Crunch CRiSP File Editor 6 User Manual
Page 78

Page 78
operator= "+=" "-=" "*=" "/=" "|=" "&=" "^=" "==" "!=" "<<=" ">>="
operator= "+" "-" "*" "/" "^" "&" "|" "!" "~"
operator= "?" ":" "++" "--" "(" ")" "[" "]"
operator= ">" ">=" "<" "<=" "->" ">>" "<<="
/****************************************************************/
/* C keywords. */
/****************************************************************/
keyword="asm" "auto" "break" "case" "char" "const" "continue"
keyword="default" "do" "double" "else" "enum" "extern"
keyword="float" "for" "goto" "if" "int" "long" "register" "return"
keyword="short" "signed" "sizeof" "static" "struct" "switch"
keyword="typedef" "union" "unsigned" "void" "volatile"
keyword="while"
Case study #2: Fortran colorizer
Colorization:case study 2
The following example illustrates the Fortran colorizer provided
with CRiSP. The original file can be found in the distribution directory src/keywords/fortran.kwd. This
colorizer file demonstrates most of the features and facilities of writing a colorizer.
[fortran]
flags=case_independent c_floats
char_start="[A-Za-z_]"
char_next="[A-Za-z_0-9$]"
string="\"*.*\""
string="'*.*'"
comment=spell "!*.*$"
comment=spell "^**.*$"
comment=spell "^C*.*$"
keyword="backspace" "block"
keyword="call" "character" "close"
keyword="common" "complex" "continue"
keyword="data" "dimensin" "do"
keyword="else" "elseif" "end" "enddo" "endif" "endmap"
keyword="external" "equivalence"
keyword="format" "function"
keyword="goto"
keyword="if" "implicit" "include" "integer" "intrinsic"
keyword="logical"
keyword="map" "namelist"
keyword="open" "parameter" "precision"
keyword="print" "program"
keyword="read" "record" "real" "return" "rewind"
keyword="save" "stop" "structure" "subroutine"
keyword="then" "type"