dotfiles

My dotfiles.
Log | Files | Refs | LICENSE

awk.jsf (3633B)


      1 # JOE syntax highlight file for AWK
      2 
      3 # Resync whole file
      4 -
      5 
      6 =Idle
      7 =Ident
      8 =Bad
      9 =Preproc
     10 =Define		+Preproc
     11 =Comment
     12 =IncLocal	+String +Preproc
     13 =IncSystem	+Preproc
     14 =Constant
     15 =Number		+Constant
     16 =String		+Constant
     17 =StringEscape	+Escape +String
     18 =Character	+String
     19 =CharacterEscape +Escape +Character
     20 =Type
     21 =Keyword
     22 =Brace		+Control
     23 =Control
     24 
     25 :reset Idle
     26 	*		first		noeat
     27 	" \t"		reset
     28 
     29 :first Idle
     30 	*		idle		noeat
     31 	"/"		regex
     32 	"#"		reset_line_comment	recolor=-1
     33 
     34 :regex Idle
     35 	*		regex
     36 	"/"		idle
     37 	"\\"		regex_skip
     38 
     39 :regex_skip Idle
     40 	*		regex
     41 
     42 :reset_line_comment Comment comment
     43 	*		reset_line_comment
     44 	"BFHNTX"        line_comment	noeat call=comment_todo.comment_todo()
     45 	"\n"		reset
     46 
     47 :idle Idle
     48 	*		idle
     49 	"\n"		reset
     50 	"#"		line_comment	recolor=-1
     51 	"0"		first_digit	recolor=-1
     52 	"1-9"		decimal	recolor=-1
     53 	"."		maybe_float
     54 	"\""		string		recolor=-1
     55 	"'"		char		recolor=-1
     56 	"a-zA-Z_"	ident		buffer
     57 	"{}"		brace		recolor=-1
     58 	"/,:;=()><[]*&|!~+\-%^"	control		recolor=-1
     59 
     60 :brace Brace
     61 	*	idle	noeat
     62 
     63 :control Control
     64 	*	idle	noeat
     65 
     66 :line_comment Comment comment
     67 	*		line_comment
     68 	"BFHNTX"        line_comment	noeat call=comment_todo.comment_todo()
     69 	"\n"		reset
     70 
     71 :first_digit Number
     72 	*		idle	noeat
     73 	"xX"		hex
     74 	"."		float
     75 	"eE"		epart
     76 	"0-7"		octal
     77 	"89"		bad_number	recolor=-1
     78 
     79 :bad_number Bad
     80 	*		idle	noeat
     81 	"0-9"		bad_number
     82 
     83 :octal Number
     84 	*		idle	noeat
     85 	"0-7"		octal
     86 	"89"		bad_number	recolor=-1
     87 
     88 :hex Number
     89 	*		idle	noeat
     90 	"0-9A-Fa-f"	hex
     91 
     92 :decimal Number
     93 	*		idle	noeat
     94 	"0-9"		decimal
     95 	"eE"		epart
     96 	"."		float
     97 
     98 :maybe_float Number
     99 	*		idle	recolor=-2	noeat
    100 	"0-9"		float		recolor=-2
    101 
    102 :float Number
    103 	*		idle	noeat
    104 	"eE"		epart
    105 	"0-9"		float
    106 
    107 :epart Number
    108 	*		idle	noeat
    109 	"0-9+\-"	enum
    110 
    111 :enum Number
    112 	*		idle	noeat
    113 	"0-9"		enum
    114 
    115 :string	String string
    116 	*		string
    117 	"\""		idle
    118 	"\\"		string_escape	recolor=-1
    119 	"%"		string_control	recolor=-1
    120 
    121 :string_escape StringEscape string
    122 	*		string
    123 	"x"		string_hex1
    124 	"0-7"		string_octal2
    125 	"\n"		string		recolor=-2
    126 
    127 :string_hex1 StringEscape string
    128 	*		string		noeat
    129 	"0-9a-fA-F"	string_hex2
    130 
    131 :string_hex2 StringEscape string
    132 	*		string		noeat
    133 	"0-9a-fA-F"	string
    134 
    135 :string_octal2 StringEscape string
    136 	*		string		noeat
    137 	"0-7"		string_octal3
    138 
    139 :string_octal3 StringEscape string
    140 	*		string		noeat
    141 	"0-7"		string
    142 
    143 :string_control StringEscape string
    144 	*		string
    145 	"\""		string noeat
    146 	"\n"		reset
    147 	"0-9.\-+ #hjILtz$"	string_control
    148 
    149 :char Character
    150 	*		char
    151 	"\n"		reset
    152 	"'"		idle
    153 	"\\"		char_escape	recolor=-1
    154 
    155 :char_escape CharacterEscape
    156 	*		char
    157 	"x"		char_hex1
    158 	"0-7"		char_octal2
    159 	"\n"		char		recolor=-2
    160 
    161 :char_hex1 CharacterEscape
    162 	*		char		noeat
    163 	"0-9a-fA-F"	char_hex2
    164 
    165 :char_hex2 CharacterEscape
    166 	*		char		noeat
    167 	"0-9a-fA-F"	char
    168 
    169 :char_octal2 CharacterEscape
    170 	*		char		noeat
    171 	"0-7"		char_octal3
    172 
    173 :char_octal3 CharacterEscape
    174 	*		char		noeat
    175 	"0-7"		char
    176 
    177 :ident Ident
    178 	*			idle	noeat istrings
    179 	"if"			kw
    180 	"else"			kw
    181 	"while"			kw
    182 	"do"			kw
    183 	"for"			kw
    184 	"break"			kw
    185 	"continue"		kw
    186 	"delete"		kw
    187 	"exit"			kw
    188 	"close"			kw
    189 	"getline"		kw
    190 	"next"			kw
    191 	"nextfile"		kw
    192 	"print"			kw
    193 	"printf"		kw
    194 	"system"		kw
    195 	"fflush"		kw
    196 	"atan2"			kw
    197 	"cos"			kw
    198 	"exp"			kw
    199 	"int"			kw
    200 	"log"			kw
    201 	"rand"			kw
    202 	"sin"			kw
    203 	"sqrt"			kw
    204 	"srand"			kw
    205 	"asort"			kw
    206 	"asorti"		kw
    207 	"gensub"		kw
    208 	"gsub"			kw
    209 	"index"			kw
    210 	"length"		kw
    211 	"match"			kw
    212 	"split"			kw
    213 	"sprintf"		kw
    214 	"strtonum"		kw
    215 	"sub"			kw
    216 	"substr"		kw
    217 	"tolower"		kw
    218 	"toupper"		kw
    219 	"mktime"		kw
    220 	"strftime"		kw
    221 	"systime"		kw
    222 	"and"			kw
    223 	"compl"			kw
    224 	"lshift"		kw
    225 	"or"			kw
    226 	"rshift"		kw
    227 	"xor"			kw
    228 	"bindtextdomain"	kw
    229 	"dcgettext"		kw
    230 	"dcngettext"		kw
    231 	"function"		kw
    232 	"return"		kw
    233 done
    234 	"a-zA-Z0-9_"	ident
    235 
    236 :kw Keyword
    237 	*	idle	noeat