ocaml.jsf (6528B)
1 # JOE syntax highlight file for OCaml 2 3 =Idle 4 =Bad 5 =Comment 6 =Constant 7 =Number +Constant 8 =String +Constant 9 =StringEscape +Escape 10 =Character +String 11 =CharacterEscape +StringEscape 12 =Boolean +Constant 13 =Keyword 14 =Type 15 =Operator +Keyword 16 =Control 17 =Brace 18 =LowId +Ident 19 =CapId +DefinedIdent 20 =Builtin +DefinedFunction +DefinedIdent 21 =Structure +Keyword 22 =StorageClass +Type +Keyword 23 =Statement +Keyword 24 =Loop +Statement 25 =Conditional +Statement 26 27 # Bugs: 28 # = in some contexts is a control, not an operator (let, etc) 29 # "type" keyword introduces a type = type 30 31 :expr Idle 32 * expr 33 "#.,)];" control recolor=-1 34 "!?" prefixop recolor=-1 35 "=<>@^&+*/$%" infixop recolor=-1 36 "\-" minus recolor=-1 37 "~" tilde recolor=-1 38 "[" brace recolor=-1 39 "|" pipe recolor=-1 40 ":" colon recolor=-1 41 "(" bracket recolor=-1 42 "0" zero recolor=-1 43 "1-9" decimal recolor=-1 44 "\"" string recolor=-1 45 "\'" char recolor=-1 46 "a-z_" lowid buffer recolor=-1 47 "A-Z`" capid buffer recolor=-1 48 49 :bad Bad 50 * expr 51 52 :control Control 53 * expr noeat 54 55 :prefixop Operator 56 * operator noeat 57 58 :infixop Operator 59 * operator noeat 60 61 :operator Operator 62 * expr noeat 63 "!?~=<>@^|&+*/$%.:\-" operator 64 65 :minus Operator 66 * operator noeat 67 "0" zero recolor=-2 68 "1-9" decimal recolor=-2 69 70 :tilde Operator 71 * prefixop noeat 72 "a-z" opparam noeat 73 74 :opparam LowId 75 * expr noeat 76 "a-zA-Z0-9_'" opparam 77 ":" control 78 79 :brace Control 80 * expr noeat 81 "|" expr 82 83 :pipe Operator 84 * infixop noeat 85 "]" pipeclose recolor=-2 86 87 :pipeclose Control 88 * expr noeat 89 90 :colon Operator 91 * type1 noeat 92 "=" assign recolor=-2 93 94 :assign Operator 95 * expr noeat 96 97 :bracket Control 98 * expr noeat 99 "*" comment recolor=-2 100 101 :zero Number 102 * expr noeat 103 "0-9_" decimal 104 "b" binaryl buffer 105 "B" binaryh buffer 106 "o" octall buffer 107 "O" octalh buffer 108 "x" hexl buffer 109 "X" hexh buffer 110 "e" epartl buffer 111 "E" eparth buffer 112 "." float 113 114 :decimal Number 115 * expr noeat 116 "0-9_" decimal 117 "." float 118 "e" epartl buffer 119 "E" eparth buffer 120 121 :binaryl Number 122 * lowid noeat recolor=-2 123 "01" binary 124 :binaryh Number 125 * capid noeat recolor=-2 126 "01" binary 127 :binary Number 128 * expr noeat 129 "01_" binary 130 131 :octall Number 132 * lowid noeat recolor=-2 133 "0-7" octal 134 :octalh Number 135 * capid noeat recolor=-2 136 "0-7" octal 137 :octal Number 138 * expr noeat 139 "0-7_" octal 140 141 :hexl Number 142 * lowid noeat recolor=-2 143 "0-9a-fA-F" hex 144 :hexh Number 145 * capid noeat recolor=-2 146 "0-9a-fA-F" hex 147 :hex Number 148 * expr noeat 149 "0-9a-fA-F_" hex 150 151 :float Number 152 * expr noeat 153 "0-9_" float 154 "e" epartl buffer 155 "E" eparth buffer 156 157 :epartl Number 158 * lowid noeat recolor=-2 159 "0-9" enum 160 "+\-" enum1 161 :eparth Number 162 * capid noeat recolor=-2 163 "0-9" enum 164 "+\-" enum1 165 166 :enum1 Number 167 * bad noeat 168 "0-9_" enum 169 :enum Number 170 * expr noeat 171 "0-9_" enum 172 173 :string String string 174 * string 175 "\"" expr 176 "\\" string_escape recolor=-1 177 "%" string_control recolor=-1 178 179 :string_escape StringEscape string 180 * string 181 "x" string_hex1 182 "0-7" string_octal2 183 184 :string_hex1 StringEscape string 185 * string noeat 186 "0-9a-fA-F" string_hex2 187 188 :string_hex2 StringEscape string 189 * string noeat 190 "0-9a-fA-F" string 191 192 :string_octal2 StringEscape string 193 * string noeat 194 "0-7" string_octal3 195 196 :string_octal3 StringEscape string 197 * string noeat 198 "0-7" string 199 200 :string_control StringEscape string 201 * string_control 202 "\"" string noeat 203 "diouxXeEfFgGaAcspn%SC" string 204 205 :char Character string 206 * charend 207 "\\" char_escape recolor=-1 208 209 :charend Character string 210 * bad noeat 211 "\'" expr 212 213 :char_escape CharacterEscape string 214 * charend 215 "x" char_hex1 216 "0-7" char_octal2 217 218 :char_hex1 CharacterEscape string 219 * bad noeat 220 "0-9a-fA-F" char_hex2 221 222 :char_hex2 CharacterEscape string 223 * charend noeat 224 "0-9a-fA-F" charend 225 226 :char_octal2 CharacterEscape string 227 * charend noeat 228 "0-7" char_octal3 229 230 :char_octal3 CharacterEscape string 231 * charend noeat 232 "0-7" charend 233 234 :lowid LowId 235 * expr noeat strings 236 "_" kw 237 "and" kw 238 "as" kw 239 "assert" kw 240 "begin" kw 241 "class" kw 242 "constraint" kw 243 "do" kw 244 "done" kw 245 "downto" kw 246 "else" kw 247 "end" kw 248 "exception" kw 249 "external" kw 250 "false" bool 251 "for" loop 252 "fun" kw 253 "function" struct 254 "functor" struct 255 "if" cond 256 "in" kw 257 "include" kw 258 "inherit" kw 259 "initializer" kw 260 "lazy" storage 261 "let" kw 262 "match" kw 263 "method" struct 264 "module" struct 265 "mutable" storage 266 "object" kw 267 "of" kw 268 "open" kw 269 "private" storage 270 "raise" kw # technically not, but ... 271 "rec" kw 272 "sig" kw 273 "struct" kw 274 "then" cond 275 "to" kw 276 "true" bool 277 "try" kw 278 "type" kw 279 "val" kw 280 "virtual" storage 281 "when" loop 282 "while" loop 283 "with" kw 284 "asr" operatorkw 285 "land" operatorkw 286 "lor" operatorkw 287 "lsl" operatorkw 288 "lsr" operatorkw 289 "lxor" operatorkw 290 "mod" operatorkw 291 "new" operatorkw 292 "or" operatorkw 293 done 294 "a-zA-Z0-9_'" lowid 295 296 :kw Keyword 297 * expr noeat 298 299 :operatorkw Operator 300 * expr noeat 301 302 :bool Boolean 303 * expr noeat 304 305 :loop Loop 306 * expr noeat 307 308 :struct Structure 309 * expr noeat 310 311 :storage StorageClass 312 * expr noeat 313 314 :cond Conditional 315 * expr noeat 316 317 :capid CapId 318 * expr noeat strings 319 "Arg" stdlib 320 "Array" stdlib 321 "ArrayLabels" stdlib 322 "Buffer" stdlib 323 "Callback" stdlib 324 "Char" stdlib 325 "Complex" stdlib 326 "Digest" stdlib 327 "Filename" stdlib 328 "Format" stdlib 329 "Gc" stdlib 330 "Genlex" stdlib 331 "Hashtbl" stdlib 332 "Int32" stdlib 333 "Int64" stdlib 334 "Lazy" stdlib 335 "Lexing" stdlib 336 "List" stdlib 337 "ListLabels" stdlib 338 "Map" stdlib 339 "Marshal" stdlib 340 "MoreLabels" stdlib 341 "Nativeint" stdlib 342 "Oo" stdlib 343 "Parsing" stdlib 344 "Printexc" stdlib 345 "Printf" stdlib 346 "Queue" stdlib 347 "Random" stdlib 348 "Scanf" stdlib 349 "Set" stdlib 350 "Sort" stdlib 351 "Stack" stdlib 352 "StdLabels" stdlib 353 "Stream" stdlib 354 "String" stdlib 355 "StringLabels" stdlib 356 "Sys" stdlib 357 "Weak" stdlib 358 done 359 "a-zA-Z0-9_'" capid 360 361 :stdlib Builtin 362 * expr noeat 363 364 :type1 Type 365 * expr noeat 366 "a-z *>'\t\-" type1 367 "(" type2 368 369 :type2 Type 370 * expr noeat 371 "a-z *>'\t\-" type2 372 "(" type3 373 ")" type1 374 375 :type3 Type 376 * expr noeat 377 "a-z *>'\t\-" type3 378 "(" type4 379 ")" type2 380 381 :type4 Type 382 * expr noeat 383 "a-z *>'\t\-" type4 384 "(" expr # too deep nesting 385 ")" type2 386 387 :comment Comment comment 388 * expr call=.comment() 389 390 .subr comment 391 392 :comment_body Comment comment 393 * comment_body 394 "(" nest_comment 395 "*" end_comment 396 "BFHNTX" comment_body noeat call=comment_todo.comment_todo() 397 398 :end_comment Comment comment 399 * comment_body noeat 400 ")" end_comment return 401 402 :nest_comment Comment comment 403 * comment_body 404 "*" comment_body call=.comment() 405 406 .end