dotfiles

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

asm.jsf (4166B)


      1 # JOE syntax highlight file for assembly language
      2 
      3 # Highlights ';' comments, C-preprocessor stuff and C-like constants.
      4 
      5 # Some assembly languages do not use C-preprocessor and use '#' for
      6 # comments.  For them, eliminate all states up to ':idle'. and change the
      7 # ";" line in 'idle' to '#'.
      8 
      9 # For UNIX assembly ';' actually separates instructions, but I've only seen
     10 # this for 'rep; movsb'.  If it bothers you eliminate the ';' line in
     11 # ':idle'.
     12 
     13 # This highlighter is too strict for numeric constants.  Many assembly
     14 # languages allow '000009', which looks like a bad octal constant in C/UNIX.
     15 
     16 =Idle
     17 =Bad		bold red
     18 =Preproc 	blue
     19 =Define		bold blue
     20 =Comment 	green
     21 =IncLocal	cyan
     22 =IncSystem	bold cyan
     23 =Constant 	cyan
     24 =Escape 	bold cyan
     25 =Type 		bold
     26 =Keyword 	bold
     27 =CppKeyword	bold
     28 =Brace
     29 =Control
     30 
     31 :reset Idle
     32 	*		first		noeat
     33 	" \t"		reset
     34 
     35 :first Idle
     36 	*		idle		noeat
     37 	"#"		pre		recolor=-1
     38 
     39 :pre Preproc
     40 	*		preproc		noeat
     41 	" \t"		pre
     42 	"a-z"		preident	recolor=-1 buffer
     43 
     44 :preident Preproc
     45 	*		preproc		noeat strings
     46 	"define"	predef
     47 	"include"	preinc
     48 done
     49 	"a-z"		preident
     50 
     51 :preinc Preproc
     52 	*		preinc
     53 	" \t"		preinc_ws
     54 	"\n"		reset
     55 	
     56 :preinc_ws Preproc
     57 	*		prebad		recolor=-1
     58 	" \t"		preinc_ws
     59 	"\""		preinc_local	recolor=-1
     60 	"<"		preinc_system	recolor=-1
     61 
     62 :preinc_local IncLocal
     63 	*		preinc_local
     64 	"\"\n"		reset
     65 	
     66 :preinc_system IncSystem
     67 	*		preinc_system
     68 	">\n"		reset
     69 
     70 :prebad	Bad	
     71 	*		prebad
     72 	"\n"		reset
     73 
     74 
     75 :predef Preproc
     76 	*		predef
     77 	" \t"		predef_ws
     78 	"\n"		reset
     79 	
     80 :predef_ws Preproc
     81 	*		prebad		recolor=-1
     82 	" \t"		predef_ws
     83 	"a-zA-Z0-9_"	predef_ident	recolor=-1
     84 
     85 :predef_ident Define
     86 	*		idle		noeat
     87 	"a-zA-Z0-9_"	predef_ident
     88 
     89 
     90 :preproc Preproc
     91 	*		preproc
     92 	"\n"		reset
     93 	"\\"		preproc_cont
     94 	"/"		preproc_slash
     95 	
     96 :preproc_slash Preproc
     97 	*		preproc		noeat
     98 	"*"		comment		recolor=-2
     99 	"/"		line_comment	recolor=-2
    100 	
    101 :preproc_cont Preproc
    102 	*		preproc_cont
    103 	"\n"		preproc
    104 
    105 # All following states are for when we're not in a preprocessor line
    106 
    107 :idle Idle
    108 	*		idle
    109 	";"		line_comment	recolor=-1
    110 	"\n"		reset
    111 	"/"		slash
    112 	"0"		first_digit	recolor=-1
    113 	"1-9"		decimal	recolor=-1
    114 	"."		maybe_float
    115 	"\""		string		recolor=-1
    116 	"'"		char		recolor=-1
    117 	"a-zA-Z_"	ident		buffer
    118 	"{}"		brace		recolor=-1
    119 	",:=()><[]*&|!~+\-%^"	control		recolor=-1
    120 
    121 :brace Brace
    122 	*	idle	noeat
    123 
    124 :control Control
    125 	*	idle	noeat
    126 
    127 :slash Idle
    128 	*		idle		noeat recolor=-2	# Not sure about this
    129 	"*"		comment		recolor=-2
    130 	"/"		line_comment	recolor=-2
    131 
    132 :comment Comment
    133 	*		comment
    134 	"*"		maybe_end_comment
    135 
    136 :maybe_end_comment Comment
    137 	*		comment
    138 	"/"		idle
    139 	"*"		maybe_end_comment
    140 
    141 :line_comment Comment
    142 	*		line_comment
    143 	"\n"		reset
    144 
    145 :first_digit Constant
    146 	*		idle	noeat
    147 	"xX"		hex
    148 	"."		float
    149 	"eE"		epart
    150 	"0-7"		octal
    151 	"89"		bad_number	recolor=-1
    152 
    153 :bad_number Bad
    154 	*		idle	noeat
    155 	"0-9"		bad_number
    156 
    157 :octal Constant
    158 	*		idle	noeat
    159 	"0-7"		octal
    160 	"89"		bad_number	recolor=-1
    161 
    162 :hex Constant
    163 	*		idle	noeat
    164 	"0-9A-Fa-f"	hex
    165 
    166 :decimal Constant
    167 	*		idle	noeat
    168 	"0-9"		decimal
    169 	"eE"		epart
    170 	"."		float
    171 
    172 :maybe_float Constant
    173 	*		idle	recolor=-2	noeat
    174 	"0-9"		float		recolor=-2
    175 
    176 :float Constant
    177 	*		idle	noeat
    178 	"eE"		epart
    179 	"0-9"		float
    180 
    181 :epart Constant
    182 	*		idle	noeat
    183 	"0-9+\-"	enum
    184 
    185 :enum Constant
    186 	*		idle	noeat
    187 	"0-9"		enum
    188 
    189 :string	Constant
    190 	*		string
    191 	"\""		idle
    192 	"\\"		string_escape	recolor=-1
    193 	"%"		string_control	recolor=-1
    194 
    195 :string_escape Escape
    196 	*		string
    197 	"x"		string_hex1
    198 	"0-7"		string_octal2
    199 	"\n"		string		recolor=-2
    200 
    201 :string_hex1 Escape
    202 	*		string		noeat
    203 	"0-9a-fA-F"	string_hex2
    204 
    205 :string_hex2 Escape
    206 	*		string		noeat
    207 	"0-9a-fA-F"	string
    208 
    209 :string_octal2 Escape
    210 	*		string		noeat
    211 	"0-7"		string_octal3
    212 
    213 :string_octal3 Escape
    214 	*		string		noeat
    215 	"0-7"		string
    216 
    217 :string_control Escape
    218 	*		string_control
    219 	"\n"		reset
    220 	"diouxXeEfFgGaAcspn%SC"	string
    221 
    222 :char Constant
    223 	*		char
    224 	"\n"		reset
    225 	"'"		idle
    226 	"\\"		char_escape	recolor=-1
    227 
    228 :char_escape	Escape
    229 	*		char
    230 	"x"		char_hex1
    231 	"0-7"		char_octal2
    232 	"\n"		char		recolor=-2
    233 
    234 :char_hex1 Escape
    235 	*		char		noeat
    236 	"0-9a-fA-F"	char_hex2
    237 
    238 :char_hex2 Escape
    239 	*		char		noeat
    240 	"0-9a-fA-F"	char
    241 
    242 :char_octal2 Escape
    243 	*		char		noeat
    244 	"0-7"		char_octal3
    245 
    246 :char_octal3 Escape
    247 	*		char		noeat
    248 	"0-7"		char
    249 
    250 :ident Idle
    251 	*		idle		noeat
    252 	"a-zA-Z0-9_"	ident