diff --git a/il65/antlr/Makefile b/il65/antlr/Makefile index 3ac22bca6..3aa635839 100644 --- a/il65/antlr/Makefile +++ b/il65/antlr/Makefile @@ -1,3 +1,3 @@ parser: - ./antlr.sh -o ../src/net/razorvine/il65/parser -listener -visitor -package net.razorvine.il65.parser tinybasic.g4 + ./antlr.sh -o ../src/il65/parser -listener -visitor -package il65.parser tinybasic.g4 diff --git a/il65/antlr/examples/tinybasic.bas b/il65/antlr/examples/tinybasic.bas deleted file mode 100644 index 50a16ce0f..000000000 --- a/il65/antlr/examples/tinybasic.bas +++ /dev/null @@ -1,7 +0,0 @@ -50 INPUT "GUESS A NUMBER?", G -60 C = C+1 -70 IF G=N GOTO 110 -80 IF G>N PRINT "LOWER" -90 IF G channel(1) ; +WS : [ \t] -> skip ; +EOL : [\r\n]+ -> skip ; NAME : [a-zA-Z_][a-zA-Z0-9_]* ; -DEC_INTEGER : ('0'..'9') | (('1'..'9')('0'..'9')+); -HEX_INTEGER : '$' (('a'..'f') | ('A'..'F') | ('0'..'9'))+ ; -BIN_INTEGER : '%' ('0' | '1')+ ; +DEC_INTEGER : ('0'..'9') | (('1'..'9')('0'..'9')+); +HEX_INTEGER : '$' (('a'..'f') | ('A'..'F') | ('0'..'9'))+ ; +BIN_INTEGER : '%' ('0' | '1')+ ; +FLOAT_NUMBER : FNUMBER (('E'|'e') ('+' | '-')? FNUMBER)? ; // sign comes later from unary expression +fragment FNUMBER : ('0' .. '9') + ('.' ('0' .. '9') +)? ; -module : - line* - EOF +fragment STRING_ESCAPE_SEQ : '\\' . | '\\' EOL; +STRING : + '"' ( STRING_ESCAPE_SEQ | ~[\\\r\n\f"] )* '"' + { + // get rid of the enclosing quotes + String s = getText(); + setText(s.substring(1, s.length() - 1)); + } ; -line : + +module : statement* EOF ; + +statement : directive + | constdecl + | memoryvardecl | vardecl + | varinitializer | assignment | augassignment ; -directive : - '%' singlename (literalvalue)? - ; +directive : '%' singlename (directivearg? | directivearg (',' directivearg)*) ; -vardecl: - datatype arrayspec? singlename ('=' expression)? - ; +directivearg : singlename | integerliteral ; -datatype: - 'byte' | 'word' | 'float' | 'str' | 'str_p' | 'str_s' | 'str_ps' - ; +vardecl: datatype arrayspec? singlename ; -arrayspec: - '[' expression (',' expression)? ']' - ; +varinitializer : datatype arrayspec? singlename '=' expression ; -assignment : - assign_target '=' expression - ; +constdecl: 'const' varinitializer ; + +memoryvardecl: 'memory' varinitializer; + +datatype: 'byte' | 'word' | 'float' | 'str' | 'str_p' | 'str_s' | 'str_ps' ; + +arrayspec: '[' expression (',' expression)? ']' ; + +assignment : assign_target '=' expression ; augassignment : assign_target ('+=' | '-=' | '/=' | '//=' | '*=' | '**=' | '<<=' | '>>=' | '<<@=' | '>>@=' | '&=' | '|=' | '^=') expression ; +assign_target: + register + | singlename + | dottedname + ; expression : unary_expression @@ -65,49 +84,32 @@ expression : | singlename ; -unary_expression: +unary_expression : '~' expression | ('+' | '-') expression | 'not' expression ; -singlename: - NAME - ; +singlename : NAME ; -dottedname: - NAME ('.' NAME)+ - ; +dottedname : NAME ('.' NAME)+ ; -register: - 'A' | 'X' | 'Y' | 'AX' | 'AY' | 'XY' | 'SC' | 'SI' | 'SZ' - ; +register : 'A' | 'X' | 'Y' | 'AX' | 'AY' | 'XY' | 'SC' | 'SI' | 'SZ' ; -literalvalue: - BIN_INTEGER | HEX_INTEGER | DEC_INTEGER - | 'true' | 'false' - | array - ; +integerliteral : DEC_INTEGER | HEX_INTEGER | BIN_INTEGER ; -array: - '[' expression (',' expression)* ']' - ; +booleanliteral : 'true' | 'false' ; +arrayliteral : '[' expression (',' expression)* ']' ; -assign_target: - register - | singlename - | dottedname - ; +stringliteral : STRING ; -COMMENT : - ';' ~[\r\n]* -> channel(1) - ; +floatliteral : FLOAT_NUMBER ; -WS : - [ \t] -> skip - ; - -EOL : - [\r\n]+ -> skip +literalvalue : + integerliteral + | booleanliteral + | arrayliteral + | stringliteral + | floatliteral ; diff --git a/il65/antlr/tinybasic.g4 b/il65/antlr/tinybasic.g4 deleted file mode 100644 index c00b68818..000000000 --- a/il65/antlr/tinybasic.g4 +++ /dev/null @@ -1,118 +0,0 @@ -/* -BSD License -Copyright (c) 2017, Tom Everett -All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Tom Everett nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -grammar tinybasic; - - -program - : line* - EOF - ; - -line - : number statement CR - | statement CR - ; - -statement - : 'PRINT' exprlist - | 'IF' expression relop expression 'THEN'? statement - | 'GOTO' number - | 'INPUT' varlist - | 'LET'? vara '=' expression - | 'GOSUB' expression - | 'RETURN' - | 'CLEAR' - | 'LIST' - | 'RUN' - | 'END' - ; - -exprlist - : (STRING | expression) (',' (STRING | expression))* - ; - -varlist - : vara (',' vara)* - ; - -expression - : ('+' | '-' | 'ε')? term (('+' | '-') term)* - ; - -term - : factor (('*' | '/') factor)* - ; - -factor - : - vara - | number - ; - -vara - : VAR - | STRING - ; - -number - : DIGIT + - ; - -relop - : ('<' ('>' | '=' | 'ε')?) - | ('>' ('<' | '=' | 'ε')?) - | '=' - | '+' - | '-' - ; - - -STRING - : '"' ~ ["\r\n]* '"' - ; - - -DIGIT - : '0' .. '9' - ; - - -VAR - : 'A' .. 'Z' - ; - - -CR - : [\r\n]+ - ; - - -WS - : [ \t] -> skip - ; diff --git a/il65/src/AST.kt b/il65/src/AST.kt deleted file mode 100644 index 0c8cc61c7..000000000 --- a/il65/src/AST.kt +++ /dev/null @@ -1,70 +0,0 @@ -package il65.ast - -import net.razorvine.il65.parser.tinybasicParser - -interface Node -interface Statement : Node - -data class Program(val lines: List) : Node -data class Line(val number: Int?, val statement: Statement) : Node - -data class Print(val exprlist: List) : Statement -data class If(val expression1: Expression, val relop: Char, val expression2: Expression, val then: Statement) : Statement -data class Goto(val number: Int) : Statement -data class Input(val varlist: List) : Statement -data class Let(val vara: Var, val expression: Expression) : Statement -data class Gosub(val expression: Expression): Statement -class Return: Statement -class Clear : Statement -class ListStmt : Statement -class Run : Statement -class End : Statement - -data class TermListTerm(val operator: Char, val term: Term) : Node -data class FactorListFactor(val operator: Char, val factor: Factor) : Node -data class Expression(val unaryOp: Char?, val term: Term, val terms: List) : Node -data class Term(val factor: Factor, val factors: List) : Node -data class Factor(val thing: String) : Node -data class Var(val thing: String): Node - - -fun tinybasicParser.ProgramContext.toAst(): Program = Program(this.line().map { - Line(it.number().toAst(), it.statement().toAst()) -}) - -fun tinybasicParser.NumberContext.toAst(): Int = this.DIGIT().joinToString(separator = "").toInt() - -fun tinybasicParser.StatementContext.toAst(): Statement = - when (this.children[0].text) { - "INPUT" -> Input(this.varlist().toAst()) - "IF" -> If(this.expression(0).toAst(), this.relop().toAst(), this.expression(1).toAst(), this.statement().toAst()) - "PRINT" -> Print(this.exprlist().toAst()) - "GOTO" -> Goto(this.number().toAst()) - "LET" -> Let(this.vara().toAst(), this.expression(0).toAst()) - "GOSUB" -> Gosub(this.expression(0).toAst()) - "RETURN" -> Return() - "CLEAR" -> Clear() - "LIST" -> ListStmt() - "RUN" -> Run() - "END" -> End() - else -> Let(this.vara().toAst(), this.expression(0).toAst()) -} - -fun tinybasicParser.RelopContext.toAst() : Char = this.text[0] - -fun tinybasicParser.VarlistContext.toAst() : List { - return emptyList() -} - -fun tinybasicParser.ExprlistContext.toAst() : List { - return emptyList() -} - -fun tinybasicParser.VaraContext.toAst() : Var = Var(this.text) - -fun tinybasicParser.ExpressionContext.toAst() : Expression { - val unaryOp = '+' - val term = Term(Factor("derp"), emptyList()) - return Expression(unaryOp, term, emptyList()) -} - diff --git a/il65/src/Main.kt b/il65/src/Main.kt deleted file mode 100644 index 82325eaf9..000000000 --- a/il65/src/Main.kt +++ /dev/null @@ -1,20 +0,0 @@ -package il65 - -import il65.ast.* -import net.razorvine.il65.parser.tinybasicLexer -import net.razorvine.il65.parser.tinybasicParser -import org.antlr.v4.runtime.CharStreams -import org.antlr.v4.runtime.CommonTokenStream - - -fun main(args: Array) { - println("Reading source file: ${args[0]}") - val input = CharStreams.fromFileName(args[0]) - val lexer = tinybasicLexer(input) - val tokens = CommonTokenStream(lexer) - val parser = tinybasicParser(tokens) - val parseTree: tinybasicParser.ProgramContext = parser.program() - val program = parseTree.toAst() - println(program) -} - diff --git a/il65/src/il65/Main.kt b/il65/src/il65/Main.kt new file mode 100644 index 000000000..1a0f38892 --- /dev/null +++ b/il65/src/il65/Main.kt @@ -0,0 +1,27 @@ +package il65 + +import il65.ast.toAst +import il65.parser.il65Lexer +import il65.parser.il65Parser +import org.antlr.v4.runtime.CharStreams +import org.antlr.v4.runtime.CommonTokenStream + + +fun main(args: Array) { + // println("Reading source file: ${args[0]}") + + val input = CharStreams.fromString( + "AX //= (5+8)*77\n" + + "X = -3.44e-99") + val lexer = il65Lexer(input) + val tokens = CommonTokenStream(lexer) + val parser = il65Parser(tokens) + + val module = parser.module() + val program = module.toAst() + + program.lines.map { + println(it) + } +} + diff --git a/il65/src/il65/ast/AST.kt b/il65/src/il65/ast/AST.kt new file mode 100644 index 000000000..cd84c9ae1 --- /dev/null +++ b/il65/src/il65/ast/AST.kt @@ -0,0 +1,211 @@ +package il65.ast + +import il65.parser.il65Parser +import org.antlr.v4.runtime.tree.TerminalNode + +enum class DataType { + BYTE, + WORD, + FLOAT, + STR, + STR_P, + STR_S, + STR_PS +} + +enum class Register { + A, + X, + Y, + AX, + AY, + XY, + SI, + SC, + SZ +} + +interface Node + +interface IStatement : Node + +data class Module(val lines: List) : Node + +data class Directive(val directive: String, val args: List) : IStatement + +data class DirectiveArg(val strval: String?, val intval: Int?) : Node + +interface IVarDecl : IStatement { + val datatype: DataType + val arrayspec: ArraySpec? + val name: String + val value: IExpression? +} + +data class ArraySpec(val x: IExpression, val y: IExpression?) : Node + +data class VarDecl(override val datatype: DataType, + override val arrayspec: ArraySpec?, + override val name: String, + override val value: IExpression?) : IVarDecl + +data class ConstDecl(override val datatype: DataType, + override val arrayspec: ArraySpec?, + override val name: String, + override val value: IExpression) : IVarDecl + +data class MemoryVarDecl(override val datatype: DataType, + override val arrayspec: ArraySpec?, + override val name: String, + override val value: IExpression) : IVarDecl + +data class Assignment(val target: AssignTarget, val aug_op : String?, val value: IExpression) : IStatement + +data class AssignTarget(val register: Register?, val singlename: String?, val dottedname: String?) : Node + + +interface IExpression: Node + +data class UnaryExpression(val operator: String, val expression: IExpression) : IExpression + +data class BinaryExpression(val left: IExpression, val operator: String, val right: IExpression) : IExpression + +data class LiteralValue(val intvalue: Int?, + val floatvalue: Double?, + val strvalue: String?, + val boolvalue: Boolean?, + val arrayvalue: List?) : IExpression + +data class RegisterExpr(val register: Register) : IExpression + +data class DottedNameExpr(val dottedname: String) : IExpression + +data class SingleNameExpr(val name: String) : IExpression + + + +fun il65Parser.ModuleContext.toAst() = Module(this.statement().map { it.toAst() }) + +fun il65Parser.StatementContext.toAst() : IStatement { + val directive = this.directive()?.toAst() + if(directive!=null) return directive + + val vardecl = this.vardecl() + if(vardecl!=null) { + return VarDecl(vardecl.datatype().toAst(), + vardecl.arrayspec()?.toAst(), + vardecl.singlename().text, + null) + } + + val constdecl = this.constdecl() + if(constdecl!=null) { + val varinit = constdecl.varinitializer() + return ConstDecl(varinit.datatype().toAst(), + varinit.arrayspec()?.toAst(), + varinit.singlename().text, + varinit.expression().toAst()) + } + + val memdecl = this.memoryvardecl() + if(memdecl!=null) { + val varinit = memdecl.varinitializer() + return MemoryVarDecl(varinit.datatype().toAst(), + varinit.arrayspec()?.toAst(), + varinit.singlename().text, + varinit.expression().toAst()) + } + + val assign = this.assignment() + if (assign!=null) { + return Assignment(assign.assign_target().toAst(), null, assign.expression().toAst()) + } + + val augassign = this.augassignment() + if (augassign!=null) { + return Assignment( + augassign.assign_target().toAst(), + augassign.children[1].text, + augassign.expression().toAst()) + } + + throw UnsupportedOperationException(this.text) +} + +fun il65Parser.Assign_targetContext.toAst() = + AssignTarget(this.register()?.toAst(), this.singlename()?.text, this.dottedname()?.text) + +fun il65Parser.RegisterContext.toAst() = Register.valueOf(this.text) + +fun il65Parser.DatatypeContext.toAst() = DataType.valueOf(this.text) + +fun il65Parser.ArrayspecContext.toAst() = ArraySpec( + this.expression(0).toAst(), + if (this.expression().size > 1) this.expression(1).toAst() else null +) + + +fun il65Parser.DirectiveContext.toAst() = Directive(this.singlename().text, this.directivearg().map { it.toAst() }) + +fun il65Parser.DirectiveargContext.toAst() = DirectiveArg(this.singlename()?.text, this.integerliteral()?.toAst()) + +fun il65Parser.IntegerliteralContext.toAst(): Int { + val terminal: TerminalNode = this.children[0] as TerminalNode + return when (terminal.symbol.type) { + il65Parser.DEC_INTEGER -> this.text.toInt() + il65Parser.HEX_INTEGER -> this.text.toInt(16) + il65Parser.BIN_INTEGER -> this.text.toInt(2) + else -> throw UnsupportedOperationException(this.text) + } +} + +fun il65Parser.ExpressionContext.toAst() : IExpression { + + if(this.singlename()!=null) { + return SingleNameExpr(this.singlename().text) + } + + val litval = this.literalvalue() + if(litval!=null) { + return LiteralValue(litval.integerliteral()?.toAst(), + litval.floatliteral()?.toAst(), + litval.stringliteral()?.text, + litval.booleanliteral()?.toAst(), + litval.arrayliteral()?.toAst() + ) + } + + if(this.dottedname()!=null) { + return DottedNameExpr(this.dottedname().text) + } + + if(this.register()!=null) { + return RegisterExpr(this.register().toAst()) + } + + if(this.unary_expression()!=null) { + return UnaryExpression(this.unary_expression().children[0].text, this.unary_expression().expression().toAst()) + } + + if(this.expression().size == 2) { + return BinaryExpression(this.expression(0).toAst(), this.text, this.expression(1).toAst()) + } + + // (....) + if(this.childCount == 3 && this.children[0].text=="(" && this.children[2].text==")") { + return this.expression(0).toAst() + } + + throw UnsupportedOperationException(this.text) +} + +fun il65Parser.FloatliteralContext.toAst() = this.text.toDouble() + +fun il65Parser.BooleanliteralContext.toAst() = when(this.text) { + "true" -> true + "false" -> false + else -> throw UnsupportedOperationException(this.text) +} + +fun il65Parser.ArrayliteralContext.toAst() = this.expression().map { it.toAst() } + diff --git a/il65/src/il65/parser/il65.tokens b/il65/src/il65/parser/il65.tokens new file mode 100644 index 000000000..3a2bba1d1 --- /dev/null +++ b/il65/src/il65/parser/il65.tokens @@ -0,0 +1,139 @@ +T__0=1 +T__1=2 +T__2=3 +T__3=4 +T__4=5 +T__5=6 +T__6=7 +T__7=8 +T__8=9 +T__9=10 +T__10=11 +T__11=12 +T__12=13 +T__13=14 +T__14=15 +T__15=16 +T__16=17 +T__17=18 +T__18=19 +T__19=20 +T__20=21 +T__21=22 +T__22=23 +T__23=24 +T__24=25 +T__25=26 +T__26=27 +T__27=28 +T__28=29 +T__29=30 +T__30=31 +T__31=32 +T__32=33 +T__33=34 +T__34=35 +T__35=36 +T__36=37 +T__37=38 +T__38=39 +T__39=40 +T__40=41 +T__41=42 +T__42=43 +T__43=44 +T__44=45 +T__45=46 +T__46=47 +T__47=48 +T__48=49 +T__49=50 +T__50=51 +T__51=52 +T__52=53 +T__53=54 +T__54=55 +T__55=56 +T__56=57 +T__57=58 +T__58=59 +T__59=60 +T__60=61 +T__61=62 +T__62=63 +T__63=64 +T__64=65 +COMMENT=66 +WS=67 +EOL=68 +NAME=69 +DEC_INTEGER=70 +HEX_INTEGER=71 +BIN_INTEGER=72 +FLOAT_NUMBER=73 +STRING=74 +'%'=1 +','=2 +'='=3 +'const'=4 +'memory'=5 +'byte'=6 +'word'=7 +'float'=8 +'str'=9 +'str_p'=10 +'str_s'=11 +'str_ps'=12 +'['=13 +']'=14 +'+='=15 +'-='=16 +'/='=17 +'//='=18 +'*='=19 +'**='=20 +'<<='=21 +'>>='=22 +'<<@='=23 +'>>@='=24 +'&='=25 +'|='=26 +'^='=27 +'('=28 +')'=29 +'**'=30 +'*'=31 +'/'=32 +'//'=33 +'+'=34 +'-'=35 +'<<'=36 +'>>'=37 +'<<@'=38 +'>>@'=39 +'&'=40 +'|'=41 +'^'=42 +'and'=43 +'or'=44 +'xor'=45 +'=='=46 +'!='=47 +'<'=48 +'>'=49 +'<='=50 +'>='=51 +'~'=52 +'not'=53 +'.'=54 +'A'=55 +'X'=56 +'Y'=57 +'AX'=58 +'AY'=59 +'XY'=60 +'SC'=61 +'SI'=62 +'SZ'=63 +'true'=64 +'false'=65 diff --git a/il65/src/il65/parser/il65Lexer.java b/il65/src/il65/parser/il65Lexer.java new file mode 100644 index 000000000..5502c613a --- /dev/null +++ b/il65/src/il65/parser/il65Lexer.java @@ -0,0 +1,308 @@ +// Generated from /home/irmen/Projects/IL65/il65/antlr/il65.g4 by ANTLR 4.7 +package il65.parser; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class il65Lexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.7", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, + T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17, + T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, + T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31, + T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38, + T__38=39, T__39=40, T__40=41, T__41=42, T__42=43, T__43=44, T__44=45, + T__45=46, T__46=47, T__47=48, T__48=49, T__49=50, T__50=51, T__51=52, + T__52=53, T__53=54, T__54=55, T__55=56, T__56=57, T__57=58, T__58=59, + T__59=60, T__60=61, T__61=62, T__62=63, T__63=64, T__64=65, COMMENT=66, + WS=67, EOL=68, NAME=69, DEC_INTEGER=70, HEX_INTEGER=71, BIN_INTEGER=72, + FLOAT_NUMBER=73, STRING=74; + public static String[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] ruleNames = { + "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", + "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", + "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", + "T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32", + "T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40", + "T__41", "T__42", "T__43", "T__44", "T__45", "T__46", "T__47", "T__48", + "T__49", "T__50", "T__51", "T__52", "T__53", "T__54", "T__55", "T__56", + "T__57", "T__58", "T__59", "T__60", "T__61", "T__62", "T__63", "T__64", + "COMMENT", "WS", "EOL", "NAME", "DEC_INTEGER", "HEX_INTEGER", "BIN_INTEGER", + "FLOAT_NUMBER", "FNUMBER", "STRING_ESCAPE_SEQ", "STRING" + }; + + private static final String[] _LITERAL_NAMES = { + null, "'%'", "','", "'='", "'const'", "'memory'", "'byte'", "'word'", + "'float'", "'str'", "'str_p'", "'str_s'", "'str_ps'", "'['", "']'", "'+='", + "'-='", "'/='", "'//='", "'*='", "'**='", "'<<='", "'>>='", "'<<@='", + "'>>@='", "'&='", "'|='", "'^='", "'('", "')'", "'**'", "'*'", "'/'", + "'//'", "'+'", "'-'", "'<<'", "'>>'", "'<<@'", "'>>@'", "'&'", "'|'", + "'^'", "'and'", "'or'", "'xor'", "'=='", "'!='", "'<'", "'>'", "'<='", + "'>='", "'~'", "'not'", "'.'", "'A'", "'X'", "'Y'", "'AX'", "'AY'", "'XY'", + "'SC'", "'SI'", "'SZ'", "'true'", "'false'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, "COMMENT", "WS", "EOL", "NAME", "DEC_INTEGER", + "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", "STRING" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public il65Lexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "il65.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getChannelNames() { return channelNames; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + @Override + public void action(RuleContext _localctx, int ruleIndex, int actionIndex) { + switch (ruleIndex) { + case 75: + STRING_action((RuleContext)_localctx, actionIndex); + break; + } + } + private void STRING_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 0: + + // get rid of the enclosing quotes + String s = getText(); + setText(s.substring(1, s.length() - 1)); + + break; + } + } + + public static final String _serializedATN = + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2L\u01ca\b\1\4\2\t"+ + "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ + "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\5\3\5\3"+ + "\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b"+ + "\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13"+ + "\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3"+ + "\17\3\17\3\20\3\20\3\20\3\21\3\21\3\21\3\22\3\22\3\22\3\23\3\23\3\23\3"+ + "\23\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\27\3\27\3"+ + "\27\3\27\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\31\3\32\3\32\3"+ + "\32\3\33\3\33\3\33\3\34\3\34\3\34\3\35\3\35\3\36\3\36\3\37\3\37\3\37\3"+ + " \3 \3!\3!\3\"\3\"\3\"\3#\3#\3$\3$\3%\3%\3%\3&\3&\3&\3\'\3\'\3\'\3\'\3"+ + "(\3(\3(\3(\3)\3)\3*\3*\3+\3+\3,\3,\3,\3,\3-\3-\3-\3.\3.\3.\3.\3/\3/\3"+ + "/\3\60\3\60\3\60\3\61\3\61\3\62\3\62\3\63\3\63\3\63\3\64\3\64\3\64\3\65"+ + "\3\65\3\66\3\66\3\66\3\66\3\67\3\67\38\38\39\39\3:\3:\3;\3;\3;\3<\3<\3"+ + "<\3=\3=\3=\3>\3>\3>\3?\3?\3?\3@\3@\3@\3A\3A\3A\3A\3A\3B\3B\3B\3B\3B\3"+ + "B\3C\3C\7C\u0177\nC\fC\16C\u017a\13C\3C\3C\3D\3D\3D\3D\3E\6E\u0183\nE"+ + "\rE\16E\u0184\3E\3E\3F\3F\7F\u018b\nF\fF\16F\u018e\13F\3G\3G\3G\6G\u0193"+ + "\nG\rG\16G\u0194\5G\u0197\nG\3H\3H\6H\u019b\nH\rH\16H\u019c\3I\3I\6I\u01a1"+ + "\nI\rI\16I\u01a2\3J\3J\3J\5J\u01a8\nJ\3J\5J\u01ab\nJ\3K\6K\u01ae\nK\r"+ + "K\16K\u01af\3K\3K\6K\u01b4\nK\rK\16K\u01b5\5K\u01b8\nK\3L\3L\3L\3L\5L"+ + "\u01be\nL\3M\3M\3M\7M\u01c3\nM\fM\16M\u01c6\13M\3M\3M\3M\2\2N\3\3\5\4"+ + "\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22"+ + "#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C"+ + "#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u{?}@\177A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG\u008dH\u008fI\u0091"+ + "J\u0093K\u0095\2\u0097\2\u0099L\3\2\n\4\2\f\f\17\17\4\2\13\13\"\"\5\2"+ + "C\\aac|\6\2\62;C\\aac|\5\2\62;CHch\4\2GGgg\4\2--//\6\2\f\f\16\17$$^^\2"+ + "\u01d6\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2"+ + "\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3"+ + "\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2"+ + "\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2"+ + "/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2"+ + "\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2"+ + "G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3"+ + "\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2"+ + "\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2"+ + "m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3"+ + "\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081\3\2\2\2\2\u0083\3\2"+ + "\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2\2\2\u008b\3\2\2\2\2"+ + "\u008d\3\2\2\2\2\u008f\3\2\2\2\2\u0091\3\2\2\2\2\u0093\3\2\2\2\2\u0099"+ + "\3\2\2\2\3\u009b\3\2\2\2\5\u009d\3\2\2\2\7\u009f\3\2\2\2\t\u00a1\3\2\2"+ + "\2\13\u00a7\3\2\2\2\r\u00ae\3\2\2\2\17\u00b3\3\2\2\2\21\u00b8\3\2\2\2"+ + "\23\u00be\3\2\2\2\25\u00c2\3\2\2\2\27\u00c8\3\2\2\2\31\u00ce\3\2\2\2\33"+ + "\u00d5\3\2\2\2\35\u00d7\3\2\2\2\37\u00d9\3\2\2\2!\u00dc\3\2\2\2#\u00df"+ + "\3\2\2\2%\u00e2\3\2\2\2\'\u00e6\3\2\2\2)\u00e9\3\2\2\2+\u00ed\3\2\2\2"+ + "-\u00f1\3\2\2\2/\u00f5\3\2\2\2\61\u00fa\3\2\2\2\63\u00ff\3\2\2\2\65\u0102"+ + "\3\2\2\2\67\u0105\3\2\2\29\u0108\3\2\2\2;\u010a\3\2\2\2=\u010c\3\2\2\2"+ + "?\u010f\3\2\2\2A\u0111\3\2\2\2C\u0113\3\2\2\2E\u0116\3\2\2\2G\u0118\3"+ + "\2\2\2I\u011a\3\2\2\2K\u011d\3\2\2\2M\u0120\3\2\2\2O\u0124\3\2\2\2Q\u0128"+ + "\3\2\2\2S\u012a\3\2\2\2U\u012c\3\2\2\2W\u012e\3\2\2\2Y\u0132\3\2\2\2["+ + "\u0135\3\2\2\2]\u0139\3\2\2\2_\u013c\3\2\2\2a\u013f\3\2\2\2c\u0141\3\2"+ + "\2\2e\u0143\3\2\2\2g\u0146\3\2\2\2i\u0149\3\2\2\2k\u014b\3\2\2\2m\u014f"+ + "\3\2\2\2o\u0151\3\2\2\2q\u0153\3\2\2\2s\u0155\3\2\2\2u\u0157\3\2\2\2w"+ + "\u015a\3\2\2\2y\u015d\3\2\2\2{\u0160\3\2\2\2}\u0163\3\2\2\2\177\u0166"+ + "\3\2\2\2\u0081\u0169\3\2\2\2\u0083\u016e\3\2\2\2\u0085\u0174\3\2\2\2\u0087"+ + "\u017d\3\2\2\2\u0089\u0182\3\2\2\2\u008b\u0188\3\2\2\2\u008d\u0196\3\2"+ + "\2\2\u008f\u0198\3\2\2\2\u0091\u019e\3\2\2\2\u0093\u01a4\3\2\2\2\u0095"+ + "\u01ad\3\2\2\2\u0097\u01bd\3\2\2\2\u0099\u01bf\3\2\2\2\u009b\u009c\7\'"+ + "\2\2\u009c\4\3\2\2\2\u009d\u009e\7.\2\2\u009e\6\3\2\2\2\u009f\u00a0\7"+ + "?\2\2\u00a0\b\3\2\2\2\u00a1\u00a2\7e\2\2\u00a2\u00a3\7q\2\2\u00a3\u00a4"+ + "\7p\2\2\u00a4\u00a5\7u\2\2\u00a5\u00a6\7v\2\2\u00a6\n\3\2\2\2\u00a7\u00a8"+ + "\7o\2\2\u00a8\u00a9\7g\2\2\u00a9\u00aa\7o\2\2\u00aa\u00ab\7q\2\2\u00ab"+ + "\u00ac\7t\2\2\u00ac\u00ad\7{\2\2\u00ad\f\3\2\2\2\u00ae\u00af\7d\2\2\u00af"+ + "\u00b0\7{\2\2\u00b0\u00b1\7v\2\2\u00b1\u00b2\7g\2\2\u00b2\16\3\2\2\2\u00b3"+ + "\u00b4\7y\2\2\u00b4\u00b5\7q\2\2\u00b5\u00b6\7t\2\2\u00b6\u00b7\7f\2\2"+ + "\u00b7\20\3\2\2\2\u00b8\u00b9\7h\2\2\u00b9\u00ba\7n\2\2\u00ba\u00bb\7"+ + "q\2\2\u00bb\u00bc\7c\2\2\u00bc\u00bd\7v\2\2\u00bd\22\3\2\2\2\u00be\u00bf"+ + "\7u\2\2\u00bf\u00c0\7v\2\2\u00c0\u00c1\7t\2\2\u00c1\24\3\2\2\2\u00c2\u00c3"+ + "\7u\2\2\u00c3\u00c4\7v\2\2\u00c4\u00c5\7t\2\2\u00c5\u00c6\7a\2\2\u00c6"+ + "\u00c7\7r\2\2\u00c7\26\3\2\2\2\u00c8\u00c9\7u\2\2\u00c9\u00ca\7v\2\2\u00ca"+ + "\u00cb\7t\2\2\u00cb\u00cc\7a\2\2\u00cc\u00cd\7u\2\2\u00cd\30\3\2\2\2\u00ce"+ + "\u00cf\7u\2\2\u00cf\u00d0\7v\2\2\u00d0\u00d1\7t\2\2\u00d1\u00d2\7a\2\2"+ + "\u00d2\u00d3\7r\2\2\u00d3\u00d4\7u\2\2\u00d4\32\3\2\2\2\u00d5\u00d6\7"+ + "]\2\2\u00d6\34\3\2\2\2\u00d7\u00d8\7_\2\2\u00d8\36\3\2\2\2\u00d9\u00da"+ + "\7-\2\2\u00da\u00db\7?\2\2\u00db \3\2\2\2\u00dc\u00dd\7/\2\2\u00dd\u00de"+ + "\7?\2\2\u00de\"\3\2\2\2\u00df\u00e0\7\61\2\2\u00e0\u00e1\7?\2\2\u00e1"+ + "$\3\2\2\2\u00e2\u00e3\7\61\2\2\u00e3\u00e4\7\61\2\2\u00e4\u00e5\7?\2\2"+ + "\u00e5&\3\2\2\2\u00e6\u00e7\7,\2\2\u00e7\u00e8\7?\2\2\u00e8(\3\2\2\2\u00e9"+ + "\u00ea\7,\2\2\u00ea\u00eb\7,\2\2\u00eb\u00ec\7?\2\2\u00ec*\3\2\2\2\u00ed"+ + "\u00ee\7>\2\2\u00ee\u00ef\7>\2\2\u00ef\u00f0\7?\2\2\u00f0,\3\2\2\2\u00f1"+ + "\u00f2\7@\2\2\u00f2\u00f3\7@\2\2\u00f3\u00f4\7?\2\2\u00f4.\3\2\2\2\u00f5"+ + "\u00f6\7>\2\2\u00f6\u00f7\7>\2\2\u00f7\u00f8\7B\2\2\u00f8\u00f9\7?\2\2"+ + "\u00f9\60\3\2\2\2\u00fa\u00fb\7@\2\2\u00fb\u00fc\7@\2\2\u00fc\u00fd\7"+ + "B\2\2\u00fd\u00fe\7?\2\2\u00fe\62\3\2\2\2\u00ff\u0100\7(\2\2\u0100\u0101"+ + "\7?\2\2\u0101\64\3\2\2\2\u0102\u0103\7~\2\2\u0103\u0104\7?\2\2\u0104\66"+ + "\3\2\2\2\u0105\u0106\7`\2\2\u0106\u0107\7?\2\2\u01078\3\2\2\2\u0108\u0109"+ + "\7*\2\2\u0109:\3\2\2\2\u010a\u010b\7+\2\2\u010b<\3\2\2\2\u010c\u010d\7"+ + ",\2\2\u010d\u010e\7,\2\2\u010e>\3\2\2\2\u010f\u0110\7,\2\2\u0110@\3\2"+ + "\2\2\u0111\u0112\7\61\2\2\u0112B\3\2\2\2\u0113\u0114\7\61\2\2\u0114\u0115"+ + "\7\61\2\2\u0115D\3\2\2\2\u0116\u0117\7-\2\2\u0117F\3\2\2\2\u0118\u0119"+ + "\7/\2\2\u0119H\3\2\2\2\u011a\u011b\7>\2\2\u011b\u011c\7>\2\2\u011cJ\3"+ + "\2\2\2\u011d\u011e\7@\2\2\u011e\u011f\7@\2\2\u011fL\3\2\2\2\u0120\u0121"+ + "\7>\2\2\u0121\u0122\7>\2\2\u0122\u0123\7B\2\2\u0123N\3\2\2\2\u0124\u0125"+ + "\7@\2\2\u0125\u0126\7@\2\2\u0126\u0127\7B\2\2\u0127P\3\2\2\2\u0128\u0129"+ + "\7(\2\2\u0129R\3\2\2\2\u012a\u012b\7~\2\2\u012bT\3\2\2\2\u012c\u012d\7"+ + "`\2\2\u012dV\3\2\2\2\u012e\u012f\7c\2\2\u012f\u0130\7p\2\2\u0130\u0131"+ + "\7f\2\2\u0131X\3\2\2\2\u0132\u0133\7q\2\2\u0133\u0134\7t\2\2\u0134Z\3"+ + "\2\2\2\u0135\u0136\7z\2\2\u0136\u0137\7q\2\2\u0137\u0138\7t\2\2\u0138"+ + "\\\3\2\2\2\u0139\u013a\7?\2\2\u013a\u013b\7?\2\2\u013b^\3\2\2\2\u013c"+ + "\u013d\7#\2\2\u013d\u013e\7?\2\2\u013e`\3\2\2\2\u013f\u0140\7>\2\2\u0140"+ + "b\3\2\2\2\u0141\u0142\7@\2\2\u0142d\3\2\2\2\u0143\u0144\7>\2\2\u0144\u0145"+ + "\7?\2\2\u0145f\3\2\2\2\u0146\u0147\7@\2\2\u0147\u0148\7?\2\2\u0148h\3"+ + "\2\2\2\u0149\u014a\7\u0080\2\2\u014aj\3\2\2\2\u014b\u014c\7p\2\2\u014c"+ + "\u014d\7q\2\2\u014d\u014e\7v\2\2\u014el\3\2\2\2\u014f\u0150\7\60\2\2\u0150"+ + "n\3\2\2\2\u0151\u0152\7C\2\2\u0152p\3\2\2\2\u0153\u0154\7Z\2\2\u0154r"+ + "\3\2\2\2\u0155\u0156\7[\2\2\u0156t\3\2\2\2\u0157\u0158\7C\2\2\u0158\u0159"+ + "\7Z\2\2\u0159v\3\2\2\2\u015a\u015b\7C\2\2\u015b\u015c\7[\2\2\u015cx\3"+ + "\2\2\2\u015d\u015e\7Z\2\2\u015e\u015f\7[\2\2\u015fz\3\2\2\2\u0160\u0161"+ + "\7U\2\2\u0161\u0162\7E\2\2\u0162|\3\2\2\2\u0163\u0164\7U\2\2\u0164\u0165"+ + "\7K\2\2\u0165~\3\2\2\2\u0166\u0167\7U\2\2\u0167\u0168\7\\\2\2\u0168\u0080"+ + "\3\2\2\2\u0169\u016a\7v\2\2\u016a\u016b\7t\2\2\u016b\u016c\7w\2\2\u016c"+ + "\u016d\7g\2\2\u016d\u0082\3\2\2\2\u016e\u016f\7h\2\2\u016f\u0170\7c\2"+ + "\2\u0170\u0171\7n\2\2\u0171\u0172\7u\2\2\u0172\u0173\7g\2\2\u0173\u0084"+ + "\3\2\2\2\u0174\u0178\7=\2\2\u0175\u0177\n\2\2\2\u0176\u0175\3\2\2\2\u0177"+ + "\u017a\3\2\2\2\u0178\u0176\3\2\2\2\u0178\u0179\3\2\2\2\u0179\u017b\3\2"+ + "\2\2\u017a\u0178\3\2\2\2\u017b\u017c\bC\2\2\u017c\u0086\3\2\2\2\u017d"+ + "\u017e\t\3\2\2\u017e\u017f\3\2\2\2\u017f\u0180\bD\3\2\u0180\u0088\3\2"+ + "\2\2\u0181\u0183\t\2\2\2\u0182\u0181\3\2\2\2\u0183\u0184\3\2\2\2\u0184"+ + "\u0182\3\2\2\2\u0184\u0185\3\2\2\2\u0185\u0186\3\2\2\2\u0186\u0187\bE"+ + "\3\2\u0187\u008a\3\2\2\2\u0188\u018c\t\4\2\2\u0189\u018b\t\5\2\2\u018a"+ + "\u0189\3\2\2\2\u018b\u018e\3\2\2\2\u018c\u018a\3\2\2\2\u018c\u018d\3\2"+ + "\2\2\u018d\u008c\3\2\2\2\u018e\u018c\3\2\2\2\u018f\u0197\4\62;\2\u0190"+ + "\u0192\4\63;\2\u0191\u0193\4\62;\2\u0192\u0191\3\2\2\2\u0193\u0194\3\2"+ + "\2\2\u0194\u0192\3\2\2\2\u0194\u0195\3\2\2\2\u0195\u0197\3\2\2\2\u0196"+ + "\u018f\3\2\2\2\u0196\u0190\3\2\2\2\u0197\u008e\3\2\2\2\u0198\u019a\7&"+ + "\2\2\u0199\u019b\t\6\2\2\u019a\u0199\3\2\2\2\u019b\u019c\3\2\2\2\u019c"+ + "\u019a\3\2\2\2\u019c\u019d\3\2\2\2\u019d\u0090\3\2\2\2\u019e\u01a0\7\'"+ + "\2\2\u019f\u01a1\4\62\63\2\u01a0\u019f\3\2\2\2\u01a1\u01a2\3\2\2\2\u01a2"+ + "\u01a0\3\2\2\2\u01a2\u01a3\3\2\2\2\u01a3\u0092\3\2\2\2\u01a4\u01aa\5\u0095"+ + "K\2\u01a5\u01a7\t\7\2\2\u01a6\u01a8\t\b\2\2\u01a7\u01a6\3\2\2\2\u01a7"+ + "\u01a8\3\2\2\2\u01a8\u01a9\3\2\2\2\u01a9\u01ab\5\u0095K\2\u01aa\u01a5"+ + "\3\2\2\2\u01aa\u01ab\3\2\2\2\u01ab\u0094\3\2\2\2\u01ac\u01ae\4\62;\2\u01ad"+ + "\u01ac\3\2\2\2\u01ae\u01af\3\2\2\2\u01af\u01ad\3\2\2\2\u01af\u01b0\3\2"+ + "\2\2\u01b0\u01b7\3\2\2\2\u01b1\u01b3\7\60\2\2\u01b2\u01b4\4\62;\2\u01b3"+ + "\u01b2\3\2\2\2\u01b4\u01b5\3\2\2\2\u01b5\u01b3\3\2\2\2\u01b5\u01b6\3\2"+ + "\2\2\u01b6\u01b8\3\2\2\2\u01b7\u01b1\3\2\2\2\u01b7\u01b8\3\2\2\2\u01b8"+ + "\u0096\3\2\2\2\u01b9\u01ba\7^\2\2\u01ba\u01be\13\2\2\2\u01bb\u01bc\7^"+ + "\2\2\u01bc\u01be\5\u0089E\2\u01bd\u01b9\3\2\2\2\u01bd\u01bb\3\2\2\2\u01be"+ + "\u0098\3\2\2\2\u01bf\u01c4\7$\2\2\u01c0\u01c3\5\u0097L\2\u01c1\u01c3\n"+ + "\t\2\2\u01c2\u01c0\3\2\2\2\u01c2\u01c1\3\2\2\2\u01c3\u01c6\3\2\2\2\u01c4"+ + "\u01c2\3\2\2\2\u01c4\u01c5\3\2\2\2\u01c5\u01c7\3\2\2\2\u01c6\u01c4\3\2"+ + "\2\2\u01c7\u01c8\7$\2\2\u01c8\u01c9\bM\4\2\u01c9\u009a\3\2\2\2\23\2\u0178"+ + "\u0184\u018c\u0194\u0196\u019a\u019c\u01a2\u01a7\u01aa\u01af\u01b5\u01b7"+ + "\u01bd\u01c2\u01c4\5\2\3\2\b\2\2\3M\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/il65/src/il65/parser/il65Lexer.tokens b/il65/src/il65/parser/il65Lexer.tokens new file mode 100644 index 000000000..3a2bba1d1 --- /dev/null +++ b/il65/src/il65/parser/il65Lexer.tokens @@ -0,0 +1,139 @@ +T__0=1 +T__1=2 +T__2=3 +T__3=4 +T__4=5 +T__5=6 +T__6=7 +T__7=8 +T__8=9 +T__9=10 +T__10=11 +T__11=12 +T__12=13 +T__13=14 +T__14=15 +T__15=16 +T__16=17 +T__17=18 +T__18=19 +T__19=20 +T__20=21 +T__21=22 +T__22=23 +T__23=24 +T__24=25 +T__25=26 +T__26=27 +T__27=28 +T__28=29 +T__29=30 +T__30=31 +T__31=32 +T__32=33 +T__33=34 +T__34=35 +T__35=36 +T__36=37 +T__37=38 +T__38=39 +T__39=40 +T__40=41 +T__41=42 +T__42=43 +T__43=44 +T__44=45 +T__45=46 +T__46=47 +T__47=48 +T__48=49 +T__49=50 +T__50=51 +T__51=52 +T__52=53 +T__53=54 +T__54=55 +T__55=56 +T__56=57 +T__57=58 +T__58=59 +T__59=60 +T__60=61 +T__61=62 +T__62=63 +T__63=64 +T__64=65 +COMMENT=66 +WS=67 +EOL=68 +NAME=69 +DEC_INTEGER=70 +HEX_INTEGER=71 +BIN_INTEGER=72 +FLOAT_NUMBER=73 +STRING=74 +'%'=1 +','=2 +'='=3 +'const'=4 +'memory'=5 +'byte'=6 +'word'=7 +'float'=8 +'str'=9 +'str_p'=10 +'str_s'=11 +'str_ps'=12 +'['=13 +']'=14 +'+='=15 +'-='=16 +'/='=17 +'//='=18 +'*='=19 +'**='=20 +'<<='=21 +'>>='=22 +'<<@='=23 +'>>@='=24 +'&='=25 +'|='=26 +'^='=27 +'('=28 +')'=29 +'**'=30 +'*'=31 +'/'=32 +'//'=33 +'+'=34 +'-'=35 +'<<'=36 +'>>'=37 +'<<@'=38 +'>>@'=39 +'&'=40 +'|'=41 +'^'=42 +'and'=43 +'or'=44 +'xor'=45 +'=='=46 +'!='=47 +'<'=48 +'>'=49 +'<='=50 +'>='=51 +'~'=52 +'not'=53 +'.'=54 +'A'=55 +'X'=56 +'Y'=57 +'AX'=58 +'AY'=59 +'XY'=60 +'SC'=61 +'SI'=62 +'SZ'=63 +'true'=64 +'false'=65 diff --git a/il65/src/il65/parser/il65Parser.java b/il65/src/il65/parser/il65Parser.java new file mode 100644 index 000000000..03970f7ec --- /dev/null +++ b/il65/src/il65/parser/il65Parser.java @@ -0,0 +1,1591 @@ +// Generated from /home/irmen/Projects/IL65/il65/antlr/il65.g4 by ANTLR 4.7 +package il65.parser; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class il65Parser extends Parser { + static { RuntimeMetaData.checkVersion("4.7", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, + T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17, + T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, + T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31, + T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38, + T__38=39, T__39=40, T__40=41, T__41=42, T__42=43, T__43=44, T__44=45, + T__45=46, T__46=47, T__47=48, T__48=49, T__49=50, T__50=51, T__51=52, + T__52=53, T__53=54, T__54=55, T__55=56, T__56=57, T__57=58, T__58=59, + T__59=60, T__60=61, T__61=62, T__62=63, T__63=64, T__64=65, COMMENT=66, + WS=67, EOL=68, NAME=69, DEC_INTEGER=70, HEX_INTEGER=71, BIN_INTEGER=72, + FLOAT_NUMBER=73, STRING=74; + public static final int + RULE_module = 0, RULE_statement = 1, RULE_directive = 2, RULE_directivearg = 3, + RULE_vardecl = 4, RULE_varinitializer = 5, RULE_constdecl = 6, RULE_memoryvardecl = 7, + RULE_datatype = 8, RULE_arrayspec = 9, RULE_assignment = 10, RULE_augassignment = 11, + RULE_assign_target = 12, RULE_expression = 13, RULE_unary_expression = 14, + RULE_singlename = 15, RULE_dottedname = 16, RULE_register = 17, RULE_integerliteral = 18, + RULE_booleanliteral = 19, RULE_arrayliteral = 20, RULE_stringliteral = 21, + RULE_floatliteral = 22, RULE_literalvalue = 23; + public static final String[] ruleNames = { + "module", "statement", "directive", "directivearg", "vardecl", "varinitializer", + "constdecl", "memoryvardecl", "datatype", "arrayspec", "assignment", "augassignment", + "assign_target", "expression", "unary_expression", "singlename", "dottedname", + "register", "integerliteral", "booleanliteral", "arrayliteral", "stringliteral", + "floatliteral", "literalvalue" + }; + + private static final String[] _LITERAL_NAMES = { + null, "'%'", "','", "'='", "'const'", "'memory'", "'byte'", "'word'", + "'float'", "'str'", "'str_p'", "'str_s'", "'str_ps'", "'['", "']'", "'+='", + "'-='", "'/='", "'//='", "'*='", "'**='", "'<<='", "'>>='", "'<<@='", + "'>>@='", "'&='", "'|='", "'^='", "'('", "')'", "'**'", "'*'", "'/'", + "'//'", "'+'", "'-'", "'<<'", "'>>'", "'<<@'", "'>>@'", "'&'", "'|'", + "'^'", "'and'", "'or'", "'xor'", "'=='", "'!='", "'<'", "'>'", "'<='", + "'>='", "'~'", "'not'", "'.'", "'A'", "'X'", "'Y'", "'AX'", "'AY'", "'XY'", + "'SC'", "'SI'", "'SZ'", "'true'", "'false'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, "COMMENT", "WS", "EOL", "NAME", "DEC_INTEGER", + "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", "STRING" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "il65.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public il65Parser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class ModuleContext extends ParserRuleContext { + public TerminalNode EOF() { return getToken(il65Parser.EOF, 0); } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public ModuleContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_module; } + } + + public final ModuleContext module() throws RecognitionException { + ModuleContext _localctx = new ModuleContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_module); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(51); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__3) | (1L << T__4) | (1L << T__5) | (1L << T__6) | (1L << T__7) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__54) | (1L << T__55) | (1L << T__56) | (1L << T__57) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || _la==NAME) { + { + { + setState(48); + statement(); + } + } + setState(53); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(54); + match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementContext extends ParserRuleContext { + public DirectiveContext directive() { + return getRuleContext(DirectiveContext.class,0); + } + public ConstdeclContext constdecl() { + return getRuleContext(ConstdeclContext.class,0); + } + public MemoryvardeclContext memoryvardecl() { + return getRuleContext(MemoryvardeclContext.class,0); + } + public VardeclContext vardecl() { + return getRuleContext(VardeclContext.class,0); + } + public VarinitializerContext varinitializer() { + return getRuleContext(VarinitializerContext.class,0); + } + public AssignmentContext assignment() { + return getRuleContext(AssignmentContext.class,0); + } + public AugassignmentContext augassignment() { + return getRuleContext(AugassignmentContext.class,0); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_statement); + try { + setState(63); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(56); + directive(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(57); + constdecl(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(58); + memoryvardecl(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(59); + vardecl(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(60); + varinitializer(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(61); + assignment(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(62); + augassignment(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DirectiveContext extends ParserRuleContext { + public SinglenameContext singlename() { + return getRuleContext(SinglenameContext.class,0); + } + public List directivearg() { + return getRuleContexts(DirectiveargContext.class); + } + public DirectiveargContext directivearg(int i) { + return getRuleContext(DirectiveargContext.class,i); + } + public DirectiveContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_directive; } + } + + public final DirectiveContext directive() throws RecognitionException { + DirectiveContext _localctx = new DirectiveContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_directive); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(65); + match(T__0); + setState(66); + singlename(); + setState(78); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) { + case 1: + { + setState(68); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) { + case 1: + { + setState(67); + directivearg(); + } + break; + } + } + break; + case 2: + { + setState(70); + directivearg(); + setState(75); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__1) { + { + { + setState(71); + match(T__1); + setState(72); + directivearg(); + } + } + setState(77); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DirectiveargContext extends ParserRuleContext { + public SinglenameContext singlename() { + return getRuleContext(SinglenameContext.class,0); + } + public IntegerliteralContext integerliteral() { + return getRuleContext(IntegerliteralContext.class,0); + } + public DirectiveargContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_directivearg; } + } + + public final DirectiveargContext directivearg() throws RecognitionException { + DirectiveargContext _localctx = new DirectiveargContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_directivearg); + try { + setState(82); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NAME: + enterOuterAlt(_localctx, 1); + { + setState(80); + singlename(); + } + break; + case DEC_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + enterOuterAlt(_localctx, 2); + { + setState(81); + integerliteral(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VardeclContext extends ParserRuleContext { + public DatatypeContext datatype() { + return getRuleContext(DatatypeContext.class,0); + } + public SinglenameContext singlename() { + return getRuleContext(SinglenameContext.class,0); + } + public ArrayspecContext arrayspec() { + return getRuleContext(ArrayspecContext.class,0); + } + public VardeclContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_vardecl; } + } + + public final VardeclContext vardecl() throws RecognitionException { + VardeclContext _localctx = new VardeclContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_vardecl); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(84); + datatype(); + setState(86); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==T__12) { + { + setState(85); + arrayspec(); + } + } + + setState(88); + singlename(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VarinitializerContext extends ParserRuleContext { + public DatatypeContext datatype() { + return getRuleContext(DatatypeContext.class,0); + } + public SinglenameContext singlename() { + return getRuleContext(SinglenameContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ArrayspecContext arrayspec() { + return getRuleContext(ArrayspecContext.class,0); + } + public VarinitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_varinitializer; } + } + + public final VarinitializerContext varinitializer() throws RecognitionException { + VarinitializerContext _localctx = new VarinitializerContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_varinitializer); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(90); + datatype(); + setState(92); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==T__12) { + { + setState(91); + arrayspec(); + } + } + + setState(94); + singlename(); + setState(95); + match(T__2); + setState(96); + expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstdeclContext extends ParserRuleContext { + public VarinitializerContext varinitializer() { + return getRuleContext(VarinitializerContext.class,0); + } + public ConstdeclContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constdecl; } + } + + public final ConstdeclContext constdecl() throws RecognitionException { + ConstdeclContext _localctx = new ConstdeclContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_constdecl); + try { + enterOuterAlt(_localctx, 1); + { + setState(98); + match(T__3); + setState(99); + varinitializer(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MemoryvardeclContext extends ParserRuleContext { + public VarinitializerContext varinitializer() { + return getRuleContext(VarinitializerContext.class,0); + } + public MemoryvardeclContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_memoryvardecl; } + } + + public final MemoryvardeclContext memoryvardecl() throws RecognitionException { + MemoryvardeclContext _localctx = new MemoryvardeclContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_memoryvardecl); + try { + enterOuterAlt(_localctx, 1); + { + setState(101); + match(T__4); + setState(102); + varinitializer(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DatatypeContext extends ParserRuleContext { + public DatatypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_datatype; } + } + + public final DatatypeContext datatype() throws RecognitionException { + DatatypeContext _localctx = new DatatypeContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_datatype); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(104); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__6) | (1L << T__7) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayspecContext extends ParserRuleContext { + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public ArrayspecContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayspec; } + } + + public final ArrayspecContext arrayspec() throws RecognitionException { + ArrayspecContext _localctx = new ArrayspecContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_arrayspec); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(106); + match(T__12); + setState(107); + expression(0); + setState(110); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(108); + match(T__1); + setState(109); + expression(0); + } + } + + setState(112); + match(T__13); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AssignmentContext extends ParserRuleContext { + public Assign_targetContext assign_target() { + return getRuleContext(Assign_targetContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public AssignmentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assignment; } + } + + public final AssignmentContext assignment() throws RecognitionException { + AssignmentContext _localctx = new AssignmentContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_assignment); + try { + enterOuterAlt(_localctx, 1); + { + setState(114); + assign_target(); + setState(115); + match(T__2); + setState(116); + expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AugassignmentContext extends ParserRuleContext { + public Assign_targetContext assign_target() { + return getRuleContext(Assign_targetContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public AugassignmentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_augassignment; } + } + + public final AugassignmentContext augassignment() throws RecognitionException { + AugassignmentContext _localctx = new AugassignmentContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_augassignment); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(118); + assign_target(); + setState(119); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__14) | (1L << T__15) | (1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25) | (1L << T__26))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(120); + expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Assign_targetContext extends ParserRuleContext { + public RegisterContext register() { + return getRuleContext(RegisterContext.class,0); + } + public SinglenameContext singlename() { + return getRuleContext(SinglenameContext.class,0); + } + public DottednameContext dottedname() { + return getRuleContext(DottednameContext.class,0); + } + public Assign_targetContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assign_target; } + } + + public final Assign_targetContext assign_target() throws RecognitionException { + Assign_targetContext _localctx = new Assign_targetContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_assign_target); + try { + setState(125); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(122); + register(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(123); + singlename(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(124); + dottedname(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionContext extends ParserRuleContext { + public Unary_expressionContext unary_expression() { + return getRuleContext(Unary_expressionContext.class,0); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public LiteralvalueContext literalvalue() { + return getRuleContext(LiteralvalueContext.class,0); + } + public RegisterContext register() { + return getRuleContext(RegisterContext.class,0); + } + public DottednameContext dottedname() { + return getRuleContext(DottednameContext.class,0); + } + public SinglenameContext singlename() { + return getRuleContext(SinglenameContext.class,0); + } + public ExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expression; } + } + + public final ExpressionContext expression() throws RecognitionException { + return expression(0); + } + + private ExpressionContext expression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); + ExpressionContext _prevctx = _localctx; + int _startState = 26; + enterRecursionRule(_localctx, 26, RULE_expression, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(137); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { + case 1: + { + setState(128); + unary_expression(); + } + break; + case 2: + { + setState(129); + match(T__27); + setState(130); + expression(0); + setState(131); + match(T__28); + } + break; + case 3: + { + setState(133); + literalvalue(); + } + break; + case 4: + { + setState(134); + register(); + } + break; + case 5: + { + setState(135); + dottedname(); + } + break; + case 6: + { + setState(136); + singlename(); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(159); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,12,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(157); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,11,_ctx) ) { + case 1: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(139); + if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); + setState(140); + match(T__29); + setState(141); + expression(11); + } + break; + case 2: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(142); + if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); + setState(143); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(144); + expression(10); + } + break; + case 3: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(145); + if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); + setState(146); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__33) | (1L << T__34))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(147); + expression(9); + } + break; + case 4: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(148); + if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); + setState(149); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__39) | (1L << T__40) | (1L << T__41))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(150); + expression(8); + } + break; + case 5: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(151); + if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(152); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__42) | (1L << T__43) | (1L << T__44))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(153); + expression(7); + } + break; + case 6: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(154); + if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(155); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__45) | (1L << T__46) | (1L << T__47) | (1L << T__48) | (1L << T__49) | (1L << T__50))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(156); + expression(6); + } + break; + } + } + } + setState(161); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,12,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class Unary_expressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public Unary_expressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_unary_expression; } + } + + public final Unary_expressionContext unary_expression() throws RecognitionException { + Unary_expressionContext _localctx = new Unary_expressionContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_unary_expression); + int _la; + try { + setState(168); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__51: + enterOuterAlt(_localctx, 1); + { + setState(162); + match(T__51); + setState(163); + expression(0); + } + break; + case T__33: + case T__34: + enterOuterAlt(_localctx, 2); + { + setState(164); + _la = _input.LA(1); + if ( !(_la==T__33 || _la==T__34) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(165); + expression(0); + } + break; + case T__52: + enterOuterAlt(_localctx, 3); + { + setState(166); + match(T__52); + setState(167); + expression(0); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SinglenameContext extends ParserRuleContext { + public TerminalNode NAME() { return getToken(il65Parser.NAME, 0); } + public SinglenameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_singlename; } + } + + public final SinglenameContext singlename() throws RecognitionException { + SinglenameContext _localctx = new SinglenameContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_singlename); + try { + enterOuterAlt(_localctx, 1); + { + setState(170); + match(NAME); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DottednameContext extends ParserRuleContext { + public List NAME() { return getTokens(il65Parser.NAME); } + public TerminalNode NAME(int i) { + return getToken(il65Parser.NAME, i); + } + public DottednameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_dottedname; } + } + + public final DottednameContext dottedname() throws RecognitionException { + DottednameContext _localctx = new DottednameContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_dottedname); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(172); + match(NAME); + setState(175); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(173); + match(T__53); + setState(174); + match(NAME); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(177); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,14,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RegisterContext extends ParserRuleContext { + public RegisterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_register; } + } + + public final RegisterContext register() throws RecognitionException { + RegisterContext _localctx = new RegisterContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_register); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(179); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__54) | (1L << T__55) | (1L << T__56) | (1L << T__57) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IntegerliteralContext extends ParserRuleContext { + public TerminalNode DEC_INTEGER() { return getToken(il65Parser.DEC_INTEGER, 0); } + public TerminalNode HEX_INTEGER() { return getToken(il65Parser.HEX_INTEGER, 0); } + public TerminalNode BIN_INTEGER() { return getToken(il65Parser.BIN_INTEGER, 0); } + public IntegerliteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_integerliteral; } + } + + public final IntegerliteralContext integerliteral() throws RecognitionException { + IntegerliteralContext _localctx = new IntegerliteralContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_integerliteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(181); + _la = _input.LA(1); + if ( !(((((_la - 70)) & ~0x3f) == 0 && ((1L << (_la - 70)) & ((1L << (DEC_INTEGER - 70)) | (1L << (HEX_INTEGER - 70)) | (1L << (BIN_INTEGER - 70)))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BooleanliteralContext extends ParserRuleContext { + public BooleanliteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_booleanliteral; } + } + + public final BooleanliteralContext booleanliteral() throws RecognitionException { + BooleanliteralContext _localctx = new BooleanliteralContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_booleanliteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(183); + _la = _input.LA(1); + if ( !(_la==T__63 || _la==T__64) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayliteralContext extends ParserRuleContext { + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public ArrayliteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayliteral; } + } + + public final ArrayliteralContext arrayliteral() throws RecognitionException { + ArrayliteralContext _localctx = new ArrayliteralContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_arrayliteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(185); + match(T__12); + setState(186); + expression(0); + setState(191); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__1) { + { + { + setState(187); + match(T__1); + setState(188); + expression(0); + } + } + setState(193); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(194); + match(T__13); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StringliteralContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(il65Parser.STRING, 0); } + public StringliteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_stringliteral; } + } + + public final StringliteralContext stringliteral() throws RecognitionException { + StringliteralContext _localctx = new StringliteralContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_stringliteral); + try { + enterOuterAlt(_localctx, 1); + { + setState(196); + match(STRING); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FloatliteralContext extends ParserRuleContext { + public TerminalNode FLOAT_NUMBER() { return getToken(il65Parser.FLOAT_NUMBER, 0); } + public FloatliteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_floatliteral; } + } + + public final FloatliteralContext floatliteral() throws RecognitionException { + FloatliteralContext _localctx = new FloatliteralContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_floatliteral); + try { + enterOuterAlt(_localctx, 1); + { + setState(198); + match(FLOAT_NUMBER); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LiteralvalueContext extends ParserRuleContext { + public IntegerliteralContext integerliteral() { + return getRuleContext(IntegerliteralContext.class,0); + } + public BooleanliteralContext booleanliteral() { + return getRuleContext(BooleanliteralContext.class,0); + } + public ArrayliteralContext arrayliteral() { + return getRuleContext(ArrayliteralContext.class,0); + } + public StringliteralContext stringliteral() { + return getRuleContext(StringliteralContext.class,0); + } + public FloatliteralContext floatliteral() { + return getRuleContext(FloatliteralContext.class,0); + } + public LiteralvalueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_literalvalue; } + } + + public final LiteralvalueContext literalvalue() throws RecognitionException { + LiteralvalueContext _localctx = new LiteralvalueContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_literalvalue); + try { + setState(205); + _errHandler.sync(this); + switch (_input.LA(1)) { + case DEC_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + enterOuterAlt(_localctx, 1); + { + setState(200); + integerliteral(); + } + break; + case T__63: + case T__64: + enterOuterAlt(_localctx, 2); + { + setState(201); + booleanliteral(); + } + break; + case T__12: + enterOuterAlt(_localctx, 3); + { + setState(202); + arrayliteral(); + } + break; + case STRING: + enterOuterAlt(_localctx, 4); + { + setState(203); + stringliteral(); + } + break; + case FLOAT_NUMBER: + enterOuterAlt(_localctx, 5); + { + setState(204); + floatliteral(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 13: + return expression_sempred((ExpressionContext)_localctx, predIndex); + } + return true; + } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return precpred(_ctx, 10); + case 1: + return precpred(_ctx, 9); + case 2: + return precpred(_ctx, 8); + case 3: + return precpred(_ctx, 7); + case 4: + return precpred(_ctx, 6); + case 5: + return precpred(_ctx, 5); + } + return true; + } + + public static final String _serializedATN = + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3L\u00d2\4\2\t\2\4"+ + "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ + "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\3\2\7\2\64\n\2\f\2\16\2\67\13\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\5"+ + "\3B\n\3\3\4\3\4\3\4\5\4G\n\4\3\4\3\4\3\4\7\4L\n\4\f\4\16\4O\13\4\5\4Q"+ + "\n\4\3\5\3\5\5\5U\n\5\3\6\3\6\5\6Y\n\6\3\6\3\6\3\7\3\7\5\7_\n\7\3\7\3"+ + "\7\3\7\3\7\3\b\3\b\3\b\3\t\3\t\3\t\3\n\3\n\3\13\3\13\3\13\3\13\5\13q\n"+ + "\13\3\13\3\13\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\16\3\16\3\16\5\16\u0080"+ + "\n\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\5\17\u008c\n\17"+ + "\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17"+ + "\3\17\3\17\3\17\3\17\7\17\u00a0\n\17\f\17\16\17\u00a3\13\17\3\20\3\20"+ + "\3\20\3\20\3\20\3\20\5\20\u00ab\n\20\3\21\3\21\3\22\3\22\3\22\6\22\u00b2"+ + "\n\22\r\22\16\22\u00b3\3\23\3\23\3\24\3\24\3\25\3\25\3\26\3\26\3\26\3"+ + "\26\7\26\u00c0\n\26\f\26\16\26\u00c3\13\26\3\26\3\26\3\27\3\27\3\30\3"+ + "\30\3\31\3\31\3\31\3\31\3\31\5\31\u00d0\n\31\3\31\2\3\34\32\2\4\6\b\n"+ + "\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\2\r\3\2\b\16\3\2\21\35\3\2 "+ + "#\4\2\3\3$%\3\2&,\3\2-/\3\2\60\65\3\2$%\3\29A\3\2HJ\3\2BC\2\u00dc\2\65"+ + "\3\2\2\2\4A\3\2\2\2\6C\3\2\2\2\bT\3\2\2\2\nV\3\2\2\2\f\\\3\2\2\2\16d\3"+ + "\2\2\2\20g\3\2\2\2\22j\3\2\2\2\24l\3\2\2\2\26t\3\2\2\2\30x\3\2\2\2\32"+ + "\177\3\2\2\2\34\u008b\3\2\2\2\36\u00aa\3\2\2\2 \u00ac\3\2\2\2\"\u00ae"+ + "\3\2\2\2$\u00b5\3\2\2\2&\u00b7\3\2\2\2(\u00b9\3\2\2\2*\u00bb\3\2\2\2,"+ + "\u00c6\3\2\2\2.\u00c8\3\2\2\2\60\u00cf\3\2\2\2\62\64\5\4\3\2\63\62\3\2"+ + "\2\2\64\67\3\2\2\2\65\63\3\2\2\2\65\66\3\2\2\2\668\3\2\2\2\67\65\3\2\2"+ + "\289\7\2\2\39\3\3\2\2\2:B\5\6\4\2;B\5\16\b\2B\5"+ + "\f\7\2?B\5\26\f\2@B\5\30\r\2A:\3\2\2\2A;\3\2\2\2A<\3\2\2\2A=\3\2\2\2A"+ + ">\3\2\2\2A?\3\2\2\2A@\3\2\2\2B\5\3\2\2\2CD\7\3\2\2DP\5 \21\2EG\5\b\5\2"+ + "FE\3\2\2\2FG\3\2\2\2GQ\3\2\2\2HM\5\b\5\2IJ\7\4\2\2JL\5\b\5\2KI\3\2\2\2"+ + "LO\3\2\2\2MK\3\2\2\2MN\3\2\2\2NQ\3\2\2\2OM\3\2\2\2PF\3\2\2\2PH\3\2\2\2"+ + "Q\7\3\2\2\2RU\5 \21\2SU\5&\24\2TR\3\2\2\2TS\3\2\2\2U\t\3\2\2\2VX\5\22"+ + "\n\2WY\5\24\13\2XW\3\2\2\2XY\3\2\2\2YZ\3\2\2\2Z[\5 \21\2[\13\3\2\2\2\\"+ + "^\5\22\n\2]_\5\24\13\2^]\3\2\2\2^_\3\2\2\2_`\3\2\2\2`a\5 \21\2ab\7\5\2"+ + "\2bc\5\34\17\2c\r\3\2\2\2de\7\6\2\2ef\5\f\7\2f\17\3\2\2\2gh\7\7\2\2hi"+ + "\5\f\7\2i\21\3\2\2\2jk\t\2\2\2k\23\3\2\2\2lm\7\17\2\2mp\5\34\17\2no\7"+ + "\4\2\2oq\5\34\17\2pn\3\2\2\2pq\3\2\2\2qr\3\2\2\2rs\7\20\2\2s\25\3\2\2"+ + "\2tu\5\32\16\2uv\7\5\2\2vw\5\34\17\2w\27\3\2\2\2xy\5\32\16\2yz\t\3\2\2"+ + "z{\5\34\17\2{\31\3\2\2\2|\u0080\5$\23\2}\u0080\5 \21\2~\u0080\5\"\22\2"+ + "\177|\3\2\2\2\177}\3\2\2\2\177~\3\2\2\2\u0080\33\3\2\2\2\u0081\u0082\b"+ + "\17\1\2\u0082\u008c\5\36\20\2\u0083\u0084\7\36\2\2\u0084\u0085\5\34\17"+ + "\2\u0085\u0086\7\37\2\2\u0086\u008c\3\2\2\2\u0087\u008c\5\60\31\2\u0088"+ + "\u008c\5$\23\2\u0089\u008c\5\"\22\2\u008a\u008c\5 \21\2\u008b\u0081\3"+ + "\2\2\2\u008b\u0083\3\2\2\2\u008b\u0087\3\2\2\2\u008b\u0088\3\2\2\2\u008b"+ + "\u0089\3\2\2\2\u008b\u008a\3\2\2\2\u008c\u00a1\3\2\2\2\u008d\u008e\f\f"+ + "\2\2\u008e\u008f\7 \2\2\u008f\u00a0\5\34\17\r\u0090\u0091\f\13\2\2\u0091"+ + "\u0092\t\4\2\2\u0092\u00a0\5\34\17\f\u0093\u0094\f\n\2\2\u0094\u0095\t"+ + "\5\2\2\u0095\u00a0\5\34\17\13\u0096\u0097\f\t\2\2\u0097\u0098\t\6\2\2"+ + "\u0098\u00a0\5\34\17\n\u0099\u009a\f\b\2\2\u009a\u009b\t\7\2\2\u009b\u00a0"+ + "\5\34\17\t\u009c\u009d\f\7\2\2\u009d\u009e\t\b\2\2\u009e\u00a0\5\34\17"+ + "\b\u009f\u008d\3\2\2\2\u009f\u0090\3\2\2\2\u009f\u0093\3\2\2\2\u009f\u0096"+ + "\3\2\2\2\u009f\u0099\3\2\2\2\u009f\u009c\3\2\2\2\u00a0\u00a3\3\2\2\2\u00a1"+ + "\u009f\3\2\2\2\u00a1\u00a2\3\2\2\2\u00a2\35\3\2\2\2\u00a3\u00a1\3\2\2"+ + "\2\u00a4\u00a5\7\66\2\2\u00a5\u00ab\5\34\17\2\u00a6\u00a7\t\t\2\2\u00a7"+ + "\u00ab\5\34\17\2\u00a8\u00a9\7\67\2\2\u00a9\u00ab\5\34\17\2\u00aa\u00a4"+ + "\3\2\2\2\u00aa\u00a6\3\2\2\2\u00aa\u00a8\3\2\2\2\u00ab\37\3\2\2\2\u00ac"+ + "\u00ad\7G\2\2\u00ad!\3\2\2\2\u00ae\u00b1\7G\2\2\u00af\u00b0\78\2\2\u00b0"+ + "\u00b2\7G\2\2\u00b1\u00af\3\2\2\2\u00b2\u00b3\3\2\2\2\u00b3\u00b1\3\2"+ + "\2\2\u00b3\u00b4\3\2\2\2\u00b4#\3\2\2\2\u00b5\u00b6\t\n\2\2\u00b6%\3\2"+ + "\2\2\u00b7\u00b8\t\13\2\2\u00b8\'\3\2\2\2\u00b9\u00ba\t\f\2\2\u00ba)\3"+ + "\2\2\2\u00bb\u00bc\7\17\2\2\u00bc\u00c1\5\34\17\2\u00bd\u00be\7\4\2\2"+ + "\u00be\u00c0\5\34\17\2\u00bf\u00bd\3\2\2\2\u00c0\u00c3\3\2\2\2\u00c1\u00bf"+ + "\3\2\2\2\u00c1\u00c2\3\2\2\2\u00c2\u00c4\3\2\2\2\u00c3\u00c1\3\2\2\2\u00c4"+ + "\u00c5\7\20\2\2\u00c5+\3\2\2\2\u00c6\u00c7\7L\2\2\u00c7-\3\2\2\2\u00c8"+ + "\u00c9\7K\2\2\u00c9/\3\2\2\2\u00ca\u00d0\5&\24\2\u00cb\u00d0\5(\25\2\u00cc"+ + "\u00d0\5*\26\2\u00cd\u00d0\5,\27\2\u00ce\u00d0\5.\30\2\u00cf\u00ca\3\2"+ + "\2\2\u00cf\u00cb\3\2\2\2\u00cf\u00cc\3\2\2\2\u00cf\u00cd\3\2\2\2\u00cf"+ + "\u00ce\3\2\2\2\u00d0\61\3\2\2\2\23\65AFMPTX^p\177\u008b\u009f\u00a1\u00aa"+ + "\u00b3\u00c1\u00cf"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file