haskell.jsf (8511B)
1 # JOE syntax highlight file for Haskell 2 3 # Define colors 4 # 5 # bold inverse blink dim underline italic 6 # white cyan magenta blue yellow green red black 7 # bg_white bg_cyan bg_magenta bg_blue bg_yellow bg_green bg_red bg_black 8 9 # not too colorfull to not distract user 10 =Idle 11 =Special bold 12 =ConId bold yellow 13 =ModId 14 =VarId 15 =VarSym 16 =ReservedId bold 17 =Comment green 18 =Pragma bold green 19 =Error bg_red black 20 =FloatNumber bold cyan 21 =DecNumber bold cyan 22 =HexNumber cyan 23 =OctNumber cyan 24 =CharLit cyan 25 =StringLit cyan 26 =StringGap bg_cyan black 27 =EscapedChar bold cyan 28 29 :reset Idle 30 * reset 31 "a-z_" varid buffer recolor=-1 32 "A-Z" conormodid mark recolor=-1 33 ":" consym buffer recolor=-1 34 "!#$%&*+./<=>?@\\^|~" varsym buffer recolor=-1 35 "-" dashorvarsym mark buffer recolor=-1 36 "(),;[]`}" special recolor=-1 37 "{" specialorncomment recolor=-1 38 "0-9" integerstart mark noeat 39 "\'" charlit recolor=-1 40 "\"" strlit recolor=-1 41 42 :special Special 43 * reset noeat 44 45 :specialorncomment Special 46 * reset noeat 47 "-" ncommentstart recolor=-2 48 49 :ncommentstart Comment 50 * reset noeat call=.comment() 51 "#" pragma recolor=-3 52 53 .subr comment 54 55 :ncomment Comment 56 * ncomment 57 "-" ncommentmaybeend 58 "{" ncommentmaybenest 59 60 :ncommentmaybeend Comment 61 * ncomment noeat 62 "}" ncomment return 63 64 :ncommentmaybenest Comment 65 * ncomment noeat 66 "-" ncomment call=.comment() 67 68 .end 69 70 :pragma Pragma 71 * pragma 72 "#" pragmamaybeend1 73 "-" pragmamaybebadend 74 75 :pragmamaybeend1 Pragma 76 * pragma noeat 77 "-" pragmamaybeend2 78 79 :pragmamaybeend2 Pragma 80 * pragma noeat 81 "}" reset 82 83 :pragmamaybebadend Error 84 * pragma noeat 85 "}" errorstate recolor=-2 86 87 :errorstate Error 88 * reset 89 90 :conormodid ConId 91 * reset noeat 92 "." probablymodid recolor=-1 93 "a-zA-Z0-9'_" conormodid 94 95 # give it color varid to color the dot in case it is *not* a modid in the 96 # right color 97 :probablymodid VarSym 98 * ismodid noeat recolormark recolor=-1 99 " \t\r\n\v\f" reset 100 101 :ismodid ModId 102 * reset noeat 103 104 :varid VarId 105 * reset noeat strings 106 "case" reservedid 107 "class" reservedid 108 "data" reservedid 109 "default" reservedid 110 "deriving" reservedid 111 "do" reservedid 112 "else" reservedid 113 "if" reservedid 114 "import" reservedid 115 "infix" reservedid 116 "infixl" reservedid 117 "infixr" reservedid 118 "instance" reservedid 119 "let" reservedid 120 "module" reservedid 121 "newtype" reservedid 122 "of" reservedid 123 "then" reservedid 124 "type" reservedid 125 "where" reservedid 126 "_" reservedid 127 done 128 "a-zA-Z0-9_'" varid 129 130 :reservedid ReservedId 131 * reset noeat 132 133 134 :consym ConId 135 * reset noeat strings 136 ":" reservedid 137 "::" reservedid 138 done 139 "-!#$%&*+./<=>?@\\^|~:" consym 140 141 :varsym VarSym 142 * reset noeat strings 143 ".." reservedid 144 "=" reservedid 145 "\\" reservedid 146 "|" reservedid 147 "<-" reservedid 148 "->" reservedid 149 "@" reservedid 150 "~" reservedid 151 done 152 "-!#$%&*+./<=>?@\\^|~:" varsym 153 154 :dashorvarsym VarSym 155 * varsym noeat 156 "-" dashdash hold 157 158 :dashdash VarSym 159 * linecomment recolormark noeat 160 "!#$%&*+./<=>?@\\^|~:" varsym 161 "-" dashdash 162 163 :linecomment Comment 164 * linecomment 165 "\n" reset 166 167 :integerstart DecNumber 168 * decnum 169 "0" intdispatch 170 171 :decnum DecNumber 172 * reset noeat 173 "." floatmaybemant 174 "e" floatexponentstart 175 "0-9" decnum 176 177 :intdispatch DecNumber 178 * decnum noeat 179 "oO" octstart 180 "xX" hexstart 181 182 # Catch "0o " which is "integer 0" "symbol o" "whitespace" 183 # and "0oo" which is "integer 0" "symbol oo" 184 :octstart OctNumber 185 * varid noeat recolor=-2 186 "0-7" octint recolor=-3 187 188 # Catch "0o08" which is "(octal) integer 0" "integer 8" 189 :octint OctNumber 190 * reset noeat 191 "0-7" octint 192 193 :hexstart HexNumber 194 * varid noeat recolor=-2 195 "0-9a-fA-F" hexint recolor=-3 196 197 :hexint HexNumber 198 * reset noeat 199 "0-9a-fA-F" hexint 200 201 # default jumps to varsym because the dot that sent us here is the first 202 # char of a symbol. 203 :floatmaybemant FloatNumber 204 * varsym noeat recolor=-2 205 "0-9" floatmantissa recolormark 206 207 :floatmantissa FloatNumber 208 * reset noeat 209 "0-9" floatmantissa 210 "eE" floatexponentstart 211 212 # after an 'e' 213 # default jump is for identifiers starting with e directly pasted to a 214 # number 215 # recolormark is needed in the case we got here from decnum 216 :floatexponentstart FloatNumber 217 * varid noeat recolor=-2 218 "+-" floatexponentstart2 219 "0-9" floatexponent recolormark 220 221 # in case of non-digit: 222 # the e is a one-char-identifier, the + or - is the start of a symbol 223 :floatexponentstart2 FloatNumber 224 * unrollfloat noeat recolor=-3 225 "0-9" floatexponent recolormark 226 227 :floatexponent FloatNumber 228 * reset noeat 229 "0-9" floatexponent 230 231 # the error is just for testing... 232 :unrollfloat VarId 233 * varsym noeat recolor=-2 234 235 :charlit CharLit 236 * charlitend 237 "\n" errorstate noeat recolor=-2 238 "\'" errorstate noeat recolor=-2 239 "\\" escape_charlit mark recolor=-1 240 241 :charlitend CharLit 242 * charliterror noeat 243 "\'" reset 244 245 :escape_charlit EscapedChar 246 * charliterror recolor=-2 247 "0-9" escdecchar 248 "o" escoctcharstart 249 "x" eschexcharstart 250 "abfnrtv\\\"\'" charlitend 251 "A-Z" escasciichar buffer 252 "^" escasciictrlchar 253 254 :escoctcharstart EscapedChar 255 * charliterror recolor=-3 noeat 256 "0-7" escoctchar 257 258 :escoctchar EscapedChar 259 * charlitend noeat 260 "0-7" escoctchar 261 262 :escdecchar EscapedChar 263 * charlitend noeat 264 "0-9" escdecchar 265 266 :eschexcharstart EscapedChar 267 * charliterror recolor=-3 noeat 268 "0-9a-fA-F" eschexchar 269 270 :eschexchar EscapedChar 271 * charlitend noeat 272 "0-9a-fA-F" eschexchar 273 274 :escascnotfoundchar EscapedChar 275 * charliterror recolormark noeat 276 "A-Z" escasciichar 277 278 :escasciichar EscapedChar 279 * charliterror recolormark 280 "A-Z'" escascnotfoundchar noeat strings 281 "NUL" asciidonechar 282 "STX" asciidonechar 283 "ETX" asciidonechar 284 "EOT" asciidonechar 285 "ENQ" asciidonechar 286 "ACK" asciidonechar 287 "BEL" asciidonechar 288 "BS" asciidonechar 289 "HT" asciidonechar 290 "LF" asciidonechar 291 "VT" asciidonechar 292 "FF" asciidonechar 293 "CR" asciidonechar 294 "SO" asciiSOchar 295 "SI" asciidonechar 296 "DLE" asciidonechar 297 "DC1" asciidonechar 298 "DC2" asciidonechar 299 "DC3" asciidonechar 300 "DC4" asciidonechar 301 "NAK" asciidonechar 302 "SYN" asciidonechar 303 "ETB" asciidonechar 304 "CAN" asciidonechar 305 "EM" asciidonechar 306 "SUB" asciidonechar 307 "ESC" asciidonechar 308 "FS" asciidonechar 309 "GS" asciidonechar 310 "RS" asciidonechar 311 "US" asciidonechar 312 "SP" asciidonechar 313 "DEL" asciidonechar 314 done 315 316 :asciiSOchar EscapedChar 317 * charliterror recolormark 318 "'" charlitend noeat 319 "H" charlitend 320 321 :escasciictrlchar EscapedChar 322 * charliterror noeat recolor=-3 323 "A-Z@[\\]^_" charlitend 324 325 :asciidonechar EscapedChar 326 * charlitend noeat 327 328 :charliterror Error 329 * charliterror 330 "\'" charlitend noeat 331 332 # now for string literals 333 334 :strlit StringLit 335 * strlit 336 "\"" reset 337 "\n" errorstate noeat recolor=-2 338 "\\" escape_strlit mark recolor=-1 339 340 :escape_strlit EscapedChar 341 * strliterror recolor=-2 342 "0-9" escdecstr 343 "o" escoctstrstart 344 "x" eschexstrstart 345 "abfnrtv\\\"\'&" strlit 346 "A-Z" escasciistr buffer 347 "^" escasciictrlstr 348 " \t\n\r\v" stringgap recolor=-2 349 350 :escoctstrstart EscapedChar 351 * strliterror recolor=-3 noeat 352 "0-7" escoctstr 353 354 :escoctstr EscapedChar 355 * strlit noeat 356 "0-7" escoctstr 357 358 :escdecstr EscapedChar 359 * strlit noeat 360 "0-9" escdecstr 361 362 :eschexstrstart EscapedChar 363 * strliterror recolor=-3 noeat 364 "0-9a-fA-F" eschexstr 365 366 :eschexstr EscapedChar 367 * strlit noeat 368 "0-9a-fA-F" eschexstr 369 370 :escascnotfoundstr EscapedChar 371 * strliterror recolormark noeat 372 "A-Z" escasciistr 373 374 :escasciistr EscapedChar 375 * strliterror noeat recolormark 376 "A-Z\"" escascnotfoundstr noeat strings 377 "NUL" asciidonestr 378 "STX" asciidonestr 379 "ETX" asciidonestr 380 "EOT" asciidonestr 381 "ENQ" asciidonestr 382 "ACK" asciidonestr 383 "BEL" asciidonestr 384 "BS" asciidonestr 385 "HT" asciidonestr 386 "LF" asciidonestr 387 "VT" asciidonestr 388 "FF" asciidonestr 389 "CR" asciidonestr 390 "SO" asciiSOstr 391 "SI" asciidonestr 392 "DLE" asciidonestr 393 "DC1" asciidonestr 394 "DC2" asciidonestr 395 "DC3" asciidonestr 396 "DC4" asciidonestr 397 "NAK" asciidonestr 398 "SYN" asciidonestr 399 "ETB" asciidonestr 400 "CAN" asciidonestr 401 "EM" asciidonestr 402 "SUB" asciidonestr 403 "ESC" asciidonestr 404 "FS" asciidonestr 405 "GS" asciidonestr 406 "RS" asciidonestr 407 "US" asciidonestr 408 "SP" asciidonestr 409 "DEL" asciidonestr 410 done 411 412 :asciiSOstr EscapedChar 413 * strlit noeat 414 "H" strlit 415 416 :escasciictrlstr EscapedChar 417 * strliterror noeat recolor=-3 418 "A-Z@[\\]^_" strlit 419 420 :asciidonestr EscapedChar 421 * strlit noeat 422 423 :stringgap StringGap 424 * strgaperror recolor=-1 425 "\\" strlit 426 " \n\r\t\v" stringgap 427 428 :strgaperror Error 429 * strgaperror 430 "\\" strlit 431 "\"" reset 432 433 :strliterror Error 434 * strlit noeat 435