b.syntax 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. # B language keywords
  2. # by Gyorgy Rotter
  3. #
  4. # For the proper syntax highlight the order of the keywords are
  5. # important. This is why the related keywords are not listed in a block.
  6. # To create semantic relationship between the keywords I used groups.
  7. # Some keywords are in a group (the name of the group is
  8. # indicated in a commented line above the keyword definition)
  9. #
  10. # With the one-liner for example we could replace
  11. # the color of the keywords which are the members of the
  12. # "Sequences" group from "yellow" to "red"...
  13. #
  14. # echo Sequences yellow red | xargs -l bash -c 'sed -z "s/\(# $0\n[^\n]*\)$1/\1$2/g" b.syntax'
  15. # ^ ^ ^
  16. # | | |
  17. # | | -- new_color
  18. # | -- actual_color
  19. # -- groupname
  20. #
  21. #
  22. # Usable groups:
  23. # Relations, Sequences, Logical, Arithmetic, Sets, Substitutions
  24. #
  25. # Usable colors:
  26. # described in the Syntax file
  27. #
  28. context default
  29. keyword whole ABSTRACT_CONSTANTS yellow
  30. keyword whole ABSTRACT_VARIABLES yellow
  31. keyword whole CONCRETE_CONSTANTS yellow
  32. keyword whole CONCRETE_VARIABLES yellow
  33. keyword whole LOCAL_OPERATIONS yellow
  34. keyword whole IMPLEMENTATION yellow
  35. keyword whole INITIALISATION yellow
  36. keyword whole CONSTRAINTS yellow
  37. keyword whole DEFINITIONS yellow
  38. keyword whole ASSERTIONS yellow
  39. keyword whole OPERATIONS yellow
  40. keyword whole PROPERTIES yellow
  41. keyword whole REFINEMENT yellow
  42. keyword whole CONSTANTS yellow
  43. keyword whole INVARIANT yellow
  44. keyword whole sequences yellow
  45. keyword whole VARIABLES yellow
  46. keyword whole Cardinal yellow
  47. # Relations
  48. keyword whole closure1 white
  49. keyword whole INCLUDES yellow
  50. # Arithmetic
  51. keyword whole NATURAL1 yellow
  52. keyword whole PROMOTES yellow
  53. keyword whole Boolean yellow
  54. keyword whole EXTENDS yellow
  55. keyword whole IMPORTS yellow
  56. # Arithmetic
  57. keyword whole INTEGER yellow
  58. keyword whole iterate yellow
  59. keyword whole MACHINE yellow
  60. # Arithmetic
  61. keyword whole NATURAL yellow
  62. keyword whole postfix yellow
  63. keyword whole REFINES yellow
  64. keyword whole subtree yellow
  65. keyword whole VARIANT yellow
  66. keyword whole ASSERT yellow
  67. keyword whole CHOICE yellow
  68. # Relations
  69. keyword whole closure white
  70. keyword whole EITHER yellow
  71. keyword whole father yellow
  72. keyword whole MAXINT yellow
  73. keyword whole MININT yellow
  74. keyword whole mirror yellow
  75. keyword whole modulo yellow
  76. keyword whole prefix yellow
  77. keyword whole SELECT yellow
  78. keyword whole STRING yellow
  79. keyword whole struct yellow
  80. keyword whole VALUES yellow
  81. keyword whole arity yellow
  82. keyword whole BEGIN yellow
  83. keyword whole btree yellow
  84. keyword whole const yellow
  85. keyword whole ELSIF yellow
  86. keyword whole FALSE yellow
  87. keyword whole first yellow
  88. keyword whole front yellow
  89. keyword whole infix yellow
  90. # Sets
  91. keyword whole INTER yellow
  92. keyword whole inter yellow
  93. keyword whole iseq1 yellow
  94. keyword whole right yellow
  95. # Arithmetic
  96. keyword whole SIGMA yellow
  97. keyword whole sizet yellow
  98. # Sets
  99. keyword whole UNION yellow
  100. keyword whole union yellow
  101. keyword whole WHERE yellow
  102. keyword whole WHILE yellow
  103. keyword whole bool yellow
  104. keyword whole BOOL yellow
  105. keyword whole card yellow
  106. keyword whole CASE yellow
  107. keyword whole conc yellow
  108. keyword whole ELSE yellow
  109. # Sets
  110. keyword whole FIN1 yellow
  111. keyword whole iseq yellow
  112. keyword whole last yellow
  113. keyword whole left yellow
  114. keyword whole NAT1 yellow
  115. # Sets
  116. keyword whole POW1 yellow
  117. keyword whole perm yellow
  118. keyword whole pred yellow
  119. keyword whole prj1 yellow
  120. keyword whole prj2 yellow
  121. keyword whole rank yellow
  122. keyword whole SEES yellow
  123. keyword whole seq1 yellow
  124. keyword whole SETS yellow
  125. keyword whole size yellow
  126. keyword whole skip yellow
  127. keyword whole sons yellow
  128. keyword whole succ yellow
  129. keyword whole tail yellow
  130. keyword whole THEN yellow
  131. keyword whole tree yellow
  132. keyword whole TRUE yellow
  133. keyword whole USES yellow
  134. keyword whole WHEN yellow
  135. keyword whole ANY yellow
  136. keyword whole bin yellow
  137. keyword whole dom yellow
  138. keyword whole END yellow
  139. # Sets
  140. keyword whole FIN yellow
  141. keyword whole fnc yellow
  142. keyword whole INT yellow
  143. keyword whole LET yellow
  144. keyword whole max yellow
  145. keyword whole min yellow
  146. keyword whole mod yellow
  147. keyword whole NAT yellow
  148. # Logical
  149. keyword whole not cyan
  150. # Sets
  151. keyword whole POW yellow
  152. keyword whole PRE yellow
  153. keyword whole ran yellow
  154. keyword whole rec yellow
  155. keyword whole rel yellow
  156. keyword whole rev yellow
  157. keyword whole seq yellow
  158. keyword whole Set yellow
  159. keyword whole son yellow
  160. keyword whole top yellow
  161. keyword whole VAR yellow
  162. keyword whole BE yellow
  163. keyword whole DO yellow
  164. keyword whole id yellow
  165. keyword whole IF yellow
  166. keyword whole IN yellow
  167. keyword whole OF yellow
  168. keyword whole OR yellow
  169. # Logical
  170. keyword whole or cyan
  171. # Arithmetic
  172. keyword whole PI yellow
  173. # prevents - keyword from interfering with comment
  174. keyword /\* green
  175. keyword \*/ green
  176. keyword // green
  177. keyword <-- yellow
  178. keyword := yellow
  179. # Relations
  180. keyword \+->> white
  181. # Relations
  182. keyword -->> white
  183. # Sets
  184. keyword /<<: yellow
  185. # Sequences
  186. keyword /|\\ magenta
  187. # Relations
  188. keyword >->> white
  189. # Relations
  190. keyword >\+> white
  191. # Arithmetic
  192. keyword \*\* yellow
  193. # Relations
  194. keyword \+-> white
  195. # Sequences
  196. keyword \\|/ magenta
  197. # Relations
  198. keyword --> white
  199. # Sets
  200. keyword /<: yellow
  201. # Sets
  202. keyword /\\ yellow
  203. # Relations
  204. keyword <-> white
  205. # Sets
  206. keyword <<: yellow
  207. # Relations
  208. keyword <<| white
  209. # Logical
  210. keyword <=> cyan
  211. # Relations
  212. keyword <\+ white
  213. # Relations
  214. keyword >-> white
  215. # Sets
  216. keyword \\/ yellow
  217. # Relations
  218. keyword |-> white
  219. # Relations
  220. keyword |>> white
  221. keyword != yellow
  222. # Sequences
  223. keyword -> magenta
  224. # Sets
  225. keyword /: yellow
  226. # Logical
  227. keyword /= cyan
  228. # Substitutions
  229. keyword :: yellow
  230. # Sequences
  231. keyword <- magenta
  232. # Sets
  233. keyword <: yellow
  234. # Arithmetic
  235. keyword <= yellow
  236. # Relations
  237. keyword <| white
  238. keyword == yellow
  239. # Logical
  240. keyword => cyan
  241. # Relations
  242. keyword >< white
  243. # Arithmetic
  244. keyword >= yellow
  245. # Arithmetic
  246. keyword \* yellow
  247. # Arithmetic
  248. keyword \+ yellow
  249. # Sets
  250. keyword {} yellow
  251. # Relations
  252. keyword |> white
  253. # Logical
  254. keyword ! cyan
  255. # Logical
  256. keyword # cyan
  257. # Relations
  258. keyword % white
  259. # Logical
  260. keyword & cyan
  261. keyword ( yellow
  262. keyword ) yellow
  263. keyword , yellow
  264. # Arithmetic
  265. keyword - yellow
  266. # Arithmetic
  267. keyword / yellow
  268. # Sets
  269. keyword : yellow
  270. keyword ; yellow
  271. # Arithmetic
  272. keyword < yellow
  273. # Logical
  274. keyword = cyan
  275. # Arithmetic
  276. keyword > yellow
  277. keyword ? yellow
  278. keyword [ yellow
  279. keyword ] yellow
  280. # Sequences
  281. keyword ^ magenta
  282. keyword { yellow
  283. keyword } yellow
  284. keyword | yellow
  285. # Relations
  286. keyword ~ white
  287. context exclusive /\* \*/ green
  288. spellcheck
  289. context exclusive // \n green
  290. spellcheck
  291. context " " brightgreen