////////////////////////////////////////////////////////////////////////////// // // ANS FORTH highlighter written by Andreas Kochenburger // ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // language name Language: FORTH ////////////////////////////////////////////////////////////////////////////// // put whatever you want here, short description, author name, email address.. Description: ANS FORTH syntax highlighter ////////////////////////////////////////////////////////////////////////////// // default file filter // note: if more than one extension is associated, eg: // C/C++ files (*.c,*.cpp,*.h,*.hpp)|*.c;*.cpp;*.h;*.hpp Filter: FORTH files (*.mf)|*.f;*.fs ////////////////////////////////////////////////////////////////////////////// // help file which will be invoked when F1 is pressed HelpFile: ////////////////////////////////////////////////////////////////////////////// // language case sensitivity // 0 - no // 1 - yes CaseSensitive: 0 ////////////////////////////////////////////////////////////////////////////// // comment type: LineComment - comment to the EOL // BlockCommentBeg - block comment begin, it could be // multiline // BlockCommentEnd - block comment end // // if there is more than one definition of line/beg/end comment string, // you can separate it with spaces. // for example, for pascal it would be: // LineComment: // // BlockCommentBeg: (* { // BlockCommentEnd: *) } LineComment: \ BlockCommentBeg: ( BlockCommentEnd: ) ////////////////////////////////////////////////////////////////////////////// // identifier characters // note: characters shouldn't be delimited, except arrays // array of chars could be defined as from_char..to_char IdentifierBegChars: a..z A..Z 0..9 !"#$%&'()*+,-./:;<=>?@ [\]^_`{|}~ IdentifierChars: a..z A..Z 0..9 !"#$%&'()*+,-./:;<=>?@ [\]^_`{|}~ ////////////////////////////////////////////////////////////////////////////// // numeric constants begin characters // note: characters shouldn't be delimited, except arrays // array of chars could be defined as from_char..to_char // number always starts with 0..9 except when NumConstBeg // defines other NumConstBegChars: 0..9 ////////////////////////////////////////////////////////////////////////////// // numeric constants characters // note: characters shouldn't be delimited, except arrays // array of chars could be defined as from_char..to_char // number always starts with 0..9 except when NumConstBeg // defines other NumConstChars: 0..9 abcdefABCDEF ////////////////////////////////////////////////////////////////////////////// // escape character EscapeChar: ////////////////////////////////////////////////////////////////////////////// // keyword table // note: delimited with spaces, lines could be wrapped // you may divide keywords into five groups which can be // highlighted differently // op codes KeyWords1: ! # #> #s #tib ' (local) * */ */mod + +! , - -trailing . ." .( .r .s / /mod /string 0< 0<> 0= 0> 1+ 1- 2! 2/ 2>r 2@ 2drop 2dup 2literal 2over 2r> 2r@ 2rot 2swap < <# <> = > >body >float >in >number >r ? ?dup @ abs accept align aligned allocate allot also and at-xy base bin bl blank blk block buffer bye c! c, c@ cell+ cells char chars close-file cmove cmove> compare compile, convert count cr create-file cs-pick cs-roll d+ d- d. d.r d0< d0= d2* d2/ d< d= d>f d>s dabs decimal definitions delete-file depth df! df@ dfalign dfaligned dfloat+ dfloats dmax dmin dnegate drop du< dump dup editor ekey ekey>char ekey? emit emit? empty-buffers environment? erase evaluate execute expect f! f* f** f+ f- f. f/ f0< f0= f< f>d f@ fabs facos facosh falign faligned falog false fasin fasinh fatan fatan2 fatanh fcos fcosh fdepth fdrop fdup fe. fexp fexpm1 file-position file-size file-status fill find fliteral fln flnp1 float+ floats flog floor flush flush-file fm/mod fmax fmin fnegate forget forth forth-wordlist fover free frot frounf fs. fsin fsincos fsinh fsqrt fswap ftan ftanh f~ get-current get-order here hex hold immediate include-file included incert key key? list literal load locals| lshift m* m*/ m+ marker max min mod move ms negate nip only open-file or order over pad page parse pick postpone precision previous query quit r/o r/w r> r@ read-file read-line refill rename-file reposition-file represent resize resize-file restore-input roll rot rshift s>d save-buffers save-input scr search search-wordlist see set-current set-order set-precision sf! sf@ sfalign sfaligned sfloat+ sfloats sign sliteral sm/rem source source-id space spaces span state swap thru tib time&date to true tuck type u. u.r u< u> um* um/mod unused update w/o within word wordlist words write-file write-line xor ['] [char] [compile] KeyWords2: if else then begin again while repeat until ahead recurse do ?do loop +loop leave unloop i j k case of endof endcase endif KeyWords3: [ ] [if] [else] [then] begin-private end-private make-private KeyWords4: abort abort" catch throw break KeyWords5: :noname ; exit create does> assembler code ;code constant value variable 2constant 2variable fconstanr fvalue fvariable sytem-variable user-variable ////////////////////////////////////////////////////////////////////////////// // string delimiter: StringBegChar - string begin char // StringEndChar - string end char // MultilineStrings - enables multiline strings, as perl // has it StringBegChar: " StringEndChar: " MultilineStrings: 0 ////////////////////////////////////////////////////////////////////////////// // use preprocessor: 0 - no // 1 - yes // note: if yes, '#' and statements after it will be // highlighted with Preprocessor defined colors UsePreprocessor: 0 ////////////////////////////////////////////////////////////////////////////// // highlight line: 0 - no // 1 - yes // note: if yes, current line will be highlighted CurrLineHighlighted: 1 ////////////////////////////////////////////////////////////////////////////// // colors // note: first value is foreground, second is background color // and third (optional) represents font attribute: // B - bold // I - italic // U - underline // S - strike out // attributes can be combined: eg. B or BI // as value, it could be used any standard windows color: // clBlack, clMaroon, clGreen, clOlive, clNavy, // clPurple, clTeal, clGray, clSilver, clRed, clLime, // clYellow, clBlue, clFuchsia, clAqua, clLtGray, // clDkGray, clWhite, clScrollBar, clBackground, // clActiveCaption, clInactiveCaption, clMenu, clWindow, // clWindowFrame, clMenuText, clWindowText, clCaptionText, // clActiveBorder, clInactiveBorder, clAppWorkSpace, // clHighlight, clHighlightText, clBtnFace, clBtnShadow, // clGrayText, clBtnText, clInactiveCaptionText, // clBtnHighlight, cl3DDkShadow, cl3DLight, clInfoText, // clInfoBk // as value, it could be used hex numeric constant too: // $BBGGRR - BB: blue, GG: green, RR: red, eg: $FF6A00 SpaceCol: clWindowText clWindow Keyword1Col: clNavy clWindow Keyword2Col: clPurple clWindow Keyword3Col: clBlue clWindow Keyword4Col: clOlive clWindow Keyword5Col: clRed clWindow IdentifierCol: clWindowText clWindow CommentCol: clGray clWindow NumberCol: clRed clWindow StringCol: clMaroon clWindow SymbolCol: clGray clWindow PreprocessorCol: clBlue clWindow SelectionCol: clWhite clNavy CurrentLineCol: clBlack clYellow