brett-compiler 1.0.21 → 1.0.23

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.
@@ -1 +1,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;
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
+
@@ -0,0 +1,108 @@
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