cariboujs 2.0.6 → 2.0.8

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 (51) hide show
  1. package/README.md +5 -3
  2. package/abnf/AbnfLexer.js +51 -50
  3. package/asm/asm8080/asm8080Lexer.js +253 -152
  4. package/asm/asm8080/asm8080Listener.js +72 -0
  5. package/asm/asm8080/asm8080Parser.js +1307 -289
  6. package/asm/asm8080/asm8080Visitor.js +48 -0
  7. package/asm/asmZ80/asmZ80Lexer.js +152 -128
  8. package/asm/asmZ80/asmZ80Listener.js +9 -0
  9. package/asm/asmZ80/asmZ80Parser.js +316 -170
  10. package/asm/asmZ80/asmZ80Visitor.js +6 -0
  11. package/c/CParser.js +1352 -1344
  12. package/cypher/CypherLexer.js +208 -205
  13. package/cypher/CypherParser.js +1180 -984
  14. package/cypher/CypherParserListener.js +18 -0
  15. package/cypher/CypherParserVisitor.js +12 -0
  16. package/miniscript/MiniscriptLexer.js +199 -0
  17. package/miniscript/MiniscriptListener.js +180 -0
  18. package/miniscript/MiniscriptParser.js +2620 -0
  19. package/miniscript/MiniscriptVisitor.js +124 -0
  20. package/package.json +1 -1
  21. package/python/python3_14/PythonLexer.js +1238 -0
  22. package/python/python3_14/PythonLexerBase.js +819 -0
  23. package/python/{python3_13 → python3_14}/PythonParser.js +4141 -3347
  24. package/python/{python3_13 → python3_14}/PythonParserListener.js +81 -0
  25. package/python/{python3_13 → python3_14}/PythonParserVisitor.js +54 -0
  26. package/sql/plsql/PlSqlLexer.js +4114 -4113
  27. package/sql/plsql/PlSqlParser.js +37114 -31650
  28. package/sql/plsql/PlSqlParserBase.js +31 -0
  29. package/sql/plsql/PlSqlParserListener.js +58 -4
  30. package/sql/plsql/PlSqlParserVisitor.js +38 -2
  31. package/sysml-v2/SysMLv2Lexer.js +617 -605
  32. package/sysml-v2/SysMLv2Parser.js +7135 -10083
  33. package/sysml-v2/SysMLv2ParserListener.js +45 -423
  34. package/sysml-v2/SysMLv2ParserVisitor.js +30 -282
  35. package/xpath/xpath4/XPath4Lexer.js +667 -0
  36. package/xpath/xpath4/XPath4Parser.js +17424 -0
  37. package/xpath/xpath4/XPath4ParserBase.js +34 -0
  38. package/xpath/xpath4/XPath4ParserListener.js +1521 -0
  39. package/xpath/xpath4/XPath4ParserVisitor.js +1018 -0
  40. package/xquery/xquery4/XQuery4Lexer.js +1396 -0
  41. package/xquery/xquery4/XQuery4LexerBase.js +42 -0
  42. package/xquery/xquery4/XQuery4Parser.js +27899 -0
  43. package/xquery/xquery4/XQuery4ParserBase.js +38 -0
  44. package/xquery/xquery4/XQuery4ParserListener.js +2322 -0
  45. package/xquery/xquery4/XQuery4ParserVisitor.js +1552 -0
  46. package/awk/awkLexer.js +0 -317
  47. package/awk/awkListener.js +0 -378
  48. package/awk/awkParser.js +0 -5859
  49. package/awk/awkVisitor.js +0 -256
  50. package/python/python3_13/PythonLexer.js +0 -974
  51. package/python/python3_13/PythonLexerBase.js +0 -676
@@ -4,49 +4,55 @@ import antlr4 from 'antlr4';
4
4
  import asmZ80Listener from './asmZ80Listener.js';
5
5
  import asmZ80Visitor from './asmZ80Visitor.js';
6
6
 
7
- const serializedATN = [4,1,18,146,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,
7
+ const serializedATN = [4,1,20,160,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,
8
8
  4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,
9
- 2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,1,0,5,0,38,8,0,10,0,12,
10
- 0,41,9,0,1,0,1,0,1,0,5,0,46,8,0,10,0,12,0,49,9,0,1,0,1,0,5,0,53,8,0,10,0,
11
- 12,0,56,9,0,3,0,58,8,0,1,0,1,0,1,1,3,1,63,8,1,1,1,1,1,3,1,67,8,1,1,1,3,1,
12
- 70,8,1,1,1,1,1,3,1,74,8,1,1,1,3,1,77,8,1,1,2,1,2,3,2,81,8,2,1,3,1,3,1,4,
13
- 1,4,1,5,3,5,88,8,5,1,5,1,5,1,5,1,6,1,6,1,7,1,7,3,7,97,8,7,1,8,1,8,1,8,5,
14
- 8,102,8,8,10,8,12,8,105,9,8,1,9,1,9,1,10,1,10,1,10,5,10,112,8,10,10,10,12,
15
- 10,115,9,10,1,11,1,11,1,11,5,11,120,8,11,10,11,12,11,123,9,11,1,12,1,12,
16
- 1,12,1,12,1,12,1,12,1,12,1,12,1,12,3,12,134,8,12,1,13,1,13,1,14,1,14,1,15,
17
- 1,15,1,16,1,16,1,17,1,17,1,17,0,0,18,0,2,4,6,8,10,12,14,16,18,20,22,24,26,
18
- 28,30,32,34,0,2,1,0,3,4,1,0,5,6,148,0,39,1,0,0,0,2,76,1,0,0,0,4,78,1,0,0,
19
- 0,6,82,1,0,0,0,8,84,1,0,0,0,10,87,1,0,0,0,12,92,1,0,0,0,14,94,1,0,0,0,16,
20
- 98,1,0,0,0,18,106,1,0,0,0,20,108,1,0,0,0,22,116,1,0,0,0,24,133,1,0,0,0,26,
21
- 135,1,0,0,0,28,137,1,0,0,0,30,139,1,0,0,0,32,141,1,0,0,0,34,143,1,0,0,0,
22
- 36,38,5,17,0,0,37,36,1,0,0,0,38,41,1,0,0,0,39,37,1,0,0,0,39,40,1,0,0,0,40,
23
- 57,1,0,0,0,41,39,1,0,0,0,42,43,3,2,1,0,43,44,5,17,0,0,44,46,1,0,0,0,45,42,
24
- 1,0,0,0,46,49,1,0,0,0,47,45,1,0,0,0,47,48,1,0,0,0,48,50,1,0,0,0,49,47,1,
25
- 0,0,0,50,54,3,2,1,0,51,53,5,17,0,0,52,51,1,0,0,0,53,56,1,0,0,0,54,52,1,0,
26
- 0,0,54,55,1,0,0,0,55,58,1,0,0,0,56,54,1,0,0,0,57,47,1,0,0,0,57,58,1,0,0,
27
- 0,58,59,1,0,0,0,59,60,5,0,0,1,60,1,1,0,0,0,61,63,3,14,7,0,62,61,1,0,0,0,
28
- 62,63,1,0,0,0,63,66,1,0,0,0,64,67,3,4,2,0,65,67,3,10,5,0,66,64,1,0,0,0,66,
29
- 65,1,0,0,0,67,69,1,0,0,0,68,70,3,34,17,0,69,68,1,0,0,0,69,70,1,0,0,0,70,
30
- 77,1,0,0,0,71,73,3,14,7,0,72,74,3,34,17,0,73,72,1,0,0,0,73,74,1,0,0,0,74,
31
- 77,1,0,0,0,75,77,3,34,17,0,76,62,1,0,0,0,76,71,1,0,0,0,76,75,1,0,0,0,77,
32
- 3,1,0,0,0,78,80,3,6,3,0,79,81,3,16,8,0,80,79,1,0,0,0,80,81,1,0,0,0,81,5,
33
- 1,0,0,0,82,83,5,12,0,0,83,7,1,0,0,0,84,85,5,10,0,0,85,9,1,0,0,0,86,88,3,
34
- 24,12,0,87,86,1,0,0,0,87,88,1,0,0,0,88,89,1,0,0,0,89,90,3,12,6,0,90,91,3,
35
- 16,8,0,91,11,1,0,0,0,92,93,5,11,0,0,93,13,1,0,0,0,94,96,3,18,9,0,95,97,5,
36
- 1,0,0,96,95,1,0,0,0,96,97,1,0,0,0,97,15,1,0,0,0,98,103,3,20,10,0,99,100,
37
- 5,2,0,0,100,102,3,20,10,0,101,99,1,0,0,0,102,105,1,0,0,0,103,101,1,0,0,0,
38
- 103,104,1,0,0,0,104,17,1,0,0,0,105,103,1,0,0,0,106,107,3,30,15,0,107,19,
39
- 1,0,0,0,108,113,3,22,11,0,109,110,7,0,0,0,110,112,3,22,11,0,111,109,1,0,
40
- 0,0,112,115,1,0,0,0,113,111,1,0,0,0,113,114,1,0,0,0,114,21,1,0,0,0,115,113,
41
- 1,0,0,0,116,121,3,24,12,0,117,118,7,1,0,0,118,120,3,24,12,0,119,117,1,0,
42
- 0,0,120,123,1,0,0,0,121,119,1,0,0,0,121,122,1,0,0,0,122,23,1,0,0,0,123,121,
43
- 1,0,0,0,124,134,3,32,16,0,125,134,3,8,4,0,126,134,3,26,13,0,127,134,3,30,
44
- 15,0,128,134,3,28,14,0,129,130,5,7,0,0,130,131,3,20,10,0,131,132,5,8,0,0,
45
- 132,134,1,0,0,0,133,124,1,0,0,0,133,125,1,0,0,0,133,126,1,0,0,0,133,127,
46
- 1,0,0,0,133,128,1,0,0,0,133,129,1,0,0,0,134,25,1,0,0,0,135,136,5,9,0,0,136,
47
- 27,1,0,0,0,137,138,5,16,0,0,138,29,1,0,0,0,139,140,5,13,0,0,140,31,1,0,0,
48
- 0,141,142,5,14,0,0,142,33,1,0,0,0,143,144,5,15,0,0,144,35,1,0,0,0,16,39,
49
- 47,54,57,62,66,69,73,76,80,87,96,103,113,121,133];
9
+ 2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,1,0,5,0,40,8,
10
+ 0,10,0,12,0,43,9,0,1,0,1,0,4,0,47,8,0,11,0,12,0,48,5,0,51,8,0,10,0,12,0,
11
+ 54,9,0,1,0,1,0,5,0,58,8,0,10,0,12,0,61,9,0,3,0,63,8,0,1,0,1,0,1,1,3,1,68,
12
+ 8,1,1,1,1,1,1,1,3,1,73,8,1,1,1,3,1,76,8,1,1,1,1,1,3,1,80,8,1,1,1,3,1,83,
13
+ 8,1,1,2,1,2,3,2,87,8,2,1,3,1,3,1,4,1,4,1,5,3,5,94,8,5,1,5,1,5,3,5,98,8,5,
14
+ 1,6,1,6,1,7,1,7,3,7,104,8,7,1,8,1,8,3,8,108,8,8,1,9,1,9,1,9,5,9,113,8,9,
15
+ 10,9,12,9,116,9,9,1,10,1,10,1,11,3,11,121,8,11,1,11,1,11,1,11,5,11,126,8,
16
+ 11,10,11,12,11,129,9,11,1,12,1,12,1,12,5,12,134,8,12,10,12,12,12,137,9,12,
17
+ 1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,3,13,148,8,13,1,14,1,14,1,15,
18
+ 1,15,1,16,1,16,1,17,1,17,1,18,1,18,1,18,0,0,19,0,2,4,6,8,10,12,14,16,18,
19
+ 20,22,24,26,28,30,32,34,36,0,4,1,0,3,4,1,0,5,6,1,0,16,17,1,0,11,13,166,0,
20
+ 41,1,0,0,0,2,82,1,0,0,0,4,84,1,0,0,0,6,88,1,0,0,0,8,90,1,0,0,0,10,93,1,0,
21
+ 0,0,12,99,1,0,0,0,14,101,1,0,0,0,16,105,1,0,0,0,18,109,1,0,0,0,20,117,1,
22
+ 0,0,0,22,120,1,0,0,0,24,130,1,0,0,0,26,147,1,0,0,0,28,149,1,0,0,0,30,151,
23
+ 1,0,0,0,32,153,1,0,0,0,34,155,1,0,0,0,36,157,1,0,0,0,38,40,5,19,0,0,39,38,
24
+ 1,0,0,0,40,43,1,0,0,0,41,39,1,0,0,0,41,42,1,0,0,0,42,62,1,0,0,0,43,41,1,
25
+ 0,0,0,44,46,3,2,1,0,45,47,5,19,0,0,46,45,1,0,0,0,47,48,1,0,0,0,48,46,1,0,
26
+ 0,0,48,49,1,0,0,0,49,51,1,0,0,0,50,44,1,0,0,0,51,54,1,0,0,0,52,50,1,0,0,
27
+ 0,52,53,1,0,0,0,53,55,1,0,0,0,54,52,1,0,0,0,55,59,3,2,1,0,56,58,5,19,0,0,
28
+ 57,56,1,0,0,0,58,61,1,0,0,0,59,57,1,0,0,0,59,60,1,0,0,0,60,63,1,0,0,0,61,
29
+ 59,1,0,0,0,62,52,1,0,0,0,62,63,1,0,0,0,63,64,1,0,0,0,64,65,5,0,0,1,65,1,
30
+ 1,0,0,0,66,68,3,16,8,0,67,66,1,0,0,0,67,68,1,0,0,0,68,72,1,0,0,0,69,73,3,
31
+ 4,2,0,70,73,3,10,5,0,71,73,3,14,7,0,72,69,1,0,0,0,72,70,1,0,0,0,72,71,1,
32
+ 0,0,0,73,75,1,0,0,0,74,76,3,36,18,0,75,74,1,0,0,0,75,76,1,0,0,0,76,83,1,
33
+ 0,0,0,77,79,3,16,8,0,78,80,3,36,18,0,79,78,1,0,0,0,79,80,1,0,0,0,80,83,1,
34
+ 0,0,0,81,83,3,36,18,0,82,67,1,0,0,0,82,77,1,0,0,0,82,81,1,0,0,0,83,3,1,0,
35
+ 0,0,84,86,3,6,3,0,85,87,3,18,9,0,86,85,1,0,0,0,86,87,1,0,0,0,87,5,1,0,0,
36
+ 0,88,89,5,12,0,0,89,7,1,0,0,0,90,91,5,10,0,0,91,9,1,0,0,0,92,94,3,26,13,
37
+ 0,93,92,1,0,0,0,93,94,1,0,0,0,94,95,1,0,0,0,95,97,3,12,6,0,96,98,3,18,9,
38
+ 0,97,96,1,0,0,0,97,98,1,0,0,0,98,11,1,0,0,0,99,100,5,11,0,0,100,13,1,0,0,
39
+ 0,101,103,5,13,0,0,102,104,3,18,9,0,103,102,1,0,0,0,103,104,1,0,0,0,104,
40
+ 15,1,0,0,0,105,107,3,20,10,0,106,108,5,1,0,0,107,106,1,0,0,0,107,108,1,0,
41
+ 0,0,108,17,1,0,0,0,109,114,3,22,11,0,110,111,5,2,0,0,111,113,3,22,11,0,112,
42
+ 110,1,0,0,0,113,116,1,0,0,0,114,112,1,0,0,0,114,115,1,0,0,0,115,19,1,0,0,
43
+ 0,116,114,1,0,0,0,117,118,3,32,16,0,118,21,1,0,0,0,119,121,5,3,0,0,120,119,
44
+ 1,0,0,0,120,121,1,0,0,0,121,122,1,0,0,0,122,127,3,24,12,0,123,124,7,0,0,
45
+ 0,124,126,3,24,12,0,125,123,1,0,0,0,126,129,1,0,0,0,127,125,1,0,0,0,127,
46
+ 128,1,0,0,0,128,23,1,0,0,0,129,127,1,0,0,0,130,135,3,26,13,0,131,132,7,1,
47
+ 0,0,132,134,3,26,13,0,133,131,1,0,0,0,134,137,1,0,0,0,135,133,1,0,0,0,135,
48
+ 136,1,0,0,0,136,25,1,0,0,0,137,135,1,0,0,0,138,148,3,34,17,0,139,148,3,8,
49
+ 4,0,140,148,3,28,14,0,141,148,3,32,16,0,142,148,3,30,15,0,143,144,5,7,0,
50
+ 0,144,145,3,22,11,0,145,146,5,8,0,0,146,148,1,0,0,0,147,138,1,0,0,0,147,
51
+ 139,1,0,0,0,147,140,1,0,0,0,147,141,1,0,0,0,147,142,1,0,0,0,147,143,1,0,
52
+ 0,0,148,27,1,0,0,0,149,150,5,9,0,0,150,29,1,0,0,0,151,152,7,2,0,0,152,31,
53
+ 1,0,0,0,153,154,7,3,0,0,154,33,1,0,0,0,155,156,5,14,0,0,156,35,1,0,0,0,157,
54
+ 158,5,15,0,0,158,37,1,0,0,0,20,41,48,52,59,62,67,72,75,79,82,86,93,97,103,
55
+ 107,114,120,127,135,147];
50
56
 
51
57
 
52
58
  const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);
@@ -58,17 +64,17 @@ const sharedContextCache = new antlr4.atn.PredictionContextCache();
58
64
  export default class asmZ80Parser extends antlr4.Parser {
59
65
 
60
66
  static grammarFileName = "asmZ80.g4";
61
- static literalNames = [ null, "':'", "','", "'+'", "'-'", "'*'", "'/'",
67
+ static literalNames = [ null, "':'", "','", "'-'", "'+'", "'*'", "'/'",
62
68
  "'('", "')'", "'$'" ];
63
69
  static symbolicNames = [ null, null, null, null, null, null, null, null,
64
70
  null, null, "REGISTER", "ASSEMBLER_DIRECTIVE",
65
71
  "OPCODE", "NAME", "NUMBER", "COMMENT", "STRING",
66
- "EOL", "WS" ];
72
+ "DOUBLE_STRING", "METADATA", "EOL", "WS" ];
67
73
  static ruleNames = [ "prog", "line", "instruction", "opcode", "register_",
68
- "directive", "assemblerdirective", "lbl", "expressionlist",
69
- "label", "expression", "multiplyingExpression",
70
- "argument", "dollar", "string_", "name", "number",
71
- "comment" ];
74
+ "directive", "assemblerdirective", "macrocall",
75
+ "lbl", "expressionlist", "label", "expression",
76
+ "multiplyingExpression", "argument", "dollar",
77
+ "string_", "name", "number", "comment" ];
72
78
 
73
79
  constructor(input) {
74
80
  super(input);
@@ -86,50 +92,58 @@ export default class asmZ80Parser extends antlr4.Parser {
86
92
  var _la = 0;
87
93
  try {
88
94
  this.enterOuterAlt(localctx, 1);
89
- this.state = 39;
95
+ this.state = 41;
90
96
  this._errHandler.sync(this);
91
97
  _la = this._input.LA(1);
92
- while(_la===17) {
93
- this.state = 36;
98
+ while(_la===19) {
99
+ this.state = 38;
94
100
  this.match(asmZ80Parser.EOL);
95
- this.state = 41;
101
+ this.state = 43;
96
102
  this._errHandler.sync(this);
97
103
  _la = this._input.LA(1);
98
104
  }
99
- this.state = 57;
105
+ this.state = 62;
100
106
  this._errHandler.sync(this);
101
107
  _la = this._input.LA(1);
102
- if((((_la) & ~0x1f) === 0 && ((1 << _la) & 130688) !== 0)) {
103
- this.state = 47;
108
+ if((((_la) & ~0x1f) === 0 && ((1 << _la) & 261760) !== 0)) {
109
+ this.state = 52;
104
110
  this._errHandler.sync(this);
105
- var _alt = this._interp.adaptivePredict(this._input,1,this._ctx)
111
+ var _alt = this._interp.adaptivePredict(this._input,2,this._ctx)
106
112
  while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
107
113
  if(_alt===1) {
108
- this.state = 42;
114
+ this.state = 44;
109
115
  this.line();
110
- this.state = 43;
111
- this.match(asmZ80Parser.EOL);
116
+ this.state = 46;
117
+ this._errHandler.sync(this);
118
+ _la = this._input.LA(1);
119
+ do {
120
+ this.state = 45;
121
+ this.match(asmZ80Parser.EOL);
122
+ this.state = 48;
123
+ this._errHandler.sync(this);
124
+ _la = this._input.LA(1);
125
+ } while(_la===19);
112
126
  }
113
- this.state = 49;
127
+ this.state = 54;
114
128
  this._errHandler.sync(this);
115
- _alt = this._interp.adaptivePredict(this._input,1,this._ctx);
129
+ _alt = this._interp.adaptivePredict(this._input,2,this._ctx);
116
130
  }
117
131
 
118
- this.state = 50;
132
+ this.state = 55;
119
133
  this.line();
120
- this.state = 54;
134
+ this.state = 59;
121
135
  this._errHandler.sync(this);
122
136
  _la = this._input.LA(1);
123
- while(_la===17) {
124
- this.state = 51;
125
- this.match(asmZ80Parser.EOL);
137
+ while(_la===19) {
126
138
  this.state = 56;
139
+ this.match(asmZ80Parser.EOL);
140
+ this.state = 61;
127
141
  this._errHandler.sync(this);
128
142
  _la = this._input.LA(1);
129
143
  }
130
144
  }
131
145
 
132
- this.state = 59;
146
+ this.state = 64;
133
147
  this.match(asmZ80Parser.EOF);
134
148
  } catch (re) {
135
149
  if(re instanceof antlr4.error.RecognitionException) {
@@ -152,45 +166,45 @@ export default class asmZ80Parser extends antlr4.Parser {
152
166
  this.enterRule(localctx, 2, asmZ80Parser.RULE_line);
153
167
  var _la = 0;
154
168
  try {
155
- this.state = 76;
169
+ this.state = 82;
156
170
  this._errHandler.sync(this);
157
- var la_ = this._interp.adaptivePredict(this._input,8,this._ctx);
171
+ var la_ = this._interp.adaptivePredict(this._input,9,this._ctx);
158
172
  switch(la_) {
159
173
  case 1:
160
174
  this.enterOuterAlt(localctx, 1);
161
- this.state = 62;
175
+ this.state = 67;
162
176
  this._errHandler.sync(this);
163
- var la_ = this._interp.adaptivePredict(this._input,4,this._ctx);
177
+ var la_ = this._interp.adaptivePredict(this._input,5,this._ctx);
164
178
  if(la_===1) {
165
- this.state = 61;
179
+ this.state = 66;
166
180
  this.lbl();
167
181
 
168
182
  }
169
- this.state = 66;
183
+ this.state = 72;
170
184
  this._errHandler.sync(this);
171
- switch(this._input.LA(1)) {
172
- case 12:
173
- this.state = 64;
185
+ var la_ = this._interp.adaptivePredict(this._input,6,this._ctx);
186
+ switch(la_) {
187
+ case 1:
188
+ this.state = 69;
174
189
  this.instruction();
175
190
  break;
176
- case 7:
177
- case 9:
178
- case 10:
179
- case 11:
180
- case 13:
181
- case 14:
182
- case 16:
183
- this.state = 65;
191
+
192
+ case 2:
193
+ this.state = 70;
184
194
  this.directive();
185
195
  break;
186
- default:
187
- throw new antlr4.error.NoViableAltException(this);
196
+
197
+ case 3:
198
+ this.state = 71;
199
+ this.macrocall();
200
+ break;
201
+
188
202
  }
189
- this.state = 69;
203
+ this.state = 75;
190
204
  this._errHandler.sync(this);
191
205
  _la = this._input.LA(1);
192
206
  if(_la===15) {
193
- this.state = 68;
207
+ this.state = 74;
194
208
  this.comment();
195
209
  }
196
210
 
@@ -198,13 +212,13 @@ export default class asmZ80Parser extends antlr4.Parser {
198
212
 
199
213
  case 2:
200
214
  this.enterOuterAlt(localctx, 2);
201
- this.state = 71;
215
+ this.state = 77;
202
216
  this.lbl();
203
- this.state = 73;
217
+ this.state = 79;
204
218
  this._errHandler.sync(this);
205
219
  _la = this._input.LA(1);
206
220
  if(_la===15) {
207
- this.state = 72;
221
+ this.state = 78;
208
222
  this.comment();
209
223
  }
210
224
 
@@ -212,7 +226,7 @@ export default class asmZ80Parser extends antlr4.Parser {
212
226
 
213
227
  case 3:
214
228
  this.enterOuterAlt(localctx, 3);
215
- this.state = 75;
229
+ this.state = 81;
216
230
  this.comment();
217
231
  break;
218
232
 
@@ -239,13 +253,13 @@ export default class asmZ80Parser extends antlr4.Parser {
239
253
  var _la = 0;
240
254
  try {
241
255
  this.enterOuterAlt(localctx, 1);
242
- this.state = 78;
256
+ this.state = 84;
243
257
  this.opcode();
244
- this.state = 80;
258
+ this.state = 86;
245
259
  this._errHandler.sync(this);
246
260
  _la = this._input.LA(1);
247
- if((((_la) & ~0x1f) === 0 && ((1 << _la) & 91776) !== 0)) {
248
- this.state = 79;
261
+ if((((_la) & ~0x1f) === 0 && ((1 << _la) & 229000) !== 0)) {
262
+ this.state = 85;
249
263
  this.expressionlist();
250
264
  }
251
265
 
@@ -270,7 +284,7 @@ export default class asmZ80Parser extends antlr4.Parser {
270
284
  this.enterRule(localctx, 6, asmZ80Parser.RULE_opcode);
271
285
  try {
272
286
  this.enterOuterAlt(localctx, 1);
273
- this.state = 82;
287
+ this.state = 88;
274
288
  this.match(asmZ80Parser.OPCODE);
275
289
  } catch (re) {
276
290
  if(re instanceof antlr4.error.RecognitionException) {
@@ -293,7 +307,7 @@ export default class asmZ80Parser extends antlr4.Parser {
293
307
  this.enterRule(localctx, 8, asmZ80Parser.RULE_register_);
294
308
  try {
295
309
  this.enterOuterAlt(localctx, 1);
296
- this.state = 84;
310
+ this.state = 90;
297
311
  this.match(asmZ80Parser.REGISTER);
298
312
  } catch (re) {
299
313
  if(re instanceof antlr4.error.RecognitionException) {
@@ -317,18 +331,24 @@ export default class asmZ80Parser extends antlr4.Parser {
317
331
  var _la = 0;
318
332
  try {
319
333
  this.enterOuterAlt(localctx, 1);
320
- this.state = 87;
334
+ this.state = 93;
321
335
  this._errHandler.sync(this);
322
- _la = this._input.LA(1);
323
- if((((_la) & ~0x1f) === 0 && ((1 << _la) & 91776) !== 0)) {
324
- this.state = 86;
336
+ var la_ = this._interp.adaptivePredict(this._input,11,this._ctx);
337
+ if(la_===1) {
338
+ this.state = 92;
325
339
  this.argument();
326
- }
327
340
 
328
- this.state = 89;
341
+ }
342
+ this.state = 95;
329
343
  this.assemblerdirective();
330
- this.state = 90;
331
- this.expressionlist();
344
+ this.state = 97;
345
+ this._errHandler.sync(this);
346
+ _la = this._input.LA(1);
347
+ if((((_la) & ~0x1f) === 0 && ((1 << _la) & 229000) !== 0)) {
348
+ this.state = 96;
349
+ this.expressionlist();
350
+ }
351
+
332
352
  } catch (re) {
333
353
  if(re instanceof antlr4.error.RecognitionException) {
334
354
  localctx.exception = re;
@@ -350,7 +370,7 @@ export default class asmZ80Parser extends antlr4.Parser {
350
370
  this.enterRule(localctx, 12, asmZ80Parser.RULE_assemblerdirective);
351
371
  try {
352
372
  this.enterOuterAlt(localctx, 1);
353
- this.state = 92;
373
+ this.state = 99;
354
374
  this.match(asmZ80Parser.ASSEMBLER_DIRECTIVE);
355
375
  } catch (re) {
356
376
  if(re instanceof antlr4.error.RecognitionException) {
@@ -368,19 +388,51 @@ export default class asmZ80Parser extends antlr4.Parser {
368
388
 
369
389
 
370
390
 
391
+ macrocall() {
392
+ let localctx = new MacrocallContext(this, this._ctx, this.state);
393
+ this.enterRule(localctx, 14, asmZ80Parser.RULE_macrocall);
394
+ var _la = 0;
395
+ try {
396
+ this.enterOuterAlt(localctx, 1);
397
+ this.state = 101;
398
+ this.match(asmZ80Parser.NAME);
399
+ this.state = 103;
400
+ this._errHandler.sync(this);
401
+ _la = this._input.LA(1);
402
+ if((((_la) & ~0x1f) === 0 && ((1 << _la) & 229000) !== 0)) {
403
+ this.state = 102;
404
+ this.expressionlist();
405
+ }
406
+
407
+ } catch (re) {
408
+ if(re instanceof antlr4.error.RecognitionException) {
409
+ localctx.exception = re;
410
+ this._errHandler.reportError(this, re);
411
+ this._errHandler.recover(this, re);
412
+ } else {
413
+ throw re;
414
+ }
415
+ } finally {
416
+ this.exitRule();
417
+ }
418
+ return localctx;
419
+ }
420
+
421
+
422
+
371
423
  lbl() {
372
424
  let localctx = new LblContext(this, this._ctx, this.state);
373
- this.enterRule(localctx, 14, asmZ80Parser.RULE_lbl);
425
+ this.enterRule(localctx, 16, asmZ80Parser.RULE_lbl);
374
426
  var _la = 0;
375
427
  try {
376
428
  this.enterOuterAlt(localctx, 1);
377
- this.state = 94;
429
+ this.state = 105;
378
430
  this.label();
379
- this.state = 96;
431
+ this.state = 107;
380
432
  this._errHandler.sync(this);
381
433
  _la = this._input.LA(1);
382
434
  if(_la===1) {
383
- this.state = 95;
435
+ this.state = 106;
384
436
  this.match(asmZ80Parser.T__0);
385
437
  }
386
438
 
@@ -402,21 +454,21 @@ export default class asmZ80Parser extends antlr4.Parser {
402
454
 
403
455
  expressionlist() {
404
456
  let localctx = new ExpressionlistContext(this, this._ctx, this.state);
405
- this.enterRule(localctx, 16, asmZ80Parser.RULE_expressionlist);
457
+ this.enterRule(localctx, 18, asmZ80Parser.RULE_expressionlist);
406
458
  var _la = 0;
407
459
  try {
408
460
  this.enterOuterAlt(localctx, 1);
409
- this.state = 98;
461
+ this.state = 109;
410
462
  this.expression();
411
- this.state = 103;
463
+ this.state = 114;
412
464
  this._errHandler.sync(this);
413
465
  _la = this._input.LA(1);
414
466
  while(_la===2) {
415
- this.state = 99;
467
+ this.state = 110;
416
468
  this.match(asmZ80Parser.T__1);
417
- this.state = 100;
469
+ this.state = 111;
418
470
  this.expression();
419
- this.state = 105;
471
+ this.state = 116;
420
472
  this._errHandler.sync(this);
421
473
  _la = this._input.LA(1);
422
474
  }
@@ -438,10 +490,10 @@ export default class asmZ80Parser extends antlr4.Parser {
438
490
 
439
491
  label() {
440
492
  let localctx = new LabelContext(this, this._ctx, this.state);
441
- this.enterRule(localctx, 18, asmZ80Parser.RULE_label);
493
+ this.enterRule(localctx, 20, asmZ80Parser.RULE_label);
442
494
  try {
443
495
  this.enterOuterAlt(localctx, 1);
444
- this.state = 106;
496
+ this.state = 117;
445
497
  this.name();
446
498
  } catch (re) {
447
499
  if(re instanceof antlr4.error.RecognitionException) {
@@ -461,17 +513,25 @@ export default class asmZ80Parser extends antlr4.Parser {
461
513
 
462
514
  expression() {
463
515
  let localctx = new ExpressionContext(this, this._ctx, this.state);
464
- this.enterRule(localctx, 20, asmZ80Parser.RULE_expression);
516
+ this.enterRule(localctx, 22, asmZ80Parser.RULE_expression);
465
517
  var _la = 0;
466
518
  try {
467
519
  this.enterOuterAlt(localctx, 1);
468
- this.state = 108;
520
+ this.state = 120;
521
+ this._errHandler.sync(this);
522
+ _la = this._input.LA(1);
523
+ if(_la===3) {
524
+ this.state = 119;
525
+ this.match(asmZ80Parser.T__2);
526
+ }
527
+
528
+ this.state = 122;
469
529
  this.multiplyingExpression();
470
- this.state = 113;
530
+ this.state = 127;
471
531
  this._errHandler.sync(this);
472
532
  _la = this._input.LA(1);
473
533
  while(_la===3 || _la===4) {
474
- this.state = 109;
534
+ this.state = 123;
475
535
  _la = this._input.LA(1);
476
536
  if(!(_la===3 || _la===4)) {
477
537
  this._errHandler.recoverInline(this);
@@ -480,9 +540,9 @@ export default class asmZ80Parser extends antlr4.Parser {
480
540
  this._errHandler.reportMatch(this);
481
541
  this.consume();
482
542
  }
483
- this.state = 110;
543
+ this.state = 124;
484
544
  this.multiplyingExpression();
485
- this.state = 115;
545
+ this.state = 129;
486
546
  this._errHandler.sync(this);
487
547
  _la = this._input.LA(1);
488
548
  }
@@ -504,17 +564,17 @@ export default class asmZ80Parser extends antlr4.Parser {
504
564
 
505
565
  multiplyingExpression() {
506
566
  let localctx = new MultiplyingExpressionContext(this, this._ctx, this.state);
507
- this.enterRule(localctx, 22, asmZ80Parser.RULE_multiplyingExpression);
567
+ this.enterRule(localctx, 24, asmZ80Parser.RULE_multiplyingExpression);
508
568
  var _la = 0;
509
569
  try {
510
570
  this.enterOuterAlt(localctx, 1);
511
- this.state = 116;
571
+ this.state = 130;
512
572
  this.argument();
513
- this.state = 121;
573
+ this.state = 135;
514
574
  this._errHandler.sync(this);
515
575
  _la = this._input.LA(1);
516
576
  while(_la===5 || _la===6) {
517
- this.state = 117;
577
+ this.state = 131;
518
578
  _la = this._input.LA(1);
519
579
  if(!(_la===5 || _la===6)) {
520
580
  this._errHandler.recoverInline(this);
@@ -523,9 +583,9 @@ export default class asmZ80Parser extends antlr4.Parser {
523
583
  this._errHandler.reportMatch(this);
524
584
  this.consume();
525
585
  }
526
- this.state = 118;
586
+ this.state = 132;
527
587
  this.argument();
528
- this.state = 123;
588
+ this.state = 137;
529
589
  this._errHandler.sync(this);
530
590
  _la = this._input.LA(1);
531
591
  }
@@ -547,43 +607,46 @@ export default class asmZ80Parser extends antlr4.Parser {
547
607
 
548
608
  argument() {
549
609
  let localctx = new ArgumentContext(this, this._ctx, this.state);
550
- this.enterRule(localctx, 24, asmZ80Parser.RULE_argument);
610
+ this.enterRule(localctx, 26, asmZ80Parser.RULE_argument);
551
611
  try {
552
- this.state = 133;
612
+ this.state = 147;
553
613
  this._errHandler.sync(this);
554
614
  switch(this._input.LA(1)) {
555
615
  case 14:
556
616
  this.enterOuterAlt(localctx, 1);
557
- this.state = 124;
617
+ this.state = 138;
558
618
  this.number();
559
619
  break;
560
620
  case 10:
561
621
  this.enterOuterAlt(localctx, 2);
562
- this.state = 125;
622
+ this.state = 139;
563
623
  this.register_();
564
624
  break;
565
625
  case 9:
566
626
  this.enterOuterAlt(localctx, 3);
567
- this.state = 126;
627
+ this.state = 140;
568
628
  this.dollar();
569
629
  break;
630
+ case 11:
631
+ case 12:
570
632
  case 13:
571
633
  this.enterOuterAlt(localctx, 4);
572
- this.state = 127;
634
+ this.state = 141;
573
635
  this.name();
574
636
  break;
575
637
  case 16:
638
+ case 17:
576
639
  this.enterOuterAlt(localctx, 5);
577
- this.state = 128;
640
+ this.state = 142;
578
641
  this.string_();
579
642
  break;
580
643
  case 7:
581
644
  this.enterOuterAlt(localctx, 6);
582
- this.state = 129;
645
+ this.state = 143;
583
646
  this.match(asmZ80Parser.T__6);
584
- this.state = 130;
647
+ this.state = 144;
585
648
  this.expression();
586
- this.state = 131;
649
+ this.state = 145;
587
650
  this.match(asmZ80Parser.T__7);
588
651
  break;
589
652
  default:
@@ -607,10 +670,10 @@ export default class asmZ80Parser extends antlr4.Parser {
607
670
 
608
671
  dollar() {
609
672
  let localctx = new DollarContext(this, this._ctx, this.state);
610
- this.enterRule(localctx, 26, asmZ80Parser.RULE_dollar);
673
+ this.enterRule(localctx, 28, asmZ80Parser.RULE_dollar);
611
674
  try {
612
675
  this.enterOuterAlt(localctx, 1);
613
- this.state = 135;
676
+ this.state = 149;
614
677
  this.match(asmZ80Parser.T__8);
615
678
  } catch (re) {
616
679
  if(re instanceof antlr4.error.RecognitionException) {
@@ -630,11 +693,19 @@ export default class asmZ80Parser extends antlr4.Parser {
630
693
 
631
694
  string_() {
632
695
  let localctx = new String_Context(this, this._ctx, this.state);
633
- this.enterRule(localctx, 28, asmZ80Parser.RULE_string_);
696
+ this.enterRule(localctx, 30, asmZ80Parser.RULE_string_);
697
+ var _la = 0;
634
698
  try {
635
699
  this.enterOuterAlt(localctx, 1);
636
- this.state = 137;
637
- this.match(asmZ80Parser.STRING);
700
+ this.state = 151;
701
+ _la = this._input.LA(1);
702
+ if(!(_la===16 || _la===17)) {
703
+ this._errHandler.recoverInline(this);
704
+ }
705
+ else {
706
+ this._errHandler.reportMatch(this);
707
+ this.consume();
708
+ }
638
709
  } catch (re) {
639
710
  if(re instanceof antlr4.error.RecognitionException) {
640
711
  localctx.exception = re;
@@ -653,11 +724,19 @@ export default class asmZ80Parser extends antlr4.Parser {
653
724
 
654
725
  name() {
655
726
  let localctx = new NameContext(this, this._ctx, this.state);
656
- this.enterRule(localctx, 30, asmZ80Parser.RULE_name);
727
+ this.enterRule(localctx, 32, asmZ80Parser.RULE_name);
728
+ var _la = 0;
657
729
  try {
658
730
  this.enterOuterAlt(localctx, 1);
659
- this.state = 139;
660
- this.match(asmZ80Parser.NAME);
731
+ this.state = 153;
732
+ _la = this._input.LA(1);
733
+ if(!((((_la) & ~0x1f) === 0 && ((1 << _la) & 14336) !== 0))) {
734
+ this._errHandler.recoverInline(this);
735
+ }
736
+ else {
737
+ this._errHandler.reportMatch(this);
738
+ this.consume();
739
+ }
661
740
  } catch (re) {
662
741
  if(re instanceof antlr4.error.RecognitionException) {
663
742
  localctx.exception = re;
@@ -676,10 +755,10 @@ export default class asmZ80Parser extends antlr4.Parser {
676
755
 
677
756
  number() {
678
757
  let localctx = new NumberContext(this, this._ctx, this.state);
679
- this.enterRule(localctx, 32, asmZ80Parser.RULE_number);
758
+ this.enterRule(localctx, 34, asmZ80Parser.RULE_number);
680
759
  try {
681
760
  this.enterOuterAlt(localctx, 1);
682
- this.state = 141;
761
+ this.state = 155;
683
762
  this.match(asmZ80Parser.NUMBER);
684
763
  } catch (re) {
685
764
  if(re instanceof antlr4.error.RecognitionException) {
@@ -699,10 +778,10 @@ export default class asmZ80Parser extends antlr4.Parser {
699
778
 
700
779
  comment() {
701
780
  let localctx = new CommentContext(this, this._ctx, this.state);
702
- this.enterRule(localctx, 34, asmZ80Parser.RULE_comment);
781
+ this.enterRule(localctx, 36, asmZ80Parser.RULE_comment);
703
782
  try {
704
783
  this.enterOuterAlt(localctx, 1);
705
- this.state = 143;
784
+ this.state = 157;
706
785
  this.match(asmZ80Parser.COMMENT);
707
786
  } catch (re) {
708
787
  if(re instanceof antlr4.error.RecognitionException) {
@@ -738,8 +817,10 @@ asmZ80Parser.NAME = 13;
738
817
  asmZ80Parser.NUMBER = 14;
739
818
  asmZ80Parser.COMMENT = 15;
740
819
  asmZ80Parser.STRING = 16;
741
- asmZ80Parser.EOL = 17;
742
- asmZ80Parser.WS = 18;
820
+ asmZ80Parser.DOUBLE_STRING = 17;
821
+ asmZ80Parser.METADATA = 18;
822
+ asmZ80Parser.EOL = 19;
823
+ asmZ80Parser.WS = 20;
743
824
 
744
825
  asmZ80Parser.RULE_prog = 0;
745
826
  asmZ80Parser.RULE_line = 1;
@@ -748,17 +829,18 @@ asmZ80Parser.RULE_opcode = 3;
748
829
  asmZ80Parser.RULE_register_ = 4;
749
830
  asmZ80Parser.RULE_directive = 5;
750
831
  asmZ80Parser.RULE_assemblerdirective = 6;
751
- asmZ80Parser.RULE_lbl = 7;
752
- asmZ80Parser.RULE_expressionlist = 8;
753
- asmZ80Parser.RULE_label = 9;
754
- asmZ80Parser.RULE_expression = 10;
755
- asmZ80Parser.RULE_multiplyingExpression = 11;
756
- asmZ80Parser.RULE_argument = 12;
757
- asmZ80Parser.RULE_dollar = 13;
758
- asmZ80Parser.RULE_string_ = 14;
759
- asmZ80Parser.RULE_name = 15;
760
- asmZ80Parser.RULE_number = 16;
761
- asmZ80Parser.RULE_comment = 17;
832
+ asmZ80Parser.RULE_macrocall = 7;
833
+ asmZ80Parser.RULE_lbl = 8;
834
+ asmZ80Parser.RULE_expressionlist = 9;
835
+ asmZ80Parser.RULE_label = 10;
836
+ asmZ80Parser.RULE_expression = 11;
837
+ asmZ80Parser.RULE_multiplyingExpression = 12;
838
+ asmZ80Parser.RULE_argument = 13;
839
+ asmZ80Parser.RULE_dollar = 14;
840
+ asmZ80Parser.RULE_string_ = 15;
841
+ asmZ80Parser.RULE_name = 16;
842
+ asmZ80Parser.RULE_number = 17;
843
+ asmZ80Parser.RULE_comment = 18;
762
844
 
763
845
  class ProgContext extends antlr4.ParserRuleContext {
764
846
 
@@ -848,6 +930,10 @@ class LineContext extends antlr4.ParserRuleContext {
848
930
  return this.getTypedRuleContext(DirectiveContext,0);
849
931
  };
850
932
 
933
+ macrocall() {
934
+ return this.getTypedRuleContext(MacrocallContext,0);
935
+ };
936
+
851
937
  lbl() {
852
938
  return this.getTypedRuleContext(LblContext,0);
853
939
  };
@@ -1032,14 +1118,14 @@ class DirectiveContext extends antlr4.ParserRuleContext {
1032
1118
  return this.getTypedRuleContext(AssemblerdirectiveContext,0);
1033
1119
  };
1034
1120
 
1035
- expressionlist() {
1036
- return this.getTypedRuleContext(ExpressionlistContext,0);
1037
- };
1038
-
1039
1121
  argument() {
1040
1122
  return this.getTypedRuleContext(ArgumentContext,0);
1041
1123
  };
1042
1124
 
1125
+ expressionlist() {
1126
+ return this.getTypedRuleContext(ExpressionlistContext,0);
1127
+ };
1128
+
1043
1129
  enterRule(listener) {
1044
1130
  if(listener instanceof asmZ80Listener ) {
1045
1131
  listener.enterDirective(this);
@@ -1108,6 +1194,53 @@ class AssemblerdirectiveContext extends antlr4.ParserRuleContext {
1108
1194
 
1109
1195
 
1110
1196
 
1197
+ class MacrocallContext extends antlr4.ParserRuleContext {
1198
+
1199
+ constructor(parser, parent, invokingState) {
1200
+ if(parent===undefined) {
1201
+ parent = null;
1202
+ }
1203
+ if(invokingState===undefined || invokingState===null) {
1204
+ invokingState = -1;
1205
+ }
1206
+ super(parent, invokingState);
1207
+ this.parser = parser;
1208
+ this.ruleIndex = asmZ80Parser.RULE_macrocall;
1209
+ }
1210
+
1211
+ NAME() {
1212
+ return this.getToken(asmZ80Parser.NAME, 0);
1213
+ };
1214
+
1215
+ expressionlist() {
1216
+ return this.getTypedRuleContext(ExpressionlistContext,0);
1217
+ };
1218
+
1219
+ enterRule(listener) {
1220
+ if(listener instanceof asmZ80Listener ) {
1221
+ listener.enterMacrocall(this);
1222
+ }
1223
+ }
1224
+
1225
+ exitRule(listener) {
1226
+ if(listener instanceof asmZ80Listener ) {
1227
+ listener.exitMacrocall(this);
1228
+ }
1229
+ }
1230
+
1231
+ accept(visitor) {
1232
+ if ( visitor instanceof asmZ80Visitor ) {
1233
+ return visitor.visitMacrocall(this);
1234
+ } else {
1235
+ return visitor.visitChildren(this);
1236
+ }
1237
+ }
1238
+
1239
+
1240
+ }
1241
+
1242
+
1243
+
1111
1244
  class LblContext extends antlr4.ParserRuleContext {
1112
1245
 
1113
1246
  constructor(parser, parent, invokingState) {
@@ -1465,6 +1598,10 @@ class String_Context extends antlr4.ParserRuleContext {
1465
1598
  return this.getToken(asmZ80Parser.STRING, 0);
1466
1599
  };
1467
1600
 
1601
+ DOUBLE_STRING() {
1602
+ return this.getToken(asmZ80Parser.DOUBLE_STRING, 0);
1603
+ };
1604
+
1468
1605
  enterRule(listener) {
1469
1606
  if(listener instanceof asmZ80Listener ) {
1470
1607
  listener.enterString_(this);
@@ -1508,6 +1645,14 @@ class NameContext extends antlr4.ParserRuleContext {
1508
1645
  return this.getToken(asmZ80Parser.NAME, 0);
1509
1646
  };
1510
1647
 
1648
+ OPCODE() {
1649
+ return this.getToken(asmZ80Parser.OPCODE, 0);
1650
+ };
1651
+
1652
+ ASSEMBLER_DIRECTIVE() {
1653
+ return this.getToken(asmZ80Parser.ASSEMBLER_DIRECTIVE, 0);
1654
+ };
1655
+
1511
1656
  enterRule(listener) {
1512
1657
  if(listener instanceof asmZ80Listener ) {
1513
1658
  listener.enterName(this);
@@ -1627,6 +1772,7 @@ asmZ80Parser.OpcodeContext = OpcodeContext;
1627
1772
  asmZ80Parser.Register_Context = Register_Context;
1628
1773
  asmZ80Parser.DirectiveContext = DirectiveContext;
1629
1774
  asmZ80Parser.AssemblerdirectiveContext = AssemblerdirectiveContext;
1775
+ asmZ80Parser.MacrocallContext = MacrocallContext;
1630
1776
  asmZ80Parser.LblContext = LblContext;
1631
1777
  asmZ80Parser.ExpressionlistContext = ExpressionlistContext;
1632
1778
  asmZ80Parser.LabelContext = LabelContext;