erlang.jsf (8457B)
1 # JOE syntax highlight file for Erlang 2 # by Christian Nicolai (http://mycrobase.de) 3 # with contributions from Jonas Rosling and Andrew Lisin 4 5 # TODO Handle type information :: 6 # TODO implement subroutines for cleaner and more correct implementation. 7 # TODO Probably use less colors to be less distractive. 8 9 10 =Idle 11 =Comment green 12 =String cyan #fg_110 13 =String_mod cyan bold #fg_200 bold 14 =String_esc cyan bold #fg_000 bold 15 =Int cyan #fg_033 16 =Record blue #fg_530 17 =Recatt 18 =Fun 19 =Module #fg_101 20 =Keyword bold 21 =Guard #fg_200 22 =Bif #fg_501 23 =Type bold #fg_141 24 =Brace magenta #fg_440 25 =Brack magenta #fg_311 26 =Macro #fg_330 27 =Variable yellow #fg_310 28 =Attribute red #fg_505 29 =Char cyan #fg_330 bold 30 31 :idle Idle 32 * idle 33 "A-Z_" variable noeat 34 "%" line_comment noeat 35 "\"" string recolor=-1 36 "'" quoted_atom mark 37 "0-9" decimal recolor=-1 38 "[]" brack recolor=-1 39 "{}" brace recolor=-1 40 "-" maybe_attribute buffer 41 "a-z" atom buffer mark noeat 42 "#" record recolor=-1 43 "$" char recolor=-1 44 "?" is_macro mark 45 "<|" lc buffer 46 47 :lc Idle 48 * idle noeat strings 49 "<-" kw 50 "||" kw 51 done 52 "-<|" lc 53 54 :pipe Idle 55 * idle noeat 56 "|" kw recolormark 57 58 :is_macro Idle 59 * macro recolormark noeat 60 "a-zA-Z0-9_@" is_macro 61 62 :macro Macro 63 * idle noeat 64 65 :char Char 66 * idle 67 "\\" charesc 68 69 :charesc Char 70 * idle 71 72 :line_comment Comment 73 * line_comment 74 "@" is_edoc noeat buffer 75 "\n" idle 76 77 :is_edoc Comment 78 * line_comment noeat strings 79 "@clear" edoc 80 "@docfile" edoc 81 "@headerfle" edoc 82 "@todo" edoc 83 "@TODO" edoc 84 "@type" edoc 85 "@reference" edoc 86 "@see" edoc 87 "@since" edoc 88 "@deprecated" edoc 89 "@hidden" edoc 90 "@private" edoc 91 "@equiv" edoc 92 "@throws" edoc 93 "@author" edoc 94 "@copyright" edoc 95 "@version" edoc 96 "@title" edoc 97 "@spec" edoc 98 "@doc" edoc 99 "@end" edoc 100 done 101 "A-Za-z@" is_edoc 102 103 :edoc Keyword 104 * line_comment noeat 105 106 :variable Variable 107 * idle noeat 108 "a-zA-Z0-9_" variable 109 110 :record Record 111 * idle noeat 112 "a-z" rec noeat 113 "'" qtrec recolor=-1 114 115 :rec Record 116 * idle noeat 117 "a-zA-Z0-9_@" rec 118 "." recatt recolor=-1 119 120 :qtrec Record 121 * qtrec 122 "'" rec 123 124 :recatt Recatt 125 * idle noeat 126 "a-zA-Z_" recatt 127 "#" record 128 129 # STRINGS 130 :string String 131 * string 132 "\\" string_escape recolor=-1 133 "~" string_ mark 134 "\"" idle 135 136 :string_escape String_esc 137 * string 138 139 :string_ String 140 * string_mod noeat 141 "0-9" string_f 142 "t" string_mod 143 :string_f String 144 * string_mod noeat 145 "0-9*" string_f 146 "." string_p 147 148 :string_p String 149 * string_mod noeat 150 "0-9*" string_p 151 152 :string_mod String 153 * string 154 "cfegswpWPBX#bx+ni" string_modifier recolormark noeat 155 156 :string_modifier String_mod 157 * string 158 # END STRINGS 159 :decimal Int 160 * idle noeat 161 "0-9" decimal 162 "." float 163 "#" base 164 165 :float Int 166 * idle noeat 167 "0-9" float 168 "Ee" eintval 169 170 :base Int 171 * idle noeat 172 "0-9A-Fa-f" base 173 174 :eintval Int 175 * eint noeat 176 "-" eint 177 178 :eint Int 179 * idle noeat 180 "0-9" eint 181 182 :brace Brace 183 * idle noeat 184 185 :brack Brack 186 * idle noeat 187 188 :maybe_attribute Idle 189 * idle noeat strings 190 "-module" attribute 191 "-export" attribute 192 "-import" attribute 193 "-compile" attribute 194 "-ifdef" attribute 195 "-endif" attribute 196 "-define" attribute 197 "-file" attribute 198 "-type" attribute 199 "-opaque" attribute 200 "-export_type" attribute 201 "-spec" attribute 202 "-author" attribute 203 "-copyright" attribute 204 "-include" attribute 205 "-include_lib" attribute 206 "-vsn" attribute 207 "-behaviour" attribute 208 "-behavior" attribute 209 "-record" attribute 210 "-on_load" attribute 211 "-connect_all" attribute 212 "-hidden" attribute 213 "-name" attribute 214 "-setcookie" attribute 215 "-sname" attribute 216 "-mode" attribute 217 done 218 "a-z_" maybe_attribute 219 220 :attribute Attribute 221 * idle noeat 222 223 :no_atom Idle 224 * idle noeat 225 " " no_atom 226 "(" function recolormark noeat 227 ":" module recolormark noeat 228 "/" funarity 229 230 :module Module 231 * idle noeat 232 233 :function Fun 234 * idle noeat 235 236 :funarity Fun 237 * function recolormark noeat 238 "0-9" idle 239 240 :kw Keyword 241 * idle noeat 242 243 :guard Guard 244 * idle noeat 245 246 :rterr Guard 247 * idle noeat 248 249 :bif Bif 250 * idle recolormark noeat 251 " " bif 252 "(" idle noeat 253 254 :type Type 255 * idle recolormark noeat 256 "(" idle noeat 257 ":" module recolormark noeat 258 259 :quoted_atom Idle 260 * quoted_atom 261 "'" no_atom 262 263 # This implementation is sort of funky. 264 # Most of the cases it's correct but some highlighting may be wrong. 265 # Should be looked over... 266 :atom Idle 267 * no_atom noeat strings 268 "after" kw 269 "and" kw 270 "andalso" kw 271 "band" kw 272 "begin" kw 273 "bnot" kw 274 "bor" kw 275 "bsl" kw 276 "bsr" kw 277 "bxor" kw 278 "case" kw 279 "catch" kw 280 "cond" kw 281 "div" kw 282 "end" kw 283 "fun" kw 284 "if" kw 285 "let" kw 286 "not" kw 287 "of" kw 288 "or" kw 289 "orelse" kw 290 "query" kw 291 "receive" kw 292 "rem" kw 293 "try" kw 294 "when" kw 295 "xor" kw 296 "any" type 297 "none" type 298 "pid" type 299 "port" type 300 "reference" type 301 "float" type 302 "atom" type 303 "binary" type 304 "integer" type 305 "list" type 306 "improper_list" type 307 "maybe_improper_list" type 308 "tuple" type 309 "term" type 310 "boolean" type 311 "byte" type 312 "char" type 313 "non_neg_integer" type 314 "pos_integer" type 315 "neg_integer" type 316 "number" type 317 "string" type 318 "nonempty_string" type 319 "iolist" type 320 "module" type 321 "mfa" type 322 #interfears with the bif "node" type 323 "timeout" type 324 "no_return" type 325 "badarg" rterr 326 "badarith" rterr 327 "badmatch" rterr 328 "function_clause" rterr 329 "case_clause" rterr 330 "if_clause" rterr 331 "try_clause" rterr 332 "undef" rterr 333 "badfun" rterr 334 "badarity" rterr 335 "timeout_value" rterr 336 "noproc" rterr 337 "nocatch" rterr 338 "system_limit" rterr 339 "is_atom" guard 340 "is_binary" guard 341 "is_bitstream" guard 342 "is_boolean" guard 343 "is_float" guard 344 "is_function" guard 345 "is_integer" guard 346 "is_list" guard 347 "is_number" guard 348 "is_pid" guard 349 "is_port" guard 350 "is_record" guard 351 "is_reference" guard 352 "is_tuple" guard 353 "abs" bif 354 "adler32" bif 355 "adler32_combine" bif 356 "append_element" bif 357 "apply" bif 358 "atom_to_binary" bif 359 "atom_to_list" bif 360 "binary_part" bif 361 "binary_to_atom" bif 362 "binary_to_existing_atom" bif 363 "binary_to_list" bif 364 "bitstring_to_list" bif 365 "binary_to_term" bif 366 "bit_size" bif 367 "bump_reductions" bif 368 "byte_size" bif 369 "cancel_timer" bif 370 "check_old_code" bif 371 "check_process_code" bif 372 "crc32" bif 373 "crc32_combine" bif 374 "date" bif 375 "decode_packet" bif 376 "delete_module" bif 377 "demonitor" bif 378 "disconnect_node" bif 379 "display" bif 380 "element" bif 381 "erase" bif 382 "error" bif 383 "exit" bif 384 "external_size" bif 385 "float" bif 386 "float_to_list" bif 387 "fun_info" bif 388 "fun_to_list" bif 389 "function_exported" bif 390 "garbage_collect" bif 391 "get" bif 392 "get_cookie" bif 393 "get_keys" bif 394 "get_stacktrace" bif 395 "group_leader" bif 396 "halt" bif 397 "hash" bif 398 "hd" bif 399 "hibernate" bif 400 "integer_to_list" bif 401 "iolist_to_binary" bif 402 "iolist_size" bif 403 "is_alive" bif 404 "is_builtin" bif 405 "is_process_alive" bif 406 "length" bif 407 "link" bif 408 "list_to_atom" bif 409 "list_to_binary" bif 410 "list_to_bitstring" bif 411 "list_to_existing_atom" bif 412 "list_to_float" bif 413 "list_to_integer" bif 414 "list_to_pid" bif 415 "list_to_tuple" bif 416 "load_module" bif 417 "load_nif" bif 418 "loaded" bif 419 "local_time" bif 420 "local_time_to_universaltime" bif 421 "make_ref" bif 422 "make_tuple" bif 423 "max" bif 424 "md5" bif 425 "md5_final" bif 426 "md5_init" bif 427 "md5_update" bif 428 "memory" bif 429 "min" bif 430 "module_loaded" bif 431 "monitor" bif 432 "monitor_node" bif 433 "nif_error" bif 434 "node" bif 435 "nodes" bif 436 "now" bif 437 "open_port" bif 438 "phash" bif 439 "phash2" bif 440 "pid_to_list" bif 441 "port_close" bif 442 "port_command" bif 443 "port_connect" bif 444 "port_control" bif 445 "port_call" bif 446 "port_info" bif 447 "port_to_list" bif 448 "ports" bif 449 "pre_loaded" bif 450 "process_display" bif 451 "process_flag" bif 452 "process_info" bif 453 "processes" bif 454 "purge_module" bif 455 "put" bif 456 "raise" bif 457 "read_timer" bif 458 "ref_to_list" bif 459 "register" bif 460 "registered" bif 461 "resume_process" bif 462 "round" bif 463 "self" bif 464 "send" bif 465 "send_after" bif 466 "send_nosuspend" bif 467 "set_cookie" bif 468 "setelement" bif 469 "size" bif 470 "spawn" bif 471 "spawn_link" bif 472 "spawn_monitor" bif 473 "spawn_opt" bif 474 "split_binary" bif 475 "start_timer" bif 476 "statistics" bif 477 "suspended_process" bif 478 "system_flag" bif 479 "system_info" bif 480 "system_monitor" bif 481 "system_profile" bif 482 "term_to_binary" bif 483 "throw" bif 484 "time" bif 485 "tl" bif 486 "trace" bif 487 "trace_deliviered" bif 488 "trace_info" bif 489 "trace_pattern" bif 490 "trunc" bif 491 "tuple_size" bif 492 "tuple_to_list" bif 493 "universaltime" bif 494 "universaltime_to_localtime" bif 495 "unlink" bif 496 "unregister" bif 497 "whereis" bif 498 "yield" bif 499 done 500 "a-zA-Z0-9_@" atom