tzo 1.0.15 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/dist/{cjs → browser}/cli.d.ts +0 -0
  2. package/dist/{cjs → browser}/cli.js +6 -5
  3. package/dist/browser/cli.js.map +1 -0
  4. package/dist/browser/concisetext/ConciseTextLexer.d.ts +30 -0
  5. package/dist/browser/concisetext/ConciseTextLexer.js +123 -0
  6. package/dist/browser/concisetext/ConciseTextLexer.js.map +1 -0
  7. package/dist/browser/concisetext/ConciseTextListener.d.ts +14 -0
  8. package/dist/browser/concisetext/ConciseTextListener.js +36 -0
  9. package/dist/browser/concisetext/ConciseTextListener.js.map +1 -0
  10. package/dist/browser/concisetext/ConciseTextParser.d.ts +99 -0
  11. package/dist/browser/concisetext/ConciseTextParser.js +439 -0
  12. package/dist/browser/concisetext/ConciseTextParser.js.map +1 -0
  13. package/dist/{cjs → browser}/getStackParams.d.ts +1 -1
  14. package/dist/{cjs → browser}/getStackParams.js +1 -0
  15. package/dist/browser/getStackParams.js.map +1 -0
  16. package/dist/browser/index.d.ts +5 -0
  17. package/dist/{cjs → browser}/index.js +6 -5
  18. package/dist/browser/index.js.map +1 -0
  19. package/dist/{cjs → browser}/interfaces.d.ts +1 -1
  20. package/dist/{cjs → browser}/interfaces.js +1 -0
  21. package/dist/browser/interfaces.js.map +1 -0
  22. package/dist/{cjs → browser}/opcodes/and.d.ts +1 -1
  23. package/dist/browser/opcodes/and.js +9 -0
  24. package/dist/browser/opcodes/and.js.map +1 -0
  25. package/dist/{cjs → browser}/opcodes/charCode.d.ts +1 -1
  26. package/dist/{cjs → browser}/opcodes/charCode.js +3 -2
  27. package/dist/browser/opcodes/charCode.js.map +1 -0
  28. package/dist/{cjs → browser}/opcodes/closeBrace.d.ts +1 -1
  29. package/dist/{cjs → browser}/opcodes/closeBrace.js +2 -1
  30. package/dist/browser/opcodes/closeBrace.js.map +1 -0
  31. package/dist/{cjs → browser}/opcodes/concat.d.ts +1 -1
  32. package/dist/browser/opcodes/concat.js +9 -0
  33. package/dist/browser/opcodes/concat.js.map +1 -0
  34. package/dist/{cjs → browser}/opcodes/delContext.d.ts +1 -1
  35. package/dist/browser/opcodes/delContext.js +9 -0
  36. package/dist/browser/opcodes/delContext.js.map +1 -0
  37. package/dist/{cjs → browser}/opcodes/dup.d.ts +1 -1
  38. package/dist/{cjs → browser}/opcodes/dup.js +3 -2
  39. package/dist/browser/opcodes/dup.js.map +1 -0
  40. package/dist/browser/opcodes/eq.d.ts +3 -0
  41. package/dist/browser/opcodes/eq.js +10 -0
  42. package/dist/browser/opcodes/eq.js.map +1 -0
  43. package/dist/{cjs → browser}/opcodes/exit.d.ts +1 -1
  44. package/dist/{cjs → browser}/opcodes/exit.js +1 -0
  45. package/dist/browser/opcodes/exit.js.map +1 -0
  46. package/dist/{cjs → browser}/opcodes/getContext.d.ts +1 -1
  47. package/dist/{cjs → browser}/opcodes/getContext.js +3 -2
  48. package/dist/browser/opcodes/getContext.js.map +1 -0
  49. package/dist/{cjs → browser}/opcodes/goto.d.ts +1 -1
  50. package/dist/{cjs → browser}/opcodes/goto.js +3 -2
  51. package/dist/browser/opcodes/goto.js.map +1 -0
  52. package/dist/browser/opcodes/gt.d.ts +3 -0
  53. package/dist/{cjs → browser}/opcodes/gt.js +3 -2
  54. package/dist/browser/opcodes/gt.js.map +1 -0
  55. package/dist/{cjs → browser}/opcodes/hasContext.d.ts +1 -1
  56. package/dist/{cjs → browser}/opcodes/hasContext.js +3 -2
  57. package/dist/browser/opcodes/hasContext.js.map +1 -0
  58. package/dist/{cjs → browser}/opcodes/jgz.d.ts +1 -1
  59. package/dist/{cjs → browser}/opcodes/jgz.js +3 -2
  60. package/dist/browser/opcodes/jgz.js.map +1 -0
  61. package/dist/browser/opcodes/jz.d.ts +3 -0
  62. package/dist/{cjs → browser}/opcodes/jz.js +3 -2
  63. package/dist/browser/opcodes/jz.js.map +1 -0
  64. package/dist/browser/opcodes/lt.d.ts +3 -0
  65. package/dist/{cjs → browser}/opcodes/lt.js +3 -2
  66. package/dist/browser/opcodes/lt.js.map +1 -0
  67. package/dist/{cjs → browser}/opcodes/min.d.ts +1 -1
  68. package/dist/{cjs → browser}/opcodes/min.js +3 -2
  69. package/dist/browser/opcodes/min.js.map +1 -0
  70. package/dist/{cjs → browser}/opcodes/mul.d.ts +1 -1
  71. package/dist/{cjs → browser}/opcodes/mul.js +3 -2
  72. package/dist/browser/opcodes/mul.js.map +1 -0
  73. package/dist/{mjs → browser}/opcodes/nop.d.ts +1 -1
  74. package/dist/{cjs → browser}/opcodes/nop.js +1 -0
  75. package/dist/browser/opcodes/nop.js.map +1 -0
  76. package/dist/{mjs → browser}/opcodes/not.d.ts +1 -1
  77. package/dist/{cjs → browser}/opcodes/not.js +3 -2
  78. package/dist/browser/opcodes/not.js.map +1 -0
  79. package/dist/{cjs → browser}/opcodes/openBrace.d.ts +1 -1
  80. package/dist/{cjs → browser}/opcodes/openBrace.js +2 -1
  81. package/dist/browser/opcodes/openBrace.js.map +1 -0
  82. package/dist/browser/opcodes/or.d.ts +3 -0
  83. package/dist/browser/opcodes/or.js +9 -0
  84. package/dist/browser/opcodes/or.js.map +1 -0
  85. package/dist/{cjs → browser}/opcodes/pause.d.ts +1 -1
  86. package/dist/{cjs → browser}/opcodes/pause.js +1 -0
  87. package/dist/browser/opcodes/pause.js.map +1 -0
  88. package/dist/{cjs → browser}/opcodes/plus.d.ts +1 -1
  89. package/dist/{cjs → browser}/opcodes/plus.js +3 -2
  90. package/dist/browser/opcodes/plus.js.map +1 -0
  91. package/dist/{cjs → browser}/opcodes/pop.d.ts +1 -1
  92. package/dist/{cjs → browser}/opcodes/pop.js +1 -0
  93. package/dist/browser/opcodes/pop.js.map +1 -0
  94. package/dist/{cjs → browser}/opcodes/ppc.d.ts +1 -1
  95. package/dist/{cjs → browser}/opcodes/ppc.js +1 -0
  96. package/dist/browser/opcodes/ppc.js.map +1 -0
  97. package/dist/{cjs → browser}/opcodes/randInt.d.ts +1 -1
  98. package/dist/{cjs → browser}/opcodes/randInt.js +3 -2
  99. package/dist/browser/opcodes/randInt.js.map +1 -0
  100. package/dist/{cjs → browser}/opcodes/rconcat.d.ts +1 -1
  101. package/dist/browser/opcodes/rconcat.js +9 -0
  102. package/dist/browser/opcodes/rconcat.js.map +1 -0
  103. package/dist/{cjs → browser}/opcodes/setContext.d.ts +1 -1
  104. package/dist/browser/opcodes/setContext.js +9 -0
  105. package/dist/browser/opcodes/setContext.js.map +1 -0
  106. package/dist/{cjs → browser}/opcodes/stacksize.d.ts +1 -1
  107. package/dist/{cjs → browser}/opcodes/stacksize.js +1 -0
  108. package/dist/browser/opcodes/stacksize.js.map +1 -0
  109. package/dist/{cjs → browser}/opcodes/stdout.d.ts +1 -1
  110. package/dist/{cjs → browser}/opcodes/stdout.js +1 -0
  111. package/dist/browser/opcodes/stdout.js.map +1 -0
  112. package/dist/{cjs → browser}/util/builder.d.ts +0 -0
  113. package/dist/{cjs → browser}/util/builder.js +1 -0
  114. package/dist/browser/util/builder.js.map +1 -0
  115. package/dist/{cjs → browser}/util/fix_antlr_grammar_ts.d.ts +0 -0
  116. package/dist/{cjs → browser}/util/fix_antlr_grammar_ts.js +1 -0
  117. package/dist/browser/util/fix_antlr_grammar_ts.js.map +1 -0
  118. package/dist/{mjs → browser}/util/tokenizer.d.ts +2 -2
  119. package/dist/{cjs → browser}/util/tokenizer.js +18 -16
  120. package/dist/browser/util/tokenizer.js.map +1 -0
  121. package/dist/{cjs → browser}/vm.d.ts +1 -1
  122. package/dist/{cjs → browser}/vm.js +64 -63
  123. package/dist/browser/vm.js.map +1 -0
  124. package/dist/{cjs → browser}/vm.test.d.ts +0 -0
  125. package/dist/{cjs → browser}/vm.test.js +2 -1
  126. package/dist/browser/vm.test.js.map +1 -0
  127. package/dist/{mjs → node}/cli.d.ts +0 -0
  128. package/dist/node/cli.js +35 -0
  129. package/dist/node/cli.js.map +1 -0
  130. package/dist/node/concisetext/ConciseTextLexer.d.ts +30 -0
  131. package/dist/node/concisetext/ConciseTextLexer.js +123 -0
  132. package/dist/node/concisetext/ConciseTextLexer.js.map +1 -0
  133. package/dist/node/concisetext/ConciseTextListener.d.ts +14 -0
  134. package/dist/node/concisetext/ConciseTextListener.js +36 -0
  135. package/dist/node/concisetext/ConciseTextListener.js.map +1 -0
  136. package/dist/node/concisetext/ConciseTextParser.d.ts +99 -0
  137. package/dist/node/concisetext/ConciseTextParser.js +439 -0
  138. package/dist/node/concisetext/ConciseTextParser.js.map +1 -0
  139. package/dist/{mjs → node}/getStackParams.d.ts +1 -1
  140. package/dist/{mjs → node}/getStackParams.js +6 -1
  141. package/dist/node/getStackParams.js.map +1 -0
  142. package/dist/node/index.d.ts +5 -0
  143. package/dist/node/index.js +18 -0
  144. package/dist/node/index.js.map +1 -0
  145. package/dist/{mjs → node}/interfaces.d.ts +1 -1
  146. package/dist/node/interfaces.js +3 -0
  147. package/dist/node/interfaces.js.map +1 -0
  148. package/dist/{mjs → node}/opcodes/and.d.ts +1 -1
  149. package/dist/node/opcodes/and.js +9 -0
  150. package/dist/node/opcodes/and.js.map +1 -0
  151. package/dist/{mjs → node}/opcodes/charCode.d.ts +1 -1
  152. package/dist/node/opcodes/charCode.js +10 -0
  153. package/dist/node/opcodes/charCode.js.map +1 -0
  154. package/dist/{mjs → node}/opcodes/closeBrace.d.ts +1 -1
  155. package/dist/node/opcodes/closeBrace.js +7 -0
  156. package/dist/node/opcodes/closeBrace.js.map +1 -0
  157. package/dist/{mjs → node}/opcodes/concat.d.ts +1 -1
  158. package/dist/node/opcodes/concat.js +9 -0
  159. package/dist/node/opcodes/concat.js.map +1 -0
  160. package/dist/{mjs → node}/opcodes/delContext.d.ts +1 -1
  161. package/dist/node/opcodes/delContext.js +9 -0
  162. package/dist/node/opcodes/delContext.js.map +1 -0
  163. package/dist/{mjs → node}/opcodes/dup.d.ts +1 -1
  164. package/dist/node/opcodes/dup.js +13 -0
  165. package/dist/node/opcodes/dup.js.map +1 -0
  166. package/dist/node/opcodes/eq.d.ts +3 -0
  167. package/dist/node/opcodes/eq.js +10 -0
  168. package/dist/node/opcodes/eq.js.map +1 -0
  169. package/dist/{mjs → node}/opcodes/exit.d.ts +1 -1
  170. package/dist/node/opcodes/exit.js +7 -0
  171. package/dist/node/opcodes/exit.js.map +1 -0
  172. package/dist/{mjs → node}/opcodes/getContext.d.ts +1 -1
  173. package/dist/node/opcodes/getContext.js +13 -0
  174. package/dist/node/opcodes/getContext.js.map +1 -0
  175. package/dist/{mjs → node}/opcodes/goto.d.ts +1 -1
  176. package/dist/{mjs → node}/opcodes/goto.js +6 -3
  177. package/dist/node/opcodes/goto.js.map +1 -0
  178. package/dist/node/opcodes/gt.d.ts +3 -0
  179. package/dist/node/opcodes/gt.js +10 -0
  180. package/dist/node/opcodes/gt.js.map +1 -0
  181. package/dist/{mjs → node}/opcodes/hasContext.d.ts +1 -1
  182. package/dist/node/opcodes/hasContext.js +14 -0
  183. package/dist/node/opcodes/hasContext.js.map +1 -0
  184. package/dist/{mjs → node}/opcodes/jgz.d.ts +1 -1
  185. package/dist/node/opcodes/jgz.js +11 -0
  186. package/dist/node/opcodes/jgz.js.map +1 -0
  187. package/dist/node/opcodes/jz.d.ts +3 -0
  188. package/dist/node/opcodes/jz.js +11 -0
  189. package/dist/node/opcodes/jz.js.map +1 -0
  190. package/dist/node/opcodes/lt.d.ts +3 -0
  191. package/dist/node/opcodes/lt.js +10 -0
  192. package/dist/node/opcodes/lt.js.map +1 -0
  193. package/dist/{mjs → node}/opcodes/min.d.ts +1 -1
  194. package/dist/node/opcodes/min.js +11 -0
  195. package/dist/node/opcodes/min.js.map +1 -0
  196. package/dist/{mjs → node}/opcodes/mul.d.ts +1 -1
  197. package/dist/node/opcodes/mul.js +11 -0
  198. package/dist/node/opcodes/mul.js.map +1 -0
  199. package/dist/{cjs → node}/opcodes/nop.d.ts +1 -1
  200. package/dist/node/opcodes/nop.js +10 -0
  201. package/dist/node/opcodes/nop.js.map +1 -0
  202. package/dist/{cjs → node}/opcodes/not.d.ts +1 -1
  203. package/dist/node/opcodes/not.js +17 -0
  204. package/dist/node/opcodes/not.js.map +1 -0
  205. package/dist/{mjs → node}/opcodes/openBrace.d.ts +1 -1
  206. package/dist/{mjs → node}/opcodes/openBrace.js +5 -2
  207. package/dist/node/opcodes/openBrace.js.map +1 -0
  208. package/dist/node/opcodes/or.d.ts +3 -0
  209. package/dist/node/opcodes/or.js +9 -0
  210. package/dist/node/opcodes/or.js.map +1 -0
  211. package/dist/{mjs → node}/opcodes/pause.d.ts +1 -1
  212. package/dist/node/opcodes/pause.js +7 -0
  213. package/dist/node/opcodes/pause.js.map +1 -0
  214. package/dist/{mjs → node}/opcodes/plus.d.ts +1 -1
  215. package/dist/node/opcodes/plus.js +11 -0
  216. package/dist/node/opcodes/plus.js.map +1 -0
  217. package/dist/{mjs → node}/opcodes/pop.d.ts +1 -1
  218. package/dist/node/opcodes/pop.js +7 -0
  219. package/dist/node/opcodes/pop.js.map +1 -0
  220. package/dist/{mjs → node}/opcodes/ppc.d.ts +1 -1
  221. package/dist/{mjs → node}/opcodes/ppc.js +4 -1
  222. package/dist/node/opcodes/ppc.js.map +1 -0
  223. package/dist/{mjs → node}/opcodes/randInt.d.ts +1 -1
  224. package/dist/node/opcodes/randInt.js +10 -0
  225. package/dist/node/opcodes/randInt.js.map +1 -0
  226. package/dist/{mjs → node}/opcodes/rconcat.d.ts +1 -1
  227. package/dist/node/opcodes/rconcat.js +9 -0
  228. package/dist/node/opcodes/rconcat.js.map +1 -0
  229. package/dist/{mjs → node}/opcodes/setContext.d.ts +1 -1
  230. package/dist/node/opcodes/setContext.js +9 -0
  231. package/dist/node/opcodes/setContext.js.map +1 -0
  232. package/dist/{mjs → node}/opcodes/stacksize.d.ts +1 -1
  233. package/dist/node/opcodes/stacksize.js +7 -0
  234. package/dist/node/opcodes/stacksize.js.map +1 -0
  235. package/dist/{mjs → node}/opcodes/stdout.d.ts +1 -1
  236. package/dist/node/opcodes/stdout.js +7 -0
  237. package/dist/node/opcodes/stdout.js.map +1 -0
  238. package/dist/{mjs → node}/util/builder.d.ts +0 -0
  239. package/dist/{mjs → node}/util/builder.js +6 -1
  240. package/dist/node/util/builder.js.map +1 -0
  241. package/dist/{mjs → node}/util/fix_antlr_grammar_ts.d.ts +0 -0
  242. package/dist/{mjs → node}/util/fix_antlr_grammar_ts.js +1 -0
  243. package/dist/node/util/fix_antlr_grammar_ts.js.map +1 -0
  244. package/dist/{cjs → node}/util/tokenizer.d.ts +2 -2
  245. package/dist/{mjs → node}/util/tokenizer.js +37 -28
  246. package/dist/node/util/tokenizer.js.map +1 -0
  247. package/dist/{mjs → node}/vm.d.ts +1 -1
  248. package/dist/{mjs → node}/vm.js +76 -70
  249. package/dist/node/vm.js.map +1 -0
  250. package/dist/{mjs → node}/vm.test.d.ts +0 -0
  251. package/dist/{mjs → node}/vm.test.js +18 -12
  252. package/dist/node/vm.test.js.map +1 -0
  253. package/package.json +12 -17
  254. package/tsconfig-browser.json +9 -0
  255. package/tsconfig.json +26 -5
  256. package/cjs_package.json +0 -3
  257. package/dist/cjs/concisetext/ConciseTextLexer.d.ts +0 -34
  258. package/dist/cjs/concisetext/ConciseTextLexer.js +0 -144
  259. package/dist/cjs/concisetext/ConciseTextListener.d.ts +0 -51
  260. package/dist/cjs/concisetext/ConciseTextListener.js +0 -4
  261. package/dist/cjs/concisetext/ConciseTextParser.d.ts +0 -100
  262. package/dist/cjs/concisetext/ConciseTextParser.js +0 -464
  263. package/dist/cjs/concisetext/ConciseTextVisitor.d.ts +0 -38
  264. package/dist/cjs/concisetext/ConciseTextVisitor.js +0 -4
  265. package/dist/cjs/index.d.ts +0 -5
  266. package/dist/cjs/opcodes/and.js +0 -8
  267. package/dist/cjs/opcodes/concat.js +0 -8
  268. package/dist/cjs/opcodes/delContext.js +0 -8
  269. package/dist/cjs/opcodes/eq.d.ts +0 -3
  270. package/dist/cjs/opcodes/eq.js +0 -9
  271. package/dist/cjs/opcodes/gt.d.ts +0 -3
  272. package/dist/cjs/opcodes/jz.d.ts +0 -3
  273. package/dist/cjs/opcodes/lt.d.ts +0 -3
  274. package/dist/cjs/opcodes/or.d.ts +0 -3
  275. package/dist/cjs/opcodes/or.js +0 -8
  276. package/dist/cjs/opcodes/rconcat.js +0 -8
  277. package/dist/cjs/opcodes/setContext.js +0 -8
  278. package/dist/cjs/package.json +0 -3
  279. package/dist/mjs/cli.js +0 -29
  280. package/dist/mjs/concisetext/ConciseTextLexer.d.ts +0 -34
  281. package/dist/mjs/concisetext/ConciseTextLexer.js +0 -121
  282. package/dist/mjs/concisetext/ConciseTextListener.d.ts +0 -51
  283. package/dist/mjs/concisetext/ConciseTextListener.js +0 -3
  284. package/dist/mjs/concisetext/ConciseTextParser.d.ts +0 -100
  285. package/dist/mjs/concisetext/ConciseTextParser.js +0 -437
  286. package/dist/mjs/concisetext/ConciseTextVisitor.d.ts +0 -38
  287. package/dist/mjs/concisetext/ConciseTextVisitor.js +0 -3
  288. package/dist/mjs/index.d.ts +0 -5
  289. package/dist/mjs/index.js +0 -5
  290. package/dist/mjs/interfaces.js +0 -1
  291. package/dist/mjs/opcodes/and.js +0 -6
  292. package/dist/mjs/opcodes/charCode.js +0 -7
  293. package/dist/mjs/opcodes/closeBrace.js +0 -4
  294. package/dist/mjs/opcodes/concat.js +0 -6
  295. package/dist/mjs/opcodes/delContext.js +0 -6
  296. package/dist/mjs/opcodes/dup.js +0 -10
  297. package/dist/mjs/opcodes/eq.d.ts +0 -3
  298. package/dist/mjs/opcodes/eq.js +0 -7
  299. package/dist/mjs/opcodes/exit.js +0 -4
  300. package/dist/mjs/opcodes/getContext.js +0 -10
  301. package/dist/mjs/opcodes/gt.d.ts +0 -3
  302. package/dist/mjs/opcodes/gt.js +0 -7
  303. package/dist/mjs/opcodes/hasContext.js +0 -11
  304. package/dist/mjs/opcodes/jgz.js +0 -8
  305. package/dist/mjs/opcodes/jz.d.ts +0 -3
  306. package/dist/mjs/opcodes/jz.js +0 -8
  307. package/dist/mjs/opcodes/lt.d.ts +0 -3
  308. package/dist/mjs/opcodes/lt.js +0 -7
  309. package/dist/mjs/opcodes/min.js +0 -8
  310. package/dist/mjs/opcodes/mul.js +0 -8
  311. package/dist/mjs/opcodes/nop.js +0 -7
  312. package/dist/mjs/opcodes/not.js +0 -14
  313. package/dist/mjs/opcodes/or.d.ts +0 -3
  314. package/dist/mjs/opcodes/or.js +0 -6
  315. package/dist/mjs/opcodes/pause.js +0 -4
  316. package/dist/mjs/opcodes/plus.js +0 -8
  317. package/dist/mjs/opcodes/pop.js +0 -4
  318. package/dist/mjs/opcodes/randInt.js +0 -7
  319. package/dist/mjs/opcodes/rconcat.js +0 -6
  320. package/dist/mjs/opcodes/setContext.js +0 -6
  321. package/dist/mjs/opcodes/stacksize.js +0 -4
  322. package/dist/mjs/opcodes/stdout.js +0 -4
  323. package/dist/mjs/package.json +0 -3
  324. package/mjs_package.json +0 -3
  325. package/tsconfig-base.json +0 -34
  326. package/tsconfig-cjs.json +0 -8
@@ -1,464 +0,0 @@
1
- "use strict";
2
- // @ts-nocheck
3
- // Generated from src/grammars/ConciseText.g4 by ANTLR 4.9.0-SNAPSHOT
4
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
- if (k2 === undefined) k2 = k;
6
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
7
- }) : (function(o, m, k, k2) {
8
- if (k2 === undefined) k2 = k;
9
- o[k2] = m[k];
10
- }));
11
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
12
- Object.defineProperty(o, "default", { enumerable: true, value: v });
13
- }) : function(o, v) {
14
- o["default"] = v;
15
- });
16
- var __importStar = (this && this.__importStar) || function (mod) {
17
- if (mod && mod.__esModule) return mod;
18
- var result = {};
19
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
20
- __setModuleDefault(result, mod);
21
- return result;
22
- };
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.InvokeFunctionContext = exports.PushStringContext = exports.PushNumberContext = exports.InstructionsContext = exports.ConciseTextParser = void 0;
25
- const ATNDeserializer_1 = require("antlr4ts/atn/ATNDeserializer");
26
- const FailedPredicateException_1 = require("antlr4ts/FailedPredicateException");
27
- const NoViableAltException_1 = require("antlr4ts/NoViableAltException");
28
- const Parser_1 = require("antlr4ts/Parser");
29
- const ParserRuleContext_1 = require("antlr4ts/ParserRuleContext");
30
- const ParserATNSimulator_1 = require("antlr4ts/atn/ParserATNSimulator");
31
- const RecognitionException_1 = require("antlr4ts/RecognitionException");
32
- const VocabularyImpl_1 = require("antlr4ts/VocabularyImpl");
33
- const Utils = __importStar(require("antlr4ts/misc/Utils"));
34
- class ConciseTextParser extends Parser_1.Parser {
35
- constructor(input) {
36
- super(input);
37
- this._interp = new ParserATNSimulator_1.ParserATNSimulator(ConciseTextParser._ATN, this);
38
- }
39
- // @Override
40
- // @NotNull
41
- get vocabulary() {
42
- return ConciseTextParser.VOCABULARY;
43
- }
44
- // tslint:enable:no-trailing-whitespace
45
- // @Override
46
- get grammarFileName() { return "ConciseText.g4"; }
47
- // @Override
48
- get ruleNames() { return ConciseTextParser.ruleNames; }
49
- // @Override
50
- get serializedATN() { return ConciseTextParser._serializedATN; }
51
- createFailedPredicateException(predicate, message) {
52
- return new FailedPredicateException_1.FailedPredicateException(this, predicate, message);
53
- }
54
- // @RuleVersion(0)
55
- instructions() {
56
- let _localctx = new InstructionsContext(this._ctx, this.state);
57
- this.enterRule(_localctx, 0, ConciseTextParser.RULE_instructions);
58
- let _la;
59
- try {
60
- this.enterOuterAlt(_localctx, 1);
61
- {
62
- this.state = 14;
63
- this._errHandler.sync(this);
64
- _la = this._input.LA(1);
65
- while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << ConciseTextParser.NUMBER) | (1 << ConciseTextParser.STRING) | (1 << ConciseTextParser.WORD) | (1 << ConciseTextParser.WHITESPACE))) !== 0)) {
66
- {
67
- this.state = 12;
68
- this._errHandler.sync(this);
69
- switch (this._input.LA(1)) {
70
- case ConciseTextParser.NUMBER:
71
- {
72
- this.state = 8;
73
- this.pushNumber();
74
- }
75
- break;
76
- case ConciseTextParser.STRING:
77
- {
78
- this.state = 9;
79
- this.pushString();
80
- }
81
- break;
82
- case ConciseTextParser.WORD:
83
- {
84
- this.state = 10;
85
- this.invokeFunction();
86
- }
87
- break;
88
- case ConciseTextParser.WHITESPACE:
89
- {
90
- this.state = 11;
91
- this.match(ConciseTextParser.WHITESPACE);
92
- }
93
- break;
94
- default:
95
- throw new NoViableAltException_1.NoViableAltException(this);
96
- }
97
- }
98
- this.state = 16;
99
- this._errHandler.sync(this);
100
- _la = this._input.LA(1);
101
- }
102
- this.state = 17;
103
- this.match(ConciseTextParser.EOF);
104
- }
105
- }
106
- catch (re) {
107
- if (re instanceof RecognitionException_1.RecognitionException) {
108
- _localctx.exception = re;
109
- this._errHandler.reportError(this, re);
110
- this._errHandler.recover(this, re);
111
- }
112
- else {
113
- throw re;
114
- }
115
- }
116
- finally {
117
- this.exitRule();
118
- }
119
- return _localctx;
120
- }
121
- // @RuleVersion(0)
122
- pushNumber() {
123
- let _localctx = new PushNumberContext(this._ctx, this.state);
124
- this.enterRule(_localctx, 2, ConciseTextParser.RULE_pushNumber);
125
- try {
126
- this.enterOuterAlt(_localctx, 1);
127
- {
128
- this.state = 19;
129
- _localctx._number = this.match(ConciseTextParser.NUMBER);
130
- this.state = 23;
131
- this._errHandler.sync(this);
132
- switch (this.interpreter.adaptivePredict(this._input, 2, this._ctx)) {
133
- case 1:
134
- {
135
- this.state = 20;
136
- this.match(ConciseTextParser.WHITESPACE);
137
- this.state = 21;
138
- this.match(ConciseTextParser.LABEL_START);
139
- this.state = 22;
140
- _localctx._label = this.match(ConciseTextParser.WORD);
141
- }
142
- break;
143
- }
144
- }
145
- }
146
- catch (re) {
147
- if (re instanceof RecognitionException_1.RecognitionException) {
148
- _localctx.exception = re;
149
- this._errHandler.reportError(this, re);
150
- this._errHandler.recover(this, re);
151
- }
152
- else {
153
- throw re;
154
- }
155
- }
156
- finally {
157
- this.exitRule();
158
- }
159
- return _localctx;
160
- }
161
- // @RuleVersion(0)
162
- pushString() {
163
- let _localctx = new PushStringContext(this._ctx, this.state);
164
- this.enterRule(_localctx, 4, ConciseTextParser.RULE_pushString);
165
- try {
166
- this.enterOuterAlt(_localctx, 1);
167
- {
168
- this.state = 25;
169
- _localctx._string = this.match(ConciseTextParser.STRING);
170
- this.state = 29;
171
- this._errHandler.sync(this);
172
- switch (this.interpreter.adaptivePredict(this._input, 3, this._ctx)) {
173
- case 1:
174
- {
175
- this.state = 26;
176
- this.match(ConciseTextParser.WHITESPACE);
177
- this.state = 27;
178
- this.match(ConciseTextParser.LABEL_START);
179
- this.state = 28;
180
- _localctx._label = this.match(ConciseTextParser.WORD);
181
- }
182
- break;
183
- }
184
- }
185
- }
186
- catch (re) {
187
- if (re instanceof RecognitionException_1.RecognitionException) {
188
- _localctx.exception = re;
189
- this._errHandler.reportError(this, re);
190
- this._errHandler.recover(this, re);
191
- }
192
- else {
193
- throw re;
194
- }
195
- }
196
- finally {
197
- this.exitRule();
198
- }
199
- return _localctx;
200
- }
201
- // @RuleVersion(0)
202
- invokeFunction() {
203
- let _localctx = new InvokeFunctionContext(this._ctx, this.state);
204
- this.enterRule(_localctx, 6, ConciseTextParser.RULE_invokeFunction);
205
- try {
206
- this.enterOuterAlt(_localctx, 1);
207
- {
208
- this.state = 31;
209
- _localctx._opcode = this.match(ConciseTextParser.WORD);
210
- this.state = 35;
211
- this._errHandler.sync(this);
212
- switch (this.interpreter.adaptivePredict(this._input, 4, this._ctx)) {
213
- case 1:
214
- {
215
- this.state = 32;
216
- this.match(ConciseTextParser.WHITESPACE);
217
- this.state = 33;
218
- this.match(ConciseTextParser.LABEL_START);
219
- this.state = 34;
220
- _localctx._label = this.match(ConciseTextParser.WORD);
221
- }
222
- break;
223
- }
224
- }
225
- }
226
- catch (re) {
227
- if (re instanceof RecognitionException_1.RecognitionException) {
228
- _localctx.exception = re;
229
- this._errHandler.reportError(this, re);
230
- this._errHandler.recover(this, re);
231
- }
232
- else {
233
- throw re;
234
- }
235
- }
236
- finally {
237
- this.exitRule();
238
- }
239
- return _localctx;
240
- }
241
- static get _ATN() {
242
- if (!ConciseTextParser.__ATN) {
243
- ConciseTextParser.__ATN = new ATNDeserializer_1.ATNDeserializer().deserialize(Utils.toCharArray(ConciseTextParser._serializedATN));
244
- }
245
- return ConciseTextParser.__ATN;
246
- }
247
- }
248
- exports.ConciseTextParser = ConciseTextParser;
249
- ConciseTextParser.SLASH = 1;
250
- ConciseTextParser.ASTERISK = 2;
251
- ConciseTextParser.COMMENT_START = 3;
252
- ConciseTextParser.ML_COMMENT_BEGIN = 4;
253
- ConciseTextParser.ML_COMMENT_END = 5;
254
- ConciseTextParser.MULTILINE_COMMENT = 6;
255
- ConciseTextParser.COMMENT = 7;
256
- ConciseTextParser.NUMBER = 8;
257
- ConciseTextParser.STRING = 9;
258
- ConciseTextParser.WORD = 10;
259
- ConciseTextParser.LABEL_START = 11;
260
- ConciseTextParser.WHITESPACE = 12;
261
- ConciseTextParser.RULE_instructions = 0;
262
- ConciseTextParser.RULE_pushNumber = 1;
263
- ConciseTextParser.RULE_pushString = 2;
264
- ConciseTextParser.RULE_invokeFunction = 3;
265
- // tslint:disable:no-trailing-whitespace
266
- ConciseTextParser.ruleNames = [
267
- "instructions", "pushNumber", "pushString", "invokeFunction",
268
- ];
269
- ConciseTextParser._LITERAL_NAMES = [
270
- undefined, "'/'", "'*'", undefined, undefined, undefined, undefined, undefined,
271
- undefined, undefined, undefined, "'#'",
272
- ];
273
- ConciseTextParser._SYMBOLIC_NAMES = [
274
- undefined, "SLASH", "ASTERISK", "COMMENT_START", "ML_COMMENT_BEGIN", "ML_COMMENT_END",
275
- "MULTILINE_COMMENT", "COMMENT", "NUMBER", "STRING", "WORD", "LABEL_START",
276
- "WHITESPACE",
277
- ];
278
- ConciseTextParser.VOCABULARY = new VocabularyImpl_1.VocabularyImpl(ConciseTextParser._LITERAL_NAMES, ConciseTextParser._SYMBOLIC_NAMES, []);
279
- ConciseTextParser._serializedATN = "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x03\x0E(\x04\x02" +
280
- "\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x03\x02\x03\x02\x03\x02" +
281
- "\x03\x02\x07\x02\x0F\n\x02\f\x02\x0E\x02\x12\v\x02\x03\x02\x03\x02\x03" +
282
- "\x03\x03\x03\x03\x03\x03\x03\x05\x03\x1A\n\x03\x03\x04\x03\x04\x03\x04" +
283
- "\x03\x04\x05\x04 \n\x04\x03\x05\x03\x05\x03\x05\x03\x05\x05\x05&\n\x05" +
284
- "\x03\x05\x02\x02\x02\x06\x02\x02\x04\x02\x06\x02\b\x02\x02\x02\x02*\x02" +
285
- "\x10\x03\x02\x02\x02\x04\x15\x03\x02\x02\x02\x06\x1B\x03\x02\x02\x02\b" +
286
- "!\x03\x02\x02\x02\n\x0F\x05\x04\x03\x02\v\x0F\x05\x06\x04\x02\f\x0F\x05" +
287
- "\b\x05\x02\r\x0F\x07\x0E\x02\x02\x0E\n\x03\x02\x02\x02\x0E\v\x03\x02\x02" +
288
- "\x02\x0E\f\x03\x02\x02\x02\x0E\r\x03\x02\x02\x02\x0F\x12\x03\x02\x02\x02" +
289
- "\x10\x0E\x03\x02\x02\x02\x10\x11\x03\x02\x02\x02\x11\x13\x03\x02\x02\x02" +
290
- "\x12\x10\x03\x02\x02\x02\x13\x14\x07\x02\x02\x03\x14\x03\x03\x02\x02\x02" +
291
- "\x15\x19\x07\n\x02\x02\x16\x17\x07\x0E\x02\x02\x17\x18\x07\r\x02\x02\x18" +
292
- "\x1A\x07\f\x02\x02\x19\x16\x03\x02\x02\x02\x19\x1A\x03\x02\x02\x02\x1A" +
293
- "\x05\x03\x02\x02\x02\x1B\x1F\x07\v\x02\x02\x1C\x1D\x07\x0E\x02\x02\x1D" +
294
- "\x1E\x07\r\x02\x02\x1E \x07\f\x02\x02\x1F\x1C\x03\x02\x02\x02\x1F \x03" +
295
- "\x02\x02\x02 \x07\x03\x02\x02\x02!%\x07\f\x02\x02\"#\x07\x0E\x02\x02#" +
296
- "$\x07\r\x02\x02$&\x07\f\x02\x02%\"\x03\x02\x02\x02%&\x03\x02\x02\x02&" +
297
- "\t\x03\x02\x02\x02\x07\x0E\x10\x19\x1F%";
298
- class InstructionsContext extends ParserRuleContext_1.ParserRuleContext {
299
- EOF() { return this.getToken(ConciseTextParser.EOF, 0); }
300
- pushNumber(i) {
301
- if (i === undefined) {
302
- return this.getRuleContexts(PushNumberContext);
303
- }
304
- else {
305
- return this.getRuleContext(i, PushNumberContext);
306
- }
307
- }
308
- pushString(i) {
309
- if (i === undefined) {
310
- return this.getRuleContexts(PushStringContext);
311
- }
312
- else {
313
- return this.getRuleContext(i, PushStringContext);
314
- }
315
- }
316
- invokeFunction(i) {
317
- if (i === undefined) {
318
- return this.getRuleContexts(InvokeFunctionContext);
319
- }
320
- else {
321
- return this.getRuleContext(i, InvokeFunctionContext);
322
- }
323
- }
324
- WHITESPACE(i) {
325
- if (i === undefined) {
326
- return this.getTokens(ConciseTextParser.WHITESPACE);
327
- }
328
- else {
329
- return this.getToken(ConciseTextParser.WHITESPACE, i);
330
- }
331
- }
332
- constructor(parent, invokingState) {
333
- super(parent, invokingState);
334
- }
335
- // @Override
336
- get ruleIndex() { return ConciseTextParser.RULE_instructions; }
337
- // @Override
338
- enterRule(listener) {
339
- if (listener.enterInstructions) {
340
- listener.enterInstructions(this);
341
- }
342
- }
343
- // @Override
344
- exitRule(listener) {
345
- if (listener.exitInstructions) {
346
- listener.exitInstructions(this);
347
- }
348
- }
349
- // @Override
350
- accept(visitor) {
351
- if (visitor.visitInstructions) {
352
- return visitor.visitInstructions(this);
353
- }
354
- else {
355
- return visitor.visitChildren(this);
356
- }
357
- }
358
- }
359
- exports.InstructionsContext = InstructionsContext;
360
- class PushNumberContext extends ParserRuleContext_1.ParserRuleContext {
361
- constructor(parent, invokingState) {
362
- super(parent, invokingState);
363
- }
364
- NUMBER() { return this.getToken(ConciseTextParser.NUMBER, 0); }
365
- WHITESPACE() { return this.tryGetToken(ConciseTextParser.WHITESPACE, 0); }
366
- LABEL_START() { return this.tryGetToken(ConciseTextParser.LABEL_START, 0); }
367
- WORD() { return this.tryGetToken(ConciseTextParser.WORD, 0); }
368
- // @Override
369
- get ruleIndex() { return ConciseTextParser.RULE_pushNumber; }
370
- // @Override
371
- enterRule(listener) {
372
- if (listener.enterPushNumber) {
373
- listener.enterPushNumber(this);
374
- }
375
- }
376
- // @Override
377
- exitRule(listener) {
378
- if (listener.exitPushNumber) {
379
- listener.exitPushNumber(this);
380
- }
381
- }
382
- // @Override
383
- accept(visitor) {
384
- if (visitor.visitPushNumber) {
385
- return visitor.visitPushNumber(this);
386
- }
387
- else {
388
- return visitor.visitChildren(this);
389
- }
390
- }
391
- }
392
- exports.PushNumberContext = PushNumberContext;
393
- class PushStringContext extends ParserRuleContext_1.ParserRuleContext {
394
- constructor(parent, invokingState) {
395
- super(parent, invokingState);
396
- }
397
- STRING() { return this.getToken(ConciseTextParser.STRING, 0); }
398
- WHITESPACE() { return this.tryGetToken(ConciseTextParser.WHITESPACE, 0); }
399
- LABEL_START() { return this.tryGetToken(ConciseTextParser.LABEL_START, 0); }
400
- WORD() { return this.tryGetToken(ConciseTextParser.WORD, 0); }
401
- // @Override
402
- get ruleIndex() { return ConciseTextParser.RULE_pushString; }
403
- // @Override
404
- enterRule(listener) {
405
- if (listener.enterPushString) {
406
- listener.enterPushString(this);
407
- }
408
- }
409
- // @Override
410
- exitRule(listener) {
411
- if (listener.exitPushString) {
412
- listener.exitPushString(this);
413
- }
414
- }
415
- // @Override
416
- accept(visitor) {
417
- if (visitor.visitPushString) {
418
- return visitor.visitPushString(this);
419
- }
420
- else {
421
- return visitor.visitChildren(this);
422
- }
423
- }
424
- }
425
- exports.PushStringContext = PushStringContext;
426
- class InvokeFunctionContext extends ParserRuleContext_1.ParserRuleContext {
427
- constructor(parent, invokingState) {
428
- super(parent, invokingState);
429
- }
430
- WORD(i) {
431
- if (i === undefined) {
432
- return this.getTokens(ConciseTextParser.WORD);
433
- }
434
- else {
435
- return this.getToken(ConciseTextParser.WORD, i);
436
- }
437
- }
438
- WHITESPACE() { return this.tryGetToken(ConciseTextParser.WHITESPACE, 0); }
439
- LABEL_START() { return this.tryGetToken(ConciseTextParser.LABEL_START, 0); }
440
- // @Override
441
- get ruleIndex() { return ConciseTextParser.RULE_invokeFunction; }
442
- // @Override
443
- enterRule(listener) {
444
- if (listener.enterInvokeFunction) {
445
- listener.enterInvokeFunction(this);
446
- }
447
- }
448
- // @Override
449
- exitRule(listener) {
450
- if (listener.exitInvokeFunction) {
451
- listener.exitInvokeFunction(this);
452
- }
453
- }
454
- // @Override
455
- accept(visitor) {
456
- if (visitor.visitInvokeFunction) {
457
- return visitor.visitInvokeFunction(this);
458
- }
459
- else {
460
- return visitor.visitChildren(this);
461
- }
462
- }
463
- }
464
- exports.InvokeFunctionContext = InvokeFunctionContext;
@@ -1,38 +0,0 @@
1
- import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor";
2
- import { InstructionsContext } from "./ConciseTextParser";
3
- import { PushNumberContext } from "./ConciseTextParser";
4
- import { PushStringContext } from "./ConciseTextParser";
5
- import { InvokeFunctionContext } from "./ConciseTextParser";
6
- /**
7
- * This interface defines a complete generic visitor for a parse tree produced
8
- * by `ConciseTextParser`.
9
- *
10
- * @param <Result> The return type of the visit operation. Use `void` for
11
- * operations with no return type.
12
- */
13
- export interface ConciseTextVisitor<Result> extends ParseTreeVisitor<Result> {
14
- /**
15
- * Visit a parse tree produced by `ConciseTextParser.instructions`.
16
- * @param ctx the parse tree
17
- * @return the visitor result
18
- */
19
- visitInstructions?: (ctx: InstructionsContext) => Result;
20
- /**
21
- * Visit a parse tree produced by `ConciseTextParser.pushNumber`.
22
- * @param ctx the parse tree
23
- * @return the visitor result
24
- */
25
- visitPushNumber?: (ctx: PushNumberContext) => Result;
26
- /**
27
- * Visit a parse tree produced by `ConciseTextParser.pushString`.
28
- * @param ctx the parse tree
29
- * @return the visitor result
30
- */
31
- visitPushString?: (ctx: PushStringContext) => Result;
32
- /**
33
- * Visit a parse tree produced by `ConciseTextParser.invokeFunction`.
34
- * @param ctx the parse tree
35
- * @return the visitor result
36
- */
37
- visitInvokeFunction?: (ctx: InvokeFunctionContext) => Result;
38
- }
@@ -1,4 +0,0 @@
1
- "use strict";
2
- // @ts-nocheck
3
- // Generated from src/grammars/ConciseText.g4 by ANTLR 4.9.0-SNAPSHOT
4
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- export * from "./vm.js";
2
- export * from "./interfaces.js";
3
- export * from "./util/tokenizer.js";
4
- export * from "./getStackParams.js";
5
- export * from "./util/builder.js";
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getStackParams_js_1 = require("../getStackParams.js");
4
- const and = (stack, context) => {
5
- const [num1, num2] = getStackParams_js_1.getStackParams("and", ["number", "number"], stack);
6
- stack.push(num1 !== 0 && num2 !== 0 ? 1 : 0);
7
- };
8
- exports.default = and;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getStackParams_js_1 = require("../getStackParams.js");
4
- const concat = (stack) => {
5
- const [val1, val2] = getStackParams_js_1.getStackParams("concat", ["string | number", "string | number"], stack);
6
- stack.push(`${val1}${val2}`);
7
- };
8
- exports.default = concat;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getStackParams_js_1 = require("../getStackParams.js");
4
- const delContext = (stack, context) => {
5
- const [str] = getStackParams_js_1.getStackParams("delContext", ["string"], stack);
6
- delete context[str];
7
- };
8
- exports.default = delContext;
@@ -1,3 +0,0 @@
1
- import { FunctionInvocationOperation } from "../interfaces.js";
2
- declare const eq: FunctionInvocationOperation;
3
- export default eq;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getStackParams_js_1 = require("../getStackParams.js");
4
- const eq = (stack, context) => {
5
- const [val1, val2] = getStackParams_js_1.getStackParams("eq", ["string | number", "string | number"], stack);
6
- const retval = val1 === val2 ? 1 : 0;
7
- stack.push(retval);
8
- };
9
- exports.default = eq;
@@ -1,3 +0,0 @@
1
- import { FunctionInvocationOperation } from "../interfaces.js";
2
- declare const gt: FunctionInvocationOperation;
3
- export default gt;
@@ -1,3 +0,0 @@
1
- import { FunctionInvocationOperation } from "../interfaces.js";
2
- declare const jz: FunctionInvocationOperation;
3
- export default jz;
@@ -1,3 +0,0 @@
1
- import { FunctionInvocationOperation } from "../interfaces.js";
2
- declare const lt: FunctionInvocationOperation;
3
- export default lt;
@@ -1,3 +0,0 @@
1
- import { FunctionInvocationOperation } from "../interfaces.js";
2
- declare const or: FunctionInvocationOperation;
3
- export default or;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getStackParams_js_1 = require("../getStackParams.js");
4
- const or = (stack, context) => {
5
- const [num1, num2] = getStackParams_js_1.getStackParams("or", ["number", "number"], stack);
6
- stack.push(num1 !== 0 || num2 !== 0 ? 1 : 0);
7
- };
8
- exports.default = or;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getStackParams_js_1 = require("../getStackParams.js");
4
- const rconcat = (stack) => {
5
- const [val1, val2] = getStackParams_js_1.getStackParams("rconcat", ["string | number", "string | number"], stack);
6
- stack.push(`${val2}${val1}`);
7
- };
8
- exports.default = rconcat;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getStackParams_js_1 = require("../getStackParams.js");
4
- const setContext = (stack, context) => {
5
- const [str1, arg2] = getStackParams_js_1.getStackParams("setContext", ["string", "string | number"], stack);
6
- context[str1] = arg2;
7
- };
8
- exports.default = setContext;
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
package/dist/mjs/cli.js DELETED
@@ -1,29 +0,0 @@
1
- import fs from "fs";
2
- import program from "commander";
3
- import { VM } from "./vm.js";
4
- import { Tokenizer } from "./util/tokenizer.js";
5
- program
6
- .version('1.0.8')
7
- .requiredOption('--input, -i <path>', "Path to Tzo VMState .json or Tzo ConciseText .txt/.tzoct file")
8
- .parse(process.argv);
9
- let input = [];
10
- let vmState = {
11
- context: {},
12
- exit: false,
13
- pause: false,
14
- programCounter: 0,
15
- labelMap: {},
16
- programList: [],
17
- stack: []
18
- };
19
- if (program.I && program.I.endsWith(".json")) {
20
- vmState = JSON.parse(fs.readFileSync(program.I).toString());
21
- }
22
- if (program.I && (program.I.endsWith(".txt") || program.I.endsWith(".tzoct"))) {
23
- const input_file = fs.readFileSync(program.I).toString();
24
- const tokenizer = new Tokenizer();
25
- vmState.programList = tokenizer.parse(input_file);
26
- }
27
- const vm = new VM({});
28
- vm.loadVMState(vmState);
29
- vm.run();
@@ -1,34 +0,0 @@
1
- import { ATN } from "antlr4ts/atn/ATN";
2
- import { CharStream } from "antlr4ts/CharStream";
3
- import { Lexer } from "antlr4ts/Lexer";
4
- import { Vocabulary } from "antlr4ts/Vocabulary";
5
- export declare class ConciseTextLexer extends Lexer {
6
- static readonly SLASH = 1;
7
- static readonly ASTERISK = 2;
8
- static readonly COMMENT_START = 3;
9
- static readonly ML_COMMENT_BEGIN = 4;
10
- static readonly ML_COMMENT_END = 5;
11
- static readonly MULTILINE_COMMENT = 6;
12
- static readonly COMMENT = 7;
13
- static readonly NUMBER = 8;
14
- static readonly STRING = 9;
15
- static readonly WORD = 10;
16
- static readonly LABEL_START = 11;
17
- static readonly WHITESPACE = 12;
18
- static readonly channelNames: string[];
19
- static readonly modeNames: string[];
20
- static readonly ruleNames: string[];
21
- private static readonly _LITERAL_NAMES;
22
- private static readonly _SYMBOLIC_NAMES;
23
- static readonly VOCABULARY: Vocabulary;
24
- get vocabulary(): Vocabulary;
25
- constructor(input: CharStream);
26
- get grammarFileName(): string;
27
- get ruleNames(): string[];
28
- get serializedATN(): string;
29
- get channelNames(): string[];
30
- get modeNames(): string[];
31
- static readonly _serializedATN: string;
32
- static __ATN: ATN;
33
- static get _ATN(): ATN;
34
- }