cariboujs 2.0.7 → 2.0.9
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.
- package/README.md +6 -4
- package/asm/asm8080/asm8080Lexer.js +253 -152
- package/asm/asm8080/asm8080Listener.js +72 -0
- package/asm/asm8080/asm8080Parser.js +1307 -289
- package/asm/asm8080/asm8080Visitor.js +48 -0
- package/asm/asmZ80/asmZ80Lexer.js +152 -128
- package/asm/asmZ80/asmZ80Listener.js +9 -0
- package/asm/asmZ80/asmZ80Parser.js +316 -170
- package/asm/asmZ80/asmZ80Visitor.js +6 -0
- package/c/CParser.js +1352 -1344
- package/clif/CLIFLexer.js +173 -0
- package/clif/CLIFListener.js +198 -0
- package/clif/CLIFParser.js +2440 -0
- package/clif/CLIFVisitor.js +136 -0
- package/cypher/CypherLexer.js +208 -205
- package/cypher/CypherParser.js +1180 -984
- package/cypher/CypherParserListener.js +18 -0
- package/cypher/CypherParserVisitor.js +12 -0
- package/javascript/javascript/JavaScriptParser.js +607 -658
- package/javascript/javascript/JavaScriptParserListener.js +0 -9
- package/javascript/javascript/JavaScriptParserVisitor.js +0 -6
- package/package.json +1 -1
- package/promql/PromQLLexer.js +147 -142
- package/python/python3_14/PythonLexer.js +1238 -0
- package/python/python3_14/PythonLexerBase.js +819 -0
- package/python/{python3_13 → python3_14}/PythonParser.js +4141 -3347
- package/python/{python3_13 → python3_14}/PythonParserListener.js +81 -0
- package/python/{python3_13 → python3_14}/PythonParserVisitor.js +54 -0
- package/sql/mysql/Oracle/MySQLParser.js +3934 -3927
- package/sql/plsql/PlSqlLexer.js +12212 -12202
- package/sql/plsql/PlSqlParser.js +45094 -39280
- package/sql/plsql/PlSqlParserBase.js +31 -0
- package/sql/plsql/PlSqlParserListener.js +76 -4
- package/sql/plsql/PlSqlParserVisitor.js +50 -2
- package/sysml-v2/SysMLv2Lexer.js +617 -605
- package/sysml-v2/SysMLv2Parser.js +7135 -10083
- package/sysml-v2/SysMLv2ParserListener.js +45 -423
- package/sysml-v2/SysMLv2ParserVisitor.js +30 -282
- package/wkt/wktLexer.js +502 -173
- package/wkt/wktParser.js +7220 -1311
- package/wkt/wktParserListener.js +756 -0
- package/wkt/wktParserVisitor.js +508 -0
- package/xpath/xpath4/XPath4Lexer.js +667 -0
- package/xpath/xpath4/XPath4Parser.js +17424 -0
- package/xpath/xpath4/XPath4ParserBase.js +34 -0
- package/xpath/xpath4/XPath4ParserListener.js +1521 -0
- package/xpath/xpath4/XPath4ParserVisitor.js +1018 -0
- package/xquery/xquery4/XQuery4Lexer.js +1396 -0
- package/xquery/xquery4/XQuery4LexerBase.js +42 -0
- package/xquery/xquery4/XQuery4Parser.js +27899 -0
- package/xquery/xquery4/XQuery4ParserBase.js +38 -0
- package/xquery/xquery4/XQuery4ParserListener.js +2322 -0
- package/xquery/xquery4/XQuery4ParserVisitor.js +1552 -0
- package/awk/awkLexer.js +0 -317
- package/awk/awkListener.js +0 -378
- package/awk/awkParser.js +0 -5859
- package/awk/awkVisitor.js +0 -256
- package/python/python3_13/PythonLexer.js +0 -974
- package/python/python3_13/PythonLexerBase.js +0 -676
- package/wkt/wktListener.js +0 -261
- package/wkt/wktVisitor.js +0 -178
|
@@ -4,49 +4,84 @@ import antlr4 from 'antlr4';
|
|
|
4
4
|
import asm8080Listener from './asm8080Listener.js';
|
|
5
5
|
import asm8080Visitor from './asm8080Visitor.js';
|
|
6
6
|
|
|
7
|
-
const serializedATN = [4,1,
|
|
7
|
+
const serializedATN = [4,1,41,244,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,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
1,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
1,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
1,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
0,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
1,0,0,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
0,0,
|
|
43
|
-
1,0,0,0,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
1,0,0,0,
|
|
47
|
-
|
|
48
|
-
0,
|
|
49
|
-
|
|
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,2,19,7,19,2,
|
|
10
|
+
20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,1,0,5,0,54,8,0,
|
|
11
|
+
10,0,12,0,57,9,0,1,0,1,0,4,0,61,8,0,11,0,12,0,62,5,0,65,8,0,10,0,12,0,68,
|
|
12
|
+
9,0,1,0,1,0,5,0,72,8,0,10,0,12,0,75,9,0,3,0,77,8,0,1,0,1,0,1,1,3,1,82,8,
|
|
13
|
+
1,1,1,1,1,1,1,3,1,87,8,1,1,1,1,1,1,1,1,1,3,1,93,8,1,5,1,95,8,1,10,1,12,1,
|
|
14
|
+
98,9,1,1,1,3,1,101,8,1,1,1,1,1,3,1,105,8,1,1,1,3,1,108,8,1,1,2,1,2,3,2,112,
|
|
15
|
+
8,2,1,3,1,3,3,3,116,8,3,1,4,1,4,1,5,1,5,1,6,3,6,123,8,6,1,6,1,6,3,6,127,
|
|
16
|
+
8,6,1,7,1,7,1,8,1,8,3,8,133,8,8,1,9,1,9,1,9,5,9,138,8,9,10,9,12,9,141,9,
|
|
17
|
+
9,1,10,1,10,1,10,3,10,146,8,10,1,11,1,11,1,11,3,11,151,8,11,1,12,1,12,1,
|
|
18
|
+
12,5,12,156,8,12,10,12,12,12,159,9,12,1,13,1,13,1,13,5,13,164,8,13,10,13,
|
|
19
|
+
12,13,167,9,13,1,14,1,14,1,14,5,14,172,8,14,10,14,12,14,175,9,14,1,15,1,
|
|
20
|
+
15,1,15,5,15,180,8,15,10,15,12,15,183,9,15,1,16,1,16,1,16,5,16,188,8,16,
|
|
21
|
+
10,16,12,16,191,9,16,1,17,1,17,1,17,5,17,196,8,17,10,17,12,17,199,9,17,1,
|
|
22
|
+
18,1,18,1,18,5,18,204,8,18,10,18,12,18,207,9,18,1,19,1,19,1,19,1,19,1,19,
|
|
23
|
+
1,19,1,19,1,19,1,19,1,19,1,19,3,19,220,8,19,1,20,1,20,1,20,1,20,1,20,1,20,
|
|
24
|
+
1,20,1,20,1,20,1,20,3,20,232,8,20,1,21,1,21,1,22,1,22,1,23,1,23,1,24,1,24,
|
|
25
|
+
1,25,1,25,1,25,0,0,26,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,
|
|
26
|
+
38,40,42,44,46,48,50,0,4,2,0,4,9,27,32,1,0,10,11,1,0,24,25,1,0,12,13,260,
|
|
27
|
+
0,55,1,0,0,0,2,107,1,0,0,0,4,109,1,0,0,0,6,113,1,0,0,0,8,117,1,0,0,0,10,
|
|
28
|
+
119,1,0,0,0,12,122,1,0,0,0,14,128,1,0,0,0,16,130,1,0,0,0,18,134,1,0,0,0,
|
|
29
|
+
20,145,1,0,0,0,22,147,1,0,0,0,24,152,1,0,0,0,26,160,1,0,0,0,28,168,1,0,0,
|
|
30
|
+
0,30,176,1,0,0,0,32,184,1,0,0,0,34,192,1,0,0,0,36,200,1,0,0,0,38,219,1,0,
|
|
31
|
+
0,0,40,231,1,0,0,0,42,233,1,0,0,0,44,235,1,0,0,0,46,237,1,0,0,0,48,239,1,
|
|
32
|
+
0,0,0,50,241,1,0,0,0,52,54,5,39,0,0,53,52,1,0,0,0,54,57,1,0,0,0,55,53,1,
|
|
33
|
+
0,0,0,55,56,1,0,0,0,56,76,1,0,0,0,57,55,1,0,0,0,58,60,3,2,1,0,59,61,5,39,
|
|
34
|
+
0,0,60,59,1,0,0,0,61,62,1,0,0,0,62,60,1,0,0,0,62,63,1,0,0,0,63,65,1,0,0,
|
|
35
|
+
0,64,58,1,0,0,0,65,68,1,0,0,0,66,64,1,0,0,0,66,67,1,0,0,0,67,69,1,0,0,0,
|
|
36
|
+
68,66,1,0,0,0,69,73,3,2,1,0,70,72,5,39,0,0,71,70,1,0,0,0,72,75,1,0,0,0,73,
|
|
37
|
+
71,1,0,0,0,73,74,1,0,0,0,74,77,1,0,0,0,75,73,1,0,0,0,76,66,1,0,0,0,76,77,
|
|
38
|
+
1,0,0,0,77,78,1,0,0,0,78,79,5,0,0,1,79,1,1,0,0,0,80,82,3,16,8,0,81,80,1,
|
|
39
|
+
0,0,0,81,82,1,0,0,0,82,86,1,0,0,0,83,87,3,4,2,0,84,87,3,12,6,0,85,87,3,6,
|
|
40
|
+
3,0,86,83,1,0,0,0,86,84,1,0,0,0,86,85,1,0,0,0,87,96,1,0,0,0,88,92,5,1,0,
|
|
41
|
+
0,89,93,3,4,2,0,90,93,3,12,6,0,91,93,3,6,3,0,92,89,1,0,0,0,92,90,1,0,0,0,
|
|
42
|
+
92,91,1,0,0,0,92,93,1,0,0,0,93,95,1,0,0,0,94,88,1,0,0,0,95,98,1,0,0,0,96,
|
|
43
|
+
94,1,0,0,0,96,97,1,0,0,0,97,100,1,0,0,0,98,96,1,0,0,0,99,101,3,50,25,0,100,
|
|
44
|
+
99,1,0,0,0,100,101,1,0,0,0,101,108,1,0,0,0,102,104,3,16,8,0,103,105,3,50,
|
|
45
|
+
25,0,104,103,1,0,0,0,104,105,1,0,0,0,105,108,1,0,0,0,106,108,3,50,25,0,107,
|
|
46
|
+
81,1,0,0,0,107,102,1,0,0,0,107,106,1,0,0,0,108,3,1,0,0,0,109,111,3,8,4,0,
|
|
47
|
+
110,112,3,18,9,0,111,110,1,0,0,0,111,112,1,0,0,0,112,5,1,0,0,0,113,115,3,
|
|
48
|
+
46,23,0,114,116,3,18,9,0,115,114,1,0,0,0,115,116,1,0,0,0,116,7,1,0,0,0,117,
|
|
49
|
+
118,5,34,0,0,118,9,1,0,0,0,119,120,5,33,0,0,120,11,1,0,0,0,121,123,3,40,
|
|
50
|
+
20,0,122,121,1,0,0,0,122,123,1,0,0,0,123,124,1,0,0,0,124,126,3,14,7,0,125,
|
|
51
|
+
127,3,18,9,0,126,125,1,0,0,0,126,127,1,0,0,0,127,13,1,0,0,0,128,129,5,17,
|
|
52
|
+
0,0,129,15,1,0,0,0,130,132,3,20,10,0,131,133,5,2,0,0,132,131,1,0,0,0,132,
|
|
53
|
+
133,1,0,0,0,133,17,1,0,0,0,134,139,3,22,11,0,135,136,5,3,0,0,136,138,3,22,
|
|
54
|
+
11,0,137,135,1,0,0,0,138,141,1,0,0,0,139,137,1,0,0,0,139,140,1,0,0,0,140,
|
|
55
|
+
19,1,0,0,0,141,139,1,0,0,0,142,146,3,46,23,0,143,146,3,10,5,0,144,146,3,
|
|
56
|
+
14,7,0,145,142,1,0,0,0,145,143,1,0,0,0,145,144,1,0,0,0,146,21,1,0,0,0,147,
|
|
57
|
+
150,3,24,12,0,148,149,7,0,0,0,149,151,3,24,12,0,150,148,1,0,0,0,150,151,
|
|
58
|
+
1,0,0,0,151,23,1,0,0,0,152,157,3,26,13,0,153,154,5,22,0,0,154,156,3,26,13,
|
|
59
|
+
0,155,153,1,0,0,0,156,159,1,0,0,0,157,155,1,0,0,0,157,158,1,0,0,0,158,25,
|
|
60
|
+
1,0,0,0,159,157,1,0,0,0,160,165,3,28,14,0,161,162,5,23,0,0,162,164,3,28,
|
|
61
|
+
14,0,163,161,1,0,0,0,164,167,1,0,0,0,165,163,1,0,0,0,165,166,1,0,0,0,166,
|
|
62
|
+
27,1,0,0,0,167,165,1,0,0,0,168,173,3,30,15,0,169,170,5,21,0,0,170,172,3,
|
|
63
|
+
30,15,0,171,169,1,0,0,0,172,175,1,0,0,0,173,171,1,0,0,0,173,174,1,0,0,0,
|
|
64
|
+
174,29,1,0,0,0,175,173,1,0,0,0,176,181,3,32,16,0,177,178,7,1,0,0,178,180,
|
|
65
|
+
3,32,16,0,179,177,1,0,0,0,180,183,1,0,0,0,181,179,1,0,0,0,181,182,1,0,0,
|
|
66
|
+
0,182,31,1,0,0,0,183,181,1,0,0,0,184,189,3,34,17,0,185,186,7,2,0,0,186,188,
|
|
67
|
+
3,34,17,0,187,185,1,0,0,0,188,191,1,0,0,0,189,187,1,0,0,0,189,190,1,0,0,
|
|
68
|
+
0,190,33,1,0,0,0,191,189,1,0,0,0,192,197,3,36,18,0,193,194,5,26,0,0,194,
|
|
69
|
+
196,3,36,18,0,195,193,1,0,0,0,196,199,1,0,0,0,197,195,1,0,0,0,197,198,1,
|
|
70
|
+
0,0,0,198,35,1,0,0,0,199,197,1,0,0,0,200,205,3,38,19,0,201,202,7,3,0,0,202,
|
|
71
|
+
204,3,38,19,0,203,201,1,0,0,0,204,207,1,0,0,0,205,203,1,0,0,0,205,206,1,
|
|
72
|
+
0,0,0,206,37,1,0,0,0,207,205,1,0,0,0,208,209,5,18,0,0,209,220,3,38,19,0,
|
|
73
|
+
210,211,5,19,0,0,211,220,3,38,19,0,212,213,5,20,0,0,213,220,3,38,19,0,214,
|
|
74
|
+
215,5,11,0,0,215,220,3,38,19,0,216,217,5,10,0,0,217,220,3,38,19,0,218,220,
|
|
75
|
+
3,40,20,0,219,208,1,0,0,0,219,210,1,0,0,0,219,212,1,0,0,0,219,214,1,0,0,
|
|
76
|
+
0,219,216,1,0,0,0,219,218,1,0,0,0,220,39,1,0,0,0,221,232,3,48,24,0,222,232,
|
|
77
|
+
3,8,4,0,223,232,3,10,5,0,224,232,3,42,21,0,225,232,3,46,23,0,226,232,3,44,
|
|
78
|
+
22,0,227,228,5,14,0,0,228,229,3,22,11,0,229,230,5,15,0,0,230,232,1,0,0,0,
|
|
79
|
+
231,221,1,0,0,0,231,222,1,0,0,0,231,223,1,0,0,0,231,224,1,0,0,0,231,225,
|
|
80
|
+
1,0,0,0,231,226,1,0,0,0,231,227,1,0,0,0,232,41,1,0,0,0,233,234,5,16,0,0,
|
|
81
|
+
234,43,1,0,0,0,235,236,5,38,0,0,236,45,1,0,0,0,237,238,5,35,0,0,238,47,1,
|
|
82
|
+
0,0,0,239,240,5,36,0,0,240,49,1,0,0,0,241,242,5,37,0,0,242,51,1,0,0,0,29,
|
|
83
|
+
55,62,66,73,76,81,86,92,96,100,104,107,111,115,122,126,132,139,145,150,157,
|
|
84
|
+
165,173,181,189,197,205,219,231];
|
|
50
85
|
|
|
51
86
|
|
|
52
87
|
const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);
|
|
@@ -58,17 +93,27 @@ const sharedContextCache = new antlr4.atn.PredictionContextCache();
|
|
|
58
93
|
export default class asm8080Parser extends antlr4.Parser {
|
|
59
94
|
|
|
60
95
|
static grammarFileName = "asm8080.g4";
|
|
61
|
-
static literalNames = [ null, "'
|
|
62
|
-
"'
|
|
96
|
+
static literalNames = [ null, "'!'", "':'", "','", "'='", "'<>'", "'<'",
|
|
97
|
+
"'>'", "'<='", "'>='", "'+'", "'-'", "'*'",
|
|
98
|
+
"'/'", "'('", "')'", "'$'", null, "'NOT'", "'HIGH'",
|
|
99
|
+
"'LOW'", "'AND'", "'OR'", "'XOR'", "'SHL'",
|
|
100
|
+
"'SHR'", "'MOD'", "'GT'", "'LT'", "'GE'", "'LE'",
|
|
101
|
+
"'NE'", "'EQ'" ];
|
|
63
102
|
static symbolicNames = [ null, null, null, null, null, null, null, null,
|
|
64
|
-
null, null,
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
103
|
+
null, null, null, null, null, null, null, null,
|
|
104
|
+
null, "ASSEMBLER_DIRECTIVE", "OP_NOT", "OP_HIGH",
|
|
105
|
+
"OP_LOW", "OP_AND", "OP_OR", "OP_XOR", "OP_SHL",
|
|
106
|
+
"OP_SHR", "OP_MOD", "OP_GT", "OP_LT", "OP_GE",
|
|
107
|
+
"OP_LE", "OP_NE", "OP_EQ", "REGISTER", "OPCODE",
|
|
108
|
+
"NAME", "NUMBER", "COMMENT", "STRING", "EOL",
|
|
109
|
+
"WS", "ARTIFACT" ];
|
|
110
|
+
static ruleNames = [ "prog", "line", "instruction", "macrocall", "opcode",
|
|
111
|
+
"register_", "directive", "assemblerdirective",
|
|
112
|
+
"lbl", "expressionlist", "label", "expression",
|
|
113
|
+
"orExpression", "xorExpression", "andExpression",
|
|
114
|
+
"addExpression", "shiftExpression", "modExpression",
|
|
115
|
+
"multiplyingExpression", "unaryExpression", "argument",
|
|
116
|
+
"dollar", "string_", "name", "number", "comment" ];
|
|
72
117
|
|
|
73
118
|
constructor(input) {
|
|
74
119
|
super(input);
|
|
@@ -86,50 +131,58 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
86
131
|
var _la = 0;
|
|
87
132
|
try {
|
|
88
133
|
this.enterOuterAlt(localctx, 1);
|
|
89
|
-
this.state =
|
|
134
|
+
this.state = 55;
|
|
90
135
|
this._errHandler.sync(this);
|
|
91
136
|
_la = this._input.LA(1);
|
|
92
|
-
while(_la===
|
|
93
|
-
this.state =
|
|
137
|
+
while(_la===39) {
|
|
138
|
+
this.state = 52;
|
|
94
139
|
this.match(asm8080Parser.EOL);
|
|
95
|
-
this.state =
|
|
140
|
+
this.state = 57;
|
|
96
141
|
this._errHandler.sync(this);
|
|
97
142
|
_la = this._input.LA(1);
|
|
98
143
|
}
|
|
99
|
-
this.state =
|
|
144
|
+
this.state = 76;
|
|
100
145
|
this._errHandler.sync(this);
|
|
101
146
|
_la = this._input.LA(1);
|
|
102
|
-
if((((_la) & ~0x1f) === 0 && ((1 << _la) &
|
|
103
|
-
this.state =
|
|
147
|
+
if(((((_la - 14)) & ~0x1f) === 0 && ((1 << (_la - 14)) & 33030157) !== 0)) {
|
|
148
|
+
this.state = 66;
|
|
104
149
|
this._errHandler.sync(this);
|
|
105
|
-
var _alt = this._interp.adaptivePredict(this._input,
|
|
150
|
+
var _alt = this._interp.adaptivePredict(this._input,2,this._ctx)
|
|
106
151
|
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
|
|
107
152
|
if(_alt===1) {
|
|
108
|
-
this.state =
|
|
153
|
+
this.state = 58;
|
|
109
154
|
this.line();
|
|
110
|
-
this.state =
|
|
111
|
-
this.
|
|
155
|
+
this.state = 60;
|
|
156
|
+
this._errHandler.sync(this);
|
|
157
|
+
_la = this._input.LA(1);
|
|
158
|
+
do {
|
|
159
|
+
this.state = 59;
|
|
160
|
+
this.match(asm8080Parser.EOL);
|
|
161
|
+
this.state = 62;
|
|
162
|
+
this._errHandler.sync(this);
|
|
163
|
+
_la = this._input.LA(1);
|
|
164
|
+
} while(_la===39);
|
|
112
165
|
}
|
|
113
|
-
this.state =
|
|
166
|
+
this.state = 68;
|
|
114
167
|
this._errHandler.sync(this);
|
|
115
|
-
_alt = this._interp.adaptivePredict(this._input,
|
|
168
|
+
_alt = this._interp.adaptivePredict(this._input,2,this._ctx);
|
|
116
169
|
}
|
|
117
170
|
|
|
118
|
-
this.state =
|
|
171
|
+
this.state = 69;
|
|
119
172
|
this.line();
|
|
120
|
-
this.state =
|
|
173
|
+
this.state = 73;
|
|
121
174
|
this._errHandler.sync(this);
|
|
122
175
|
_la = this._input.LA(1);
|
|
123
|
-
while(_la===
|
|
124
|
-
this.state =
|
|
176
|
+
while(_la===39) {
|
|
177
|
+
this.state = 70;
|
|
125
178
|
this.match(asm8080Parser.EOL);
|
|
126
|
-
this.state =
|
|
179
|
+
this.state = 75;
|
|
127
180
|
this._errHandler.sync(this);
|
|
128
181
|
_la = this._input.LA(1);
|
|
129
182
|
}
|
|
130
183
|
}
|
|
131
184
|
|
|
132
|
-
this.state =
|
|
185
|
+
this.state = 78;
|
|
133
186
|
this.match(asm8080Parser.EOF);
|
|
134
187
|
} catch (re) {
|
|
135
188
|
if(re instanceof antlr4.error.RecognitionException) {
|
|
@@ -152,45 +205,71 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
152
205
|
this.enterRule(localctx, 2, asm8080Parser.RULE_line);
|
|
153
206
|
var _la = 0;
|
|
154
207
|
try {
|
|
155
|
-
this.state =
|
|
208
|
+
this.state = 107;
|
|
156
209
|
this._errHandler.sync(this);
|
|
157
|
-
var la_ = this._interp.adaptivePredict(this._input,
|
|
210
|
+
var la_ = this._interp.adaptivePredict(this._input,11,this._ctx);
|
|
158
211
|
switch(la_) {
|
|
159
212
|
case 1:
|
|
160
213
|
this.enterOuterAlt(localctx, 1);
|
|
161
|
-
this.state =
|
|
214
|
+
this.state = 81;
|
|
162
215
|
this._errHandler.sync(this);
|
|
163
|
-
var la_ = this._interp.adaptivePredict(this._input,
|
|
216
|
+
var la_ = this._interp.adaptivePredict(this._input,5,this._ctx);
|
|
164
217
|
if(la_===1) {
|
|
165
|
-
this.state =
|
|
218
|
+
this.state = 80;
|
|
166
219
|
this.lbl();
|
|
167
220
|
|
|
168
221
|
}
|
|
169
|
-
this.state =
|
|
222
|
+
this.state = 86;
|
|
170
223
|
this._errHandler.sync(this);
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
224
|
+
var la_ = this._interp.adaptivePredict(this._input,6,this._ctx);
|
|
225
|
+
switch(la_) {
|
|
226
|
+
case 1:
|
|
227
|
+
this.state = 83;
|
|
174
228
|
this.instruction();
|
|
175
229
|
break;
|
|
176
|
-
|
|
177
|
-
case
|
|
178
|
-
|
|
179
|
-
case 11:
|
|
180
|
-
case 13:
|
|
181
|
-
case 14:
|
|
182
|
-
case 16:
|
|
183
|
-
this.state = 65;
|
|
230
|
+
|
|
231
|
+
case 2:
|
|
232
|
+
this.state = 84;
|
|
184
233
|
this.directive();
|
|
185
234
|
break;
|
|
186
|
-
|
|
187
|
-
|
|
235
|
+
|
|
236
|
+
case 3:
|
|
237
|
+
this.state = 85;
|
|
238
|
+
this.macrocall();
|
|
239
|
+
break;
|
|
240
|
+
|
|
188
241
|
}
|
|
189
|
-
this.state =
|
|
242
|
+
this.state = 96;
|
|
190
243
|
this._errHandler.sync(this);
|
|
191
244
|
_la = this._input.LA(1);
|
|
192
|
-
|
|
193
|
-
this.state =
|
|
245
|
+
while(_la===1) {
|
|
246
|
+
this.state = 88;
|
|
247
|
+
this.match(asm8080Parser.T__0);
|
|
248
|
+
this.state = 92;
|
|
249
|
+
this._errHandler.sync(this);
|
|
250
|
+
var la_ = this._interp.adaptivePredict(this._input,7,this._ctx);
|
|
251
|
+
if(la_===1) {
|
|
252
|
+
this.state = 89;
|
|
253
|
+
this.instruction();
|
|
254
|
+
|
|
255
|
+
} else if(la_===2) {
|
|
256
|
+
this.state = 90;
|
|
257
|
+
this.directive();
|
|
258
|
+
|
|
259
|
+
} else if(la_===3) {
|
|
260
|
+
this.state = 91;
|
|
261
|
+
this.macrocall();
|
|
262
|
+
|
|
263
|
+
}
|
|
264
|
+
this.state = 98;
|
|
265
|
+
this._errHandler.sync(this);
|
|
266
|
+
_la = this._input.LA(1);
|
|
267
|
+
}
|
|
268
|
+
this.state = 100;
|
|
269
|
+
this._errHandler.sync(this);
|
|
270
|
+
_la = this._input.LA(1);
|
|
271
|
+
if(_la===37) {
|
|
272
|
+
this.state = 99;
|
|
194
273
|
this.comment();
|
|
195
274
|
}
|
|
196
275
|
|
|
@@ -198,13 +277,13 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
198
277
|
|
|
199
278
|
case 2:
|
|
200
279
|
this.enterOuterAlt(localctx, 2);
|
|
201
|
-
this.state =
|
|
280
|
+
this.state = 102;
|
|
202
281
|
this.lbl();
|
|
203
|
-
this.state =
|
|
282
|
+
this.state = 104;
|
|
204
283
|
this._errHandler.sync(this);
|
|
205
284
|
_la = this._input.LA(1);
|
|
206
|
-
if(_la===
|
|
207
|
-
this.state =
|
|
285
|
+
if(_la===37) {
|
|
286
|
+
this.state = 103;
|
|
208
287
|
this.comment();
|
|
209
288
|
}
|
|
210
289
|
|
|
@@ -212,7 +291,7 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
212
291
|
|
|
213
292
|
case 3:
|
|
214
293
|
this.enterOuterAlt(localctx, 3);
|
|
215
|
-
this.state =
|
|
294
|
+
this.state = 106;
|
|
216
295
|
this.comment();
|
|
217
296
|
break;
|
|
218
297
|
|
|
@@ -239,13 +318,45 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
239
318
|
var _la = 0;
|
|
240
319
|
try {
|
|
241
320
|
this.enterOuterAlt(localctx, 1);
|
|
242
|
-
this.state =
|
|
321
|
+
this.state = 109;
|
|
243
322
|
this.opcode();
|
|
244
|
-
this.state =
|
|
323
|
+
this.state = 111;
|
|
324
|
+
this._errHandler.sync(this);
|
|
325
|
+
_la = this._input.LA(1);
|
|
326
|
+
if(((((_la - 10)) & ~0x1f) === 0 && ((1 << (_la - 10)) & 394266451) !== 0)) {
|
|
327
|
+
this.state = 110;
|
|
328
|
+
this.expressionlist();
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
} catch (re) {
|
|
332
|
+
if(re instanceof antlr4.error.RecognitionException) {
|
|
333
|
+
localctx.exception = re;
|
|
334
|
+
this._errHandler.reportError(this, re);
|
|
335
|
+
this._errHandler.recover(this, re);
|
|
336
|
+
} else {
|
|
337
|
+
throw re;
|
|
338
|
+
}
|
|
339
|
+
} finally {
|
|
340
|
+
this.exitRule();
|
|
341
|
+
}
|
|
342
|
+
return localctx;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
macrocall() {
|
|
348
|
+
let localctx = new MacrocallContext(this, this._ctx, this.state);
|
|
349
|
+
this.enterRule(localctx, 6, asm8080Parser.RULE_macrocall);
|
|
350
|
+
var _la = 0;
|
|
351
|
+
try {
|
|
352
|
+
this.enterOuterAlt(localctx, 1);
|
|
353
|
+
this.state = 113;
|
|
354
|
+
this.name();
|
|
355
|
+
this.state = 115;
|
|
245
356
|
this._errHandler.sync(this);
|
|
246
357
|
_la = this._input.LA(1);
|
|
247
|
-
if((((_la) & ~0x1f) === 0 && ((1 << _la) &
|
|
248
|
-
this.state =
|
|
358
|
+
if(((((_la - 10)) & ~0x1f) === 0 && ((1 << (_la - 10)) & 394266451) !== 0)) {
|
|
359
|
+
this.state = 114;
|
|
249
360
|
this.expressionlist();
|
|
250
361
|
}
|
|
251
362
|
|
|
@@ -267,10 +378,10 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
267
378
|
|
|
268
379
|
opcode() {
|
|
269
380
|
let localctx = new OpcodeContext(this, this._ctx, this.state);
|
|
270
|
-
this.enterRule(localctx,
|
|
381
|
+
this.enterRule(localctx, 8, asm8080Parser.RULE_opcode);
|
|
271
382
|
try {
|
|
272
383
|
this.enterOuterAlt(localctx, 1);
|
|
273
|
-
this.state =
|
|
384
|
+
this.state = 117;
|
|
274
385
|
this.match(asm8080Parser.OPCODE);
|
|
275
386
|
} catch (re) {
|
|
276
387
|
if(re instanceof antlr4.error.RecognitionException) {
|
|
@@ -290,10 +401,10 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
290
401
|
|
|
291
402
|
register_() {
|
|
292
403
|
let localctx = new Register_Context(this, this._ctx, this.state);
|
|
293
|
-
this.enterRule(localctx,
|
|
404
|
+
this.enterRule(localctx, 10, asm8080Parser.RULE_register_);
|
|
294
405
|
try {
|
|
295
406
|
this.enterOuterAlt(localctx, 1);
|
|
296
|
-
this.state =
|
|
407
|
+
this.state = 119;
|
|
297
408
|
this.match(asm8080Parser.REGISTER);
|
|
298
409
|
} catch (re) {
|
|
299
410
|
if(re instanceof antlr4.error.RecognitionException) {
|
|
@@ -313,22 +424,28 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
313
424
|
|
|
314
425
|
directive() {
|
|
315
426
|
let localctx = new DirectiveContext(this, this._ctx, this.state);
|
|
316
|
-
this.enterRule(localctx,
|
|
427
|
+
this.enterRule(localctx, 12, asm8080Parser.RULE_directive);
|
|
317
428
|
var _la = 0;
|
|
318
429
|
try {
|
|
319
430
|
this.enterOuterAlt(localctx, 1);
|
|
320
|
-
this.state =
|
|
431
|
+
this.state = 122;
|
|
321
432
|
this._errHandler.sync(this);
|
|
322
433
|
_la = this._input.LA(1);
|
|
323
|
-
if((((_la) & ~0x1f) === 0 && ((1 << _la) &
|
|
324
|
-
this.state =
|
|
434
|
+
if(((((_la - 14)) & ~0x1f) === 0 && ((1 << (_la - 14)) & 24641541) !== 0)) {
|
|
435
|
+
this.state = 121;
|
|
325
436
|
this.argument();
|
|
326
437
|
}
|
|
327
438
|
|
|
328
|
-
this.state =
|
|
439
|
+
this.state = 124;
|
|
329
440
|
this.assemblerdirective();
|
|
330
|
-
this.state =
|
|
331
|
-
this.
|
|
441
|
+
this.state = 126;
|
|
442
|
+
this._errHandler.sync(this);
|
|
443
|
+
_la = this._input.LA(1);
|
|
444
|
+
if(((((_la - 10)) & ~0x1f) === 0 && ((1 << (_la - 10)) & 394266451) !== 0)) {
|
|
445
|
+
this.state = 125;
|
|
446
|
+
this.expressionlist();
|
|
447
|
+
}
|
|
448
|
+
|
|
332
449
|
} catch (re) {
|
|
333
450
|
if(re instanceof antlr4.error.RecognitionException) {
|
|
334
451
|
localctx.exception = re;
|
|
@@ -347,10 +464,10 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
347
464
|
|
|
348
465
|
assemblerdirective() {
|
|
349
466
|
let localctx = new AssemblerdirectiveContext(this, this._ctx, this.state);
|
|
350
|
-
this.enterRule(localctx,
|
|
467
|
+
this.enterRule(localctx, 14, asm8080Parser.RULE_assemblerdirective);
|
|
351
468
|
try {
|
|
352
469
|
this.enterOuterAlt(localctx, 1);
|
|
353
|
-
this.state =
|
|
470
|
+
this.state = 128;
|
|
354
471
|
this.match(asm8080Parser.ASSEMBLER_DIRECTIVE);
|
|
355
472
|
} catch (re) {
|
|
356
473
|
if(re instanceof antlr4.error.RecognitionException) {
|
|
@@ -370,18 +487,18 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
370
487
|
|
|
371
488
|
lbl() {
|
|
372
489
|
let localctx = new LblContext(this, this._ctx, this.state);
|
|
373
|
-
this.enterRule(localctx,
|
|
490
|
+
this.enterRule(localctx, 16, asm8080Parser.RULE_lbl);
|
|
374
491
|
var _la = 0;
|
|
375
492
|
try {
|
|
376
493
|
this.enterOuterAlt(localctx, 1);
|
|
377
|
-
this.state =
|
|
494
|
+
this.state = 130;
|
|
378
495
|
this.label();
|
|
379
|
-
this.state =
|
|
496
|
+
this.state = 132;
|
|
380
497
|
this._errHandler.sync(this);
|
|
381
498
|
_la = this._input.LA(1);
|
|
382
|
-
if(_la===
|
|
383
|
-
this.state =
|
|
384
|
-
this.match(asm8080Parser.
|
|
499
|
+
if(_la===2) {
|
|
500
|
+
this.state = 131;
|
|
501
|
+
this.match(asm8080Parser.T__1);
|
|
385
502
|
}
|
|
386
503
|
|
|
387
504
|
} catch (re) {
|
|
@@ -402,21 +519,21 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
402
519
|
|
|
403
520
|
expressionlist() {
|
|
404
521
|
let localctx = new ExpressionlistContext(this, this._ctx, this.state);
|
|
405
|
-
this.enterRule(localctx,
|
|
522
|
+
this.enterRule(localctx, 18, asm8080Parser.RULE_expressionlist);
|
|
406
523
|
var _la = 0;
|
|
407
524
|
try {
|
|
408
525
|
this.enterOuterAlt(localctx, 1);
|
|
409
|
-
this.state =
|
|
526
|
+
this.state = 134;
|
|
410
527
|
this.expression();
|
|
411
|
-
this.state =
|
|
528
|
+
this.state = 139;
|
|
412
529
|
this._errHandler.sync(this);
|
|
413
530
|
_la = this._input.LA(1);
|
|
414
|
-
while(_la===
|
|
415
|
-
this.state =
|
|
416
|
-
this.match(asm8080Parser.
|
|
417
|
-
this.state =
|
|
531
|
+
while(_la===3) {
|
|
532
|
+
this.state = 135;
|
|
533
|
+
this.match(asm8080Parser.T__2);
|
|
534
|
+
this.state = 136;
|
|
418
535
|
this.expression();
|
|
419
|
-
this.state =
|
|
536
|
+
this.state = 141;
|
|
420
537
|
this._errHandler.sync(this);
|
|
421
538
|
_la = this._input.LA(1);
|
|
422
539
|
}
|
|
@@ -438,11 +555,29 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
438
555
|
|
|
439
556
|
label() {
|
|
440
557
|
let localctx = new LabelContext(this, this._ctx, this.state);
|
|
441
|
-
this.enterRule(localctx,
|
|
558
|
+
this.enterRule(localctx, 20, asm8080Parser.RULE_label);
|
|
442
559
|
try {
|
|
443
|
-
this.
|
|
444
|
-
this.
|
|
445
|
-
this.
|
|
560
|
+
this.state = 145;
|
|
561
|
+
this._errHandler.sync(this);
|
|
562
|
+
switch(this._input.LA(1)) {
|
|
563
|
+
case 35:
|
|
564
|
+
this.enterOuterAlt(localctx, 1);
|
|
565
|
+
this.state = 142;
|
|
566
|
+
this.name();
|
|
567
|
+
break;
|
|
568
|
+
case 33:
|
|
569
|
+
this.enterOuterAlt(localctx, 2);
|
|
570
|
+
this.state = 143;
|
|
571
|
+
this.register_();
|
|
572
|
+
break;
|
|
573
|
+
case 17:
|
|
574
|
+
this.enterOuterAlt(localctx, 3);
|
|
575
|
+
this.state = 144;
|
|
576
|
+
this.assemblerdirective();
|
|
577
|
+
break;
|
|
578
|
+
default:
|
|
579
|
+
throw new antlr4.error.NoViableAltException(this);
|
|
580
|
+
}
|
|
446
581
|
} catch (re) {
|
|
447
582
|
if(re instanceof antlr4.error.RecognitionException) {
|
|
448
583
|
localctx.exception = re;
|
|
@@ -461,31 +596,29 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
461
596
|
|
|
462
597
|
expression() {
|
|
463
598
|
let localctx = new ExpressionContext(this, this._ctx, this.state);
|
|
464
|
-
this.enterRule(localctx,
|
|
599
|
+
this.enterRule(localctx, 22, asm8080Parser.RULE_expression);
|
|
465
600
|
var _la = 0;
|
|
466
601
|
try {
|
|
467
602
|
this.enterOuterAlt(localctx, 1);
|
|
468
|
-
this.state =
|
|
469
|
-
this.
|
|
470
|
-
this.state =
|
|
603
|
+
this.state = 147;
|
|
604
|
+
this.orExpression();
|
|
605
|
+
this.state = 150;
|
|
471
606
|
this._errHandler.sync(this);
|
|
472
607
|
_la = this._input.LA(1);
|
|
473
|
-
|
|
474
|
-
this.state =
|
|
608
|
+
if(((((_la - 4)) & ~0x1f) === 0 && ((1 << (_la - 4)) & 528482367) !== 0)) {
|
|
609
|
+
this.state = 148;
|
|
475
610
|
_la = this._input.LA(1);
|
|
476
|
-
if(!(_la===
|
|
611
|
+
if(!(((((_la - 4)) & ~0x1f) === 0 && ((1 << (_la - 4)) & 528482367) !== 0))) {
|
|
477
612
|
this._errHandler.recoverInline(this);
|
|
478
613
|
}
|
|
479
614
|
else {
|
|
480
615
|
this._errHandler.reportMatch(this);
|
|
481
616
|
this.consume();
|
|
482
617
|
}
|
|
483
|
-
this.state =
|
|
484
|
-
this.
|
|
485
|
-
this.state = 115;
|
|
486
|
-
this._errHandler.sync(this);
|
|
487
|
-
_la = this._input.LA(1);
|
|
618
|
+
this.state = 149;
|
|
619
|
+
this.orExpression();
|
|
488
620
|
}
|
|
621
|
+
|
|
489
622
|
} catch (re) {
|
|
490
623
|
if(re instanceof antlr4.error.RecognitionException) {
|
|
491
624
|
localctx.exception = re;
|
|
@@ -502,30 +635,23 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
502
635
|
|
|
503
636
|
|
|
504
637
|
|
|
505
|
-
|
|
506
|
-
let localctx = new
|
|
507
|
-
this.enterRule(localctx,
|
|
638
|
+
orExpression() {
|
|
639
|
+
let localctx = new OrExpressionContext(this, this._ctx, this.state);
|
|
640
|
+
this.enterRule(localctx, 24, asm8080Parser.RULE_orExpression);
|
|
508
641
|
var _la = 0;
|
|
509
642
|
try {
|
|
510
643
|
this.enterOuterAlt(localctx, 1);
|
|
511
|
-
this.state =
|
|
512
|
-
this.
|
|
513
|
-
this.state =
|
|
644
|
+
this.state = 152;
|
|
645
|
+
this.xorExpression();
|
|
646
|
+
this.state = 157;
|
|
514
647
|
this._errHandler.sync(this);
|
|
515
648
|
_la = this._input.LA(1);
|
|
516
|
-
while(_la===
|
|
517
|
-
this.state =
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
this.
|
|
521
|
-
|
|
522
|
-
else {
|
|
523
|
-
this._errHandler.reportMatch(this);
|
|
524
|
-
this.consume();
|
|
525
|
-
}
|
|
526
|
-
this.state = 118;
|
|
527
|
-
this.argument();
|
|
528
|
-
this.state = 123;
|
|
649
|
+
while(_la===22) {
|
|
650
|
+
this.state = 153;
|
|
651
|
+
this.match(asm8080Parser.OP_OR);
|
|
652
|
+
this.state = 154;
|
|
653
|
+
this.xorExpression();
|
|
654
|
+
this.state = 159;
|
|
529
655
|
this._errHandler.sync(this);
|
|
530
656
|
_la = this._input.LA(1);
|
|
531
657
|
}
|
|
@@ -545,49 +671,25 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
545
671
|
|
|
546
672
|
|
|
547
673
|
|
|
548
|
-
|
|
549
|
-
let localctx = new
|
|
550
|
-
this.enterRule(localctx,
|
|
674
|
+
xorExpression() {
|
|
675
|
+
let localctx = new XorExpressionContext(this, this._ctx, this.state);
|
|
676
|
+
this.enterRule(localctx, 26, asm8080Parser.RULE_xorExpression);
|
|
677
|
+
var _la = 0;
|
|
551
678
|
try {
|
|
552
|
-
this.
|
|
679
|
+
this.enterOuterAlt(localctx, 1);
|
|
680
|
+
this.state = 160;
|
|
681
|
+
this.andExpression();
|
|
682
|
+
this.state = 165;
|
|
553
683
|
this._errHandler.sync(this);
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
this.
|
|
557
|
-
this.
|
|
558
|
-
this.
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
this.
|
|
562
|
-
|
|
563
|
-
this.register_();
|
|
564
|
-
break;
|
|
565
|
-
case 9:
|
|
566
|
-
this.enterOuterAlt(localctx, 3);
|
|
567
|
-
this.state = 126;
|
|
568
|
-
this.dollar();
|
|
569
|
-
break;
|
|
570
|
-
case 13:
|
|
571
|
-
this.enterOuterAlt(localctx, 4);
|
|
572
|
-
this.state = 127;
|
|
573
|
-
this.name();
|
|
574
|
-
break;
|
|
575
|
-
case 16:
|
|
576
|
-
this.enterOuterAlt(localctx, 5);
|
|
577
|
-
this.state = 128;
|
|
578
|
-
this.string_();
|
|
579
|
-
break;
|
|
580
|
-
case 7:
|
|
581
|
-
this.enterOuterAlt(localctx, 6);
|
|
582
|
-
this.state = 129;
|
|
583
|
-
this.match(asm8080Parser.T__6);
|
|
584
|
-
this.state = 130;
|
|
585
|
-
this.expression();
|
|
586
|
-
this.state = 131;
|
|
587
|
-
this.match(asm8080Parser.T__7);
|
|
588
|
-
break;
|
|
589
|
-
default:
|
|
590
|
-
throw new antlr4.error.NoViableAltException(this);
|
|
684
|
+
_la = this._input.LA(1);
|
|
685
|
+
while(_la===23) {
|
|
686
|
+
this.state = 161;
|
|
687
|
+
this.match(asm8080Parser.OP_XOR);
|
|
688
|
+
this.state = 162;
|
|
689
|
+
this.andExpression();
|
|
690
|
+
this.state = 167;
|
|
691
|
+
this._errHandler.sync(this);
|
|
692
|
+
_la = this._input.LA(1);
|
|
591
693
|
}
|
|
592
694
|
} catch (re) {
|
|
593
695
|
if(re instanceof antlr4.error.RecognitionException) {
|
|
@@ -605,13 +707,26 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
605
707
|
|
|
606
708
|
|
|
607
709
|
|
|
608
|
-
|
|
609
|
-
let localctx = new
|
|
610
|
-
this.enterRule(localctx,
|
|
710
|
+
andExpression() {
|
|
711
|
+
let localctx = new AndExpressionContext(this, this._ctx, this.state);
|
|
712
|
+
this.enterRule(localctx, 28, asm8080Parser.RULE_andExpression);
|
|
713
|
+
var _la = 0;
|
|
611
714
|
try {
|
|
612
715
|
this.enterOuterAlt(localctx, 1);
|
|
613
|
-
this.state =
|
|
614
|
-
this.
|
|
716
|
+
this.state = 168;
|
|
717
|
+
this.addExpression();
|
|
718
|
+
this.state = 173;
|
|
719
|
+
this._errHandler.sync(this);
|
|
720
|
+
_la = this._input.LA(1);
|
|
721
|
+
while(_la===21) {
|
|
722
|
+
this.state = 169;
|
|
723
|
+
this.match(asm8080Parser.OP_AND);
|
|
724
|
+
this.state = 170;
|
|
725
|
+
this.addExpression();
|
|
726
|
+
this.state = 175;
|
|
727
|
+
this._errHandler.sync(this);
|
|
728
|
+
_la = this._input.LA(1);
|
|
729
|
+
}
|
|
615
730
|
} catch (re) {
|
|
616
731
|
if(re instanceof antlr4.error.RecognitionException) {
|
|
617
732
|
localctx.exception = re;
|
|
@@ -628,13 +743,33 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
628
743
|
|
|
629
744
|
|
|
630
745
|
|
|
631
|
-
|
|
632
|
-
let localctx = new
|
|
633
|
-
this.enterRule(localctx,
|
|
746
|
+
addExpression() {
|
|
747
|
+
let localctx = new AddExpressionContext(this, this._ctx, this.state);
|
|
748
|
+
this.enterRule(localctx, 30, asm8080Parser.RULE_addExpression);
|
|
749
|
+
var _la = 0;
|
|
634
750
|
try {
|
|
635
751
|
this.enterOuterAlt(localctx, 1);
|
|
636
|
-
this.state =
|
|
637
|
-
this.
|
|
752
|
+
this.state = 176;
|
|
753
|
+
this.shiftExpression();
|
|
754
|
+
this.state = 181;
|
|
755
|
+
this._errHandler.sync(this);
|
|
756
|
+
_la = this._input.LA(1);
|
|
757
|
+
while(_la===10 || _la===11) {
|
|
758
|
+
this.state = 177;
|
|
759
|
+
_la = this._input.LA(1);
|
|
760
|
+
if(!(_la===10 || _la===11)) {
|
|
761
|
+
this._errHandler.recoverInline(this);
|
|
762
|
+
}
|
|
763
|
+
else {
|
|
764
|
+
this._errHandler.reportMatch(this);
|
|
765
|
+
this.consume();
|
|
766
|
+
}
|
|
767
|
+
this.state = 178;
|
|
768
|
+
this.shiftExpression();
|
|
769
|
+
this.state = 183;
|
|
770
|
+
this._errHandler.sync(this);
|
|
771
|
+
_la = this._input.LA(1);
|
|
772
|
+
}
|
|
638
773
|
} catch (re) {
|
|
639
774
|
if(re instanceof antlr4.error.RecognitionException) {
|
|
640
775
|
localctx.exception = re;
|
|
@@ -651,13 +786,33 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
651
786
|
|
|
652
787
|
|
|
653
788
|
|
|
654
|
-
|
|
655
|
-
let localctx = new
|
|
656
|
-
this.enterRule(localctx,
|
|
789
|
+
shiftExpression() {
|
|
790
|
+
let localctx = new ShiftExpressionContext(this, this._ctx, this.state);
|
|
791
|
+
this.enterRule(localctx, 32, asm8080Parser.RULE_shiftExpression);
|
|
792
|
+
var _la = 0;
|
|
657
793
|
try {
|
|
658
794
|
this.enterOuterAlt(localctx, 1);
|
|
659
|
-
this.state =
|
|
660
|
-
this.
|
|
795
|
+
this.state = 184;
|
|
796
|
+
this.modExpression();
|
|
797
|
+
this.state = 189;
|
|
798
|
+
this._errHandler.sync(this);
|
|
799
|
+
_la = this._input.LA(1);
|
|
800
|
+
while(_la===24 || _la===25) {
|
|
801
|
+
this.state = 185;
|
|
802
|
+
_la = this._input.LA(1);
|
|
803
|
+
if(!(_la===24 || _la===25)) {
|
|
804
|
+
this._errHandler.recoverInline(this);
|
|
805
|
+
}
|
|
806
|
+
else {
|
|
807
|
+
this._errHandler.reportMatch(this);
|
|
808
|
+
this.consume();
|
|
809
|
+
}
|
|
810
|
+
this.state = 186;
|
|
811
|
+
this.modExpression();
|
|
812
|
+
this.state = 191;
|
|
813
|
+
this._errHandler.sync(this);
|
|
814
|
+
_la = this._input.LA(1);
|
|
815
|
+
}
|
|
661
816
|
} catch (re) {
|
|
662
817
|
if(re instanceof antlr4.error.RecognitionException) {
|
|
663
818
|
localctx.exception = re;
|
|
@@ -674,13 +829,26 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
674
829
|
|
|
675
830
|
|
|
676
831
|
|
|
677
|
-
|
|
678
|
-
let localctx = new
|
|
679
|
-
this.enterRule(localctx,
|
|
832
|
+
modExpression() {
|
|
833
|
+
let localctx = new ModExpressionContext(this, this._ctx, this.state);
|
|
834
|
+
this.enterRule(localctx, 34, asm8080Parser.RULE_modExpression);
|
|
835
|
+
var _la = 0;
|
|
680
836
|
try {
|
|
681
837
|
this.enterOuterAlt(localctx, 1);
|
|
682
|
-
this.state =
|
|
683
|
-
this.
|
|
838
|
+
this.state = 192;
|
|
839
|
+
this.multiplyingExpression();
|
|
840
|
+
this.state = 197;
|
|
841
|
+
this._errHandler.sync(this);
|
|
842
|
+
_la = this._input.LA(1);
|
|
843
|
+
while(_la===26) {
|
|
844
|
+
this.state = 193;
|
|
845
|
+
this.match(asm8080Parser.OP_MOD);
|
|
846
|
+
this.state = 194;
|
|
847
|
+
this.multiplyingExpression();
|
|
848
|
+
this.state = 199;
|
|
849
|
+
this._errHandler.sync(this);
|
|
850
|
+
_la = this._input.LA(1);
|
|
851
|
+
}
|
|
684
852
|
} catch (re) {
|
|
685
853
|
if(re instanceof antlr4.error.RecognitionException) {
|
|
686
854
|
localctx.exception = re;
|
|
@@ -697,13 +865,33 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
697
865
|
|
|
698
866
|
|
|
699
867
|
|
|
700
|
-
|
|
701
|
-
let localctx = new
|
|
702
|
-
this.enterRule(localctx,
|
|
868
|
+
multiplyingExpression() {
|
|
869
|
+
let localctx = new MultiplyingExpressionContext(this, this._ctx, this.state);
|
|
870
|
+
this.enterRule(localctx, 36, asm8080Parser.RULE_multiplyingExpression);
|
|
871
|
+
var _la = 0;
|
|
703
872
|
try {
|
|
704
873
|
this.enterOuterAlt(localctx, 1);
|
|
705
|
-
this.state =
|
|
706
|
-
this.
|
|
874
|
+
this.state = 200;
|
|
875
|
+
this.unaryExpression();
|
|
876
|
+
this.state = 205;
|
|
877
|
+
this._errHandler.sync(this);
|
|
878
|
+
_la = this._input.LA(1);
|
|
879
|
+
while(_la===12 || _la===13) {
|
|
880
|
+
this.state = 201;
|
|
881
|
+
_la = this._input.LA(1);
|
|
882
|
+
if(!(_la===12 || _la===13)) {
|
|
883
|
+
this._errHandler.recoverInline(this);
|
|
884
|
+
}
|
|
885
|
+
else {
|
|
886
|
+
this._errHandler.reportMatch(this);
|
|
887
|
+
this.consume();
|
|
888
|
+
}
|
|
889
|
+
this.state = 202;
|
|
890
|
+
this.unaryExpression();
|
|
891
|
+
this.state = 207;
|
|
892
|
+
this._errHandler.sync(this);
|
|
893
|
+
_la = this._input.LA(1);
|
|
894
|
+
}
|
|
707
895
|
} catch (re) {
|
|
708
896
|
if(re instanceof antlr4.error.RecognitionException) {
|
|
709
897
|
localctx.exception = re;
|
|
@@ -719,53 +907,336 @@ export default class asm8080Parser extends antlr4.Parser {
|
|
|
719
907
|
}
|
|
720
908
|
|
|
721
909
|
|
|
722
|
-
}
|
|
723
910
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
asm8080Parser.
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
asm8080Parser.
|
|
742
|
-
|
|
911
|
+
unaryExpression() {
|
|
912
|
+
let localctx = new UnaryExpressionContext(this, this._ctx, this.state);
|
|
913
|
+
this.enterRule(localctx, 38, asm8080Parser.RULE_unaryExpression);
|
|
914
|
+
try {
|
|
915
|
+
this.state = 219;
|
|
916
|
+
this._errHandler.sync(this);
|
|
917
|
+
switch(this._input.LA(1)) {
|
|
918
|
+
case 18:
|
|
919
|
+
this.enterOuterAlt(localctx, 1);
|
|
920
|
+
this.state = 208;
|
|
921
|
+
this.match(asm8080Parser.OP_NOT);
|
|
922
|
+
this.state = 209;
|
|
923
|
+
this.unaryExpression();
|
|
924
|
+
break;
|
|
925
|
+
case 19:
|
|
926
|
+
this.enterOuterAlt(localctx, 2);
|
|
927
|
+
this.state = 210;
|
|
928
|
+
this.match(asm8080Parser.OP_HIGH);
|
|
929
|
+
this.state = 211;
|
|
930
|
+
this.unaryExpression();
|
|
931
|
+
break;
|
|
932
|
+
case 20:
|
|
933
|
+
this.enterOuterAlt(localctx, 3);
|
|
934
|
+
this.state = 212;
|
|
935
|
+
this.match(asm8080Parser.OP_LOW);
|
|
936
|
+
this.state = 213;
|
|
937
|
+
this.unaryExpression();
|
|
938
|
+
break;
|
|
939
|
+
case 11:
|
|
940
|
+
this.enterOuterAlt(localctx, 4);
|
|
941
|
+
this.state = 214;
|
|
942
|
+
this.match(asm8080Parser.T__10);
|
|
943
|
+
this.state = 215;
|
|
944
|
+
this.unaryExpression();
|
|
945
|
+
break;
|
|
946
|
+
case 10:
|
|
947
|
+
this.enterOuterAlt(localctx, 5);
|
|
948
|
+
this.state = 216;
|
|
949
|
+
this.match(asm8080Parser.T__9);
|
|
950
|
+
this.state = 217;
|
|
951
|
+
this.unaryExpression();
|
|
952
|
+
break;
|
|
953
|
+
case 14:
|
|
954
|
+
case 16:
|
|
955
|
+
case 33:
|
|
956
|
+
case 34:
|
|
957
|
+
case 35:
|
|
958
|
+
case 36:
|
|
959
|
+
case 38:
|
|
960
|
+
this.enterOuterAlt(localctx, 6);
|
|
961
|
+
this.state = 218;
|
|
962
|
+
this.argument();
|
|
963
|
+
break;
|
|
964
|
+
default:
|
|
965
|
+
throw new antlr4.error.NoViableAltException(this);
|
|
966
|
+
}
|
|
967
|
+
} catch (re) {
|
|
968
|
+
if(re instanceof antlr4.error.RecognitionException) {
|
|
969
|
+
localctx.exception = re;
|
|
970
|
+
this._errHandler.reportError(this, re);
|
|
971
|
+
this._errHandler.recover(this, re);
|
|
972
|
+
} else {
|
|
973
|
+
throw re;
|
|
974
|
+
}
|
|
975
|
+
} finally {
|
|
976
|
+
this.exitRule();
|
|
977
|
+
}
|
|
978
|
+
return localctx;
|
|
979
|
+
}
|
|
743
980
|
|
|
744
|
-
asm8080Parser.RULE_prog = 0;
|
|
745
|
-
asm8080Parser.RULE_line = 1;
|
|
746
|
-
asm8080Parser.RULE_instruction = 2;
|
|
747
|
-
asm8080Parser.RULE_opcode = 3;
|
|
748
|
-
asm8080Parser.RULE_register_ = 4;
|
|
749
|
-
asm8080Parser.RULE_directive = 5;
|
|
750
|
-
asm8080Parser.RULE_assemblerdirective = 6;
|
|
751
|
-
asm8080Parser.RULE_lbl = 7;
|
|
752
|
-
asm8080Parser.RULE_expressionlist = 8;
|
|
753
|
-
asm8080Parser.RULE_label = 9;
|
|
754
|
-
asm8080Parser.RULE_expression = 10;
|
|
755
|
-
asm8080Parser.RULE_multiplyingExpression = 11;
|
|
756
|
-
asm8080Parser.RULE_argument = 12;
|
|
757
|
-
asm8080Parser.RULE_dollar = 13;
|
|
758
|
-
asm8080Parser.RULE_string_ = 14;
|
|
759
|
-
asm8080Parser.RULE_name = 15;
|
|
760
|
-
asm8080Parser.RULE_number = 16;
|
|
761
|
-
asm8080Parser.RULE_comment = 17;
|
|
762
981
|
|
|
763
|
-
class ProgContext extends antlr4.ParserRuleContext {
|
|
764
982
|
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
983
|
+
argument() {
|
|
984
|
+
let localctx = new ArgumentContext(this, this._ctx, this.state);
|
|
985
|
+
this.enterRule(localctx, 40, asm8080Parser.RULE_argument);
|
|
986
|
+
try {
|
|
987
|
+
this.state = 231;
|
|
988
|
+
this._errHandler.sync(this);
|
|
989
|
+
switch(this._input.LA(1)) {
|
|
990
|
+
case 36:
|
|
991
|
+
this.enterOuterAlt(localctx, 1);
|
|
992
|
+
this.state = 221;
|
|
993
|
+
this.number();
|
|
994
|
+
break;
|
|
995
|
+
case 34:
|
|
996
|
+
this.enterOuterAlt(localctx, 2);
|
|
997
|
+
this.state = 222;
|
|
998
|
+
this.opcode();
|
|
999
|
+
break;
|
|
1000
|
+
case 33:
|
|
1001
|
+
this.enterOuterAlt(localctx, 3);
|
|
1002
|
+
this.state = 223;
|
|
1003
|
+
this.register_();
|
|
1004
|
+
break;
|
|
1005
|
+
case 16:
|
|
1006
|
+
this.enterOuterAlt(localctx, 4);
|
|
1007
|
+
this.state = 224;
|
|
1008
|
+
this.dollar();
|
|
1009
|
+
break;
|
|
1010
|
+
case 35:
|
|
1011
|
+
this.enterOuterAlt(localctx, 5);
|
|
1012
|
+
this.state = 225;
|
|
1013
|
+
this.name();
|
|
1014
|
+
break;
|
|
1015
|
+
case 38:
|
|
1016
|
+
this.enterOuterAlt(localctx, 6);
|
|
1017
|
+
this.state = 226;
|
|
1018
|
+
this.string_();
|
|
1019
|
+
break;
|
|
1020
|
+
case 14:
|
|
1021
|
+
this.enterOuterAlt(localctx, 7);
|
|
1022
|
+
this.state = 227;
|
|
1023
|
+
this.match(asm8080Parser.T__13);
|
|
1024
|
+
this.state = 228;
|
|
1025
|
+
this.expression();
|
|
1026
|
+
this.state = 229;
|
|
1027
|
+
this.match(asm8080Parser.T__14);
|
|
1028
|
+
break;
|
|
1029
|
+
default:
|
|
1030
|
+
throw new antlr4.error.NoViableAltException(this);
|
|
1031
|
+
}
|
|
1032
|
+
} catch (re) {
|
|
1033
|
+
if(re instanceof antlr4.error.RecognitionException) {
|
|
1034
|
+
localctx.exception = re;
|
|
1035
|
+
this._errHandler.reportError(this, re);
|
|
1036
|
+
this._errHandler.recover(this, re);
|
|
1037
|
+
} else {
|
|
1038
|
+
throw re;
|
|
1039
|
+
}
|
|
1040
|
+
} finally {
|
|
1041
|
+
this.exitRule();
|
|
1042
|
+
}
|
|
1043
|
+
return localctx;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
|
|
1048
|
+
dollar() {
|
|
1049
|
+
let localctx = new DollarContext(this, this._ctx, this.state);
|
|
1050
|
+
this.enterRule(localctx, 42, asm8080Parser.RULE_dollar);
|
|
1051
|
+
try {
|
|
1052
|
+
this.enterOuterAlt(localctx, 1);
|
|
1053
|
+
this.state = 233;
|
|
1054
|
+
this.match(asm8080Parser.T__15);
|
|
1055
|
+
} catch (re) {
|
|
1056
|
+
if(re instanceof antlr4.error.RecognitionException) {
|
|
1057
|
+
localctx.exception = re;
|
|
1058
|
+
this._errHandler.reportError(this, re);
|
|
1059
|
+
this._errHandler.recover(this, re);
|
|
1060
|
+
} else {
|
|
1061
|
+
throw re;
|
|
1062
|
+
}
|
|
1063
|
+
} finally {
|
|
1064
|
+
this.exitRule();
|
|
1065
|
+
}
|
|
1066
|
+
return localctx;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
string_() {
|
|
1072
|
+
let localctx = new String_Context(this, this._ctx, this.state);
|
|
1073
|
+
this.enterRule(localctx, 44, asm8080Parser.RULE_string_);
|
|
1074
|
+
try {
|
|
1075
|
+
this.enterOuterAlt(localctx, 1);
|
|
1076
|
+
this.state = 235;
|
|
1077
|
+
this.match(asm8080Parser.STRING);
|
|
1078
|
+
} catch (re) {
|
|
1079
|
+
if(re instanceof antlr4.error.RecognitionException) {
|
|
1080
|
+
localctx.exception = re;
|
|
1081
|
+
this._errHandler.reportError(this, re);
|
|
1082
|
+
this._errHandler.recover(this, re);
|
|
1083
|
+
} else {
|
|
1084
|
+
throw re;
|
|
1085
|
+
}
|
|
1086
|
+
} finally {
|
|
1087
|
+
this.exitRule();
|
|
1088
|
+
}
|
|
1089
|
+
return localctx;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
name() {
|
|
1095
|
+
let localctx = new NameContext(this, this._ctx, this.state);
|
|
1096
|
+
this.enterRule(localctx, 46, asm8080Parser.RULE_name);
|
|
1097
|
+
try {
|
|
1098
|
+
this.enterOuterAlt(localctx, 1);
|
|
1099
|
+
this.state = 237;
|
|
1100
|
+
this.match(asm8080Parser.NAME);
|
|
1101
|
+
} catch (re) {
|
|
1102
|
+
if(re instanceof antlr4.error.RecognitionException) {
|
|
1103
|
+
localctx.exception = re;
|
|
1104
|
+
this._errHandler.reportError(this, re);
|
|
1105
|
+
this._errHandler.recover(this, re);
|
|
1106
|
+
} else {
|
|
1107
|
+
throw re;
|
|
1108
|
+
}
|
|
1109
|
+
} finally {
|
|
1110
|
+
this.exitRule();
|
|
1111
|
+
}
|
|
1112
|
+
return localctx;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
number() {
|
|
1118
|
+
let localctx = new NumberContext(this, this._ctx, this.state);
|
|
1119
|
+
this.enterRule(localctx, 48, asm8080Parser.RULE_number);
|
|
1120
|
+
try {
|
|
1121
|
+
this.enterOuterAlt(localctx, 1);
|
|
1122
|
+
this.state = 239;
|
|
1123
|
+
this.match(asm8080Parser.NUMBER);
|
|
1124
|
+
} catch (re) {
|
|
1125
|
+
if(re instanceof antlr4.error.RecognitionException) {
|
|
1126
|
+
localctx.exception = re;
|
|
1127
|
+
this._errHandler.reportError(this, re);
|
|
1128
|
+
this._errHandler.recover(this, re);
|
|
1129
|
+
} else {
|
|
1130
|
+
throw re;
|
|
1131
|
+
}
|
|
1132
|
+
} finally {
|
|
1133
|
+
this.exitRule();
|
|
1134
|
+
}
|
|
1135
|
+
return localctx;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
comment() {
|
|
1141
|
+
let localctx = new CommentContext(this, this._ctx, this.state);
|
|
1142
|
+
this.enterRule(localctx, 50, asm8080Parser.RULE_comment);
|
|
1143
|
+
try {
|
|
1144
|
+
this.enterOuterAlt(localctx, 1);
|
|
1145
|
+
this.state = 241;
|
|
1146
|
+
this.match(asm8080Parser.COMMENT);
|
|
1147
|
+
} catch (re) {
|
|
1148
|
+
if(re instanceof antlr4.error.RecognitionException) {
|
|
1149
|
+
localctx.exception = re;
|
|
1150
|
+
this._errHandler.reportError(this, re);
|
|
1151
|
+
this._errHandler.recover(this, re);
|
|
1152
|
+
} else {
|
|
1153
|
+
throw re;
|
|
1154
|
+
}
|
|
1155
|
+
} finally {
|
|
1156
|
+
this.exitRule();
|
|
1157
|
+
}
|
|
1158
|
+
return localctx;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
asm8080Parser.EOF = antlr4.Token.EOF;
|
|
1165
|
+
asm8080Parser.T__0 = 1;
|
|
1166
|
+
asm8080Parser.T__1 = 2;
|
|
1167
|
+
asm8080Parser.T__2 = 3;
|
|
1168
|
+
asm8080Parser.T__3 = 4;
|
|
1169
|
+
asm8080Parser.T__4 = 5;
|
|
1170
|
+
asm8080Parser.T__5 = 6;
|
|
1171
|
+
asm8080Parser.T__6 = 7;
|
|
1172
|
+
asm8080Parser.T__7 = 8;
|
|
1173
|
+
asm8080Parser.T__8 = 9;
|
|
1174
|
+
asm8080Parser.T__9 = 10;
|
|
1175
|
+
asm8080Parser.T__10 = 11;
|
|
1176
|
+
asm8080Parser.T__11 = 12;
|
|
1177
|
+
asm8080Parser.T__12 = 13;
|
|
1178
|
+
asm8080Parser.T__13 = 14;
|
|
1179
|
+
asm8080Parser.T__14 = 15;
|
|
1180
|
+
asm8080Parser.T__15 = 16;
|
|
1181
|
+
asm8080Parser.ASSEMBLER_DIRECTIVE = 17;
|
|
1182
|
+
asm8080Parser.OP_NOT = 18;
|
|
1183
|
+
asm8080Parser.OP_HIGH = 19;
|
|
1184
|
+
asm8080Parser.OP_LOW = 20;
|
|
1185
|
+
asm8080Parser.OP_AND = 21;
|
|
1186
|
+
asm8080Parser.OP_OR = 22;
|
|
1187
|
+
asm8080Parser.OP_XOR = 23;
|
|
1188
|
+
asm8080Parser.OP_SHL = 24;
|
|
1189
|
+
asm8080Parser.OP_SHR = 25;
|
|
1190
|
+
asm8080Parser.OP_MOD = 26;
|
|
1191
|
+
asm8080Parser.OP_GT = 27;
|
|
1192
|
+
asm8080Parser.OP_LT = 28;
|
|
1193
|
+
asm8080Parser.OP_GE = 29;
|
|
1194
|
+
asm8080Parser.OP_LE = 30;
|
|
1195
|
+
asm8080Parser.OP_NE = 31;
|
|
1196
|
+
asm8080Parser.OP_EQ = 32;
|
|
1197
|
+
asm8080Parser.REGISTER = 33;
|
|
1198
|
+
asm8080Parser.OPCODE = 34;
|
|
1199
|
+
asm8080Parser.NAME = 35;
|
|
1200
|
+
asm8080Parser.NUMBER = 36;
|
|
1201
|
+
asm8080Parser.COMMENT = 37;
|
|
1202
|
+
asm8080Parser.STRING = 38;
|
|
1203
|
+
asm8080Parser.EOL = 39;
|
|
1204
|
+
asm8080Parser.WS = 40;
|
|
1205
|
+
asm8080Parser.ARTIFACT = 41;
|
|
1206
|
+
|
|
1207
|
+
asm8080Parser.RULE_prog = 0;
|
|
1208
|
+
asm8080Parser.RULE_line = 1;
|
|
1209
|
+
asm8080Parser.RULE_instruction = 2;
|
|
1210
|
+
asm8080Parser.RULE_macrocall = 3;
|
|
1211
|
+
asm8080Parser.RULE_opcode = 4;
|
|
1212
|
+
asm8080Parser.RULE_register_ = 5;
|
|
1213
|
+
asm8080Parser.RULE_directive = 6;
|
|
1214
|
+
asm8080Parser.RULE_assemblerdirective = 7;
|
|
1215
|
+
asm8080Parser.RULE_lbl = 8;
|
|
1216
|
+
asm8080Parser.RULE_expressionlist = 9;
|
|
1217
|
+
asm8080Parser.RULE_label = 10;
|
|
1218
|
+
asm8080Parser.RULE_expression = 11;
|
|
1219
|
+
asm8080Parser.RULE_orExpression = 12;
|
|
1220
|
+
asm8080Parser.RULE_xorExpression = 13;
|
|
1221
|
+
asm8080Parser.RULE_andExpression = 14;
|
|
1222
|
+
asm8080Parser.RULE_addExpression = 15;
|
|
1223
|
+
asm8080Parser.RULE_shiftExpression = 16;
|
|
1224
|
+
asm8080Parser.RULE_modExpression = 17;
|
|
1225
|
+
asm8080Parser.RULE_multiplyingExpression = 18;
|
|
1226
|
+
asm8080Parser.RULE_unaryExpression = 19;
|
|
1227
|
+
asm8080Parser.RULE_argument = 20;
|
|
1228
|
+
asm8080Parser.RULE_dollar = 21;
|
|
1229
|
+
asm8080Parser.RULE_string_ = 22;
|
|
1230
|
+
asm8080Parser.RULE_name = 23;
|
|
1231
|
+
asm8080Parser.RULE_number = 24;
|
|
1232
|
+
asm8080Parser.RULE_comment = 25;
|
|
1233
|
+
|
|
1234
|
+
class ProgContext extends antlr4.ParserRuleContext {
|
|
1235
|
+
|
|
1236
|
+
constructor(parser, parent, invokingState) {
|
|
1237
|
+
if(parent===undefined) {
|
|
1238
|
+
parent = null;
|
|
1239
|
+
}
|
|
769
1240
|
if(invokingState===undefined || invokingState===null) {
|
|
770
1241
|
invokingState = -1;
|
|
771
1242
|
}
|
|
@@ -840,12 +1311,37 @@ class LineContext extends antlr4.ParserRuleContext {
|
|
|
840
1311
|
this.ruleIndex = asm8080Parser.RULE_line;
|
|
841
1312
|
}
|
|
842
1313
|
|
|
843
|
-
instruction() {
|
|
844
|
-
|
|
1314
|
+
instruction = function(i) {
|
|
1315
|
+
if(i===undefined) {
|
|
1316
|
+
i = null;
|
|
1317
|
+
}
|
|
1318
|
+
if(i===null) {
|
|
1319
|
+
return this.getTypedRuleContexts(InstructionContext);
|
|
1320
|
+
} else {
|
|
1321
|
+
return this.getTypedRuleContext(InstructionContext,i);
|
|
1322
|
+
}
|
|
845
1323
|
};
|
|
846
1324
|
|
|
847
|
-
directive() {
|
|
848
|
-
|
|
1325
|
+
directive = function(i) {
|
|
1326
|
+
if(i===undefined) {
|
|
1327
|
+
i = null;
|
|
1328
|
+
}
|
|
1329
|
+
if(i===null) {
|
|
1330
|
+
return this.getTypedRuleContexts(DirectiveContext);
|
|
1331
|
+
} else {
|
|
1332
|
+
return this.getTypedRuleContext(DirectiveContext,i);
|
|
1333
|
+
}
|
|
1334
|
+
};
|
|
1335
|
+
|
|
1336
|
+
macrocall = function(i) {
|
|
1337
|
+
if(i===undefined) {
|
|
1338
|
+
i = null;
|
|
1339
|
+
}
|
|
1340
|
+
if(i===null) {
|
|
1341
|
+
return this.getTypedRuleContexts(MacrocallContext);
|
|
1342
|
+
} else {
|
|
1343
|
+
return this.getTypedRuleContext(MacrocallContext,i);
|
|
1344
|
+
}
|
|
849
1345
|
};
|
|
850
1346
|
|
|
851
1347
|
lbl() {
|
|
@@ -928,6 +1424,53 @@ class InstructionContext extends antlr4.ParserRuleContext {
|
|
|
928
1424
|
|
|
929
1425
|
|
|
930
1426
|
|
|
1427
|
+
class MacrocallContext extends antlr4.ParserRuleContext {
|
|
1428
|
+
|
|
1429
|
+
constructor(parser, parent, invokingState) {
|
|
1430
|
+
if(parent===undefined) {
|
|
1431
|
+
parent = null;
|
|
1432
|
+
}
|
|
1433
|
+
if(invokingState===undefined || invokingState===null) {
|
|
1434
|
+
invokingState = -1;
|
|
1435
|
+
}
|
|
1436
|
+
super(parent, invokingState);
|
|
1437
|
+
this.parser = parser;
|
|
1438
|
+
this.ruleIndex = asm8080Parser.RULE_macrocall;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
name() {
|
|
1442
|
+
return this.getTypedRuleContext(NameContext,0);
|
|
1443
|
+
};
|
|
1444
|
+
|
|
1445
|
+
expressionlist() {
|
|
1446
|
+
return this.getTypedRuleContext(ExpressionlistContext,0);
|
|
1447
|
+
};
|
|
1448
|
+
|
|
1449
|
+
enterRule(listener) {
|
|
1450
|
+
if(listener instanceof asm8080Listener ) {
|
|
1451
|
+
listener.enterMacrocall(this);
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
exitRule(listener) {
|
|
1456
|
+
if(listener instanceof asm8080Listener ) {
|
|
1457
|
+
listener.exitMacrocall(this);
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
accept(visitor) {
|
|
1462
|
+
if ( visitor instanceof asm8080Visitor ) {
|
|
1463
|
+
return visitor.visitMacrocall(this);
|
|
1464
|
+
} else {
|
|
1465
|
+
return visitor.visitChildren(this);
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
|
|
931
1474
|
class OpcodeContext extends antlr4.ParserRuleContext {
|
|
932
1475
|
|
|
933
1476
|
constructor(parser, parent, invokingState) {
|
|
@@ -1032,14 +1575,14 @@ class DirectiveContext extends antlr4.ParserRuleContext {
|
|
|
1032
1575
|
return this.getTypedRuleContext(AssemblerdirectiveContext,0);
|
|
1033
1576
|
};
|
|
1034
1577
|
|
|
1035
|
-
expressionlist() {
|
|
1036
|
-
return this.getTypedRuleContext(ExpressionlistContext,0);
|
|
1037
|
-
};
|
|
1038
|
-
|
|
1039
1578
|
argument() {
|
|
1040
1579
|
return this.getTypedRuleContext(ArgumentContext,0);
|
|
1041
1580
|
};
|
|
1042
1581
|
|
|
1582
|
+
expressionlist() {
|
|
1583
|
+
return this.getTypedRuleContext(ExpressionlistContext,0);
|
|
1584
|
+
};
|
|
1585
|
+
|
|
1043
1586
|
enterRule(listener) {
|
|
1044
1587
|
if(listener instanceof asm8080Listener ) {
|
|
1045
1588
|
listener.enterDirective(this);
|
|
@@ -1219,6 +1762,14 @@ class LabelContext extends antlr4.ParserRuleContext {
|
|
|
1219
1762
|
return this.getTypedRuleContext(NameContext,0);
|
|
1220
1763
|
};
|
|
1221
1764
|
|
|
1765
|
+
register_() {
|
|
1766
|
+
return this.getTypedRuleContext(Register_Context,0);
|
|
1767
|
+
};
|
|
1768
|
+
|
|
1769
|
+
assemblerdirective() {
|
|
1770
|
+
return this.getTypedRuleContext(AssemblerdirectiveContext,0);
|
|
1771
|
+
};
|
|
1772
|
+
|
|
1222
1773
|
enterRule(listener) {
|
|
1223
1774
|
if(listener instanceof asm8080Listener ) {
|
|
1224
1775
|
listener.enterLabel(this);
|
|
@@ -1258,19 +1809,43 @@ class ExpressionContext extends antlr4.ParserRuleContext {
|
|
|
1258
1809
|
this.ruleIndex = asm8080Parser.RULE_expression;
|
|
1259
1810
|
}
|
|
1260
1811
|
|
|
1261
|
-
|
|
1812
|
+
orExpression = function(i) {
|
|
1262
1813
|
if(i===undefined) {
|
|
1263
1814
|
i = null;
|
|
1264
1815
|
}
|
|
1265
1816
|
if(i===null) {
|
|
1266
|
-
return this.getTypedRuleContexts(
|
|
1817
|
+
return this.getTypedRuleContexts(OrExpressionContext);
|
|
1267
1818
|
} else {
|
|
1268
|
-
return this.getTypedRuleContext(
|
|
1819
|
+
return this.getTypedRuleContext(OrExpressionContext,i);
|
|
1269
1820
|
}
|
|
1270
1821
|
};
|
|
1271
1822
|
|
|
1272
|
-
|
|
1273
|
-
|
|
1823
|
+
OP_GT() {
|
|
1824
|
+
return this.getToken(asm8080Parser.OP_GT, 0);
|
|
1825
|
+
};
|
|
1826
|
+
|
|
1827
|
+
OP_LT() {
|
|
1828
|
+
return this.getToken(asm8080Parser.OP_LT, 0);
|
|
1829
|
+
};
|
|
1830
|
+
|
|
1831
|
+
OP_GE() {
|
|
1832
|
+
return this.getToken(asm8080Parser.OP_GE, 0);
|
|
1833
|
+
};
|
|
1834
|
+
|
|
1835
|
+
OP_LE() {
|
|
1836
|
+
return this.getToken(asm8080Parser.OP_LE, 0);
|
|
1837
|
+
};
|
|
1838
|
+
|
|
1839
|
+
OP_NE() {
|
|
1840
|
+
return this.getToken(asm8080Parser.OP_NE, 0);
|
|
1841
|
+
};
|
|
1842
|
+
|
|
1843
|
+
OP_EQ() {
|
|
1844
|
+
return this.getToken(asm8080Parser.OP_EQ, 0);
|
|
1845
|
+
};
|
|
1846
|
+
|
|
1847
|
+
enterRule(listener) {
|
|
1848
|
+
if(listener instanceof asm8080Listener ) {
|
|
1274
1849
|
listener.enterExpression(this);
|
|
1275
1850
|
}
|
|
1276
1851
|
}
|
|
@@ -1294,6 +1869,378 @@ class ExpressionContext extends antlr4.ParserRuleContext {
|
|
|
1294
1869
|
|
|
1295
1870
|
|
|
1296
1871
|
|
|
1872
|
+
class OrExpressionContext extends antlr4.ParserRuleContext {
|
|
1873
|
+
|
|
1874
|
+
constructor(parser, parent, invokingState) {
|
|
1875
|
+
if(parent===undefined) {
|
|
1876
|
+
parent = null;
|
|
1877
|
+
}
|
|
1878
|
+
if(invokingState===undefined || invokingState===null) {
|
|
1879
|
+
invokingState = -1;
|
|
1880
|
+
}
|
|
1881
|
+
super(parent, invokingState);
|
|
1882
|
+
this.parser = parser;
|
|
1883
|
+
this.ruleIndex = asm8080Parser.RULE_orExpression;
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
xorExpression = function(i) {
|
|
1887
|
+
if(i===undefined) {
|
|
1888
|
+
i = null;
|
|
1889
|
+
}
|
|
1890
|
+
if(i===null) {
|
|
1891
|
+
return this.getTypedRuleContexts(XorExpressionContext);
|
|
1892
|
+
} else {
|
|
1893
|
+
return this.getTypedRuleContext(XorExpressionContext,i);
|
|
1894
|
+
}
|
|
1895
|
+
};
|
|
1896
|
+
|
|
1897
|
+
OP_OR = function(i) {
|
|
1898
|
+
if(i===undefined) {
|
|
1899
|
+
i = null;
|
|
1900
|
+
}
|
|
1901
|
+
if(i===null) {
|
|
1902
|
+
return this.getTokens(asm8080Parser.OP_OR);
|
|
1903
|
+
} else {
|
|
1904
|
+
return this.getToken(asm8080Parser.OP_OR, i);
|
|
1905
|
+
}
|
|
1906
|
+
};
|
|
1907
|
+
|
|
1908
|
+
|
|
1909
|
+
enterRule(listener) {
|
|
1910
|
+
if(listener instanceof asm8080Listener ) {
|
|
1911
|
+
listener.enterOrExpression(this);
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
exitRule(listener) {
|
|
1916
|
+
if(listener instanceof asm8080Listener ) {
|
|
1917
|
+
listener.exitOrExpression(this);
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
accept(visitor) {
|
|
1922
|
+
if ( visitor instanceof asm8080Visitor ) {
|
|
1923
|
+
return visitor.visitOrExpression(this);
|
|
1924
|
+
} else {
|
|
1925
|
+
return visitor.visitChildren(this);
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
|
|
1933
|
+
|
|
1934
|
+
class XorExpressionContext extends antlr4.ParserRuleContext {
|
|
1935
|
+
|
|
1936
|
+
constructor(parser, parent, invokingState) {
|
|
1937
|
+
if(parent===undefined) {
|
|
1938
|
+
parent = null;
|
|
1939
|
+
}
|
|
1940
|
+
if(invokingState===undefined || invokingState===null) {
|
|
1941
|
+
invokingState = -1;
|
|
1942
|
+
}
|
|
1943
|
+
super(parent, invokingState);
|
|
1944
|
+
this.parser = parser;
|
|
1945
|
+
this.ruleIndex = asm8080Parser.RULE_xorExpression;
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
andExpression = function(i) {
|
|
1949
|
+
if(i===undefined) {
|
|
1950
|
+
i = null;
|
|
1951
|
+
}
|
|
1952
|
+
if(i===null) {
|
|
1953
|
+
return this.getTypedRuleContexts(AndExpressionContext);
|
|
1954
|
+
} else {
|
|
1955
|
+
return this.getTypedRuleContext(AndExpressionContext,i);
|
|
1956
|
+
}
|
|
1957
|
+
};
|
|
1958
|
+
|
|
1959
|
+
OP_XOR = function(i) {
|
|
1960
|
+
if(i===undefined) {
|
|
1961
|
+
i = null;
|
|
1962
|
+
}
|
|
1963
|
+
if(i===null) {
|
|
1964
|
+
return this.getTokens(asm8080Parser.OP_XOR);
|
|
1965
|
+
} else {
|
|
1966
|
+
return this.getToken(asm8080Parser.OP_XOR, i);
|
|
1967
|
+
}
|
|
1968
|
+
};
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
enterRule(listener) {
|
|
1972
|
+
if(listener instanceof asm8080Listener ) {
|
|
1973
|
+
listener.enterXorExpression(this);
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
exitRule(listener) {
|
|
1978
|
+
if(listener instanceof asm8080Listener ) {
|
|
1979
|
+
listener.exitXorExpression(this);
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
accept(visitor) {
|
|
1984
|
+
if ( visitor instanceof asm8080Visitor ) {
|
|
1985
|
+
return visitor.visitXorExpression(this);
|
|
1986
|
+
} else {
|
|
1987
|
+
return visitor.visitChildren(this);
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
|
|
1995
|
+
|
|
1996
|
+
class AndExpressionContext extends antlr4.ParserRuleContext {
|
|
1997
|
+
|
|
1998
|
+
constructor(parser, parent, invokingState) {
|
|
1999
|
+
if(parent===undefined) {
|
|
2000
|
+
parent = null;
|
|
2001
|
+
}
|
|
2002
|
+
if(invokingState===undefined || invokingState===null) {
|
|
2003
|
+
invokingState = -1;
|
|
2004
|
+
}
|
|
2005
|
+
super(parent, invokingState);
|
|
2006
|
+
this.parser = parser;
|
|
2007
|
+
this.ruleIndex = asm8080Parser.RULE_andExpression;
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
addExpression = function(i) {
|
|
2011
|
+
if(i===undefined) {
|
|
2012
|
+
i = null;
|
|
2013
|
+
}
|
|
2014
|
+
if(i===null) {
|
|
2015
|
+
return this.getTypedRuleContexts(AddExpressionContext);
|
|
2016
|
+
} else {
|
|
2017
|
+
return this.getTypedRuleContext(AddExpressionContext,i);
|
|
2018
|
+
}
|
|
2019
|
+
};
|
|
2020
|
+
|
|
2021
|
+
OP_AND = function(i) {
|
|
2022
|
+
if(i===undefined) {
|
|
2023
|
+
i = null;
|
|
2024
|
+
}
|
|
2025
|
+
if(i===null) {
|
|
2026
|
+
return this.getTokens(asm8080Parser.OP_AND);
|
|
2027
|
+
} else {
|
|
2028
|
+
return this.getToken(asm8080Parser.OP_AND, i);
|
|
2029
|
+
}
|
|
2030
|
+
};
|
|
2031
|
+
|
|
2032
|
+
|
|
2033
|
+
enterRule(listener) {
|
|
2034
|
+
if(listener instanceof asm8080Listener ) {
|
|
2035
|
+
listener.enterAndExpression(this);
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
exitRule(listener) {
|
|
2040
|
+
if(listener instanceof asm8080Listener ) {
|
|
2041
|
+
listener.exitAndExpression(this);
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
accept(visitor) {
|
|
2046
|
+
if ( visitor instanceof asm8080Visitor ) {
|
|
2047
|
+
return visitor.visitAndExpression(this);
|
|
2048
|
+
} else {
|
|
2049
|
+
return visitor.visitChildren(this);
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
|
|
2057
|
+
|
|
2058
|
+
class AddExpressionContext extends antlr4.ParserRuleContext {
|
|
2059
|
+
|
|
2060
|
+
constructor(parser, parent, invokingState) {
|
|
2061
|
+
if(parent===undefined) {
|
|
2062
|
+
parent = null;
|
|
2063
|
+
}
|
|
2064
|
+
if(invokingState===undefined || invokingState===null) {
|
|
2065
|
+
invokingState = -1;
|
|
2066
|
+
}
|
|
2067
|
+
super(parent, invokingState);
|
|
2068
|
+
this.parser = parser;
|
|
2069
|
+
this.ruleIndex = asm8080Parser.RULE_addExpression;
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
shiftExpression = function(i) {
|
|
2073
|
+
if(i===undefined) {
|
|
2074
|
+
i = null;
|
|
2075
|
+
}
|
|
2076
|
+
if(i===null) {
|
|
2077
|
+
return this.getTypedRuleContexts(ShiftExpressionContext);
|
|
2078
|
+
} else {
|
|
2079
|
+
return this.getTypedRuleContext(ShiftExpressionContext,i);
|
|
2080
|
+
}
|
|
2081
|
+
};
|
|
2082
|
+
|
|
2083
|
+
enterRule(listener) {
|
|
2084
|
+
if(listener instanceof asm8080Listener ) {
|
|
2085
|
+
listener.enterAddExpression(this);
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
exitRule(listener) {
|
|
2090
|
+
if(listener instanceof asm8080Listener ) {
|
|
2091
|
+
listener.exitAddExpression(this);
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
accept(visitor) {
|
|
2096
|
+
if ( visitor instanceof asm8080Visitor ) {
|
|
2097
|
+
return visitor.visitAddExpression(this);
|
|
2098
|
+
} else {
|
|
2099
|
+
return visitor.visitChildren(this);
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
|
|
2107
|
+
|
|
2108
|
+
class ShiftExpressionContext extends antlr4.ParserRuleContext {
|
|
2109
|
+
|
|
2110
|
+
constructor(parser, parent, invokingState) {
|
|
2111
|
+
if(parent===undefined) {
|
|
2112
|
+
parent = null;
|
|
2113
|
+
}
|
|
2114
|
+
if(invokingState===undefined || invokingState===null) {
|
|
2115
|
+
invokingState = -1;
|
|
2116
|
+
}
|
|
2117
|
+
super(parent, invokingState);
|
|
2118
|
+
this.parser = parser;
|
|
2119
|
+
this.ruleIndex = asm8080Parser.RULE_shiftExpression;
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
modExpression = function(i) {
|
|
2123
|
+
if(i===undefined) {
|
|
2124
|
+
i = null;
|
|
2125
|
+
}
|
|
2126
|
+
if(i===null) {
|
|
2127
|
+
return this.getTypedRuleContexts(ModExpressionContext);
|
|
2128
|
+
} else {
|
|
2129
|
+
return this.getTypedRuleContext(ModExpressionContext,i);
|
|
2130
|
+
}
|
|
2131
|
+
};
|
|
2132
|
+
|
|
2133
|
+
OP_SHL = function(i) {
|
|
2134
|
+
if(i===undefined) {
|
|
2135
|
+
i = null;
|
|
2136
|
+
}
|
|
2137
|
+
if(i===null) {
|
|
2138
|
+
return this.getTokens(asm8080Parser.OP_SHL);
|
|
2139
|
+
} else {
|
|
2140
|
+
return this.getToken(asm8080Parser.OP_SHL, i);
|
|
2141
|
+
}
|
|
2142
|
+
};
|
|
2143
|
+
|
|
2144
|
+
|
|
2145
|
+
OP_SHR = function(i) {
|
|
2146
|
+
if(i===undefined) {
|
|
2147
|
+
i = null;
|
|
2148
|
+
}
|
|
2149
|
+
if(i===null) {
|
|
2150
|
+
return this.getTokens(asm8080Parser.OP_SHR);
|
|
2151
|
+
} else {
|
|
2152
|
+
return this.getToken(asm8080Parser.OP_SHR, i);
|
|
2153
|
+
}
|
|
2154
|
+
};
|
|
2155
|
+
|
|
2156
|
+
|
|
2157
|
+
enterRule(listener) {
|
|
2158
|
+
if(listener instanceof asm8080Listener ) {
|
|
2159
|
+
listener.enterShiftExpression(this);
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
exitRule(listener) {
|
|
2164
|
+
if(listener instanceof asm8080Listener ) {
|
|
2165
|
+
listener.exitShiftExpression(this);
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
accept(visitor) {
|
|
2170
|
+
if ( visitor instanceof asm8080Visitor ) {
|
|
2171
|
+
return visitor.visitShiftExpression(this);
|
|
2172
|
+
} else {
|
|
2173
|
+
return visitor.visitChildren(this);
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
|
|
2181
|
+
|
|
2182
|
+
class ModExpressionContext extends antlr4.ParserRuleContext {
|
|
2183
|
+
|
|
2184
|
+
constructor(parser, parent, invokingState) {
|
|
2185
|
+
if(parent===undefined) {
|
|
2186
|
+
parent = null;
|
|
2187
|
+
}
|
|
2188
|
+
if(invokingState===undefined || invokingState===null) {
|
|
2189
|
+
invokingState = -1;
|
|
2190
|
+
}
|
|
2191
|
+
super(parent, invokingState);
|
|
2192
|
+
this.parser = parser;
|
|
2193
|
+
this.ruleIndex = asm8080Parser.RULE_modExpression;
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
multiplyingExpression = function(i) {
|
|
2197
|
+
if(i===undefined) {
|
|
2198
|
+
i = null;
|
|
2199
|
+
}
|
|
2200
|
+
if(i===null) {
|
|
2201
|
+
return this.getTypedRuleContexts(MultiplyingExpressionContext);
|
|
2202
|
+
} else {
|
|
2203
|
+
return this.getTypedRuleContext(MultiplyingExpressionContext,i);
|
|
2204
|
+
}
|
|
2205
|
+
};
|
|
2206
|
+
|
|
2207
|
+
OP_MOD = function(i) {
|
|
2208
|
+
if(i===undefined) {
|
|
2209
|
+
i = null;
|
|
2210
|
+
}
|
|
2211
|
+
if(i===null) {
|
|
2212
|
+
return this.getTokens(asm8080Parser.OP_MOD);
|
|
2213
|
+
} else {
|
|
2214
|
+
return this.getToken(asm8080Parser.OP_MOD, i);
|
|
2215
|
+
}
|
|
2216
|
+
};
|
|
2217
|
+
|
|
2218
|
+
|
|
2219
|
+
enterRule(listener) {
|
|
2220
|
+
if(listener instanceof asm8080Listener ) {
|
|
2221
|
+
listener.enterModExpression(this);
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
exitRule(listener) {
|
|
2226
|
+
if(listener instanceof asm8080Listener ) {
|
|
2227
|
+
listener.exitModExpression(this);
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
accept(visitor) {
|
|
2232
|
+
if ( visitor instanceof asm8080Visitor ) {
|
|
2233
|
+
return visitor.visitModExpression(this);
|
|
2234
|
+
} else {
|
|
2235
|
+
return visitor.visitChildren(this);
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
|
|
2243
|
+
|
|
1297
2244
|
class MultiplyingExpressionContext extends antlr4.ParserRuleContext {
|
|
1298
2245
|
|
|
1299
2246
|
constructor(parser, parent, invokingState) {
|
|
@@ -1308,14 +2255,14 @@ class MultiplyingExpressionContext extends antlr4.ParserRuleContext {
|
|
|
1308
2255
|
this.ruleIndex = asm8080Parser.RULE_multiplyingExpression;
|
|
1309
2256
|
}
|
|
1310
2257
|
|
|
1311
|
-
|
|
2258
|
+
unaryExpression = function(i) {
|
|
1312
2259
|
if(i===undefined) {
|
|
1313
2260
|
i = null;
|
|
1314
2261
|
}
|
|
1315
2262
|
if(i===null) {
|
|
1316
|
-
return this.getTypedRuleContexts(
|
|
2263
|
+
return this.getTypedRuleContexts(UnaryExpressionContext);
|
|
1317
2264
|
} else {
|
|
1318
|
-
return this.getTypedRuleContext(
|
|
2265
|
+
return this.getTypedRuleContext(UnaryExpressionContext,i);
|
|
1319
2266
|
}
|
|
1320
2267
|
};
|
|
1321
2268
|
|
|
@@ -1344,6 +2291,65 @@ class MultiplyingExpressionContext extends antlr4.ParserRuleContext {
|
|
|
1344
2291
|
|
|
1345
2292
|
|
|
1346
2293
|
|
|
2294
|
+
class UnaryExpressionContext extends antlr4.ParserRuleContext {
|
|
2295
|
+
|
|
2296
|
+
constructor(parser, parent, invokingState) {
|
|
2297
|
+
if(parent===undefined) {
|
|
2298
|
+
parent = null;
|
|
2299
|
+
}
|
|
2300
|
+
if(invokingState===undefined || invokingState===null) {
|
|
2301
|
+
invokingState = -1;
|
|
2302
|
+
}
|
|
2303
|
+
super(parent, invokingState);
|
|
2304
|
+
this.parser = parser;
|
|
2305
|
+
this.ruleIndex = asm8080Parser.RULE_unaryExpression;
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
OP_NOT() {
|
|
2309
|
+
return this.getToken(asm8080Parser.OP_NOT, 0);
|
|
2310
|
+
};
|
|
2311
|
+
|
|
2312
|
+
unaryExpression() {
|
|
2313
|
+
return this.getTypedRuleContext(UnaryExpressionContext,0);
|
|
2314
|
+
};
|
|
2315
|
+
|
|
2316
|
+
OP_HIGH() {
|
|
2317
|
+
return this.getToken(asm8080Parser.OP_HIGH, 0);
|
|
2318
|
+
};
|
|
2319
|
+
|
|
2320
|
+
OP_LOW() {
|
|
2321
|
+
return this.getToken(asm8080Parser.OP_LOW, 0);
|
|
2322
|
+
};
|
|
2323
|
+
|
|
2324
|
+
argument() {
|
|
2325
|
+
return this.getTypedRuleContext(ArgumentContext,0);
|
|
2326
|
+
};
|
|
2327
|
+
|
|
2328
|
+
enterRule(listener) {
|
|
2329
|
+
if(listener instanceof asm8080Listener ) {
|
|
2330
|
+
listener.enterUnaryExpression(this);
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
exitRule(listener) {
|
|
2335
|
+
if(listener instanceof asm8080Listener ) {
|
|
2336
|
+
listener.exitUnaryExpression(this);
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
accept(visitor) {
|
|
2341
|
+
if ( visitor instanceof asm8080Visitor ) {
|
|
2342
|
+
return visitor.visitUnaryExpression(this);
|
|
2343
|
+
} else {
|
|
2344
|
+
return visitor.visitChildren(this);
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
|
|
2352
|
+
|
|
1347
2353
|
class ArgumentContext extends antlr4.ParserRuleContext {
|
|
1348
2354
|
|
|
1349
2355
|
constructor(parser, parent, invokingState) {
|
|
@@ -1362,6 +2368,10 @@ class ArgumentContext extends antlr4.ParserRuleContext {
|
|
|
1362
2368
|
return this.getTypedRuleContext(NumberContext,0);
|
|
1363
2369
|
};
|
|
1364
2370
|
|
|
2371
|
+
opcode() {
|
|
2372
|
+
return this.getTypedRuleContext(OpcodeContext,0);
|
|
2373
|
+
};
|
|
2374
|
+
|
|
1365
2375
|
register_() {
|
|
1366
2376
|
return this.getTypedRuleContext(Register_Context,0);
|
|
1367
2377
|
};
|
|
@@ -1623,6 +2633,7 @@ class CommentContext extends antlr4.ParserRuleContext {
|
|
|
1623
2633
|
asm8080Parser.ProgContext = ProgContext;
|
|
1624
2634
|
asm8080Parser.LineContext = LineContext;
|
|
1625
2635
|
asm8080Parser.InstructionContext = InstructionContext;
|
|
2636
|
+
asm8080Parser.MacrocallContext = MacrocallContext;
|
|
1626
2637
|
asm8080Parser.OpcodeContext = OpcodeContext;
|
|
1627
2638
|
asm8080Parser.Register_Context = Register_Context;
|
|
1628
2639
|
asm8080Parser.DirectiveContext = DirectiveContext;
|
|
@@ -1631,7 +2642,14 @@ asm8080Parser.LblContext = LblContext;
|
|
|
1631
2642
|
asm8080Parser.ExpressionlistContext = ExpressionlistContext;
|
|
1632
2643
|
asm8080Parser.LabelContext = LabelContext;
|
|
1633
2644
|
asm8080Parser.ExpressionContext = ExpressionContext;
|
|
2645
|
+
asm8080Parser.OrExpressionContext = OrExpressionContext;
|
|
2646
|
+
asm8080Parser.XorExpressionContext = XorExpressionContext;
|
|
2647
|
+
asm8080Parser.AndExpressionContext = AndExpressionContext;
|
|
2648
|
+
asm8080Parser.AddExpressionContext = AddExpressionContext;
|
|
2649
|
+
asm8080Parser.ShiftExpressionContext = ShiftExpressionContext;
|
|
2650
|
+
asm8080Parser.ModExpressionContext = ModExpressionContext;
|
|
1634
2651
|
asm8080Parser.MultiplyingExpressionContext = MultiplyingExpressionContext;
|
|
2652
|
+
asm8080Parser.UnaryExpressionContext = UnaryExpressionContext;
|
|
1635
2653
|
asm8080Parser.ArgumentContext = ArgumentContext;
|
|
1636
2654
|
asm8080Parser.DollarContext = DollarContext;
|
|
1637
2655
|
asm8080Parser.String_Context = String_Context;
|