tokens_pascal.json 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. [[
  2. "punctuation.definition.comment.pascal",
  3. ["punctuation.definition.comment.pascal","(*"],
  4. ["comment.block.pascal.one","****************************************************************************"]
  5. ],[
  6. "punctuation.definition.comment.pascal",
  7. ["comment.block.pascal.one"," * A simple bubble sort program. Reads integers, one per line, and prints *"]
  8. ],[
  9. "punctuation.definition.comment.pascal",
  10. ["comment.block.pascal.one"," * them out in sorted order. Blows up if there are more than 49. *"]
  11. ],[
  12. "start",
  13. ["comment.block.pascal.one"," ****************************************************************************"],
  14. ["punctuation.definition.comment.pascal","*)"]
  15. ],[
  16. "start",
  17. ["keyword.control.pascal","PROGRAM"],
  18. ["text"," Sort(input"],
  19. ["keyword.operator",","],
  20. ["text"," output)"],
  21. ["keyword.operator",";"]
  22. ],[
  23. "start",
  24. ["text"," "],
  25. ["keyword.control.pascal","CONST"]
  26. ],[
  27. "start",
  28. ["text"," "],
  29. ["punctuation.definition.comment.pascal","(*"],
  30. ["comment.block.pascal.one"," Max array size. "],
  31. ["punctuation.definition.comment.pascal","*)"]
  32. ],[
  33. "start",
  34. ["text"," MaxElts "],
  35. ["keyword.operator","="],
  36. ["text"," "],
  37. ["constant.numeric.pascal","50"],
  38. ["keyword.operator",";"]
  39. ],[
  40. "start",
  41. ["text"," "],
  42. ["keyword.control.pascal","TYPE"],
  43. ["text"," "]
  44. ],[
  45. "start",
  46. ["text"," "],
  47. ["punctuation.definition.comment.pascal","(*"],
  48. ["comment.block.pascal.one"," Type of the element array. "],
  49. ["punctuation.definition.comment.pascal","*)"]
  50. ],[
  51. "start",
  52. ["text"," IntArrType "],
  53. ["keyword.operator","="],
  54. ["text"," "],
  55. ["keyword.control.pascal","ARRAY"],
  56. ["text"," ["],
  57. ["constant.numeric.pascal","1"],
  58. ["text","..MaxElts] "],
  59. ["keyword.control.pascal","OF"],
  60. ["text"," Integer"],
  61. ["keyword.operator",";"]
  62. ],[
  63. "start"
  64. ],[
  65. "start",
  66. ["text"," "],
  67. ["keyword.control.pascal","VAR"]
  68. ],[
  69. "start",
  70. ["text"," "],
  71. ["punctuation.definition.comment.pascal","(*"],
  72. ["comment.block.pascal.one"," Indexes, exchange temp, array size. "],
  73. ["punctuation.definition.comment.pascal","*)"]
  74. ],[
  75. "start",
  76. ["text"," i"],
  77. ["keyword.operator",","],
  78. ["text"," j"],
  79. ["keyword.operator",","],
  80. ["text"," tmp"],
  81. ["keyword.operator",","],
  82. ["text"," size: integer"],
  83. ["keyword.operator",";"]
  84. ],[
  85. "start"
  86. ],[
  87. "start",
  88. ["text"," "],
  89. ["punctuation.definition.comment.pascal","(*"],
  90. ["comment.block.pascal.one"," Array of ints "],
  91. ["punctuation.definition.comment.pascal","*)"]
  92. ],[
  93. "start",
  94. ["text"," arr: IntArrType"],
  95. ["keyword.operator",";"]
  96. ],[
  97. "start"
  98. ],[
  99. "start",
  100. ["text"," "],
  101. ["punctuation.definition.comment.pascal","(*"],
  102. ["comment.block.pascal.one"," Read in the integers. "],
  103. ["punctuation.definition.comment.pascal","*)"]
  104. ],[
  105. "start",
  106. ["text"," "],
  107. ["variable.pascal","PROCEDURE"],
  108. ["text"," "],
  109. ["storage.type.function.pascal","ReadArr"],
  110. ["text","("],
  111. ["keyword.control.pascal","VAR"],
  112. ["text"," size: Integer"],
  113. ["keyword.operator",";"],
  114. ["text"," "],
  115. ["keyword.control.pascal","VAR"],
  116. ["text"," a: IntArrType)"],
  117. ["keyword.operator",";"],
  118. ["text"," "]
  119. ],[
  120. "start",
  121. ["text"," "],
  122. ["keyword.control.pascal","BEGIN"]
  123. ],[
  124. "start",
  125. ["text"," size "],
  126. ["keyword.operator",":="],
  127. ["text"," "],
  128. ["constant.numeric.pascal","1"],
  129. ["keyword.operator",";"]
  130. ],[
  131. "start",
  132. ["text"," "],
  133. ["keyword.control.pascal","WHILE"],
  134. ["text"," "],
  135. ["keyword.control.pascal","NOT"],
  136. ["text"," eof "],
  137. ["keyword.control.pascal","DO"],
  138. ["text"," "],
  139. ["keyword.control.pascal","BEGIN"]
  140. ],[
  141. "start",
  142. ["text"," readln(a[size])"],
  143. ["keyword.operator",";"]
  144. ],[
  145. "start",
  146. ["text"," "],
  147. ["keyword.control.pascal","IF"],
  148. ["text"," "],
  149. ["keyword.control.pascal","NOT"],
  150. ["text"," eof "],
  151. ["keyword.control.pascal","THEN"],
  152. ["text"," "]
  153. ],[
  154. "start",
  155. ["text"," size "],
  156. ["keyword.operator",":="],
  157. ["text"," size "],
  158. ["keyword.operator","+"],
  159. ["text"," "],
  160. ["constant.numeric.pascal","1"]
  161. ],[
  162. "start",
  163. ["text"," "],
  164. ["keyword.control.pascal","END"]
  165. ],[
  166. "start",
  167. ["text"," "],
  168. ["keyword.control.pascal","END"],
  169. ["keyword.operator",";"]
  170. ],[
  171. "start"
  172. ],[
  173. "start",
  174. ["text"," "],
  175. ["keyword.control.pascal","BEGIN"]
  176. ],[
  177. "start",
  178. ["text"," "],
  179. ["punctuation.definition.comment.pascal","(*"],
  180. ["comment.block.pascal.one"," Read "],
  181. ["punctuation.definition.comment.pascal","*)"]
  182. ],[
  183. "start",
  184. ["text"," ReadArr(size"],
  185. ["keyword.operator",","],
  186. ["text"," arr)"],
  187. ["keyword.operator",";"]
  188. ],[
  189. "start"
  190. ],[
  191. "start",
  192. ["text"," "],
  193. ["punctuation.definition.comment.pascal","(*"],
  194. ["comment.block.pascal.one"," Sort using bubble sort. "],
  195. ["punctuation.definition.comment.pascal","*)"]
  196. ],[
  197. "start",
  198. ["text"," "],
  199. ["keyword.control.pascal","FOR"],
  200. ["text"," i "],
  201. ["keyword.operator",":="],
  202. ["text"," size "],
  203. ["keyword.operator","-"],
  204. ["text"," "],
  205. ["constant.numeric.pascal","1"],
  206. ["text"," DOWNTO "],
  207. ["constant.numeric.pascal","1"],
  208. ["text"," "],
  209. ["keyword.control.pascal","DO"]
  210. ],[
  211. "start",
  212. ["text"," "],
  213. ["keyword.control.pascal","FOR"],
  214. ["text"," j "],
  215. ["keyword.operator",":="],
  216. ["text"," "],
  217. ["constant.numeric.pascal","1"],
  218. ["text"," "],
  219. ["keyword.control.pascal","TO"],
  220. ["text"," i "],
  221. ["keyword.control.pascal","DO"],
  222. ["text"," "]
  223. ],[
  224. "start",
  225. ["text"," "],
  226. ["keyword.control.pascal","IF"],
  227. ["text"," arr[j] > arr[j "],
  228. ["keyword.operator","+"],
  229. ["text"," "],
  230. ["constant.numeric.pascal","1"],
  231. ["text","] "],
  232. ["keyword.control.pascal","THEN"],
  233. ["text"," "],
  234. ["keyword.control.pascal","BEGIN"]
  235. ],[
  236. "start",
  237. ["text"," tmp "],
  238. ["keyword.operator",":="],
  239. ["text"," arr[j]"],
  240. ["keyword.operator",";"]
  241. ],[
  242. "start",
  243. ["text"," arr[j] "],
  244. ["keyword.operator",":="],
  245. ["text"," arr[j "],
  246. ["keyword.operator","+"],
  247. ["text"," "],
  248. ["constant.numeric.pascal","1"],
  249. ["text","]"],
  250. ["keyword.operator",";"]
  251. ],[
  252. "start",
  253. ["text"," arr[j "],
  254. ["keyword.operator","+"],
  255. ["text"," "],
  256. ["constant.numeric.pascal","1"],
  257. ["text","] "],
  258. ["keyword.operator",":="],
  259. ["text"," tmp"],
  260. ["keyword.operator",";"]
  261. ],[
  262. "start",
  263. ["text"," "],
  264. ["keyword.control.pascal","END"],
  265. ["keyword.operator",";"]
  266. ],[
  267. "start"
  268. ],[
  269. "start",
  270. ["text"," "],
  271. ["punctuation.definition.comment.pascal","(*"],
  272. ["comment.block.pascal.one"," Print. "],
  273. ["punctuation.definition.comment.pascal","*)"]
  274. ],[
  275. "start",
  276. ["text"," "],
  277. ["keyword.control.pascal","FOR"],
  278. ["text"," i "],
  279. ["keyword.operator",":="],
  280. ["text"," "],
  281. ["constant.numeric.pascal","1"],
  282. ["text"," "],
  283. ["keyword.control.pascal","TO"],
  284. ["text"," size "],
  285. ["keyword.control.pascal","DO"]
  286. ],[
  287. "start",
  288. ["text"," writeln(arr[i])"]
  289. ],[
  290. "start",
  291. ["text"," "],
  292. ["keyword.control.pascal","END"],
  293. ["text","."]
  294. ],[
  295. "start",
  296. ["text"," "]
  297. ]]