brett-compiler 1.0.19 → 1.0.21
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/dist/BrettLexer.js +1 -0
- package/dist/BrettListener.js +1 -0
- package/dist/BrettParser.js +1 -0
- package/dist/BrettVisitor.js +1 -0
- package/dist/SemanticAnalyserVisitor.js +1 -191
- package/dist/SymbolTable.js +1 -28
- package/dist/SyntaxErrorListener.js +1 -24
- package/dist/generated/BrettLexer.js +1 -232
- package/dist/generated/BrettListener.js +1 -369
- package/dist/generated/BrettParser.js +1 -3990
- package/dist/generated/BrettVisitor.js +1 -250
- package/dist/index.js +1 -58
- package/dist/model.js +1 -7
- package/package.json +8 -5
- package/dist/generated/Brett.interp +0 -152
- package/dist/generated/Brett.tokens +0 -108
- package/dist/generated/BrettLexer.interp +0 -188
- package/dist/generated/BrettLexer.tokens +0 -108
- package/dist/index.d.ts +0 -18
|
@@ -1,250 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// jshint ignore: start
|
|
3
|
-
import antlr4 from 'antlr4';
|
|
4
|
-
|
|
5
|
-
// This class defines a complete generic visitor for a parse tree produced by BrettParser.
|
|
6
|
-
|
|
7
|
-
export default class BrettVisitor extends antlr4.tree.ParseTreeVisitor {
|
|
8
|
-
|
|
9
|
-
// Visit a parse tree produced by BrettParser#program.
|
|
10
|
-
visitProgram(ctx) {
|
|
11
|
-
return this.visitChildren(ctx);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// Visit a parse tree produced by BrettParser#statement.
|
|
16
|
-
visitStatement(ctx) {
|
|
17
|
-
return this.visitChildren(ctx);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// Visit a parse tree produced by BrettParser#block.
|
|
22
|
-
visitBlock(ctx) {
|
|
23
|
-
return this.visitChildren(ctx);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// Visit a parse tree produced by BrettParser#variableDeclaration.
|
|
28
|
-
visitVariableDeclaration(ctx) {
|
|
29
|
-
return this.visitChildren(ctx);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// Visit a parse tree produced by BrettParser#ifStatement.
|
|
34
|
-
visitIfStatement(ctx) {
|
|
35
|
-
return this.visitChildren(ctx);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
// Visit a parse tree produced by BrettParser#whileStatement.
|
|
40
|
-
visitWhileStatement(ctx) {
|
|
41
|
-
return this.visitChildren(ctx);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
// Visit a parse tree produced by BrettParser#doWhileStatement.
|
|
46
|
-
visitDoWhileStatement(ctx) {
|
|
47
|
-
return this.visitChildren(ctx);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// Visit a parse tree produced by BrettParser#forStatement.
|
|
52
|
-
visitForStatement(ctx) {
|
|
53
|
-
return this.visitChildren(ctx);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// Visit a parse tree produced by BrettParser#switchStatement.
|
|
58
|
-
visitSwitchStatement(ctx) {
|
|
59
|
-
return this.visitChildren(ctx);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
// Visit a parse tree produced by BrettParser#switchCase.
|
|
64
|
-
visitSwitchCase(ctx) {
|
|
65
|
-
return this.visitChildren(ctx);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
// Visit a parse tree produced by BrettParser#defaultCase.
|
|
70
|
-
visitDefaultCase(ctx) {
|
|
71
|
-
return this.visitChildren(ctx);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
// Visit a parse tree produced by BrettParser#returnStatement.
|
|
76
|
-
visitReturnStatement(ctx) {
|
|
77
|
-
return this.visitChildren(ctx);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
// Visit a parse tree produced by BrettParser#breakStatement.
|
|
82
|
-
visitBreakStatement(ctx) {
|
|
83
|
-
return this.visitChildren(ctx);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
// Visit a parse tree produced by BrettParser#continueStatement.
|
|
88
|
-
visitContinueStatement(ctx) {
|
|
89
|
-
return this.visitChildren(ctx);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
// Visit a parse tree produced by BrettParser#expressionStatement.
|
|
94
|
-
visitExpressionStatement(ctx) {
|
|
95
|
-
return this.visitChildren(ctx);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
// Visit a parse tree produced by BrettParser#functionDeclaration.
|
|
100
|
-
visitFunctionDeclaration(ctx) {
|
|
101
|
-
return this.visitChildren(ctx);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
// Visit a parse tree produced by BrettParser#parameterList.
|
|
106
|
-
visitParameterList(ctx) {
|
|
107
|
-
return this.visitChildren(ctx);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
// Visit a parse tree produced by BrettParser#parameter.
|
|
112
|
-
visitParameter(ctx) {
|
|
113
|
-
return this.visitChildren(ctx);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
// Visit a parse tree produced by BrettParser#ArrayType.
|
|
118
|
-
visitArrayType(ctx) {
|
|
119
|
-
return this.visitChildren(ctx);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
// Visit a parse tree produced by BrettParser#SimpleType.
|
|
124
|
-
visitSimpleType(ctx) {
|
|
125
|
-
return this.visitChildren(ctx);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
// Visit a parse tree produced by BrettParser#baseType.
|
|
130
|
-
visitBaseType(ctx) {
|
|
131
|
-
return this.visitChildren(ctx);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
// Visit a parse tree produced by BrettParser#tryCatchStatement.
|
|
136
|
-
visitTryCatchStatement(ctx) {
|
|
137
|
-
return this.visitChildren(ctx);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
// Visit a parse tree produced by BrettParser#MemberExpression.
|
|
142
|
-
visitMemberExpression(ctx) {
|
|
143
|
-
return this.visitChildren(ctx);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
// Visit a parse tree produced by BrettParser#PrimaryExpression.
|
|
148
|
-
visitPrimaryExpression(ctx) {
|
|
149
|
-
return this.visitChildren(ctx);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
// Visit a parse tree produced by BrettParser#AssignmentExpression.
|
|
154
|
-
visitAssignmentExpression(ctx) {
|
|
155
|
-
return this.visitChildren(ctx);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
// Visit a parse tree produced by BrettParser#BinaryExpression.
|
|
160
|
-
visitBinaryExpression(ctx) {
|
|
161
|
-
return this.visitChildren(ctx);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
// Visit a parse tree produced by BrettParser#NewExpression.
|
|
166
|
-
visitNewExpression(ctx) {
|
|
167
|
-
return this.visitChildren(ctx);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
// Visit a parse tree produced by BrettParser#PreIncrementDecrement.
|
|
172
|
-
visitPreIncrementDecrement(ctx) {
|
|
173
|
-
return this.visitChildren(ctx);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
// Visit a parse tree produced by BrettParser#IndexExpression.
|
|
178
|
-
visitIndexExpression(ctx) {
|
|
179
|
-
return this.visitChildren(ctx);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
// Visit a parse tree produced by BrettParser#PostIncrementDecrement.
|
|
184
|
-
visitPostIncrementDecrement(ctx) {
|
|
185
|
-
return this.visitChildren(ctx);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
// Visit a parse tree produced by BrettParser#LiteralExpression.
|
|
190
|
-
visitLiteralExpression(ctx) {
|
|
191
|
-
return this.visitChildren(ctx);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
// Visit a parse tree produced by BrettParser#IdentifierExpression.
|
|
196
|
-
visitIdentifierExpression(ctx) {
|
|
197
|
-
return this.visitChildren(ctx);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
// Visit a parse tree produced by BrettParser#ParenthesizedExpression.
|
|
202
|
-
visitParenthesizedExpression(ctx) {
|
|
203
|
-
return this.visitChildren(ctx);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
// Visit a parse tree produced by BrettParser#FunctionCallExpression.
|
|
208
|
-
visitFunctionCallExpression(ctx) {
|
|
209
|
-
return this.visitChildren(ctx);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
// Visit a parse tree produced by BrettParser#ArrayLiteralExpression.
|
|
214
|
-
visitArrayLiteralExpression(ctx) {
|
|
215
|
-
return this.visitChildren(ctx);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
// Visit a parse tree produced by BrettParser#ObjectLiteralExpression.
|
|
220
|
-
visitObjectLiteralExpression(ctx) {
|
|
221
|
-
return this.visitChildren(ctx);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
// Visit a parse tree produced by BrettParser#arrayLiteral.
|
|
226
|
-
visitArrayLiteral(ctx) {
|
|
227
|
-
return this.visitChildren(ctx);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
// Visit a parse tree produced by BrettParser#objectLiteral.
|
|
232
|
-
visitObjectLiteral(ctx) {
|
|
233
|
-
return this.visitChildren(ctx);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
// Visit a parse tree produced by BrettParser#property.
|
|
238
|
-
visitProperty(ctx) {
|
|
239
|
-
return this.visitChildren(ctx);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
// Visit a parse tree produced by BrettParser#argList.
|
|
244
|
-
visitArgList(ctx) {
|
|
245
|
-
return this.visitChildren(ctx);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("antlr4");class r extends t.tree.ParseTreeVisitor{visitProgram(i){return this.visitChildren(i)}visitStatement(i){return this.visitChildren(i)}visitBlock(i){return this.visitChildren(i)}visitVariableDeclaration(i){return this.visitChildren(i)}visitIfStatement(i){return this.visitChildren(i)}visitWhileStatement(i){return this.visitChildren(i)}visitDoWhileStatement(i){return this.visitChildren(i)}visitForStatement(i){return this.visitChildren(i)}visitSwitchStatement(i){return this.visitChildren(i)}visitSwitchCase(i){return this.visitChildren(i)}visitDefaultCase(i){return this.visitChildren(i)}visitReturnStatement(i){return this.visitChildren(i)}visitBreakStatement(i){return this.visitChildren(i)}visitContinueStatement(i){return this.visitChildren(i)}visitExpressionStatement(i){return this.visitChildren(i)}visitFunctionDeclaration(i){return this.visitChildren(i)}visitParameterList(i){return this.visitChildren(i)}visitParameter(i){return this.visitChildren(i)}visitArrayType(i){return this.visitChildren(i)}visitSimpleType(i){return this.visitChildren(i)}visitBaseType(i){return this.visitChildren(i)}visitTryCatchStatement(i){return this.visitChildren(i)}visitMemberExpression(i){return this.visitChildren(i)}visitPrimaryExpression(i){return this.visitChildren(i)}visitAssignmentExpression(i){return this.visitChildren(i)}visitBinaryExpression(i){return this.visitChildren(i)}visitNewExpression(i){return this.visitChildren(i)}visitPreIncrementDecrement(i){return this.visitChildren(i)}visitIndexExpression(i){return this.visitChildren(i)}visitPostIncrementDecrement(i){return this.visitChildren(i)}visitLiteralExpression(i){return this.visitChildren(i)}visitIdentifierExpression(i){return this.visitChildren(i)}visitParenthesizedExpression(i){return this.visitChildren(i)}visitFunctionCallExpression(i){return this.visitChildren(i)}visitArrayLiteralExpression(i){return this.visitChildren(i)}visitObjectLiteralExpression(i){return this.visitChildren(i)}visitArrayLiteral(i){return this.visitChildren(i)}visitObjectLiteral(i){return this.visitChildren(i)}visitProperty(i){return this.visitChildren(i)}visitArgList(i){return this.visitChildren(i)}}exports.BrettVisitor=r;
|
package/dist/index.js
CHANGED
|
@@ -1,58 +1 @@
|
|
|
1
|
-
const antlr4 =
|
|
2
|
-
|
|
3
|
-
const lexerModule = require('./generated/BrettLexer');
|
|
4
|
-
const parserModule = require('./generated/BrettParser');
|
|
5
|
-
|
|
6
|
-
const BrettLexer = lexerModule.BrettLexer || lexerModule.default || lexerModule;
|
|
7
|
-
const BrettParser = parserModule.BrettParser || parserModule.default || parserModule;
|
|
8
|
-
|
|
9
|
-
const { SemanticAnalyzerVisitor } = require('./SemanticAnalyserVisitor');
|
|
10
|
-
const { SyntaxErrorListener } = require('./SyntaxErrorListener');
|
|
11
|
-
|
|
12
|
-
function compile(input) {
|
|
13
|
-
const chars = new antlr4.InputStream(input);
|
|
14
|
-
const lexer = new BrettLexer(chars);
|
|
15
|
-
const tokens = new antlr4.CommonTokenStream(lexer);
|
|
16
|
-
const parser = new BrettParser(tokens);
|
|
17
|
-
|
|
18
|
-
const errors = [];
|
|
19
|
-
parser.removeErrorListeners();
|
|
20
|
-
parser.addErrorListener(new SyntaxErrorListener(errors));
|
|
21
|
-
|
|
22
|
-
const tree = parser.program();
|
|
23
|
-
|
|
24
|
-
const visitor = new SemanticAnalyzerVisitor();
|
|
25
|
-
|
|
26
|
-
try {
|
|
27
|
-
visitor.visit(tree);
|
|
28
|
-
} catch (e) {
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const allErrors = errors.concat(visitor.errors);
|
|
32
|
-
|
|
33
|
-
return allErrors;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function analyzeAndGetSymbols(input) {
|
|
37
|
-
const chars = new antlr4.InputStream(input);
|
|
38
|
-
const lexer = new BrettLexer(chars);
|
|
39
|
-
const tokens = new antlr4.CommonTokenStream(lexer);
|
|
40
|
-
const parser = new BrettParser(tokens);
|
|
41
|
-
|
|
42
|
-
parser.removeErrorListeners();
|
|
43
|
-
|
|
44
|
-
const tree = parser.program();
|
|
45
|
-
const visitor = new SemanticAnalyzerVisitor();
|
|
46
|
-
|
|
47
|
-
try {
|
|
48
|
-
visitor.visit(tree);
|
|
49
|
-
} catch (e) {
|
|
50
|
-
console.error("Symbol analysis failed due to syntax error");
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return visitor.getSymbols();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
module.exports = { compile, analyzeAndGetSymbols };
|
|
57
|
-
|
|
58
|
-
// Experiment to see if the new version is released in the right way.
|
|
1
|
+
"use strict";const n=require("antlr4"),l=require("./generated/BrettLexer"),m=require("./generated/BrettParser"),u=l.BrettLexer||l.default||l,w=m.BrettParser||m.default||m,{SemanticAnalyzerVisitor:y}=require("./SemanticAnalyserVisitor"),{SyntaxErrorListener:d}=require("./SyntaxErrorListener");function p(o){const s=new n.InputStream(o),c=new u(s),a=new n.CommonTokenStream(c),r=new w(a),e=[];r.removeErrorListeners(),r.addErrorListener(new d(e));const t=r.program(),i=new y;try{i.visit(t)}catch{}return e.concat(i.errors)}function S(o){const s=new n.InputStream(o),c=new u(s),a=new n.CommonTokenStream(c),r=new w(a);r.removeErrorListeners();const e=r.program(),t=new y;try{t.visit(e)}catch{console.error("Symbol analysis failed due to syntax error")}return t.getSymbols()}module.exports={compile:p,analyzeAndGetSymbols:S};
|
package/dist/model.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brett-compiler",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"description": "Een compiler voor de .Brett taal",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"antlr4": "^4.13.1"
|
|
11
|
+
"antlr4": "^4.13.1",
|
|
12
|
+
"vite": "^7.3.0"
|
|
12
13
|
},
|
|
13
14
|
"scripts": {
|
|
14
15
|
"antlr": "powershell -ExecutionPolicy Bypass -File generate-compiler.ps1",
|
|
@@ -16,12 +17,14 @@
|
|
|
16
17
|
"postinstall": "node generate-compiler.js",
|
|
17
18
|
"start": "node dist/index.js",
|
|
18
19
|
"test": "vitest",
|
|
19
|
-
"build": "npm run antlrci &&
|
|
20
|
+
"build": "npm run antlrci && vite build",
|
|
20
21
|
"prepublishOnly": "npm run build",
|
|
21
22
|
"release": "semantic-release"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
25
|
+
"javascript-obfuscator": "^5.1.0",
|
|
26
|
+
"rollup-plugin-javascript-obfuscator": "^1.0.4",
|
|
27
|
+
"standard-version": "^9.5.0",
|
|
28
|
+
"vitest": "^4.0.10"
|
|
26
29
|
}
|
|
27
30
|
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
token literal names:
|
|
2
|
-
null
|
|
3
|
-
'[]'
|
|
4
|
-
'string'
|
|
5
|
-
'number'
|
|
6
|
-
'bool'
|
|
7
|
-
'any'
|
|
8
|
-
'++'
|
|
9
|
-
'--'
|
|
10
|
-
'true'
|
|
11
|
-
'false'
|
|
12
|
-
'nil'
|
|
13
|
-
'let'
|
|
14
|
-
'const'
|
|
15
|
-
'def'
|
|
16
|
-
'if'
|
|
17
|
-
'else'
|
|
18
|
-
'while'
|
|
19
|
-
'for'
|
|
20
|
-
'do'
|
|
21
|
-
'try'
|
|
22
|
-
'catch'
|
|
23
|
-
'finally'
|
|
24
|
-
'break'
|
|
25
|
-
'continue'
|
|
26
|
-
'new'
|
|
27
|
-
'void'
|
|
28
|
-
'switch'
|
|
29
|
-
'case'
|
|
30
|
-
'default'
|
|
31
|
-
'return'
|
|
32
|
-
null
|
|
33
|
-
null
|
|
34
|
-
'=='
|
|
35
|
-
'!='
|
|
36
|
-
'<='
|
|
37
|
-
'>='
|
|
38
|
-
'<'
|
|
39
|
-
'>'
|
|
40
|
-
'+'
|
|
41
|
-
'-'
|
|
42
|
-
'*'
|
|
43
|
-
'/'
|
|
44
|
-
'='
|
|
45
|
-
';'
|
|
46
|
-
':'
|
|
47
|
-
','
|
|
48
|
-
'.'
|
|
49
|
-
'('
|
|
50
|
-
')'
|
|
51
|
-
'{'
|
|
52
|
-
'}'
|
|
53
|
-
'['
|
|
54
|
-
']'
|
|
55
|
-
'=>'
|
|
56
|
-
null
|
|
57
|
-
null
|
|
58
|
-
null
|
|
59
|
-
null
|
|
60
|
-
|
|
61
|
-
token symbolic names:
|
|
62
|
-
null
|
|
63
|
-
null
|
|
64
|
-
null
|
|
65
|
-
null
|
|
66
|
-
null
|
|
67
|
-
null
|
|
68
|
-
null
|
|
69
|
-
null
|
|
70
|
-
null
|
|
71
|
-
null
|
|
72
|
-
null
|
|
73
|
-
LET
|
|
74
|
-
CONST
|
|
75
|
-
DEF
|
|
76
|
-
IF
|
|
77
|
-
ELSE
|
|
78
|
-
WHILE
|
|
79
|
-
FOR
|
|
80
|
-
DO
|
|
81
|
-
TRY
|
|
82
|
-
CATCH
|
|
83
|
-
FINALLY
|
|
84
|
-
BREAK
|
|
85
|
-
CONTINUE
|
|
86
|
-
NEW
|
|
87
|
-
VOID
|
|
88
|
-
SWITCH
|
|
89
|
-
CASE
|
|
90
|
-
DEFAULT
|
|
91
|
-
RETURN
|
|
92
|
-
NUMBER
|
|
93
|
-
STRING
|
|
94
|
-
EQ
|
|
95
|
-
NEQ
|
|
96
|
-
LE
|
|
97
|
-
GE
|
|
98
|
-
LT
|
|
99
|
-
GT
|
|
100
|
-
PLUS
|
|
101
|
-
MINUS
|
|
102
|
-
STAR
|
|
103
|
-
SLASH
|
|
104
|
-
ASSIGN
|
|
105
|
-
SEMI
|
|
106
|
-
COLON
|
|
107
|
-
COMMA
|
|
108
|
-
DOT
|
|
109
|
-
LPAREN
|
|
110
|
-
RPAREN
|
|
111
|
-
LBRACE
|
|
112
|
-
RBRACE
|
|
113
|
-
LBRACK
|
|
114
|
-
RBRACK
|
|
115
|
-
ARROW
|
|
116
|
-
IDENTIFIER
|
|
117
|
-
WS
|
|
118
|
-
LINE_COMMENT
|
|
119
|
-
BLOCK_COMMENT
|
|
120
|
-
|
|
121
|
-
rule names:
|
|
122
|
-
program
|
|
123
|
-
statement
|
|
124
|
-
block
|
|
125
|
-
variableDeclaration
|
|
126
|
-
ifStatement
|
|
127
|
-
whileStatement
|
|
128
|
-
doWhileStatement
|
|
129
|
-
forStatement
|
|
130
|
-
switchStatement
|
|
131
|
-
switchCase
|
|
132
|
-
defaultCase
|
|
133
|
-
returnStatement
|
|
134
|
-
breakStatement
|
|
135
|
-
continueStatement
|
|
136
|
-
expressionStatement
|
|
137
|
-
functionDeclaration
|
|
138
|
-
parameterList
|
|
139
|
-
parameter
|
|
140
|
-
type
|
|
141
|
-
baseType
|
|
142
|
-
tryCatchStatement
|
|
143
|
-
expression
|
|
144
|
-
primary
|
|
145
|
-
arrayLiteral
|
|
146
|
-
objectLiteral
|
|
147
|
-
property
|
|
148
|
-
argList
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
atn:
|
|
152
|
-
[4, 1, 57, 342, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 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, 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, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 1, 0, 5, 0, 56, 8, 0, 10, 0, 12, 0, 59, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 76, 8, 1, 1, 2, 1, 2, 5, 2, 80, 8, 2, 10, 2, 12, 2, 83, 9, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 91, 8, 3, 1, 3, 1, 3, 3, 3, 95, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 107, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 116, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 136, 8, 7, 1, 7, 3, 7, 139, 8, 7, 1, 7, 1, 7, 3, 7, 143, 8, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 4, 8, 151, 8, 8, 11, 8, 12, 8, 152, 1, 8, 3, 8, 156, 8, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 3, 11, 171, 8, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 188, 8, 15, 1, 15, 1, 15, 1, 15, 3, 15, 193, 8, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 5, 16, 200, 8, 16, 10, 16, 12, 16, 203, 9, 16, 1, 17, 1, 17, 1, 17, 3, 17, 208, 8, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 5, 18, 215, 8, 18, 10, 18, 12, 18, 218, 9, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 229, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 235, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 3, 21, 246, 8, 21, 1, 21, 1, 21, 1, 21, 3, 21, 251, 8, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 275, 8, 21, 10, 21, 12, 21, 278, 9, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 293, 8, 22, 1, 22, 1, 22, 1, 22, 3, 22, 298, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 304, 8, 23, 10, 23, 12, 23, 307, 9, 23, 3, 23, 309, 8, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 317, 8, 24, 10, 24, 12, 24, 320, 9, 24, 3, 24, 322, 8, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 332, 8, 25, 1, 26, 1, 26, 1, 26, 5, 26, 337, 8, 26, 10, 26, 12, 26, 340, 9, 26, 1, 26, 0, 2, 36, 42, 27, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 0, 6, 3, 0, 2, 5, 25, 25, 54, 54, 1, 0, 6, 7, 1, 0, 40, 41, 1, 0, 38, 39, 1, 0, 34, 37, 1, 0, 32, 33, 373, 0, 57, 1, 0, 0, 0, 2, 75, 1, 0, 0, 0, 4, 77, 1, 0, 0, 0, 6, 106, 1, 0, 0, 0, 8, 108, 1, 0, 0, 0, 10, 117, 1, 0, 0, 0, 12, 123, 1, 0, 0, 0, 14, 131, 1, 0, 0, 0, 16, 147, 1, 0, 0, 0, 18, 159, 1, 0, 0, 0, 20, 164, 1, 0, 0, 0, 22, 168, 1, 0, 0, 0, 24, 174, 1, 0, 0, 0, 26, 177, 1, 0, 0, 0, 28, 180, 1, 0, 0, 0, 30, 183, 1, 0, 0, 0, 32, 196, 1, 0, 0, 0, 34, 204, 1, 0, 0, 0, 36, 209, 1, 0, 0, 0, 38, 219, 1, 0, 0, 0, 40, 221, 1, 0, 0, 0, 42, 250, 1, 0, 0, 0, 44, 297, 1, 0, 0, 0, 46, 299, 1, 0, 0, 0, 48, 312, 1, 0, 0, 0, 50, 331, 1, 0, 0, 0, 52, 333, 1, 0, 0, 0, 54, 56, 3, 2, 1, 0, 55, 54, 1, 0, 0, 0, 56, 59, 1, 0, 0, 0, 57, 55, 1, 0, 0, 0, 57, 58, 1, 0, 0, 0, 58, 60, 1, 0, 0, 0, 59, 57, 1, 0, 0, 0, 60, 61, 5, 0, 0, 1, 61, 1, 1, 0, 0, 0, 62, 76, 3, 6, 3, 0, 63, 76, 3, 30, 15, 0, 64, 76, 3, 8, 4, 0, 65, 76, 3, 10, 5, 0, 66, 76, 3, 14, 7, 0, 67, 76, 3, 16, 8, 0, 68, 76, 3, 22, 11, 0, 69, 76, 3, 28, 14, 0, 70, 76, 3, 4, 2, 0, 71, 76, 3, 24, 12, 0, 72, 76, 3, 26, 13, 0, 73, 76, 3, 12, 6, 0, 74, 76, 3, 40, 20, 0, 75, 62, 1, 0, 0, 0, 75, 63, 1, 0, 0, 0, 75, 64, 1, 0, 0, 0, 75, 65, 1, 0, 0, 0, 75, 66, 1, 0, 0, 0, 75, 67, 1, 0, 0, 0, 75, 68, 1, 0, 0, 0, 75, 69, 1, 0, 0, 0, 75, 70, 1, 0, 0, 0, 75, 71, 1, 0, 0, 0, 75, 72, 1, 0, 0, 0, 75, 73, 1, 0, 0, 0, 75, 74, 1, 0, 0, 0, 76, 3, 1, 0, 0, 0, 77, 81, 5, 49, 0, 0, 78, 80, 3, 2, 1, 0, 79, 78, 1, 0, 0, 0, 80, 83, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 81, 82, 1, 0, 0, 0, 82, 84, 1, 0, 0, 0, 83, 81, 1, 0, 0, 0, 84, 85, 5, 50, 0, 0, 85, 5, 1, 0, 0, 0, 86, 87, 5, 11, 0, 0, 87, 90, 5, 54, 0, 0, 88, 89, 5, 44, 0, 0, 89, 91, 3, 36, 18, 0, 90, 88, 1, 0, 0, 0, 90, 91, 1, 0, 0, 0, 91, 94, 1, 0, 0, 0, 92, 93, 5, 42, 0, 0, 93, 95, 3, 42, 21, 0, 94, 92, 1, 0, 0, 0, 94, 95, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 107, 5, 43, 0, 0, 97, 98, 5, 12, 0, 0, 98, 99, 5, 54, 0, 0, 99, 100, 5, 44, 0, 0, 100, 101, 3, 36, 18, 0, 101, 102, 1, 0, 0, 0, 102, 103, 5, 42, 0, 0, 103, 104, 3, 42, 21, 0, 104, 105, 5, 43, 0, 0, 105, 107, 1, 0, 0, 0, 106, 86, 1, 0, 0, 0, 106, 97, 1, 0, 0, 0, 107, 7, 1, 0, 0, 0, 108, 109, 5, 14, 0, 0, 109, 110, 5, 47, 0, 0, 110, 111, 3, 42, 21, 0, 111, 112, 5, 48, 0, 0, 112, 115, 3, 4, 2, 0, 113, 114, 5, 15, 0, 0, 114, 116, 3, 4, 2, 0, 115, 113, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 9, 1, 0, 0, 0, 117, 118, 5, 16, 0, 0, 118, 119, 5, 47, 0, 0, 119, 120, 3, 42, 21, 0, 120, 121, 5, 48, 0, 0, 121, 122, 3, 4, 2, 0, 122, 11, 1, 0, 0, 0, 123, 124, 5, 18, 0, 0, 124, 125, 3, 4, 2, 0, 125, 126, 5, 16, 0, 0, 126, 127, 5, 47, 0, 0, 127, 128, 3, 42, 21, 0, 128, 129, 5, 48, 0, 0, 129, 130, 5, 43, 0, 0, 130, 13, 1, 0, 0, 0, 131, 132, 5, 17, 0, 0, 132, 135, 5, 47, 0, 0, 133, 136, 3, 6, 3, 0, 134, 136, 3, 28, 14, 0, 135, 133, 1, 0, 0, 0, 135, 134, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 138, 1, 0, 0, 0, 137, 139, 3, 42, 21, 0, 138, 137, 1, 0, 0, 0, 138, 139, 1, 0, 0, 0, 139, 140, 1, 0, 0, 0, 140, 142, 5, 43, 0, 0, 141, 143, 3, 42, 21, 0, 142, 141, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 145, 5, 48, 0, 0, 145, 146, 3, 4, 2, 0, 146, 15, 1, 0, 0, 0, 147, 148, 5, 26, 0, 0, 148, 150, 5, 49, 0, 0, 149, 151, 3, 18, 9, 0, 150, 149, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 150, 1, 0, 0, 0, 152, 153, 1, 0, 0, 0, 153, 155, 1, 0, 0, 0, 154, 156, 3, 20, 10, 0, 155, 154, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 158, 5, 50, 0, 0, 158, 17, 1, 0, 0, 0, 159, 160, 5, 27, 0, 0, 160, 161, 3, 42, 21, 0, 161, 162, 5, 53, 0, 0, 162, 163, 3, 4, 2, 0, 163, 19, 1, 0, 0, 0, 164, 165, 5, 28, 0, 0, 165, 166, 5, 53, 0, 0, 166, 167, 3, 4, 2, 0, 167, 21, 1, 0, 0, 0, 168, 170, 5, 29, 0, 0, 169, 171, 3, 42, 21, 0, 170, 169, 1, 0, 0, 0, 170, 171, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 173, 5, 43, 0, 0, 173, 23, 1, 0, 0, 0, 174, 175, 5, 22, 0, 0, 175, 176, 5, 43, 0, 0, 176, 25, 1, 0, 0, 0, 177, 178, 5, 23, 0, 0, 178, 179, 5, 43, 0, 0, 179, 27, 1, 0, 0, 0, 180, 181, 3, 42, 21, 0, 181, 182, 5, 43, 0, 0, 182, 29, 1, 0, 0, 0, 183, 184, 5, 13, 0, 0, 184, 185, 5, 54, 0, 0, 185, 187, 5, 47, 0, 0, 186, 188, 3, 32, 16, 0, 187, 186, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 189, 1, 0, 0, 0, 189, 192, 5, 48, 0, 0, 190, 191, 5, 44, 0, 0, 191, 193, 3, 36, 18, 0, 192, 190, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 195, 3, 4, 2, 0, 195, 31, 1, 0, 0, 0, 196, 201, 3, 34, 17, 0, 197, 198, 5, 45, 0, 0, 198, 200, 3, 34, 17, 0, 199, 197, 1, 0, 0, 0, 200, 203, 1, 0, 0, 0, 201, 199, 1, 0, 0, 0, 201, 202, 1, 0, 0, 0, 202, 33, 1, 0, 0, 0, 203, 201, 1, 0, 0, 0, 204, 207, 5, 54, 0, 0, 205, 206, 5, 44, 0, 0, 206, 208, 3, 36, 18, 0, 207, 205, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 35, 1, 0, 0, 0, 209, 210, 6, 18, -1, 0, 210, 211, 3, 38, 19, 0, 211, 216, 1, 0, 0, 0, 212, 213, 10, 1, 0, 0, 213, 215, 5, 1, 0, 0, 214, 212, 1, 0, 0, 0, 215, 218, 1, 0, 0, 0, 216, 214, 1, 0, 0, 0, 216, 217, 1, 0, 0, 0, 217, 37, 1, 0, 0, 0, 218, 216, 1, 0, 0, 0, 219, 220, 7, 0, 0, 0, 220, 39, 1, 0, 0, 0, 221, 222, 5, 19, 0, 0, 222, 223, 3, 4, 2, 0, 223, 224, 5, 20, 0, 0, 224, 225, 5, 47, 0, 0, 225, 228, 5, 54, 0, 0, 226, 227, 5, 44, 0, 0, 227, 229, 3, 36, 18, 0, 228, 226, 1, 0, 0, 0, 228, 229, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 231, 5, 48, 0, 0, 231, 234, 3, 4, 2, 0, 232, 233, 5, 21, 0, 0, 233, 235, 3, 4, 2, 0, 234, 232, 1, 0, 0, 0, 234, 235, 1, 0, 0, 0, 235, 41, 1, 0, 0, 0, 236, 237, 6, 21, -1, 0, 237, 251, 3, 44, 22, 0, 238, 239, 5, 54, 0, 0, 239, 240, 5, 42, 0, 0, 240, 251, 3, 42, 21, 6, 241, 242, 5, 24, 0, 0, 242, 243, 5, 54, 0, 0, 243, 245, 5, 47, 0, 0, 244, 246, 3, 52, 26, 0, 245, 244, 1, 0, 0, 0, 245, 246, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 251, 5, 48, 0, 0, 248, 249, 7, 1, 0, 0, 249, 251, 3, 42, 21, 1, 250, 236, 1, 0, 0, 0, 250, 238, 1, 0, 0, 0, 250, 241, 1, 0, 0, 0, 250, 248, 1, 0, 0, 0, 251, 276, 1, 0, 0, 0, 252, 253, 10, 10, 0, 0, 253, 254, 7, 2, 0, 0, 254, 275, 3, 42, 21, 11, 255, 256, 10, 9, 0, 0, 256, 257, 7, 3, 0, 0, 257, 275, 3, 42, 21, 10, 258, 259, 10, 8, 0, 0, 259, 260, 7, 4, 0, 0, 260, 275, 3, 42, 21, 9, 261, 262, 10, 7, 0, 0, 262, 263, 7, 5, 0, 0, 263, 275, 3, 42, 21, 8, 264, 265, 10, 5, 0, 0, 265, 266, 5, 51, 0, 0, 266, 267, 3, 42, 21, 0, 267, 268, 5, 52, 0, 0, 268, 275, 1, 0, 0, 0, 269, 270, 10, 4, 0, 0, 270, 271, 5, 46, 0, 0, 271, 275, 5, 54, 0, 0, 272, 273, 10, 2, 0, 0, 273, 275, 7, 1, 0, 0, 274, 252, 1, 0, 0, 0, 274, 255, 1, 0, 0, 0, 274, 258, 1, 0, 0, 0, 274, 261, 1, 0, 0, 0, 274, 264, 1, 0, 0, 0, 274, 269, 1, 0, 0, 0, 274, 272, 1, 0, 0, 0, 275, 278, 1, 0, 0, 0, 276, 274, 1, 0, 0, 0, 276, 277, 1, 0, 0, 0, 277, 43, 1, 0, 0, 0, 278, 276, 1, 0, 0, 0, 279, 298, 5, 30, 0, 0, 280, 298, 5, 31, 0, 0, 281, 298, 5, 8, 0, 0, 282, 298, 5, 9, 0, 0, 283, 298, 5, 10, 0, 0, 284, 298, 5, 54, 0, 0, 285, 286, 5, 47, 0, 0, 286, 287, 3, 42, 21, 0, 287, 288, 5, 48, 0, 0, 288, 298, 1, 0, 0, 0, 289, 290, 5, 54, 0, 0, 290, 292, 5, 47, 0, 0, 291, 293, 3, 52, 26, 0, 292, 291, 1, 0, 0, 0, 292, 293, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 298, 5, 48, 0, 0, 295, 298, 3, 46, 23, 0, 296, 298, 3, 48, 24, 0, 297, 279, 1, 0, 0, 0, 297, 280, 1, 0, 0, 0, 297, 281, 1, 0, 0, 0, 297, 282, 1, 0, 0, 0, 297, 283, 1, 0, 0, 0, 297, 284, 1, 0, 0, 0, 297, 285, 1, 0, 0, 0, 297, 289, 1, 0, 0, 0, 297, 295, 1, 0, 0, 0, 297, 296, 1, 0, 0, 0, 298, 45, 1, 0, 0, 0, 299, 308, 5, 51, 0, 0, 300, 305, 3, 42, 21, 0, 301, 302, 5, 45, 0, 0, 302, 304, 3, 42, 21, 0, 303, 301, 1, 0, 0, 0, 304, 307, 1, 0, 0, 0, 305, 303, 1, 0, 0, 0, 305, 306, 1, 0, 0, 0, 306, 309, 1, 0, 0, 0, 307, 305, 1, 0, 0, 0, 308, 300, 1, 0, 0, 0, 308, 309, 1, 0, 0, 0, 309, 310, 1, 0, 0, 0, 310, 311, 5, 52, 0, 0, 311, 47, 1, 0, 0, 0, 312, 321, 5, 49, 0, 0, 313, 318, 3, 50, 25, 0, 314, 315, 5, 45, 0, 0, 315, 317, 3, 50, 25, 0, 316, 314, 1, 0, 0, 0, 317, 320, 1, 0, 0, 0, 318, 316, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, 322, 1, 0, 0, 0, 320, 318, 1, 0, 0, 0, 321, 313, 1, 0, 0, 0, 321, 322, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 324, 5, 50, 0, 0, 324, 49, 1, 0, 0, 0, 325, 326, 5, 54, 0, 0, 326, 327, 5, 44, 0, 0, 327, 332, 3, 42, 21, 0, 328, 329, 5, 31, 0, 0, 329, 330, 5, 44, 0, 0, 330, 332, 3, 42, 21, 0, 331, 325, 1, 0, 0, 0, 331, 328, 1, 0, 0, 0, 332, 51, 1, 0, 0, 0, 333, 338, 3, 42, 21, 0, 334, 335, 5, 45, 0, 0, 335, 337, 3, 42, 21, 0, 336, 334, 1, 0, 0, 0, 337, 340, 1, 0, 0, 0, 338, 336, 1, 0, 0, 0, 338, 339, 1, 0, 0, 0, 339, 53, 1, 0, 0, 0, 340, 338, 1, 0, 0, 0, 32, 57, 75, 81, 90, 94, 106, 115, 135, 138, 142, 152, 155, 170, 187, 192, 201, 207, 216, 228, 234, 245, 250, 274, 276, 292, 297, 305, 308, 318, 321, 331, 338]
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
T__0=1
|
|
2
|
-
T__1=2
|
|
3
|
-
T__2=3
|
|
4
|
-
T__3=4
|
|
5
|
-
T__4=5
|
|
6
|
-
T__5=6
|
|
7
|
-
T__6=7
|
|
8
|
-
T__7=8
|
|
9
|
-
T__8=9
|
|
10
|
-
T__9=10
|
|
11
|
-
LET=11
|
|
12
|
-
CONST=12
|
|
13
|
-
DEF=13
|
|
14
|
-
IF=14
|
|
15
|
-
ELSE=15
|
|
16
|
-
WHILE=16
|
|
17
|
-
FOR=17
|
|
18
|
-
DO=18
|
|
19
|
-
TRY=19
|
|
20
|
-
CATCH=20
|
|
21
|
-
FINALLY=21
|
|
22
|
-
BREAK=22
|
|
23
|
-
CONTINUE=23
|
|
24
|
-
NEW=24
|
|
25
|
-
VOID=25
|
|
26
|
-
SWITCH=26
|
|
27
|
-
CASE=27
|
|
28
|
-
DEFAULT=28
|
|
29
|
-
RETURN=29
|
|
30
|
-
NUMBER=30
|
|
31
|
-
STRING=31
|
|
32
|
-
EQ=32
|
|
33
|
-
NEQ=33
|
|
34
|
-
LE=34
|
|
35
|
-
GE=35
|
|
36
|
-
LT=36
|
|
37
|
-
GT=37
|
|
38
|
-
PLUS=38
|
|
39
|
-
MINUS=39
|
|
40
|
-
STAR=40
|
|
41
|
-
SLASH=41
|
|
42
|
-
ASSIGN=42
|
|
43
|
-
SEMI=43
|
|
44
|
-
COLON=44
|
|
45
|
-
COMMA=45
|
|
46
|
-
DOT=46
|
|
47
|
-
LPAREN=47
|
|
48
|
-
RPAREN=48
|
|
49
|
-
LBRACE=49
|
|
50
|
-
RBRACE=50
|
|
51
|
-
LBRACK=51
|
|
52
|
-
RBRACK=52
|
|
53
|
-
ARROW=53
|
|
54
|
-
IDENTIFIER=54
|
|
55
|
-
WS=55
|
|
56
|
-
LINE_COMMENT=56
|
|
57
|
-
BLOCK_COMMENT=57
|
|
58
|
-
'[]'=1
|
|
59
|
-
'string'=2
|
|
60
|
-
'number'=3
|
|
61
|
-
'bool'=4
|
|
62
|
-
'any'=5
|
|
63
|
-
'++'=6
|
|
64
|
-
'--'=7
|
|
65
|
-
'true'=8
|
|
66
|
-
'false'=9
|
|
67
|
-
'nil'=10
|
|
68
|
-
'let'=11
|
|
69
|
-
'const'=12
|
|
70
|
-
'def'=13
|
|
71
|
-
'if'=14
|
|
72
|
-
'else'=15
|
|
73
|
-
'while'=16
|
|
74
|
-
'for'=17
|
|
75
|
-
'do'=18
|
|
76
|
-
'try'=19
|
|
77
|
-
'catch'=20
|
|
78
|
-
'finally'=21
|
|
79
|
-
'break'=22
|
|
80
|
-
'continue'=23
|
|
81
|
-
'new'=24
|
|
82
|
-
'void'=25
|
|
83
|
-
'switch'=26
|
|
84
|
-
'case'=27
|
|
85
|
-
'default'=28
|
|
86
|
-
'return'=29
|
|
87
|
-
'=='=32
|
|
88
|
-
'!='=33
|
|
89
|
-
'<='=34
|
|
90
|
-
'>='=35
|
|
91
|
-
'<'=36
|
|
92
|
-
'>'=37
|
|
93
|
-
'+'=38
|
|
94
|
-
'-'=39
|
|
95
|
-
'*'=40
|
|
96
|
-
'/'=41
|
|
97
|
-
'='=42
|
|
98
|
-
';'=43
|
|
99
|
-
':'=44
|
|
100
|
-
','=45
|
|
101
|
-
'.'=46
|
|
102
|
-
'('=47
|
|
103
|
-
')'=48
|
|
104
|
-
'{'=49
|
|
105
|
-
'}'=50
|
|
106
|
-
'['=51
|
|
107
|
-
']'=52
|
|
108
|
-
'=>'=53
|