erlang.syntax 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. # -------------------------------
  2. #
  3. # Erlang programming language syntax highlighting
  4. # for CoolEdit
  5. #
  6. # Homepage of Erlang: http://www.erlang.org
  7. #
  8. # Author: Witold Baryluk < baryluk at smp if uj edu pl >
  9. # Date: 07-07-2009, 08-02-2009
  10. #
  11. # -------------------------------
  12. #
  13. # Useful links:
  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
  22. #
  23. # entries for Syntax file:
  24. #
  25. # file ..\*\\.erl$ Erlang\sProgram (-module\\(|#!.*escript)
  26. # include erlang.syntax
  27. #
  28. # file ..\*\\.hrl$ Erlang\sHeader -record\\(
  29. # include erlang.syntax
  30. context default
  31. keyword whole after yellow
  32. keyword whole and brown
  33. keyword whole andalso brown
  34. keyword whole band brown
  35. keyword whole begin yellow
  36. keyword whole bnot brown
  37. keyword whole bor brown
  38. keyword whole bsl brown
  39. keyword whole bsr brown
  40. keyword whole bxor brown
  41. keyword whole case yellow
  42. keyword whole catch yellow
  43. keyword whole cond yellow
  44. keyword whole div brown
  45. keyword whole end yellow
  46. keyword whole fun yellow
  47. keyword whole if yellow
  48. keyword whole let yellow
  49. keyword whole not brown
  50. keyword whole of yellow
  51. keyword whole or brown
  52. keyword whole orelse brown
  53. keyword whole query yellow
  54. keyword whole receive yellow
  55. keyword whole rem brown
  56. keyword whole try yellow
  57. keyword whole throw yellow
  58. keyword whole xor brown
  59. keyword whole when yellow
  60. keyword whole -module brightmagenta
  61. keyword whole -compile brightmagenta
  62. keyword whole -behaviour brightmagenta
  63. keyword whole -record brightmagenta
  64. keyword whole -define brightmagenta
  65. keyword whole -include brightmagenta
  66. keyword whole -include_lib brightmagenta
  67. keyword whole -vsn magenta
  68. keyword whole -author magenta
  69. keyword whole -copyright magenta
  70. keyword whole -export brightmagenta
  71. keyword whole -\{abcdefghijklmnoprqstuvwxyz\}\[abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTVWXYZ0123456789_\] red
  72. # erlang:*
  73. keyword whole abs brightgreen
  74. keyword whole accept brightgreen
  75. keyword whole alarm brightgreen
  76. keyword whole apply brightgreen
  77. keyword whole atom_to_list brightgreen
  78. keyword whole binary_to_list brightgreen
  79. keyword whole binary_to_term brightgreen
  80. keyword whole check_process_code brightgreen
  81. keyword whole concat_binary brightgreen
  82. keyword whole date brightgreen
  83. keyword whole delete_module brightgreen
  84. keyword whole disconnect_node brightgreen
  85. keyword whole element brightgreen
  86. keyword whole erase brightgreen
  87. keyword whole exit brightgreen
  88. keyword whole float brightgreen
  89. keyword whole float_to_list brightgreen
  90. keyword whole garbage_collect brightgreen
  91. keyword whole get brightgreen
  92. keyword whole get_keys brightgreen
  93. keyword whole group_leader brightgreen
  94. keyword whole halt brightgreen
  95. keyword whole hd brightgreen
  96. keyword whole integer_to_list brightgreen
  97. keyword whole is_alive brightgreen
  98. keyword whole is_atom brightgreen
  99. keyword whole is_binary brightgreen
  100. keyword whole is_boolean brightgreen
  101. keyword whole is_float brightgreen
  102. keyword whole is_function brightgreen
  103. keyword whole is_integer brightgreen
  104. keyword whole is_list brightgreen
  105. keyword whole is_number brightgreen
  106. keyword whole is_pid brightgreen
  107. keyword whole is_port brightgreen
  108. keyword whole is_process_alive brightgreen
  109. keyword whole is_record brightgreen
  110. keyword whole is_reference brightgreen
  111. keyword whole is_tuple brightgreen
  112. keyword whole length brightgreen
  113. keyword whole link brightgreen
  114. keyword whole list_to_atom brightgreen
  115. keyword whole list_to_binary brightgreen
  116. keyword whole list_to_float brightgreen
  117. keyword whole list_to_integer brightgreen
  118. keyword whole list_to_pid brightgreen
  119. keyword whole list_to_tuple brightgreen
  120. keyword whole load_module brightgreen
  121. keyword whole loaded brightgreen
  122. keyword whole localtime brightgreen
  123. keyword whole make_ref brightgreen
  124. keyword whole module_loaded brightgreen
  125. keyword whole node brightgreen
  126. keyword whole nodes brightgreen
  127. keyword whole now brightgreen
  128. keyword whole open_port brightgreen
  129. keyword whole pid_to_list brightgreen
  130. keyword whole port_close brightgreen
  131. keyword whole port_command brightgreen
  132. keyword whole port_connect brightgreen
  133. keyword whole port_control brightgreen
  134. keyword whole ports brightgreen
  135. keyword whole pre_loaded brightgreen
  136. keyword whole process_flag brightgreen
  137. keyword whole process_info brightgreen
  138. keyword whole processes brightgreen
  139. keyword whole purge_module brightgreen
  140. keyword whole put brightgreen
  141. keyword whole register brightgreen
  142. keyword whole registered brightgreen
  143. keyword whole round brightgreen
  144. keyword whole self brightgreen
  145. keyword whole setelement brightgreen
  146. keyword whole size brightgreen
  147. keyword whole spawn brightgreen
  148. keyword whole spawn_link brightgreen
  149. keyword whole spawn_opt brightgreen
  150. keyword whole split_binary brightgreen
  151. keyword whole statistics brightgreen
  152. keyword whole term_to_binary brightgreen
  153. keyword whole throw brightgreen
  154. keyword whole time brightgreen
  155. keyword whole tl brightgreen
  156. keyword whole trunc brightgreen
  157. keyword whole tuple_to_list brightgreen
  158. keyword whole unlink brightgreen
  159. keyword whole unregister brightgreen
  160. keyword whole whereis brightgreen
  161. keyword whole gen_server:cast brightgreen
  162. keyword whole gen_server:call brightgreen
  163. keyword whole gen_server:reply brightgreen
  164. keyword whole gen_server:start_link brightgreen
  165. keyword whole gen_server:start brightgreen
  166. keyword whole io:format brightgreen
  167. keyword whole init white
  168. keyword whole handle_cast white
  169. keyword whole handle_call white
  170. keyword whole handle_info white
  171. keyword whole handle_event white
  172. keyword whole handle_sync_event white
  173. keyword whole terminate white
  174. keyword whole code_change white
  175. # list comprehension
  176. keyword <- yellow
  177. # clause
  178. keyword -> yellow
  179. # guards
  180. keyword =:= brown
  181. keyword == brown
  182. keyword /= brown
  183. keyword =/= brown
  184. # binary
  185. keyword << brightcyan
  186. keyword >> brightcyan
  187. # guards
  188. keyword < brown
  189. keyword =< brown
  190. keyword >= brown
  191. keyword > brown
  192. # ops
  193. keyword - yellow
  194. keyword \+ yellow
  195. keyword / yellow
  196. keyword \* yellow
  197. keyword ; brightcyan
  198. keyword , brightcyan
  199. keyword . brightcyan
  200. keyword = yellow
  201. keyword % brown
  202. keyword \+\+ yellow
  203. keyword -- yellow
  204. keyword ! yellow
  205. # TODO this does not work for $" or $', use $\" or $\' instead. ?
  206. keyword $\{abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789_{}[]()(\\/`~!@#$%^&\*+-=;:'"|,./?<>\} red
  207. keyword $\ red
  208. # keyword '\\\{0123\}\{01234567\}\{01234567\}' brightgreen
  209. # TODO: integers, inegers of form Base#digits, 2#1010101
  210. # todo: records access via #state{}
  211. keyword whole ?MODULE red
  212. keyword whole ?LINE red
  213. keyword whole ?FILE red
  214. keyword whole ?\[abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789_@\] red
  215. # gray operatory
  216. # cyan - moduly
  217. keyword whole true red
  218. keyword whole false red
  219. keyword [ brightcyan
  220. keyword || brightcyan
  221. keyword | brightcyan
  222. keyword ] brightcyan
  223. keyword ( brightcyan
  224. keyword ) brightcyan
  225. keyword { cyan
  226. keyword } cyan
  227. keyword whole lists:seq gray
  228. keyword whole lists:map gray
  229. keyword whole lists:filter gray
  230. keyword whole lists:reduce gray
  231. keyword whole lists:foldl gray
  232. keyword whole lists:foldr gray
  233. keyword whole lists:append gray
  234. keyword whole lists:nth gray
  235. keyword whole behaviour_info gray
  236. keyword whole dict:find gray
  237. keyword whole dict:is_key gray
  238. keyword whole dict:erase gray
  239. keyword whole dict:new gray
  240. keyword whole dict:map gray
  241. keyword whole dict:store gray
  242. keyword whole dict:fetch_keys gray
  243. keyword whole dict:append gray
  244. keyword whole dict:update gray
  245. keyword whole dict:update_counter gray
  246. keyword whole dict:fold gray
  247. keyword whole dict:to_list gray
  248. keyword whole dict:fetch gray
  249. # todo: no more than one dot in atom, and not at the end
  250. keyword whole \{abcdefghijklmnoprqstuvwxyz\}\[abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789_.@\] lightgray
  251. keyword whole \{_ABCDEFGHIJKLMNOPRQSTUVWXYZ\}\[abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789_@\] white
  252. context exclusive % \n brown
  253. spellcheck
  254. context " " green
  255. spellcheck
  256. keyword ~p brightgreen
  257. keyword ~n brightgreen
  258. keyword ~w brightgreen
  259. keyword ~~ brightgreen
  260. keyword \\" brightgreen
  261. keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
  262. keyword \\\{01234567\}\{01234567\} brightgreen
  263. keyword \\\{01234567\} brightgreen
  264. keyword \\x\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\} brightgreen
  265. keyword \\\\ brightgreen
  266. keyword \\' brightgreen
  267. keyword \\\{bdefrstv\} brightgreen
  268. keyword \\^\{abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ\} brightgreen
  269. context ' ' red
  270. keyword \\" brightred
  271. keyword \\\{0123\}\{01234567\}\{01234567\} brightred
  272. keyword \\\{01234567\}\{01234567\} brightred
  273. keyword \\\{01234567\} brightred
  274. keyword \\x\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\} brightred
  275. keyword \\\\ brightred
  276. keyword \\' brightred
  277. keyword \\\{bdefrstv\} brightred
  278. keyword \\^\{abcdefghijklmnoprqstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ\} brightred