pascal.jsf (3454B)
1 # PASCAL highlighter for JOE 2 # With support for Delphi and FPC by Michael Van Canneyt 3 4 =Idle 5 =Comment green 6 =Constant cyan 7 =Type bold 8 =Keyword bold 9 =Operator bold 10 =Function bold 11 =Bad bold red 12 13 :idle Idle 14 * idle 15 "\i" ident buffer 16 "(" maybe_comment 17 "/" maybe_linecomment 18 "{" comment recolor=-1 19 "'" string recolor=-1 20 "$" maybe_hex_number 21 "%" maybe_bin_number 22 "&" maybe_oct_number 23 "0-9" number recolor=-1 24 25 # Comments 26 27 :maybe_comment Idle 28 * idle noeat 29 "*" comment recolor=-2 30 31 :maybe_linecomment Idle 32 * idle noeat 33 "/" line_comment recolor=-2 34 35 :line_comment Comment 36 * line_comment 37 "\n" reset 38 39 :comment Comment 40 * comment 41 "*" maybe_end_comment 42 "}" idle 43 44 :maybe_end_comment Comment 45 * comment noeat 46 ")" idle 47 48 # String constant 49 50 :string Constant 51 * string 52 "\n" idle 53 "'" maybe_end_string 54 55 :maybe_end_string Constant 56 * idle recolor=-1 noeat 57 "'" string 58 59 # Numeric constant 60 61 :maybe_hex_number Idle 62 * idle noeat 63 "0-9A-Fa-f" hex_number recolor=-2 64 65 :maybe_bin_number Idle 66 * idle noeat 67 "01" bin_number recolor=-2 68 69 :maybe_oct_number Idle 70 * idle noeat 71 "0-7" oct_number recolor=-2 72 73 :bad Bad 74 * idle noeat 75 76 :hex_number Constant 77 * idle noeat 78 "0-9" hex_number 79 "a-fA-F" hex_number 80 81 :bin_number Constant 82 * idle noeat 83 "01" bin_number 84 "2-9" bad recolor=-1 85 86 :oct_number Constant 87 * idle noeat 88 "0-7" oct_number 89 "89" bad recolor=-1 90 91 :number Constant 92 * idle noeat 93 "0-9" number 94 "eE" epart 95 "." dot 96 97 :dot Constant 98 * idle noeat 99 "0-9" float 100 101 :float Constant 102 * idle noeat 103 "eE" epart 104 "0-9" float 105 106 :epart Constant 107 * idle noeat 108 "0-9+\-" enum 109 110 :enum Constant 111 * idle noeat 112 "0-9" enum 113 114 115 # Keywords 116 117 :ident Idle 118 * idle noeat istrings 119 "and" operator 120 "array" type 121 "begin" kw 122 "case" kw 123 "const" kw 124 "div" operator 125 "do" kw 126 "downto" kw 127 "else" kw 128 "end" kw 129 "file" kw 130 "for" kw 131 "function" kw 132 "goto" kw 133 "if" kw 134 "in" kw 135 "label" kw 136 "mod" operator 137 "nil" word_constant 138 "not" operator 139 "of" kw 140 "or" operator 141 "packed" kw 142 "procedure" kw 143 "program" kw 144 "record" kw 145 "repeat" kw 146 "set" kw 147 "then" kw 148 "type" kw 149 "until" kw 150 "var" kw 151 "while" kw 152 "with" kw 153 # Delphi keywords 154 "to" kw 155 "try" kw 156 "finally" kw 157 "raise" kw 158 "absolute" kw 159 "cdecl" kw 160 "stdcall" kw 161 "register" kw 162 "interface" kw 163 "library" kw 164 "constructor" kw 165 "destructor" kw 166 "dispinterface" kw 167 "inherited" kw 168 "public" kw 169 "private" kw 170 "published" kw 171 "protected" kw 172 "initialization" kw 173 "finalization" kw 174 "class" kw 175 "object" kw 176 "resourcestring" kw 177 "property" kw 178 "threadvar" kw 179 "integer" type 180 "boolean" type 181 "real" type 182 "char" type 183 "string" type 184 "text" type 185 "abs" function 186 "atan" function 187 "arctan" function 188 "concat" function 189 "cos" function 190 "eof" function 191 "eoln" function 192 "exp" function 193 "insert" function 194 "length" function 195 "ln" function 196 "log" function 197 "odd" function 198 "ord" function 199 "page" function 200 "pred" function 201 "round" function 202 "sin" function 203 "sqr" function 204 "sqrt" function 205 "succ" function 206 "trun" function 207 done 208 "\c" ident 209 210 :kw Keyword 211 * idle noeat 212 213 :type Type 214 * idle noeat 215 216 :operator Operator 217 * idle noeat 218 219 :word_constant Constant 220 * idle noeat 221 222 :function Function 223 * idle noeat