dotfiles

My dotfiles.
git clone git://git.ryanmj.xyz/dotfiles.git
Log | Files | Refs | LICENSE

java.jsf.in (4034B)


      1 # JOE syntax highlight file for JAVA
      2 
      3 # Needs: improve escape parsing
      4 
      5 =Idle
      6 =Comment 	green
      7 =Constant 	cyan
      8 =Escape 	bold cyan
      9 =Type 		bold
     10 =Keyword 	bold
     11 =Operator	bold
     12 =Bad		bold red
     13 =Brace		magenta
     14 =Control	
     15 
     16 =Methods
     17 
     18 :begin Idle
     19 	*	begin	noeat call=.java()
     20 
     21 #
     22 # Java as a subroute- for use as java script in html
     23 #
     24 
     25 .subr java
     26 
     27 :idle Idle
     28 	*		idle
     29 	"\n"		idle
     30 	"/"		slash
     31 	"0"		first_digit	recolor=-1
     32 	"1-9"		decimal		recolor=-1
     33 	"."		maybe_float
     34 	"\""		string		recolor=-1
     35 	"'"		char		recolor=-1
     36 	"\i\p{Sc}"	ident		mark buffer
     37 	"{}"		brace		recolor=-1
     38 	",:;=()><[]*&|!~+\-%^"	control	recolor=-1
     39 
     40 :maybe_done Control
     41 	*		idle		noeat
     42 	"/"		idle		noeat return recolor=-2
     43 
     44 :brace Brace
     45 	*		idle		noeat
     46 
     47 :control Control
     48 	*		idle		noeat
     49 
     50 :slash Idle
     51 	*		idle		noeat
     52 	"*"		comment		recolor=-2
     53 	"/"		line_comment	recolor=-2
     54 
     55 :comment Comment
     56 	*		comment
     57 	# might be TODO label
     58 	"BFHNTX"	comment		noeat call=comment_todo.comment_todo()
     59 	"*"		maybe_end_comment
     60 
     61 :maybe_end_comment Comment
     62 	*		comment		noeat
     63 	"/"		idle
     64 	"*"		maybe_end_comment
     65 
     66 :line_comment Comment
     67 	*		line_comment
     68 	# might be TODO label
     69 	"BFHNTX"	line_comment	noeat call=comment_todo.comment_todo()
     70 	"\n"		idle
     71 
     72 :first_digit Constant
     73 	*		idle		noeat
     74 	"xX"		hex
     75 	"."		float
     76 	"eE"		epart
     77 	"0-7"		octal
     78 	"89"		bad_number	recolor=-1
     79 
     80 :bad_number Bad
     81 	*		idle		noeat
     82 	"0-9"		bad_number
     83 
     84 :octal Constant
     85 	*		idle		noeat
     86 	"0-7"		octal
     87 	"89"		bad_number	recolor=-1
     88 
     89 :hex Constant
     90 	*		idle		noeat
     91 	"0-9A-Fa-f"	hex
     92 
     93 :decimal Constant
     94 	*		idle		noeat
     95 	"0-9"		decimal
     96 	"eE"		epart
     97 	"."		float
     98 
     99 :maybe_float Constant
    100 	*		idle		recolor=-2 noeat
    101 	"0-9"		float		recolor=-2
    102 
    103 :float Constant
    104 	*		idle		noeat
    105 	"eE"		epart
    106 	"0-9"		float
    107 
    108 :epart Constant
    109 	*		idle		noeat
    110 	"0-9+\-"	enum
    111 
    112 :enum Constant
    113 	*		idle		noeat
    114 	"0-9"		enum
    115 
    116 :string	Constant
    117 	*		string
    118 	"\""		idle
    119 	"\\"		string_escape	recolor=-1
    120 	"%"		string_control	recolor=-1
    121 
    122 :string_escape Escape
    123 	*		string
    124 	"u"		string_uni1
    125 	"0-7"		string_octal2
    126 	"\n"		string		recolor=-2
    127 
    128 :string_uni1 Escape
    129 	*		string		noeat
    130 	"0-9a-fA-F"	string_uni2
    131 
    132 :string_uni2 Escape
    133 	*		string		noeat
    134 	"0-9a-fA-F"	string_uni3
    135 
    136 :string_uni3 Escape
    137 	*		string		noeat
    138 	"0-9a-fA-F"	string_uni4
    139 
    140 :string_uni4 Escape
    141 	*		string		noeat
    142 	"0-9a-fA-F"	string
    143 
    144 :string_octal2 Escape
    145 	*		string		noeat
    146 	"0-7"		string_octal3
    147 
    148 :string_octal3 Escape
    149 	*		string		noeat
    150 	"0-7"		string
    151 
    152 :string_control Escape
    153 	*		string_control
    154 	"\n"		reset
    155 	"diouxXeEfFgGaAcspn%SC"	string
    156 
    157 :char Constant
    158 	*		char
    159 	"\n"		reset
    160 	"'"		idle
    161 	"\\"		char_escape	recolor=-1
    162 
    163 :char_escape	Escape
    164 	*		char
    165 	"u"		char_uni1
    166 	"0-7"		char_octal2
    167 	"\n"		char		recolor=-2
    168 
    169 :char_uni1 Escape
    170 	*		char		noeat
    171 	"0-9a-fA-F"	char_uni2
    172 
    173 :char_uni2 Escape
    174 	*		char		noeat
    175 	"0-9a-fA-F"	char_uni3
    176 
    177 :char_uni3 Escape
    178 	*		char		noeat
    179 	"0-9a-fA-F"	char_uni4
    180 
    181 :char_uni4 Escape
    182 	*		char		noeat
    183 	"0-9a-fA-F"	char
    184 
    185 :char_octal2 Escape
    186 	*		char		noeat
    187 	"0-7"		char_octal3
    188 
    189 :char_octal3 Escape
    190 	*		char		noeat
    191 	"0-7"		char
    192 
    193 :ident Idle
    194 	*		ident_end	noeat markend strings
    195 	"abstract"	kw
    196 	"assert"	kw
    197 	"boolean"	type
    198 	"break"		kw
    199 	"byte"		type
    200 	"case"		kw
    201 	"catch"		kw
    202 	"char"		type
    203 	"class"		kw
    204 	"const"		bad_kw
    205 	"continue"	kw
    206 	"default"	kw
    207 	"do"		kw
    208 	"double"	type
    209 	"else"		kw
    210 	"enum"		kw
    211 	"extends"	kw
    212 	"false"		lit
    213 	"final"		kw
    214 	"finally"	kw
    215 	"float"		type
    216 	"for"		kw
    217 	"goto"		bad_kw
    218 	"if"		kw
    219 	"implements"	kw
    220 	"import"	kw
    221 	"instanceof"	operator
    222 	"int"		type
    223 	"interface"	kw
    224 	"long"		type
    225 	"native"	kw
    226 	"new"		operator
    227 	"null"		lit
    228 	"package"	kw
    229 	"private"	kw
    230 	"protected"	kw
    231 	"public"	kw
    232 	"return"	kw
    233 	"short"		type
    234 	"static"	kw
    235 	"strictfp"	kw
    236 	"super"		kw
    237 	"switch"	kw
    238 	"synchronized"	kw
    239 	"this"		kw
    240 	"throw"		kw
    241 	"throws"	kw
    242 	"transient"	kw
    243 	"true"		lit
    244 	"try"		kw
    245 	"void"		kw
    246 	"volatile"	kw
    247 	"while"		kw
    248 done
    249 	"\c\p{Sc}"	ident
    250 
    251 :type Type
    252 	*		idle		noeat
    253 
    254 :kw Keyword
    255 	*		idle		noeat
    256 
    257 :bad_kw Bad
    258 	*		idle		noeat
    259 
    260 :lit Constant
    261 	*		idle		noeat
    262 
    263 :operator Operator
    264 	*		idle		noeat
    265 
    266 :ident_end Idle
    267 	*		idle		noeat
    268 	" "		ident_end
    269 	"("		method_end	noeat recolormark
    270 
    271 :method_end Methods
    272 	*		idle		noeat
    273 
    274 .end