1 # $MirOS: contrib/code/jupp/syntax/asm.jsf.in,v 1.3 2012/09/02 14:46:51 tg Exp $
3 # JOE syntax highlight file for assembly language
5 # Highlights ';' comments, C-preprocessor stuff and C-like constants.
7 # Some assembly languages do not use C-preprocessor and use '#' for
8 # comments. For them, eliminate all states up to ':idle'. and change the
9 # ";" line in 'idle' to '#'.
11 # For UNIX assembly ';' actually separates instructions, but I've only seen
12 # this for 'rep; movsb'. If it bothers you eliminate the ';' line in
15 # This highlighter is too strict for numeric constants. Many assembly
16 # languages allow '000009', which looks like a bad octal constant in C/UNIX.
19 # Always reparse from beginning
49 "a-z" preident recolor=-1 buffer
52 * preproc noeat strings
66 "\"" preinc_local recolor=-1
67 "<" preinc_system recolor=-1
69 :preinc_local IncLocal
73 :preinc_system IncSystem
90 "a-zA-Z0-9_" predef_ident recolor=-1
94 "a-zA-Z0-9_" predef_ident
103 :preproc_slash Preproc
105 "*" comment recolor=-2
106 "/" line_comment recolor=-2
108 :preproc_cont Preproc
112 # All following states are for when we're not in a preprocessor line
116 ";" line_comment recolor=-1
119 "0" first_digit recolor=-1
120 "1-9" decimal recolor=-1
122 "\"" string recolor=-1
124 "a-zA-Z_" ident buffer
125 "{}" brace recolor=-1
126 ",:=()><[]*&|!~+\-%^" control recolor=-1
135 * idle noeat recolor=-2 # Not sure about this
136 "*" comment recolor=-2
137 "/" line_comment recolor=-2
141 "*" maybe_end_comment
143 :maybe_end_comment Comment
146 "*" maybe_end_comment
148 :line_comment Comment
152 :first_digit Constant
158 "89" bad_number recolor=-1
167 "89" bad_number recolor=-1
179 :maybe_float Constant
180 * idle recolor=-2 noeat
181 "0-9" float recolor=-2
199 "\\" string_escape recolor=-1
200 "%" string_control recolor=-1
202 :string_escape Escape
206 "\n" string recolor=-2
210 "0-9a-fA-F" string_hex2
216 :string_octal2 Escape
220 :string_octal3 Escape
224 :string_control Escape
227 "diouxXeEfFgGaAcspn%SC" string
233 "\\" char_escape recolor=-1
243 "0-9a-fA-F" char_hex2