dotfiles

My dotfiles.
Log | Files | Refs | LICENSE

d.jsf (8818B)


      1 # JOE syntax highlight file for D
      2 
      3 =Idle
      4 =Ident
      5 =Comment
      6 =Constant
      7 =String		+Constant
      8 =Number		+Constant
      9 =Boolean	+Constant
     10 =Character	+String
     11 =Escape
     12 =StringEscape	+Escape
     13 =CharacterEscape +StringEscape
     14 =Type
     15 =Keyword
     16 =Operator	+Keyword
     17 =Statement	+Keyword
     18 =Conditional	+Statement
     19 =Loop		+Statement
     20 =Label		+DefinedIdent
     21 =Bad
     22 =Brace
     23 =Control
     24 
     25 =Methods
     26 
     27 :begin Idle
     28 	*	begin	noeat call=.d()
     29 
     30 .subr d
     31 
     32 :idle Idle
     33 	*		idle
     34 	"("		idle		call=.d(paren)
     35 	"["		idle		call=.d(brack)
     36 	"{"		do_brace	recolor=-1 noeat
     37 #	"{"		brace		recolor=-1 call=.d(squiggly)
     38 .ifdef paren
     39 	")"		idle		return
     40 .else
     41 	")"		stray		recolor=-1
     42 .endif
     43 .ifdef brack
     44 	"]"		idle		return
     45 .else
     46 	"]"		stray		recolor=-1
     47 .endif
     48 .ifdef squiggly
     49 	"}"		brace		recolor=-1 return
     50 .else
     51 	"}"		stray		recolor=-1
     52 .endif
     53 	"\n"		idle
     54 	"/"		slash
     55 	"0"		first_digit	recolor=-1
     56 	"1-9"		decimal		recolor=-1
     57 	"."		maybe_float
     58 	"\""		string		recolor=-1
     59 	"'"		char		recolor=-1
     60 	"\i"		ident		mark buffer
     61 	",:;=><*&|!~+\-%^"	control	recolor=-1
     62 	"r"		maybe_rstring	mark buffer
     63 	"x"		maybe_xstring	mark buffer
     64 	"q"		maybe_qstring	recolor=-1 mark buffer
     65 	"`"		bstring		recolor=-1
     66 
     67 :do_brace Brace
     68 	*		idle		noeat
     69 	"{"		brace		call=.d(squiggly)
     70 
     71 :brace Brace
     72 	*		idle		noeat
     73 
     74 :stray Bad
     75 	*		idle		noeat
     76 
     77 :maybe_done Control
     78 	*		idle		noeat
     79 	"/"		idle		noeat return recolor=-2
     80 
     81 :control Control
     82 	*		idle		noeat
     83 
     84 :slash Idle
     85 	*		idle		noeat
     86 	"*"		comment		recolor=-2
     87 	"+"		idle		recolor=-2 call=.block_comment()
     88 	"/"		line_comment	recolor=-2
     89 
     90 :comment Comment comment
     91 	*		comment
     92 	# might be TODO label
     93 	"BFHNTX"	comment		noeat call=comment_todo.comment_todo()
     94 	"*"		maybe_end_comment
     95 
     96 :maybe_end_comment Comment comment
     97 	*		comment		noeat
     98 	"/"		idle
     99 	"*"		maybe_end_comment
    100 
    101 :line_comment Comment comment
    102 	*		line_comment
    103 	# might be TODO label
    104 	"BFHNTX"	line_comment	noeat call=comment_todo.comment_todo()
    105 	"\n"		idle
    106 
    107 :int_postfix Number
    108 	*		idle		noeat
    109 	"uU"		int_postfix_1
    110 	"L"		int_postfix_2
    111 
    112 :int_postfix_1 Number
    113 	*		idle		noeat
    114 	"L"		idle
    115 
    116 :int_postfix_2 Number
    117 	*		idle		noeat
    118 	"uU"		idle
    119 
    120 :float_postfix Number
    121 	*		idle		noeat
    122 	"fF"		float_postfix_1
    123 	"L"		float_postfix_1
    124 	"i"		idle
    125 
    126 :float_postfix_1 Number
    127 	*		idle		noeat
    128 	"i"		idle
    129 
    130 :first_digit Number
    131 	*		int_postfix	noeat
    132 	"xX"		hex
    133 	"bB"		bin
    134 	"."		float
    135 	"eE"		epart
    136 	"0-9"		decimal
    137 
    138 :bad_number Bad
    139 	*		idle		noeat
    140 	"0-9"		bad_number
    141 
    142 :octal Number
    143 	*		int_postfix	noeat
    144 	"0-7_"		octal
    145 	"89"		bad_number	recolor=-1
    146 
    147 :hex Number
    148 	*		int_postfix	noeat
    149 	"0-9A-Fa-f_"	hex
    150 	"."		hexfloat
    151 	"pP"		ppart
    152 
    153 :hexfloat Number
    154 	*		float_postfix	noeat
    155 	"0-9A-Fa-f_"	hexfloat
    156 	"pP"		ppart
    157 
    158 :ppart Number
    159 	*		float_postfix	noeat
    160 	"0-9+\-"	pnum
    161 
    162 :pnum Number
    163 	*		float_postfix	noeat
    164 	"0-9_"		pnum
    165 
    166 :decimal Number
    167 	*		int_postfix	noeat
    168 	"0-9_"		decimal
    169 	"eE"		epart
    170 	"."		float
    171 
    172 :maybe_float Number
    173 	*		idle		recolor=-2 noeat
    174 	"\i"		not_ident	recolor=-2
    175 	"0-9"		float		recolor=-2
    176 
    177 :not_ident Idle
    178 	*		idle		noeat
    179 	"\c"		not_ident
    180 
    181 :float Number
    182 	*		float_postfix	noeat
    183 	"eE"		epart
    184 	"0-9_"		float
    185 
    186 :epart Number
    187 	*		idle		noeat
    188 	"0-9+\-"	enum
    189 
    190 :enum Number
    191 	*		float_postfix	noeat
    192 	"0-9_"		enum
    193 
    194 :maybe_qstring Brace
    195 	*		ident		recolor=-1 noeat
    196 	"{"		brace		call=.d(squiggly)
    197 	"\""		qdstring	recolor=-2
    198 
    199 :qdstring String string
    200 	*		qstring		save_c
    201 	"\i"		qdelim		buffer
    202 
    203 :qdelim String string
    204 	*		qdelim_bad	noeat save_s
    205 	"\c"		qdelim
    206 	"\n"		skipline	noeat save_s
    207 
    208 :qdelim_bad Bad
    209 	*		qdelim_bad
    210 	"\n"		skipline	noeat
    211 
    212 :skipline String string
    213 	*		skipline
    214 	"\n"		next_line
    215 
    216 :todelim String string
    217 	*		todelim
    218 	"\n"		next_line
    219 	"\""		next_line	strings
    220 	"&"		founddelim
    221 done
    222 
    223 :founddelim String string
    224 	*		idle		noeat
    225 	"\""		bad_line
    226 
    227 :bad_line Bad
    228 	*		bad_line
    229 	"\n"		idle
    230 
    231 # eat \n so it's not in string.
    232 :next_line String string
    233 	*		todelim		buffer
    234 	"\n"		next_line
    235 
    236 :qstring String string
    237 	*		qstring
    238 	&		qstring_1
    239 
    240 :qstring_1 String string
    241 	*		qstring		noeat
    242 	"\""		string_postfix
    243 
    244 :maybe_xstring Idle
    245 	*		ident		noeat
    246 	"\""		xstring		recolor=-2
    247 
    248 :xstring String string
    249 	*		bad_xstring	recolor=-1
    250 	" \t\r\n\f0-9A-Fa-f"	xstring
    251 	"\""		string_postfix
    252 
    253 :bad_xstring Bad
    254 	*		xstring		noeat
    255 
    256 :maybe_rstring Idle
    257 	*		ident		noeat
    258 	"\""		rstring		recolor=-2
    259 
    260 :rstring String string
    261 	*		rstring
    262 	"\""		string_postfix
    263 
    264 :bstring String string
    265 	*		bstring
    266 	"`"		string_postfix
    267 
    268 :string	String string
    269 	*		string
    270 	"\""		string_postfix
    271 	"\\"		string_escape	recolor=-1
    272 	"%"		string_control	recolor=-1
    273 
    274 :string_postfix String string
    275 	*		idle	noeat
    276 	"cwd"		idle
    277 
    278 :string_escape StringEscape string
    279 	*		string
    280 	"U"		string_hex8
    281 	"u"		string_hex4
    282 	"x"		string_hex2
    283 	"0-7"		string_octal2
    284 	"\n"		string		recolor=-2
    285 
    286 :string_hex8 StringEscape string
    287 	*		string		noeat
    288 	"0-9a-fA-F"	string_hex7
    289 
    290 :string_hex7 StringEscape string
    291 	*		string		noeat
    292 	"0-9a-fA-F"	string_hex6
    293 
    294 :string_hex6 StringEscape string
    295 	*		string		noeat
    296 	"0-9a-fA-F"	string_hex5
    297 
    298 :string_hex5 StringEscape string
    299 	*		string		noeat
    300 	"0-9a-fA-F"	string_hex4
    301 
    302 :string_hex4 StringEscape string
    303 	*		string		noeat
    304 	"0-9a-fA-F"	string_hex3
    305 
    306 :string_hex3 StringEscape string
    307 	*		string		noeat
    308 	"0-9a-fA-F"	string_hex2
    309 
    310 :string_hex2 StringEscape string
    311 	*		string		noeat
    312 	"0-9a-fA-F"	string_hex1
    313 
    314 :string_hex1 StringEscape string
    315 	*		string		noeat
    316 	"0-9a-fA-F"	string
    317 
    318 :string_octal2 StringEscape string
    319 	*		string		noeat
    320 	"0-7"		string_octal1
    321 
    322 :string_octal1 StringEscape string
    323 	*		string		noeat
    324 	"0-7"		string
    325 
    326 :string_control StringEscape string
    327 	*		string_control
    328 	"\n"		idle
    329 	"\""		string		noeat
    330  	"diouxXeEfFgGaAcspn%SCM"	string
    331 
    332 :char Character string
    333 	*		char_done
    334 	"'"		idle
    335 	"\\"		char_escape	recolor=-1
    336 
    337 :char_done Character string
    338 	*		idle		noeat recolor=-3
    339 	"\'"		idle
    340 
    341 :char_escape CharacterEscape string
    342 	*		char_done
    343 	"U"		char_hex8
    344 	"u"		char_hex4
    345 	"x"		char_hex2
    346 	"0-7"		char_octal2
    347 
    348 :char_hex8 CharacterEscape string
    349 	*		char_done	noeat
    350 	"0-9a-fA-F"	char_hex7
    351 
    352 :char_hex7 CharacterEscape string
    353 	*		char_done	noeat
    354 	"0-9a-fA-F"	char_hex6
    355 
    356 :char_hex6 CharacterEscape string
    357 	*		char_done	noeat
    358 	"0-9a-fA-F"	char_hex5
    359 
    360 :char_hex5 CharacterEscape string
    361 	*		char_done	noeat
    362 	"0-9a-fA-F"	char_hex4
    363 
    364 :char_hex4 CharacterEscape string
    365 	*		char_done	noeat
    366 	"0-9a-fA-F"	char_hex3
    367 
    368 :char_hex3 CharacterEscape string
    369 	*		char_done	noeat
    370 	"0-9a-fA-F"	char_hex2
    371 
    372 :char_hex2 CharacterEscape string
    373 	*		char_done	noeat
    374 	"0-9a-fA-F"	char_hex1
    375 
    376 :char_hex1 CharacterEscape string
    377 	*		char_done	noeat
    378 	"0-9a-fA-F"	char_done
    379 
    380 :char_octal2 CharacterEscape string
    381 	*		char_done	noeat
    382 	"0-7"		char_octal1
    383 
    384 :char_octal1 CharacterEscape string
    385 	*		char_done	noeat
    386 	"0-7"		char_done
    387 
    388 :ident Ident
    389 	*		ident_end	noeat recolormark strings
    390 	"abstract"	kw
    391 	"alias"		kw
    392 	"align"		kw
    393 	"asm"		kw
    394 	"assert"	kw
    395 	"auto"		kw
    396 	"body"		kw
    397 	"bool"		kw
    398 	"break"		kw
    399 	"byte"		kw
    400 	"case"		kw
    401 	"cast"		kw
    402 	"catch"		kw
    403 	"cdouble"	kw
    404 	"cent"		kw
    405 	"cfloat"	kw
    406 	"char"		kw
    407 	"class"		kw
    408 	"const"		kw
    409 	"continue"	kw
    410 	"creal"		kw
    411 	"dchar"		kw
    412 	"debug"		kw
    413 	"default"	kw
    414 	"delegate"	kw
    415 	"delete"	kw
    416 	"deprecated"	kw
    417 	"do"		kw
    418 	"double"	kw
    419 	"else"		kw
    420 	"enum"		kw
    421 	"export"	kw
    422 	"extern"	kw
    423 	"false"		kw
    424 	"final"		kw
    425 	"finally"	kw
    426 	"float"		kw
    427 	"for"		kw
    428 	"foreach"	kw
    429 	"foreach_reverse"	kw
    430 	"function"	kw
    431 	"goto"		kw
    432 	"idouble"	kw
    433 	"if"		kw
    434 	"ifloat"	kw
    435 	"immutable"	kw
    436 	"import"	kw
    437 	"in"		kw
    438 	"inout"		kw
    439 	"int"		kw
    440 	"interface"	kw
    441 	"invariant"	kw
    442 	"ireal"		kw
    443 	"is"		kw
    444 	"lazy"		kw
    445 	"long"		kw
    446 	"macro"		kw
    447 	"mixin"		kw
    448 	"module"	kw
    449 	"new"		kw
    450 	"nothrow"	kw
    451 	"null"		kw
    452 	"out"		kw
    453 	"override"	kw
    454 	"package"	kw
    455 	"pragma"	kw
    456 	"private"	kw
    457 	"protected"	kw
    458 	"public"	kw
    459 	"pure"		kw
    460 	"real"		kw
    461 	"ref"		kw
    462 	"return"	kw
    463 	"scope"		kw
    464 	"shared"	kw
    465 	"short"		kw
    466 	"static"	kw
    467 	"struct"	kw
    468 	"super"		kw
    469 	"switch"	kw
    470 	"synchronized"	kw
    471 	"template"	kw
    472 	"this"		kw
    473 	"throw"		kw
    474 	"true"		kw
    475 	"try"		kw
    476 	"typedef"	kw
    477 	"typeid"	kw
    478 	"typeof"	kw
    479 	"ubyte"		kw
    480 	"ucent"		kw
    481 	"uint"		kw
    482 	"ulong"		kw
    483 	"union"		kw
    484 	"unittest"	kw
    485 	"ushort"	kw
    486 	"version"	kw
    487 	"void"		kw
    488 	"volatile"	kw
    489 	"wchar"		kw
    490 	"while"		kw
    491 	"with"		kw
    492 	"__FILE__"	kw
    493 	"__MODULE__"	kw
    494 	"__LINE__"	kw
    495 	"__FUNCTION__"	kw
    496 	"__PRETTY_FUNCTION__"	kw
    497 	"__gshared"	kw
    498 	"__traits"	kw
    499 	"__vector"	kw
    500 	"__parameters"	kw
    501 done
    502 	"\c"		ident
    503 
    504 :type Type
    505 	*		idle		noeat
    506 
    507 :kw Keyword
    508 	*		idle		noeat
    509 
    510 :bad_kw Bad
    511 	*		idle		noeat
    512 
    513 :bool Boolean
    514 	*		idle		noeat
    515 
    516 :lit Constant
    517 	*		idle		noeat
    518 
    519 :loop Loop
    520 	*		idle		noeat
    521 
    522 :cond Conditional
    523 	*		idle		noeat
    524 
    525 :stmt Statement
    526 	*		idle		noeat
    527 
    528 :operator Operator
    529 	*		idle		noeat
    530 
    531 :ident_end Idle
    532 	*		idle		noeat
    533 	" "		ident_end
    534 	"("		method_end	noeat recolormark
    535 
    536 :method_end Methods
    537 	*		idle		noeat
    538 
    539 .end
    540 
    541 # Recursive block comments
    542 
    543 .subr block_comment
    544 
    545 :idle Comment comment
    546 	*		idle
    547 	# might be TODO label
    548 	"BFHNTX"	idle		noeat call=comment_todo.comment_todo()
    549 	"+"		maybe_done
    550 	"/"		maybe_recur
    551 
    552 :maybe_done Comment comment
    553 	*		idle	noeat
    554 	"/"		idle	return
    555 
    556 :maybe_recur Comment comment
    557 	*		idle	noeat
    558 	"+"		idle	call=.block_comment()
    559 
    560 .end