1 # Author : Sergei Trofimovich <slyfox@inbox.ru>
4 # 'Syntax rules for the C and the C++ programming languages' is taken as base
5 # (haskell compilers support CPP macros)
7 # haskell keywords and reserved symbols are grabbed from ghc-6.10.1/compiler/parser/Lexer.hs
16 keyword whole _\[0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\] brightmagenta
18 keyword whole as yellow
19 keyword whole case yellow
20 keyword whole class yellow
21 keyword whole data yellow
22 keyword whole default yellow
23 keyword whole deriving yellow
24 keyword whole do yellow
25 keyword whole else yellow
26 keyword whole hiding yellow
27 keyword whole if yellow
28 keyword whole import yellow
29 keyword whole in yellow
30 keyword whole infix yellow
31 keyword whole infixl yellow
32 keyword whole infixr yellow
33 keyword whole instance yellow
34 keyword whole let yellow
35 keyword whole module yellow
36 keyword whole newtype yellow
37 keyword whole of yellow
38 keyword whole qualified yellow
39 keyword whole then yellow
40 keyword whole type yellow
41 keyword whole where yellow
44 keyword whole forall yellow
45 keyword whole mdo yellow
46 keyword whole family yellow
47 keyword whole group yellow
48 keyword whole by yellow
49 keyword whole using yellow
52 keyword whole foreign yellow
53 keyword whole export yellow
54 keyword whole label yellow
55 keyword whole dynamic yellow
56 keyword whole safe yellow
57 keyword whole threadsafe yellow
58 keyword whole unsafe yellow
59 keyword whole stdcall yellow
60 keyword whole ccall yellow
61 keyword whole dotnet yellow
63 keyword whole rec yellow
64 keyword whole proc yellow
68 # keyword whole .. white
70 # unboxed (started from upcase)
71 keyword whole \{ABCDEFGHIJKLMNOPQRSTUVWXYZ\}\[0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\]# white
73 keyword whole \{ABCDEFGHIJKLMNOPQRSTUVWXYZ\}\[0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\] white
75 # C keywords (TODO: remove unused in haskell source)
76 keyword whole auto yellow
77 keyword whole break yellow
78 keyword whole case yellow
79 keyword whole char yellow
80 keyword whole const yellow
81 keyword whole continue yellow
82 keyword whole do yellow
83 keyword whole double yellow
84 keyword whole else yellow
85 keyword whole enum yellow
86 keyword whole extern yellow
87 keyword whole float yellow
88 keyword whole for yellow
89 keyword whole goto yellow
90 keyword whole if yellow
91 keyword whole int yellow
92 keyword whole long yellow
93 keyword whole register yellow
94 keyword whole return yellow
95 keyword whole short yellow
96 keyword whole signed yellow
97 keyword whole sizeof yellow
98 keyword whole static yellow
99 keyword whole struct yellow
100 keyword whole switch yellow
101 keyword whole typedef yellow
102 keyword whole union yellow
103 keyword whole unsigned yellow
104 keyword whole void yellow
105 keyword whole volatile yellow
106 keyword whole while yellow
107 keyword whole asm yellow
108 keyword whole inline yellow
109 keyword whole wchar_t yellow
110 keyword whole ... yellow
111 keyword whole linestart \{\s\t\}\[\s\t\]#*\n brightmagenta
112 keyword whole \[\s\t\]default yellow
113 keyword whole linestart \[\s\t\]\{ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\}\[0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\]: cyan
116 keyword whole 0\{xX\}\{0123456789abcdefABCDEF\}\[0123456789abcdefABCDEF\] brightgreen
117 keyword whole \{0123456789\}\[0123456789\] brightgreen
118 keyword whole \[0123456789\]\.\{0123456789\}\[0123456789\] brightgreen
119 keyword whole \{0123456789\}\[0123456789\]\.\[0123456789\] brightgreen
120 keyword whole \{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
121 keyword whole \{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen
122 keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
123 keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen
134 keyword '\\\{"abtnvfr\}' brightgreen
136 #haskell standalone char escapes
137 keyword '\\NUL' brightgreen
138 keyword '\\SOH' brightgreen
139 keyword '\\STX' brightgreen
140 keyword '\\ETX' brightgreen
141 keyword '\\EOT' brightgreen
142 keyword '\\ENQ' brightgreen
143 keyword '\\ACK' brightgreen
144 keyword '\\BEL' brightgreen
145 keyword '\\BS' brightgreen
146 keyword '\\HT' brightgreen
147 keyword '\\LF' brightgreen
148 keyword '\\VT' brightgreen
149 keyword '\\FF' brightgreen
150 keyword '\\CR' brightgreen
151 keyword '\\SO' brightgreen
152 keyword '\\SI' brightgreen
153 keyword '\\DLE' brightgreen
154 keyword '\\DC1' brightgreen
155 keyword '\\DC2' brightgreen
156 keyword '\\DC3' brightgreen
157 keyword '\\DC4' brightgreen
158 keyword '\\NAK' brightgreen
159 keyword '\\SYN' brightgreen
160 keyword '\\ETB' brightgreen
161 keyword '\\CAN' brightgreen
162 keyword '\\EM' brightgreen
163 keyword '\\SUB' brightgreen
164 keyword '\\ESC' brightgreen
165 keyword '\\FS' brightgreen
166 keyword '\\GS' brightgreen
167 keyword '\\RS' brightgreen
168 keyword '\\US' brightgreen
169 keyword '\\SP' brightgreen
170 keyword '\\DEL' brightgreen
172 keyword '\\\{0123\}\{01234567\}\{01234567\}' brightgreen
173 keyword '\\'' brightgreen
174 keyword '\\\\' brightgreen
175 keyword '\\0' brightgreen
176 keyword '\{\s!"#$%&()\*\+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\}' brightgreen
178 # some punctuation characters
179 keyword whole $ yellow
180 keyword whole ! white
181 keyword whole && white
182 keyword whole \* yellow
183 keyword whole \+ yellow
184 keyword whole / yellow
185 keyword whole < yellow
186 keyword whole > yellow
187 keyword whole ^ white
188 keyword whole || white
189 keyword whole | white
205 context exclusive /\* \*/ brown
208 context exclusive {-# #-} green
211 context exclusive {- -} brown
214 context exclusive // \n brown
217 context exclusive \-\- \n brown
221 context linestart # \n brightred
223 keyword /\**\*/ brown
232 #haskell escapes in ""s
233 keyword \\NUL brightgreen
234 keyword \\SOH brightgreen
235 keyword \\STX brightgreen
236 keyword \\ETX brightgreen
237 keyword \\EOT brightgreen
238 keyword \\ENQ brightgreen
239 keyword \\ACK brightgreen
240 keyword \\BEL brightgreen
241 keyword \\BS brightgreen
242 keyword \\HT brightgreen
243 keyword \\LF brightgreen
244 keyword \\VT brightgreen
245 keyword \\FF brightgreen
246 keyword \\CR brightgreen
247 keyword \\SO brightgreen
248 keyword \\SI brightgreen
249 keyword \\DLE brightgreen
250 keyword \\DC1 brightgreen
251 keyword \\DC2 brightgreen
252 keyword \\DC3 brightgreen
253 keyword \\DC4 brightgreen
254 keyword \\NAK brightgreen
255 keyword \\SYN brightgreen
256 keyword \\ETB brightgreen
257 keyword \\CAN brightgreen
258 keyword \\EM brightgreen
259 keyword \\SUB brightgreen
260 keyword \\ESC brightgreen
261 keyword \\FS brightgreen
262 keyword \\GS brightgreen
263 keyword \\RS brightgreen
264 keyword \\US brightgreen
265 keyword \\SP brightgreen
266 keyword \\DEL brightgreen
268 keyword \\" brightgreen
269 keyword %% brightgreen
270 keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[L\]\{eEfgGoxX\} brightgreen
271 keyword %\[0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[hl\]\{diuxX\} brightgreen
272 keyword %\[hl\]n brightgreen
273 keyword %\[-\]\[0123456789\*\]\[.\]\[0123456789\*\]s brightgreen
274 keyword %[*] brightgreen
275 keyword %c brightgreen
276 keyword %p brightgreen
277 keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
278 keyword \\\\ brightgreen
279 keyword \\' brightgreen
280 keyword \\\{abtnvfr\} brightgreen
283 context exclusive ` ` white