1 # -------------------------------
3 # Erlang programming language syntax highlighting
6 # Homepage of Erlang: http://www.erlang.org
8 # Author: Witold Baryluk < baryluk at smp if uj edu pl >
9 # Date: 07-07-2009, 08-02-2009
11 # -------------------------------
14 # http://www.erlang.org/doc/doc-5.4.13/doc/reference_manual/part_frame.html
15 # http://www.erlang.org/doc/reference_manual/data_types.html#2.14
16 # http://www.regular-expressions.info/reference.html
17 # gedit: http://martin.ankerl.com/files/erlang.lang
18 # joe: http://www.straatinvestments.com/~tlack/erlang/joe-editor/erlang.jsf
19 # geshi: http://www.kreisquadratur.de/blog/?p=305
20 # vim: http://erlang.org/pipermail/erlang-questions/2006-July/021362.html
21 # kate: http://bugsfiles.kde.org/attachment.cgi?id=21155
23 # entries for Syntax file:
25 # file ..\*\\.erl$ Erlang\sProgram (-module\\(|#!.*escript)
26 # include erlang.syntax
28 # file ..\*\\.hrl$ Erlang\sHeader -record\\(
29 # include erlang.syntax
32 keyword whole after yellow
33 keyword whole and brown
34 keyword whole andalso brown
35 keyword whole band brown
36 keyword whole begin yellow
37 keyword whole bnot brown
38 keyword whole bor brown
39 keyword whole bsl brown
40 keyword whole bsr brown
41 keyword whole bxor brown
42 keyword whole case yellow
43 keyword whole catch yellow
44 keyword whole cond yellow
45 keyword whole div brown
46 keyword whole end yellow
47 keyword whole fun yellow
48 keyword whole if yellow
49 keyword whole let yellow
50 keyword whole not brown
51 keyword whole of yellow
52 keyword whole or brown
53 keyword whole orelse brown
54 keyword whole query yellow
55 keyword whole receive yellow
56 keyword whole rem brown
57 keyword whole try yellow
58 keyword whole throw yellow
59 keyword whole xor brown
61 keyword whole when yellow
63 keyword whole -module brightmagenta
64 keyword whole -compile brightmagenta
65 keyword whole -behaviour brightmagenta
66 keyword whole -record brightmagenta
67 keyword whole -define brightmagenta
68 keyword whole -include brightmagenta
69 keyword whole -include_lib brightmagenta
70 keyword whole -vsn magenta
71 keyword whole -author magenta
72 keyword whole -copyright magenta
73 keyword whole -export brightmagenta
74 keyword whole -\{abcdefghijklmnoprqstuvwxyz\}\[abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTVWXYZ0123456789_\] red
77 keyword whole abs brightgreen
78 keyword whole accept brightgreen
79 keyword whole alarm brightgreen
80 keyword whole apply brightgreen
81 keyword whole atom_to_list brightgreen
82 keyword whole binary_to_list brightgreen
83 keyword whole binary_to_term brightgreen
84 keyword whole check_process_code brightgreen
85 keyword whole concat_binary brightgreen
86 keyword whole date brightgreen
87 keyword whole delete_module brightgreen
88 keyword whole disconnect_node brightgreen
89 keyword whole element brightgreen
90 keyword whole erase brightgreen
91 keyword whole exit brightgreen
92 keyword whole float brightgreen
93 keyword whole float_to_list brightgreen
94 keyword whole garbage_collect brightgreen
95 keyword whole get brightgreen
96 keyword whole get_keys brightgreen
97 keyword whole group_leader brightgreen
98 keyword whole halt brightgreen
99 keyword whole hd brightgreen
100 keyword whole integer_to_list brightgreen
101 keyword whole is_alive brightgreen
102 keyword whole is_atom brightgreen
103 keyword whole is_binary brightgreen
104 keyword whole is_boolean brightgreen
105 keyword whole is_float brightgreen
106 keyword whole is_function brightgreen
107 keyword whole is_integer brightgreen
108 keyword whole is_list brightgreen
109 keyword whole is_number brightgreen
110 keyword whole is_pid brightgreen
111 keyword whole is_port brightgreen
112 keyword whole is_process_alive brightgreen
113 keyword whole is_record brightgreen
114 keyword whole is_reference brightgreen
115 keyword whole is_tuple brightgreen
116 keyword whole length brightgreen
117 keyword whole link brightgreen
118 keyword whole list_to_atom brightgreen
119 keyword whole list_to_binary brightgreen
120 keyword whole list_to_float brightgreen
121 keyword whole list_to_integer brightgreen
122 keyword whole list_to_pid brightgreen
123 keyword whole list_to_tuple brightgreen
124 keyword whole load_module brightgreen
125 keyword whole loaded brightgreen
126 keyword whole localtime brightgreen
127 keyword whole make_ref brightgreen
128 keyword whole module_loaded brightgreen
129 keyword whole node brightgreen
130 keyword whole nodes brightgreen
131 keyword whole now brightgreen
132 keyword whole open_port brightgreen
133 keyword whole pid_to_list brightgreen
134 keyword whole port_close brightgreen
135 keyword whole port_command brightgreen
136 keyword whole port_connect brightgreen
137 keyword whole port_control brightgreen
138 keyword whole ports brightgreen
139 keyword whole pre_loaded brightgreen
140 keyword whole process_flag brightgreen
141 keyword whole process_info brightgreen
142 keyword whole processes brightgreen
143 keyword whole purge_module brightgreen
144 keyword whole put brightgreen
145 keyword whole register brightgreen
146 keyword whole registered brightgreen
147 keyword whole round brightgreen
148 keyword whole self brightgreen
149 keyword whole setelement brightgreen
150 keyword whole size brightgreen
151 keyword whole spawn brightgreen
152 keyword whole spawn_link brightgreen
153 keyword whole spawn_opt brightgreen
154 keyword whole split_binary brightgreen
155 keyword whole statistics brightgreen
156 keyword whole term_to_binary brightgreen
157 keyword whole throw brightgreen
158 keyword whole time brightgreen
159 keyword whole tl brightgreen
160 keyword whole trunc brightgreen
161 keyword whole tuple_to_list brightgreen
162 keyword whole unlink brightgreen
163 keyword whole unregister brightgreen
164 keyword whole whereis brightgreen
166 keyword whole gen_server:cast brightgreen
167 keyword whole gen_server:call brightgreen
168 keyword whole gen_server:reply brightgreen
169 keyword whole gen_server:start_link brightgreen
170 keyword whole gen_server:start brightgreen
171 keyword whole io:format brightgreen
173 keyword whole init white
174 keyword whole handle_cast white
175 keyword whole handle_call white
176 keyword whole handle_info white
177 keyword whole handle_event white
178 keyword whole handle_sync_event white
179 keyword whole terminate white
180 keyword whole code_change white
192 keyword << brightcyan
193 keyword >> brightcyan
214 # TODO this does not work for $" or $', use $\" or $\' instead. ?
215 keyword $\{abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789_{}[]()(\\/`~!@#$%^&\*+-=;:'"|,./?<>\} red
218 # keyword '\\\{0123\}\{01234567\}\{01234567\}' brightgreen
220 # TODO: integers, inegers of form Base#digits, 2#1010101
221 # todo: records access via #state{}
223 keyword whole ?MODULE red
224 keyword whole ?LINE red
225 keyword whole ?FILE red
226 keyword whole ?\[abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789_@\] red
232 keyword whole true red
233 keyword whole false red
236 keyword || brightcyan
244 keyword whole lists:seq gray
245 keyword whole lists:map gray
246 keyword whole lists:filter gray
247 keyword whole lists:reduce gray
248 keyword whole lists:foldl gray
249 keyword whole lists:foldr gray
250 keyword whole lists:append gray
251 keyword whole lists:nth gray
252 keyword whole behaviour_info gray
253 keyword whole dict:find gray
254 keyword whole dict:is_key gray
255 keyword whole dict:erase gray
256 keyword whole dict:new gray
257 keyword whole dict:map gray
258 keyword whole dict:store gray
259 keyword whole dict:fetch_keys gray
260 keyword whole dict:append gray
261 keyword whole dict:update gray
262 keyword whole dict:update_counter gray
263 keyword whole dict:fold gray
264 keyword whole dict:to_list gray
265 keyword whole dict:fetch gray
267 # todo: no more than one dot in atom, and not at the end
268 keyword whole \{abcdefghijklmnoprqstuvwxyz\}\[abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789_.@\] lightgray
269 keyword whole \{_ABCDEFGHIJKLMNOPRQSTUVWXYZ\}\[abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789_@\] white
271 context exclusive % \n brown
276 keyword ~p brightgreen
277 keyword ~n brightgreen
278 keyword ~w brightgreen
279 keyword ~~ brightgreen
280 keyword \\" brightgreen
281 keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
282 keyword \\\{01234567\}\{01234567\} brightgreen
283 keyword \\\{01234567\} brightgreen
284 keyword \\x\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\} brightgreen
285 keyword \\\\ brightgreen
286 keyword \\' brightgreen
287 keyword \\\{bdefrstv\} brightgreen
288 keyword \\^\{abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ\} brightgreen
291 keyword \\" brightred
292 keyword \\\{0123\}\{01234567\}\{01234567\} brightred
293 keyword \\\{01234567\}\{01234567\} brightred
294 keyword \\\{01234567\} brightred
295 keyword \\x\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\} brightred
296 keyword \\\\ brightred
297 keyword \\' brightred
298 keyword \\\{bdefrstv\} brightred
299 keyword \\^\{abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ\} brightred