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.
@@ -0,0 +1 @@
1
+ "use strict";require("antlr4");const e=require("./generated/BrettLexer.js");module.exports=e.BrettLexer;
@@ -0,0 +1 @@
1
+ "use strict";require("antlr4");const e=require("./generated/BrettListener.js");module.exports=e.BrettListener;
@@ -0,0 +1 @@
1
+ "use strict";require("antlr4");require("./generated/BrettListener.js");require("./generated/BrettVisitor.js");const e=require("./generated/BrettParser.js");module.exports=e.BrettParser;
@@ -0,0 +1 @@
1
+ "use strict";require("antlr4");const e=require("./generated/BrettVisitor.js");module.exports=e.BrettVisitor;
@@ -1,191 +1 @@
1
- const BrettVisitor = require('./generated/BrettVisitor').default;
2
- const { SymbolKind } = require('./model.js');
3
- const { SymbolTable } = require('./SymbolTable.js');
4
-
5
- const parserModule = require('./generated/BrettParser');
6
- const BrettParser = parserModule.BrettParser || parserModule.default || parserModule;
7
-
8
- class SemanticAnalyzerVisitor extends BrettVisitor {
9
- constructor() {
10
- super();
11
- this.errors = [];
12
- this.currentScope = new SymbolTable();
13
- this.allScopes = [];
14
- }
15
-
16
- addError(message, token, severity = 'error') {
17
- const line = token ? token.line : 0;
18
- const column = token ? token.column + 1 : 0;
19
- const length = token ? token.text.length : 1;
20
-
21
- this.errors.push({
22
- message,
23
- line,
24
- column,
25
- type: severity === 'error' ? 'Semantic Error' : 'Warning',
26
- length
27
- });
28
- }
29
-
30
- checkAssignment(declaredType, actualType, token) {
31
- // If either side is 'any', we assume it's valid (or already an error)
32
- if (declaredType === 'any' || actualType === 'any') {
33
- return true;
34
- }
35
-
36
- // Strict string comparison
37
- if (String(declaredType) !== String(actualType)) {
38
- this.addError(
39
- `Type '${actualType}' kan niet worden toegewezen aan type '${declaredType}'`,
40
- token
41
- );
42
- return false;
43
- }
44
- return true;
45
- }
46
-
47
- getSymbols() {
48
- const allSymbols = new Map();
49
- this.allScopes.forEach(scope => {
50
- if (scope.symbols) {
51
- for (const [name, symbol] of scope.symbols.entries()) {
52
- if (!allSymbols.has(name)) allSymbols.set(name, symbol);
53
- }
54
- }
55
- });
56
- ['string', 'number', 'bool', 'any'].forEach(t =>
57
- allSymbols.set(t, { name: t, kind: 'Type', type: 'type' })
58
- );
59
- return Array.from(allSymbols.values());
60
- }
61
-
62
- visitProgram(ctx) { this.visitChildren(ctx); }
63
-
64
- visitBlock(ctx) {
65
- this.currentScope = new SymbolTable(this.currentScope);
66
- this.visitChildren(ctx);
67
- this.allScopes.push(this.currentScope);
68
- this.currentScope = this.currentScope.parent;
69
- }
70
-
71
- visitFunctionDeclaration(ctx) {
72
- const identifierNode = ctx.IDENTIFIER();
73
- if (!identifierNode) return;
74
-
75
- const name = identifierNode.getText();
76
- const returnType = ctx.type()?.getText() ?? 'any';
77
-
78
- if (!this.currentScope.define({ name, kind: SymbolKind.Function, type: returnType })) {
79
- this.addError(`Functie '${name}' is al gedefinieerd.`, identifierNode.getSymbol());
80
- }
81
-
82
- this.currentScope = new SymbolTable(this.currentScope);
83
- if (ctx.parameterList()) this.visit(ctx.parameterList());
84
- if (ctx.block()) this.visit(ctx.block());
85
- this.currentScope = this.currentScope.parent;
86
- }
87
-
88
- visitParameter(ctx) {
89
- const identifierNode = ctx.IDENTIFIER();
90
- if (!identifierNode) return;
91
- const name = identifierNode.getText();
92
- const type = ctx.type()?.getText() ?? 'any';
93
- this.currentScope.define({ name, kind: SymbolKind.Parameter, type });
94
- }
95
-
96
- visitVariableDeclaration(ctx) {
97
- const identifierNode = ctx.IDENTIFIER();
98
- if (!identifierNode) return;
99
-
100
- const name = identifierNode.getText();
101
- const declaredType = ctx.type()?.getText() ?? 'any';
102
- const identifierToken = identifierNode.getSymbol();
103
-
104
- if (!/^[a-z]/.test(name)) {
105
- this.addError(`Variabele '${name}' moet met kleine letter beginnen.`, identifierToken, 'warning');
106
- }
107
-
108
- if (!this.currentScope.define({ name, kind: SymbolKind.Variable, type: declaredType })) {
109
- this.addError(`Variabele '${name}' is al gedefinieerd.`, identifierToken);
110
- }
111
-
112
- if (ctx.expression()) {
113
- const exprType = this.visit(ctx.expression());
114
- this.checkAssignment(declaredType, exprType, ctx.expression().start);
115
- }
116
- }
117
-
118
- // ================= EXPRESSION VISITORS =================
119
-
120
- visitAssignmentExpression(ctx) {
121
- const name = ctx.IDENTIFIER().getText();
122
- const symbol = this.currentScope.resolve(name);
123
- const token = ctx.IDENTIFIER().getSymbol();
124
-
125
- if (!symbol) {
126
- this.addError(`Variabele '${name}' is niet gevonden in deze scope.`, token);
127
- } else if (symbol.kind !== SymbolKind.Variable && symbol.kind !== SymbolKind.Parameter) {
128
- this.addError(`'${name}' is geen variabele.`, token);
129
- }
130
-
131
- const valType = this.visit(ctx.expression());
132
-
133
- if (symbol) {
134
- this.checkAssignment(symbol.type, valType, ctx.expression().start);
135
- }
136
- return valType;
137
- }
138
-
139
- visitBinaryExpression(ctx) {
140
- const leftType = this.visit(ctx.expression(0));
141
- const rightType = this.visit(ctx.expression(1));
142
- const operator = ctx.op.text;
143
-
144
- if (leftType === 'number' && rightType === 'number') {
145
- if (['<', '>', '<=', '>=', '==', '!='].includes(operator)) return 'bool';
146
- return 'number';
147
- }
148
-
149
- if (operator === '+' && (leftType === 'string' || rightType === 'string')) {
150
- return 'string';
151
- }
152
- return 'any';
153
- }
154
-
155
- visitIdentifierExpression(ctx) {
156
- const name = ctx.IDENTIFIER().getText();
157
- const symbol = this.currentScope.resolve(name);
158
-
159
- if (!symbol) {
160
- this.addError(`Variabele '${name}' is niet gevonden in deze scope.`, ctx.IDENTIFIER().getSymbol());
161
- // Important: Return 'any' so checkAssignment logic above ignores it
162
- return 'any';
163
- }
164
- return symbol.type;
165
- }
166
-
167
- visitFunctionCallExpression(ctx) {
168
- const name = ctx.IDENTIFIER().getText();
169
- const symbol = this.currentScope.resolve(name);
170
-
171
- if (!symbol || symbol.kind !== SymbolKind.Function) {
172
- this.addError(`Functie '${name}' is niet gedefinieerd.`, ctx.IDENTIFIER().getSymbol());
173
- return 'any';
174
- }
175
- if (ctx.argList()) this.visit(ctx.argList());
176
- return symbol.type;
177
- }
178
-
179
- visitLiteralExpression(ctx) {
180
- if (ctx.NUMBER()) return 'number';
181
- if (ctx.STRING()) return 'string';
182
- if (ctx.getText() === 'true' || ctx.getText() === 'false') return 'bool';
183
- return 'any';
184
- }
185
-
186
- visitParenthesizedExpression(ctx) {
187
- return this.visit(ctx.expression());
188
- }
189
- }
190
-
191
- module.exports = { SemanticAnalyzerVisitor };
1
+ "use strict";const l=require("./generated/BrettVisitor").default,{SymbolKind:s}=require("./model.js"),{SymbolTable:a}=require("./SymbolTable.js"),c=require("./generated/BrettParser");c.BrettParser||c.default;class u extends l{constructor(){super(),this.errors=[],this.currentScope=new a,this.allScopes=[]}addError(e,r,t="error"){const i=r?r.line:0,n=r?r.column+1:0,o=r?r.text.length:1;this.errors.push({message:e,line:i,column:n,type:t==="error"?"Semantic Error":"Warning",length:o})}checkAssignment(e,r,t){return e==="any"||r==="any"?!0:String(e)!==String(r)?(this.addError(`Type '${r}' kan niet worden toegewezen aan type '${e}'`,t),!1):!0}getSymbols(){const e=new Map;return this.allScopes.forEach(r=>{if(r.symbols)for(const[t,i]of r.symbols.entries())e.has(t)||e.set(t,i)}),["string","number","bool","any"].forEach(r=>e.set(r,{name:r,kind:"Type",type:"type"})),Array.from(e.values())}visitProgram(e){this.visitChildren(e)}visitBlock(e){this.currentScope=new a(this.currentScope),this.visitChildren(e),this.allScopes.push(this.currentScope),this.currentScope=this.currentScope.parent}visitFunctionDeclaration(e){const r=e.IDENTIFIER();if(!r)return;const t=r.getText(),i=e.type()?.getText()??"any";this.currentScope.define({name:t,kind:s.Function,type:i})||this.addError(`Functie '${t}' is al gedefinieerd.`,r.getSymbol()),this.currentScope=new a(this.currentScope),e.parameterList()&&this.visit(e.parameterList()),e.block()&&this.visit(e.block()),this.currentScope=this.currentScope.parent}visitParameter(e){const r=e.IDENTIFIER();if(!r)return;const t=r.getText(),i=e.type()?.getText()??"any";this.currentScope.define({name:t,kind:s.Parameter,type:i})}visitVariableDeclaration(e){const r=e.IDENTIFIER();if(!r)return;const t=r.getText(),i=e.type()?.getText()??"any",n=r.getSymbol();if(/^[a-z]/.test(t)||this.addError(`Variabele '${t}' moet met kleine letter beginnen.`,n,"warning"),this.currentScope.define({name:t,kind:s.Variable,type:i})||this.addError(`Variabele '${t}' is al gedefinieerd.`,n),e.expression()){const o=this.visit(e.expression());this.checkAssignment(i,o,e.expression().start)}}visitAssignmentExpression(e){const r=e.IDENTIFIER().getText(),t=this.currentScope.resolve(r),i=e.IDENTIFIER().getSymbol();t?t.kind!==s.Variable&&t.kind!==s.Parameter&&this.addError(`'${r}' is geen variabele.`,i):this.addError(`Variabele '${r}' is niet gevonden in deze scope.`,i);const n=this.visit(e.expression());return t&&this.checkAssignment(t.type,n,e.expression().start),n}visitBinaryExpression(e){const r=this.visit(e.expression(0)),t=this.visit(e.expression(1)),i=e.op.text;return r==="number"&&t==="number"?["<",">","<=",">=","==","!="].includes(i)?"bool":"number":i==="+"&&(r==="string"||t==="string")?"string":"any"}visitIdentifierExpression(e){const r=e.IDENTIFIER().getText(),t=this.currentScope.resolve(r);return t?t.type:(this.addError(`Variabele '${r}' is niet gevonden in deze scope.`,e.IDENTIFIER().getSymbol()),"any")}visitFunctionCallExpression(e){const r=e.IDENTIFIER().getText(),t=this.currentScope.resolve(r);return!t||t.kind!==s.Function?(this.addError(`Functie '${r}' is niet gedefinieerd.`,e.IDENTIFIER().getSymbol()),"any"):(e.argList()&&this.visit(e.argList()),t.type)}visitLiteralExpression(e){return e.NUMBER()?"number":e.STRING()?"string":e.getText()==="true"||e.getText()==="false"?"bool":"any"}visitParenthesizedExpression(e){return this.visit(e.expression())}}module.exports={SemanticAnalyzerVisitor:u};
@@ -1,28 +1 @@
1
- const { SymbolKind } = require('./model.js');
2
-
3
- class SymbolTable {
4
- constructor(parent = null) {
5
- this.symbols = new Map();
6
- this.parent = parent;
7
- }
8
-
9
- define(symbol) {
10
- if (this.symbols.has(symbol.name)) return false;
11
- this.symbols.set(symbol.name, symbol);
12
- return true;
13
- }
14
-
15
- resolve(name) {
16
- const s = this.symbols.get(name);
17
- if (s) return s;
18
- // Cruciaal: De recursieve lookup in ouderlijke scopes
19
- if (this.parent) return this.parent.resolve(name);
20
- return null; // Triggert Fout 8 en 9 in de Visitor
21
- }
22
- }
23
-
24
- module.exports = { SymbolTable };
25
-
26
- /*
27
- Another configuration change
28
- */
1
+ "use strict";const{SymbolKind:n}=require("./model.js");class t{constructor(s=null){this.symbols=new Map,this.parent=s}define(s){return this.symbols.has(s.name)?!1:(this.symbols.set(s.name,s),!0)}resolve(s){const e=this.symbols.get(s);return e||(this.parent?this.parent.resolve(s):null)}}module.exports={SymbolTable:t};
@@ -1,24 +1 @@
1
- class SyntaxErrorListener {
2
- constructor(errorsList) {
3
- this.errors = errorsList;
4
- }
5
-
6
- syntaxError(recognizer, offendingSymbol, line, column, msg, e) {
7
- const length = offendingSymbol ? offendingSymbol.text.length : 1;
8
-
9
- this.errors.push({
10
- type: 'Syntax Error',
11
- message: msg,
12
- line: line,
13
- column: column + 1, // 1-based for the user
14
- length: length // NEW: Store the token length
15
- });
16
- }
17
-
18
- // Deze lege methodes zijn nodig om als listener te werken
19
- reportAmbiguity() {}
20
- reportAttemptingFullContext() {}
21
- reportContextSensitivity() {}
22
- }
23
-
24
- module.exports = { SyntaxErrorListener };
1
+ "use strict";class i{constructor(t){this.errors=t}syntaxError(t,r,e,s,n,l){const o=r?r.text.length:1;this.errors.push({type:"Syntax Error",message:n,line:e,column:s+1,length:o})}reportAmbiguity(){}reportAttemptingFullContext(){}reportContextSensitivity(){}}module.exports={SyntaxErrorListener:i};
@@ -1,232 +1 @@
1
- // Generated from /builds/kdg-ti/programmeren-3/projecten-25-26/brett.deswert/Compiler/src/g4/Brett.g4 by ANTLR 4.13.2
2
- // jshint ignore: start
3
- import antlr4 from 'antlr4';
4
-
5
-
6
- const serializedATN = [4,0,57,378,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,
7
- 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,
8
- 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,
9
- 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,2,
10
- 27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,
11
- 7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,
12
- 41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,
13
- 2,49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,
14
- 56,7,56,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,
15
- 1,2,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,6,1,6,1,6,1,7,1,7,
16
- 1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,
17
- 1,11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,14,1,
18
- 14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,17,
19
- 1,17,1,17,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,
20
- 20,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,
21
- 1,22,1,22,1,22,1,22,1,22,1,22,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,
22
- 24,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,27,1,27,
23
- 1,27,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,29,4,
24
- 29,268,8,29,11,29,12,29,269,1,29,1,29,4,29,274,8,29,11,29,12,29,275,3,29,
25
- 278,8,29,1,30,1,30,1,30,1,30,5,30,284,8,30,10,30,12,30,287,9,30,1,30,1,30,
26
- 1,31,1,31,1,31,1,32,1,32,1,32,1,33,1,33,1,33,1,34,1,34,1,34,1,35,1,35,1,
27
- 36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,1,40,1,40,1,41,1,41,1,42,1,42,1,43,
28
- 1,43,1,44,1,44,1,45,1,45,1,46,1,46,1,47,1,47,1,48,1,48,1,49,1,49,1,50,1,
29
- 50,1,51,1,51,1,52,1,52,1,52,1,53,1,53,5,53,342,8,53,10,53,12,53,345,9,53,
30
- 1,54,4,54,348,8,54,11,54,12,54,349,1,54,1,54,1,55,1,55,1,55,1,55,5,55,358,
31
- 8,55,10,55,12,55,361,9,55,1,55,1,55,1,56,1,56,1,56,1,56,5,56,369,8,56,10,
32
- 56,12,56,372,9,56,1,56,1,56,1,56,1,56,1,56,1,370,0,57,1,1,3,2,5,3,7,4,9,
33
- 5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,
34
- 18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,
35
- 30,61,31,63,32,65,33,67,34,69,35,71,36,73,37,75,38,77,39,79,40,81,41,83,
36
- 42,85,43,87,44,89,45,91,46,93,47,95,48,97,49,99,50,101,51,103,52,105,53,
37
- 107,54,109,55,111,56,113,57,1,0,6,1,0,48,57,2,0,34,34,92,92,3,0,65,90,95,
38
- 95,97,122,4,0,48,57,65,90,95,95,97,122,3,0,9,10,13,13,32,32,2,0,10,10,13,
39
- 13,386,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,
40
- 1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,
41
- 0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,
42
- 0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,
43
- 45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,
44
- 0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,
45
- 1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,
46
- 0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,
47
- 0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,
48
- 101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,
49
- 1,0,0,0,0,113,1,0,0,0,1,115,1,0,0,0,3,118,1,0,0,0,5,125,1,0,0,0,7,132,1,
50
- 0,0,0,9,137,1,0,0,0,11,141,1,0,0,0,13,144,1,0,0,0,15,147,1,0,0,0,17,152,
51
- 1,0,0,0,19,158,1,0,0,0,21,162,1,0,0,0,23,166,1,0,0,0,25,172,1,0,0,0,27,176,
52
- 1,0,0,0,29,179,1,0,0,0,31,184,1,0,0,0,33,190,1,0,0,0,35,194,1,0,0,0,37,197,
53
- 1,0,0,0,39,201,1,0,0,0,41,207,1,0,0,0,43,215,1,0,0,0,45,221,1,0,0,0,47,230,
54
- 1,0,0,0,49,234,1,0,0,0,51,239,1,0,0,0,53,246,1,0,0,0,55,251,1,0,0,0,57,259,
55
- 1,0,0,0,59,267,1,0,0,0,61,279,1,0,0,0,63,290,1,0,0,0,65,293,1,0,0,0,67,296,
56
- 1,0,0,0,69,299,1,0,0,0,71,302,1,0,0,0,73,304,1,0,0,0,75,306,1,0,0,0,77,308,
57
- 1,0,0,0,79,310,1,0,0,0,81,312,1,0,0,0,83,314,1,0,0,0,85,316,1,0,0,0,87,318,
58
- 1,0,0,0,89,320,1,0,0,0,91,322,1,0,0,0,93,324,1,0,0,0,95,326,1,0,0,0,97,328,
59
- 1,0,0,0,99,330,1,0,0,0,101,332,1,0,0,0,103,334,1,0,0,0,105,336,1,0,0,0,107,
60
- 339,1,0,0,0,109,347,1,0,0,0,111,353,1,0,0,0,113,364,1,0,0,0,115,116,5,91,
61
- 0,0,116,117,5,93,0,0,117,2,1,0,0,0,118,119,5,115,0,0,119,120,5,116,0,0,120,
62
- 121,5,114,0,0,121,122,5,105,0,0,122,123,5,110,0,0,123,124,5,103,0,0,124,
63
- 4,1,0,0,0,125,126,5,110,0,0,126,127,5,117,0,0,127,128,5,109,0,0,128,129,
64
- 5,98,0,0,129,130,5,101,0,0,130,131,5,114,0,0,131,6,1,0,0,0,132,133,5,98,
65
- 0,0,133,134,5,111,0,0,134,135,5,111,0,0,135,136,5,108,0,0,136,8,1,0,0,0,
66
- 137,138,5,97,0,0,138,139,5,110,0,0,139,140,5,121,0,0,140,10,1,0,0,0,141,
67
- 142,5,43,0,0,142,143,5,43,0,0,143,12,1,0,0,0,144,145,5,45,0,0,145,146,5,
68
- 45,0,0,146,14,1,0,0,0,147,148,5,116,0,0,148,149,5,114,0,0,149,150,5,117,
69
- 0,0,150,151,5,101,0,0,151,16,1,0,0,0,152,153,5,102,0,0,153,154,5,97,0,0,
70
- 154,155,5,108,0,0,155,156,5,115,0,0,156,157,5,101,0,0,157,18,1,0,0,0,158,
71
- 159,5,110,0,0,159,160,5,105,0,0,160,161,5,108,0,0,161,20,1,0,0,0,162,163,
72
- 5,108,0,0,163,164,5,101,0,0,164,165,5,116,0,0,165,22,1,0,0,0,166,167,5,99,
73
- 0,0,167,168,5,111,0,0,168,169,5,110,0,0,169,170,5,115,0,0,170,171,5,116,
74
- 0,0,171,24,1,0,0,0,172,173,5,100,0,0,173,174,5,101,0,0,174,175,5,102,0,0,
75
- 175,26,1,0,0,0,176,177,5,105,0,0,177,178,5,102,0,0,178,28,1,0,0,0,179,180,
76
- 5,101,0,0,180,181,5,108,0,0,181,182,5,115,0,0,182,183,5,101,0,0,183,30,1,
77
- 0,0,0,184,185,5,119,0,0,185,186,5,104,0,0,186,187,5,105,0,0,187,188,5,108,
78
- 0,0,188,189,5,101,0,0,189,32,1,0,0,0,190,191,5,102,0,0,191,192,5,111,0,0,
79
- 192,193,5,114,0,0,193,34,1,0,0,0,194,195,5,100,0,0,195,196,5,111,0,0,196,
80
- 36,1,0,0,0,197,198,5,116,0,0,198,199,5,114,0,0,199,200,5,121,0,0,200,38,
81
- 1,0,0,0,201,202,5,99,0,0,202,203,5,97,0,0,203,204,5,116,0,0,204,205,5,99,
82
- 0,0,205,206,5,104,0,0,206,40,1,0,0,0,207,208,5,102,0,0,208,209,5,105,0,0,
83
- 209,210,5,110,0,0,210,211,5,97,0,0,211,212,5,108,0,0,212,213,5,108,0,0,213,
84
- 214,5,121,0,0,214,42,1,0,0,0,215,216,5,98,0,0,216,217,5,114,0,0,217,218,
85
- 5,101,0,0,218,219,5,97,0,0,219,220,5,107,0,0,220,44,1,0,0,0,221,222,5,99,
86
- 0,0,222,223,5,111,0,0,223,224,5,110,0,0,224,225,5,116,0,0,225,226,5,105,
87
- 0,0,226,227,5,110,0,0,227,228,5,117,0,0,228,229,5,101,0,0,229,46,1,0,0,0,
88
- 230,231,5,110,0,0,231,232,5,101,0,0,232,233,5,119,0,0,233,48,1,0,0,0,234,
89
- 235,5,118,0,0,235,236,5,111,0,0,236,237,5,105,0,0,237,238,5,100,0,0,238,
90
- 50,1,0,0,0,239,240,5,115,0,0,240,241,5,119,0,0,241,242,5,105,0,0,242,243,
91
- 5,116,0,0,243,244,5,99,0,0,244,245,5,104,0,0,245,52,1,0,0,0,246,247,5,99,
92
- 0,0,247,248,5,97,0,0,248,249,5,115,0,0,249,250,5,101,0,0,250,54,1,0,0,0,
93
- 251,252,5,100,0,0,252,253,5,101,0,0,253,254,5,102,0,0,254,255,5,97,0,0,255,
94
- 256,5,117,0,0,256,257,5,108,0,0,257,258,5,116,0,0,258,56,1,0,0,0,259,260,
95
- 5,114,0,0,260,261,5,101,0,0,261,262,5,116,0,0,262,263,5,117,0,0,263,264,
96
- 5,114,0,0,264,265,5,110,0,0,265,58,1,0,0,0,266,268,7,0,0,0,267,266,1,0,0,
97
- 0,268,269,1,0,0,0,269,267,1,0,0,0,269,270,1,0,0,0,270,277,1,0,0,0,271,273,
98
- 5,46,0,0,272,274,7,0,0,0,273,272,1,0,0,0,274,275,1,0,0,0,275,273,1,0,0,0,
99
- 275,276,1,0,0,0,276,278,1,0,0,0,277,271,1,0,0,0,277,278,1,0,0,0,278,60,1,
100
- 0,0,0,279,285,5,34,0,0,280,284,8,1,0,0,281,282,5,92,0,0,282,284,9,0,0,0,
101
- 283,280,1,0,0,0,283,281,1,0,0,0,284,287,1,0,0,0,285,283,1,0,0,0,285,286,
102
- 1,0,0,0,286,288,1,0,0,0,287,285,1,0,0,0,288,289,5,34,0,0,289,62,1,0,0,0,
103
- 290,291,5,61,0,0,291,292,5,61,0,0,292,64,1,0,0,0,293,294,5,33,0,0,294,295,
104
- 5,61,0,0,295,66,1,0,0,0,296,297,5,60,0,0,297,298,5,61,0,0,298,68,1,0,0,0,
105
- 299,300,5,62,0,0,300,301,5,61,0,0,301,70,1,0,0,0,302,303,5,60,0,0,303,72,
106
- 1,0,0,0,304,305,5,62,0,0,305,74,1,0,0,0,306,307,5,43,0,0,307,76,1,0,0,0,
107
- 308,309,5,45,0,0,309,78,1,0,0,0,310,311,5,42,0,0,311,80,1,0,0,0,312,313,
108
- 5,47,0,0,313,82,1,0,0,0,314,315,5,61,0,0,315,84,1,0,0,0,316,317,5,59,0,0,
109
- 317,86,1,0,0,0,318,319,5,58,0,0,319,88,1,0,0,0,320,321,5,44,0,0,321,90,1,
110
- 0,0,0,322,323,5,46,0,0,323,92,1,0,0,0,324,325,5,40,0,0,325,94,1,0,0,0,326,
111
- 327,5,41,0,0,327,96,1,0,0,0,328,329,5,123,0,0,329,98,1,0,0,0,330,331,5,125,
112
- 0,0,331,100,1,0,0,0,332,333,5,91,0,0,333,102,1,0,0,0,334,335,5,93,0,0,335,
113
- 104,1,0,0,0,336,337,5,61,0,0,337,338,5,62,0,0,338,106,1,0,0,0,339,343,7,
114
- 2,0,0,340,342,7,3,0,0,341,340,1,0,0,0,342,345,1,0,0,0,343,341,1,0,0,0,343,
115
- 344,1,0,0,0,344,108,1,0,0,0,345,343,1,0,0,0,346,348,7,4,0,0,347,346,1,0,
116
- 0,0,348,349,1,0,0,0,349,347,1,0,0,0,349,350,1,0,0,0,350,351,1,0,0,0,351,
117
- 352,6,54,0,0,352,110,1,0,0,0,353,354,5,47,0,0,354,355,5,47,0,0,355,359,1,
118
- 0,0,0,356,358,8,5,0,0,357,356,1,0,0,0,358,361,1,0,0,0,359,357,1,0,0,0,359,
119
- 360,1,0,0,0,360,362,1,0,0,0,361,359,1,0,0,0,362,363,6,55,0,0,363,112,1,0,
120
- 0,0,364,365,5,47,0,0,365,366,5,42,0,0,366,370,1,0,0,0,367,369,9,0,0,0,368,
121
- 367,1,0,0,0,369,372,1,0,0,0,370,371,1,0,0,0,370,368,1,0,0,0,371,373,1,0,
122
- 0,0,372,370,1,0,0,0,373,374,5,42,0,0,374,375,5,47,0,0,375,376,1,0,0,0,376,
123
- 377,6,56,0,0,377,114,1,0,0,0,10,0,269,275,277,283,285,343,349,359,370,1,
124
- 6,0,0];
125
-
126
-
127
- const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);
128
-
129
- const decisionsToDFA = atn.decisionToState.map( (ds, index) => new antlr4.dfa.DFA(ds, index) );
130
-
131
- export default class BrettLexer extends antlr4.Lexer {
132
-
133
- static grammarFileName = "Brett.g4";
134
- static channelNames = [ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" ];
135
- static modeNames = [ "DEFAULT_MODE" ];
136
- static literalNames = [ null, "'[]'", "'string'", "'number'", "'bool'",
137
- "'any'", "'++'", "'--'", "'true'", "'false'", "'nil'",
138
- "'let'", "'const'", "'def'", "'if'", "'else'",
139
- "'while'", "'for'", "'do'", "'try'", "'catch'",
140
- "'finally'", "'break'", "'continue'", "'new'",
141
- "'void'", "'switch'", "'case'", "'default'", "'return'",
142
- null, null, "'=='", "'!='", "'<='", "'>='", "'<'",
143
- "'>'", "'+'", "'-'", "'*'", "'/'", "'='", "';'",
144
- "':'", "','", "'.'", "'('", "')'", "'{'", "'}'",
145
- "'['", "']'", "'=>'" ];
146
- static symbolicNames = [ null, null, null, null, null, null, null, null,
147
- null, null, null, "LET", "CONST", "DEF", "IF",
148
- "ELSE", "WHILE", "FOR", "DO", "TRY", "CATCH",
149
- "FINALLY", "BREAK", "CONTINUE", "NEW", "VOID",
150
- "SWITCH", "CASE", "DEFAULT", "RETURN", "NUMBER",
151
- "STRING", "EQ", "NEQ", "LE", "GE", "LT", "GT",
152
- "PLUS", "MINUS", "STAR", "SLASH", "ASSIGN", "SEMI",
153
- "COLON", "COMMA", "DOT", "LPAREN", "RPAREN", "LBRACE",
154
- "RBRACE", "LBRACK", "RBRACK", "ARROW", "IDENTIFIER",
155
- "WS", "LINE_COMMENT", "BLOCK_COMMENT" ];
156
- static ruleNames = [ "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6",
157
- "T__7", "T__8", "T__9", "LET", "CONST", "DEF", "IF",
158
- "ELSE", "WHILE", "FOR", "DO", "TRY", "CATCH", "FINALLY",
159
- "BREAK", "CONTINUE", "NEW", "VOID", "SWITCH", "CASE",
160
- "DEFAULT", "RETURN", "NUMBER", "STRING", "EQ", "NEQ",
161
- "LE", "GE", "LT", "GT", "PLUS", "MINUS", "STAR", "SLASH",
162
- "ASSIGN", "SEMI", "COLON", "COMMA", "DOT", "LPAREN",
163
- "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK",
164
- "ARROW", "IDENTIFIER", "WS", "LINE_COMMENT", "BLOCK_COMMENT" ];
165
-
166
- constructor(input) {
167
- super(input)
168
- this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.atn.PredictionContextCache());
169
- }
170
- }
171
-
172
- BrettLexer.EOF = antlr4.Token.EOF;
173
- BrettLexer.T__0 = 1;
174
- BrettLexer.T__1 = 2;
175
- BrettLexer.T__2 = 3;
176
- BrettLexer.T__3 = 4;
177
- BrettLexer.T__4 = 5;
178
- BrettLexer.T__5 = 6;
179
- BrettLexer.T__6 = 7;
180
- BrettLexer.T__7 = 8;
181
- BrettLexer.T__8 = 9;
182
- BrettLexer.T__9 = 10;
183
- BrettLexer.LET = 11;
184
- BrettLexer.CONST = 12;
185
- BrettLexer.DEF = 13;
186
- BrettLexer.IF = 14;
187
- BrettLexer.ELSE = 15;
188
- BrettLexer.WHILE = 16;
189
- BrettLexer.FOR = 17;
190
- BrettLexer.DO = 18;
191
- BrettLexer.TRY = 19;
192
- BrettLexer.CATCH = 20;
193
- BrettLexer.FINALLY = 21;
194
- BrettLexer.BREAK = 22;
195
- BrettLexer.CONTINUE = 23;
196
- BrettLexer.NEW = 24;
197
- BrettLexer.VOID = 25;
198
- BrettLexer.SWITCH = 26;
199
- BrettLexer.CASE = 27;
200
- BrettLexer.DEFAULT = 28;
201
- BrettLexer.RETURN = 29;
202
- BrettLexer.NUMBER = 30;
203
- BrettLexer.STRING = 31;
204
- BrettLexer.EQ = 32;
205
- BrettLexer.NEQ = 33;
206
- BrettLexer.LE = 34;
207
- BrettLexer.GE = 35;
208
- BrettLexer.LT = 36;
209
- BrettLexer.GT = 37;
210
- BrettLexer.PLUS = 38;
211
- BrettLexer.MINUS = 39;
212
- BrettLexer.STAR = 40;
213
- BrettLexer.SLASH = 41;
214
- BrettLexer.ASSIGN = 42;
215
- BrettLexer.SEMI = 43;
216
- BrettLexer.COLON = 44;
217
- BrettLexer.COMMA = 45;
218
- BrettLexer.DOT = 46;
219
- BrettLexer.LPAREN = 47;
220
- BrettLexer.RPAREN = 48;
221
- BrettLexer.LBRACE = 49;
222
- BrettLexer.RBRACE = 50;
223
- BrettLexer.LBRACK = 51;
224
- BrettLexer.RBRACK = 52;
225
- BrettLexer.ARROW = 53;
226
- BrettLexer.IDENTIFIER = 54;
227
- BrettLexer.WS = 55;
228
- BrettLexer.LINE_COMMENT = 56;
229
- BrettLexer.BLOCK_COMMENT = 57;
230
-
231
-
232
-
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("antlr4"),t=[4,0,57,378,6,-1,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,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,29,4,29,268,8,29,11,29,12,29,269,1,29,1,29,4,29,274,8,29,11,29,12,29,275,3,29,278,8,29,1,30,1,30,1,30,1,30,5,30,284,8,30,10,30,12,30,287,9,30,1,30,1,30,1,31,1,31,1,31,1,32,1,32,1,32,1,33,1,33,1,33,1,34,1,34,1,34,1,35,1,35,1,36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,1,40,1,40,1,41,1,41,1,42,1,42,1,43,1,43,1,44,1,44,1,45,1,45,1,46,1,46,1,47,1,47,1,48,1,48,1,49,1,49,1,50,1,50,1,51,1,51,1,52,1,52,1,52,1,53,1,53,5,53,342,8,53,10,53,12,53,345,9,53,1,54,4,54,348,8,54,11,54,12,54,349,1,54,1,54,1,55,1,55,1,55,1,55,5,55,358,8,55,10,55,12,55,361,9,55,1,55,1,55,1,56,1,56,1,56,1,56,5,56,369,8,56,10,56,12,56,372,9,56,1,56,1,56,1,56,1,56,1,56,1,370,0,57,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35,71,36,73,37,75,38,77,39,79,40,81,41,83,42,85,43,87,44,89,45,91,46,93,47,95,48,97,49,99,50,101,51,103,52,105,53,107,54,109,55,111,56,113,57,1,0,6,1,0,48,57,2,0,34,34,92,92,3,0,65,90,95,95,97,122,4,0,48,57,65,90,95,95,97,122,3,0,9,10,13,13,32,32,2,0,10,10,13,13,386,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,1,115,1,0,0,0,3,118,1,0,0,0,5,125,1,0,0,0,7,132,1,0,0,0,9,137,1,0,0,0,11,141,1,0,0,0,13,144,1,0,0,0,15,147,1,0,0,0,17,152,1,0,0,0,19,158,1,0,0,0,21,162,1,0,0,0,23,166,1,0,0,0,25,172,1,0,0,0,27,176,1,0,0,0,29,179,1,0,0,0,31,184,1,0,0,0,33,190,1,0,0,0,35,194,1,0,0,0,37,197,1,0,0,0,39,201,1,0,0,0,41,207,1,0,0,0,43,215,1,0,0,0,45,221,1,0,0,0,47,230,1,0,0,0,49,234,1,0,0,0,51,239,1,0,0,0,53,246,1,0,0,0,55,251,1,0,0,0,57,259,1,0,0,0,59,267,1,0,0,0,61,279,1,0,0,0,63,290,1,0,0,0,65,293,1,0,0,0,67,296,1,0,0,0,69,299,1,0,0,0,71,302,1,0,0,0,73,304,1,0,0,0,75,306,1,0,0,0,77,308,1,0,0,0,79,310,1,0,0,0,81,312,1,0,0,0,83,314,1,0,0,0,85,316,1,0,0,0,87,318,1,0,0,0,89,320,1,0,0,0,91,322,1,0,0,0,93,324,1,0,0,0,95,326,1,0,0,0,97,328,1,0,0,0,99,330,1,0,0,0,101,332,1,0,0,0,103,334,1,0,0,0,105,336,1,0,0,0,107,339,1,0,0,0,109,347,1,0,0,0,111,353,1,0,0,0,113,364,1,0,0,0,115,116,5,91,0,0,116,117,5,93,0,0,117,2,1,0,0,0,118,119,5,115,0,0,119,120,5,116,0,0,120,121,5,114,0,0,121,122,5,105,0,0,122,123,5,110,0,0,123,124,5,103,0,0,124,4,1,0,0,0,125,126,5,110,0,0,126,127,5,117,0,0,127,128,5,109,0,0,128,129,5,98,0,0,129,130,5,101,0,0,130,131,5,114,0,0,131,6,1,0,0,0,132,133,5,98,0,0,133,134,5,111,0,0,134,135,5,111,0,0,135,136,5,108,0,0,136,8,1,0,0,0,137,138,5,97,0,0,138,139,5,110,0,0,139,140,5,121,0,0,140,10,1,0,0,0,141,142,5,43,0,0,142,143,5,43,0,0,143,12,1,0,0,0,144,145,5,45,0,0,145,146,5,45,0,0,146,14,1,0,0,0,147,148,5,116,0,0,148,149,5,114,0,0,149,150,5,117,0,0,150,151,5,101,0,0,151,16,1,0,0,0,152,153,5,102,0,0,153,154,5,97,0,0,154,155,5,108,0,0,155,156,5,115,0,0,156,157,5,101,0,0,157,18,1,0,0,0,158,159,5,110,0,0,159,160,5,105,0,0,160,161,5,108,0,0,161,20,1,0,0,0,162,163,5,108,0,0,163,164,5,101,0,0,164,165,5,116,0,0,165,22,1,0,0,0,166,167,5,99,0,0,167,168,5,111,0,0,168,169,5,110,0,0,169,170,5,115,0,0,170,171,5,116,0,0,171,24,1,0,0,0,172,173,5,100,0,0,173,174,5,101,0,0,174,175,5,102,0,0,175,26,1,0,0,0,176,177,5,105,0,0,177,178,5,102,0,0,178,28,1,0,0,0,179,180,5,101,0,0,180,181,5,108,0,0,181,182,5,115,0,0,182,183,5,101,0,0,183,30,1,0,0,0,184,185,5,119,0,0,185,186,5,104,0,0,186,187,5,105,0,0,187,188,5,108,0,0,188,189,5,101,0,0,189,32,1,0,0,0,190,191,5,102,0,0,191,192,5,111,0,0,192,193,5,114,0,0,193,34,1,0,0,0,194,195,5,100,0,0,195,196,5,111,0,0,196,36,1,0,0,0,197,198,5,116,0,0,198,199,5,114,0,0,199,200,5,121,0,0,200,38,1,0,0,0,201,202,5,99,0,0,202,203,5,97,0,0,203,204,5,116,0,0,204,205,5,99,0,0,205,206,5,104,0,0,206,40,1,0,0,0,207,208,5,102,0,0,208,209,5,105,0,0,209,210,5,110,0,0,210,211,5,97,0,0,211,212,5,108,0,0,212,213,5,108,0,0,213,214,5,121,0,0,214,42,1,0,0,0,215,216,5,98,0,0,216,217,5,114,0,0,217,218,5,101,0,0,218,219,5,97,0,0,219,220,5,107,0,0,220,44,1,0,0,0,221,222,5,99,0,0,222,223,5,111,0,0,223,224,5,110,0,0,224,225,5,116,0,0,225,226,5,105,0,0,226,227,5,110,0,0,227,228,5,117,0,0,228,229,5,101,0,0,229,46,1,0,0,0,230,231,5,110,0,0,231,232,5,101,0,0,232,233,5,119,0,0,233,48,1,0,0,0,234,235,5,118,0,0,235,236,5,111,0,0,236,237,5,105,0,0,237,238,5,100,0,0,238,50,1,0,0,0,239,240,5,115,0,0,240,241,5,119,0,0,241,242,5,105,0,0,242,243,5,116,0,0,243,244,5,99,0,0,244,245,5,104,0,0,245,52,1,0,0,0,246,247,5,99,0,0,247,248,5,97,0,0,248,249,5,115,0,0,249,250,5,101,0,0,250,54,1,0,0,0,251,252,5,100,0,0,252,253,5,101,0,0,253,254,5,102,0,0,254,255,5,97,0,0,255,256,5,117,0,0,256,257,5,108,0,0,257,258,5,116,0,0,258,56,1,0,0,0,259,260,5,114,0,0,260,261,5,101,0,0,261,262,5,116,0,0,262,263,5,117,0,0,263,264,5,114,0,0,264,265,5,110,0,0,265,58,1,0,0,0,266,268,7,0,0,0,267,266,1,0,0,0,268,269,1,0,0,0,269,267,1,0,0,0,269,270,1,0,0,0,270,277,1,0,0,0,271,273,5,46,0,0,272,274,7,0,0,0,273,272,1,0,0,0,274,275,1,0,0,0,275,273,1,0,0,0,275,276,1,0,0,0,276,278,1,0,0,0,277,271,1,0,0,0,277,278,1,0,0,0,278,60,1,0,0,0,279,285,5,34,0,0,280,284,8,1,0,0,281,282,5,92,0,0,282,284,9,0,0,0,283,280,1,0,0,0,283,281,1,0,0,0,284,287,1,0,0,0,285,283,1,0,0,0,285,286,1,0,0,0,286,288,1,0,0,0,287,285,1,0,0,0,288,289,5,34,0,0,289,62,1,0,0,0,290,291,5,61,0,0,291,292,5,61,0,0,292,64,1,0,0,0,293,294,5,33,0,0,294,295,5,61,0,0,295,66,1,0,0,0,296,297,5,60,0,0,297,298,5,61,0,0,298,68,1,0,0,0,299,300,5,62,0,0,300,301,5,61,0,0,301,70,1,0,0,0,302,303,5,60,0,0,303,72,1,0,0,0,304,305,5,62,0,0,305,74,1,0,0,0,306,307,5,43,0,0,307,76,1,0,0,0,308,309,5,45,0,0,309,78,1,0,0,0,310,311,5,42,0,0,311,80,1,0,0,0,312,313,5,47,0,0,313,82,1,0,0,0,314,315,5,61,0,0,315,84,1,0,0,0,316,317,5,59,0,0,317,86,1,0,0,0,318,319,5,58,0,0,319,88,1,0,0,0,320,321,5,44,0,0,321,90,1,0,0,0,322,323,5,46,0,0,323,92,1,0,0,0,324,325,5,40,0,0,325,94,1,0,0,0,326,327,5,41,0,0,327,96,1,0,0,0,328,329,5,123,0,0,329,98,1,0,0,0,330,331,5,125,0,0,331,100,1,0,0,0,332,333,5,91,0,0,333,102,1,0,0,0,334,335,5,93,0,0,335,104,1,0,0,0,336,337,5,61,0,0,337,338,5,62,0,0,338,106,1,0,0,0,339,343,7,2,0,0,340,342,7,3,0,0,341,340,1,0,0,0,342,345,1,0,0,0,343,341,1,0,0,0,343,344,1,0,0,0,344,108,1,0,0,0,345,343,1,0,0,0,346,348,7,4,0,0,347,346,1,0,0,0,348,349,1,0,0,0,349,347,1,0,0,0,349,350,1,0,0,0,350,351,1,0,0,0,351,352,6,54,0,0,352,110,1,0,0,0,353,354,5,47,0,0,354,355,5,47,0,0,355,359,1,0,0,0,356,358,8,5,0,0,357,356,1,0,0,0,358,361,1,0,0,0,359,357,1,0,0,0,359,360,1,0,0,0,360,362,1,0,0,0,361,359,1,0,0,0,362,363,6,55,0,0,363,112,1,0,0,0,364,365,5,47,0,0,365,366,5,42,0,0,366,370,1,0,0,0,367,369,9,0,0,0,368,367,1,0,0,0,369,372,1,0,0,0,370,371,1,0,0,0,370,368,1,0,0,0,371,373,1,0,0,0,372,370,1,0,0,0,373,374,5,42,0,0,374,375,5,47,0,0,375,376,1,0,0,0,376,377,6,56,0,0,377,114,1,0,0,0,10,0,269,275,277,283,285,343,349,359,370,1,6,0,0],R=new T.atn.ATNDeserializer().deserialize(t),A=R.decisionToState.map((N,e)=>new T.dfa.DFA(N,e));class E extends T.Lexer{static grammarFileName="Brett.g4";static channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"];static modeNames=["DEFAULT_MODE"];static literalNames=[null,"'[]'","'string'","'number'","'bool'","'any'","'++'","'--'","'true'","'false'","'nil'","'let'","'const'","'def'","'if'","'else'","'while'","'for'","'do'","'try'","'catch'","'finally'","'break'","'continue'","'new'","'void'","'switch'","'case'","'default'","'return'",null,null,"'=='","'!='","'<='","'>='","'<'","'>'","'+'","'-'","'*'","'/'","'='","';'","':'","','","'.'","'('","')'","'{'","'}'","'['","']'","'=>'"];static symbolicNames=[null,null,null,null,null,null,null,null,null,null,null,"LET","CONST","DEF","IF","ELSE","WHILE","FOR","DO","TRY","CATCH","FINALLY","BREAK","CONTINUE","NEW","VOID","SWITCH","CASE","DEFAULT","RETURN","NUMBER","STRING","EQ","NEQ","LE","GE","LT","GT","PLUS","MINUS","STAR","SLASH","ASSIGN","SEMI","COLON","COMMA","DOT","LPAREN","RPAREN","LBRACE","RBRACE","LBRACK","RBRACK","ARROW","IDENTIFIER","WS","LINE_COMMENT","BLOCK_COMMENT"];static ruleNames=["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","T__9","LET","CONST","DEF","IF","ELSE","WHILE","FOR","DO","TRY","CATCH","FINALLY","BREAK","CONTINUE","NEW","VOID","SWITCH","CASE","DEFAULT","RETURN","NUMBER","STRING","EQ","NEQ","LE","GE","LT","GT","PLUS","MINUS","STAR","SLASH","ASSIGN","SEMI","COLON","COMMA","DOT","LPAREN","RPAREN","LBRACE","RBRACE","LBRACK","RBRACK","ARROW","IDENTIFIER","WS","LINE_COMMENT","BLOCK_COMMENT"];constructor(e){super(e),this._interp=new T.atn.LexerATNSimulator(this,R,A,new T.atn.PredictionContextCache)}}E.EOF=T.Token.EOF;E.T__0=1;E.T__1=2;E.T__2=3;E.T__3=4;E.T__4=5;E.T__5=6;E.T__6=7;E.T__7=8;E.T__8=9;E.T__9=10;E.LET=11;E.CONST=12;E.DEF=13;E.IF=14;E.ELSE=15;E.WHILE=16;E.FOR=17;E.DO=18;E.TRY=19;E.CATCH=20;E.FINALLY=21;E.BREAK=22;E.CONTINUE=23;E.NEW=24;E.VOID=25;E.SWITCH=26;E.CASE=27;E.DEFAULT=28;E.RETURN=29;E.NUMBER=30;E.STRING=31;E.EQ=32;E.NEQ=33;E.LE=34;E.GE=35;E.LT=36;E.GT=37;E.PLUS=38;E.MINUS=39;E.STAR=40;E.SLASH=41;E.ASSIGN=42;E.SEMI=43;E.COLON=44;E.COMMA=45;E.DOT=46;E.LPAREN=47;E.RPAREN=48;E.LBRACE=49;E.RBRACE=50;E.LBRACK=51;E.RBRACK=52;E.ARROW=53;E.IDENTIFIER=54;E.WS=55;E.LINE_COMMENT=56;E.BLOCK_COMMENT=57;exports.BrettLexer=E;