groovy.jsf (7400B)
1 # JOE syntax highlight file for Groovy 2 3 =Idle 4 =Comment green 5 =Shebang yellow 6 =Constant cyan 7 =Escape bold cyan 8 =Operator bold 9 =Keyword bold 10 =Bad bold red 11 =Var yellow 12 =Brace magenta 13 14 =ProcArg #yellow 15 =ClassMember yellow #fg_310 # brown 16 =GlobalVar #yellow 17 =ClassDecl bold blue 18 19 :pre_idle Idle 20 * NULL noeat call=.groovy() 21 22 .subr groovy 23 24 # #! allowed on first line 25 26 :reset Idle 27 * idle noeat 28 "#" maybe_shebang 29 30 :maybe_shebang Idle 31 * idle noeat 32 "!" shebang recolor=-2 33 34 :shebang Shebang 35 * shebang 36 "\n" idle 37 38 :idle Idle 39 * idle 40 "{}" brace recolor=-1 41 "0" first_digit recolor=-1 42 "1-9" decimal recolor=-1 43 "." ident_no_kw 44 "\"" double_quote recolor=-1 45 "'" single_quote recolor=-1 46 "/" maybe_regex recolor=-1 47 "$" not_string buffer 48 "\i" ident buffer 49 50 # / / regex not allowed after terms 51 52 :after_term Idle 53 * idle noeat 54 " \t)" after_term 55 "/" slash_after_term 56 57 :slash_after_term Idle 58 * idle noeat 59 "/" line_comment recolor=-2 60 "*" comment recolor=-2 61 62 :maybe_regex Constant 63 * regex noeat 64 "*" comment recolor=-2 65 "/" line_comment recolor=-2 66 67 :regex Constant 68 * regex 69 "\\" regex_quote recolor=-1 70 "/" after_term 71 "$" maybe_regex_subst recolor=-1 72 73 :maybe_regex_subst Constant 74 * regex noeat 75 "\i" regex_subst1 recolor=-2 76 "{" regex_subst recolor=-2 77 78 :regex_subst Escape 79 * regex_subst 80 "}" regex 81 82 :regex_subst1 Escape 83 * regex noeat 84 ".\c" regex_subst1 85 86 :regex_quote Escape 87 * regex 88 89 :not_string Idle 90 * idle noeat 91 "\c" global_var recolor=-2 92 "/" dstring recolor=-2 93 94 :brace Brace 95 * idle noeat 96 97 :comment Comment 98 * comment 99 "*" maybe_end_comment 100 101 :maybe_end_comment Comment 102 * comment 103 "/" idle 104 "*" maybe_end_comment 105 106 :line_comment Comment 107 * line_comment 108 "\n" idle 109 110 :end_of_file_comment Comment 111 * end_of_file_comment 112 113 :first_digit Constant 114 * after_term noeat 115 "x" hex 116 "b" binary 117 "." float 118 "eE" epart 119 "0-7" octal 120 "89" bad_number recolor=-1 121 "gGlLiIdDfF" after_term 122 123 :bad_number Bad 124 * after_term noeat 125 "0-9" bad_number 126 127 :octal Constant 128 * after_term noeat 129 "0-7_" octal 130 "89" bad_number recolor=-1 131 132 :binary Constant 133 * after_term noeat 134 "01_" binary 135 "2-9" bad_number recolor=-1 136 137 :hex Constant 138 * after_term noeat 139 "0-9A-Fa-f_" hex 140 141 :decimal Constant 142 * after_term noeat 143 "0-9_" decimal 144 "eE" epart 145 "." float 146 "gGlLiIdDfF" after_term 147 148 :float Constant 149 * after_term noeat 150 "eE" epart 151 "0-9_" float 152 "gGlLiIdDfF" after_term 153 154 :epart Constant 155 * after_term noeat 156 "0-9+\-" enum 157 158 :enum Constant 159 * after_term noeat 160 "0-9_" enum 161 "gGlLiIdDfF" after_term 162 163 # Distinguish between " and """ 164 165 :double_quote Constant 166 * string noeat 167 "\"" double_quote_1 168 169 :double_quote_1 Constant 170 * after_term noeat 171 "\"" tstring 172 173 # strings like "hello" 174 # interpolation allowed 175 # line crossing not allowed 176 177 :string Constant 178 * string 179 "\"" after_term 180 "\n" after_term 181 "\\" string_escape recolor=-1 182 "$" maybe_string_subst recolor=-1 183 184 :maybe_string_subst Constant 185 * string noeat 186 "\i" string_subst1 recolor=-2 187 "{" string_subst recolor=-2 188 189 :string_subst Escape 190 * string_subst 191 "}" string 192 193 :string_subst1 Escape 194 * string noeat 195 ".\c" string_subst1 196 197 :string_escape Escape 198 * string 199 "x" string_hex2 200 "u" string_hex4 201 "0-7" string_octal2 202 "\n" string recolor=-2 203 204 :string_hex4 Escape 205 * string noeat 206 "0-9a-fA-F" string_hex3 207 208 :string_hex3 Escape 209 * string noeat 210 "0-9a-fA-F" string_hex2 211 212 :string_hex2 Escape 213 * string noeat 214 "0-9a-fA-F" string_hex1 215 216 :string_hex1 Escape 217 * string noeat 218 "0-9a-fA-F" string 219 220 :string_octal2 Escape 221 * string noeat 222 "0-7" string_octal1 223 224 :string_octal1 Escape 225 * string noeat 226 "0-7" string 227 228 # tstrings like "hello" 229 # interpolation allowed 230 # line crossing not allowed 231 232 :tstring Constant 233 * tstring 234 "\"" tstring_maybe_done 235 "\\" tstring_escape recolor=-1 236 "$" maybe_tstring_subst recolor=-1 237 238 :tstring_maybe_done Constant 239 * tstring noeat 240 "\"" tstring_maybe_done_2 241 242 :tstring_maybe_done_2 Constant 243 * tstring noeat 244 "\"" after_term 245 246 :maybe_tstring_subst Constant 247 * tstring noeat 248 "\i" tstring_subst1 recolor=-2 249 "{" tstring_subst recolor=-2 250 251 :tstring_subst Escape 252 * tstring_subst 253 "}" tstring 254 255 :tstring_subst1 Escape 256 * tstring noeat 257 ".\c" tstring_subst1 258 259 :tstring_escape Escape 260 * tstring 261 "x" tstring_hex2 262 "u" tstring_hex4 263 "0-7" tstring_octal2 264 "\n" tstring recolor=-2 265 266 :tstring_hex4 Escape 267 * tstring noeat 268 "0-9a-fA-F" tstring_hex3 269 270 :tstring_hex3 Escape 271 * tstring noeat 272 "0-9a-fA-F" tstring_hex2 273 274 :tstring_hex2 Escape 275 * tstring noeat 276 "0-9a-fA-F" tstring_hex1 277 278 :tstring_hex1 Escape 279 * tstring noeat 280 "0-9a-fA-F" tstring 281 282 :tstring_octal2 Escape 283 * tstring noeat 284 "0-7" tstring_octal1 285 286 :tstring_octal1 Escape 287 * tstring noeat 288 "0-7" tstring 289 290 # strings like: $/sdfsdf/$ 291 # interpolation allowed 292 293 :dstring Constant 294 * dstring 295 "$" dstring_esc recolor=-1 296 "/" dstring_maybe_done 297 298 :dstring_maybe_done Constant 299 * dstring noeat 300 "$" after_term 301 302 :dstring_esc Escape 303 * dstring 304 "/" dstring_esc_slash 305 306 :dstring_esc_slash Escape 307 * dstring noeat recolor=-1 308 "$" dstring 309 310 :single_quote Constant 311 * char noeat 312 "\'" single_quote_1 313 314 :single_quote_1 Constant 315 * after_term noeat 316 "\'" tchar 317 318 # strings like 'hello' 319 # no interpolation 320 # no line crossing 321 322 :char Constant 323 * char 324 "\n" after_term 325 "\'" after_term 326 "\\" char_escape recolor=-1 327 328 :char_escape Escape 329 * char 330 "x" char_hex2 331 "u" char_hex4 332 "0-7" char_octal2 333 "\n" char recolor=-2 334 335 :char_hex4 Escape 336 * char noeat 337 "0-9a-fA-F" char_hex3 338 339 :char_hex3 Escape 340 * char noeat 341 "0-9a-fA-F" char_hex2 342 343 :char_hex2 Escape 344 * char noeat 345 "0-9a-fA-F" char_hex1 346 347 :char_hex1 Escape 348 * char noeat 349 "0-9a-fA-F" char 350 351 :char_octal2 Escape 352 * char noeat 353 "0-7" char_octal1 354 355 :char_octal1 Escape 356 * char noeat 357 "0-7" char 358 359 # strings like 'hello' 360 # no interpolation 361 # no line crossing 362 363 :tchar Constant 364 * tchar 365 "\'" after_term 366 "\\" tchar_escape recolor=-1 367 368 :tchar_maybe_done Constant 369 * tchar noeat 370 "\'" tchar_maybe_done_2 371 372 :tchar_maybe_done_2 Constant 373 * tchar noeat 374 "\'" after_term 375 376 :tchar_escape Escape 377 * tchar 378 "x" tchar_hex2 379 "u" tchar_hex4 380 "0-7" tchar_octal2 381 "\n" tchar recolor=-2 382 383 :tchar_hex4 Escape 384 * tchar noeat 385 "0-9a-fA-F" tchar_hex3 386 387 :tchar_hex3 Escape 388 * tchar noeat 389 "0-9a-fA-F" tchar_hex2 390 391 :tchar_hex2 Escape 392 * tchar noeat 393 "0-9a-fA-F" tchar_hex1 394 395 :tchar_hex1 Escape 396 * tchar noeat 397 "0-9a-fA-F" tchar 398 399 :tchar_octal2 Escape 400 * tchar noeat 401 "0-7" tchar_octal1 402 403 :tchar_octal1 Escape 404 * tchar noeat 405 "0-7" tchar 406 407 :ident_no_kw Idle 408 * after_term noeat 409 "0" first_digit recolor=-1 410 "1-9" decimal recolor=-1 411 "\i" ident_no_kw1 412 413 :ident_no_kw1 Idle 414 * after_term noeat 415 "\c" ident_no_kw1 416 417 :ident Idle 418 * after_term noeat strings 419 "as" operator 420 "assert" kw 421 "break" kw 422 "case" kw 423 "catch" kw 424 "class" kw 425 "const" kw 426 "continue" kw 427 "def" kw 428 "default" kw 429 "do" kw 430 "else" kw 431 "enum" kw 432 "extends" kw 433 "finally" kw 434 "for" kw 435 "goto" kw 436 "if" kw 437 "implements" kw 438 "import" kw 439 "in" operator 440 "instanceof" kw 441 "interface" kw 442 "new" operator 443 "package" kw 444 "return" kw 445 "super" kw 446 "switch" kw 447 "throw" kw 448 "throws" kw 449 "trait" kw 450 "try" kw 451 "while" kw 452 "true" lit 453 "false" lit 454 "null" lit 455 done 456 "\c" ident 457 458 :kw Keyword 459 * idle noeat 460 461 :lit Constant 462 * idle noeat 463 464 :operator Operator 465 * idle noeat 466 467 :global_var GlobalVar 468 * idle noeat 469 "\c" global_var 470 471 .end