From fed020825aac9daeb2a390812745e5092d62e7c9 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sat, 27 Jul 2019 17:55:14 +0200 Subject: [PATCH] some more asmgen v2; fixed duplicate label namings, if stmt, and vars in anon scopes --- .idea/.gitignore | 2 + .../compiler/target/c64/codegen/SimpleAsm.kt | 32 +- .../src/prog8/ast/processing/AstChecker.kt | 10 + compiler/src/prog8/compiler/Main.kt | 2 + .../c64/codegen2/AnonymousScopeCleanup.kt | 31 + .../compiler/target/c64/codegen2/AsmGen2.kt | 330 +- examples/test.p8 | 69 +- parser/src/prog8/parser/prog8Lexer.java | 516 ++ parser/src/prog8/parser/prog8Parser.java | 5587 +++++++++++++++++ 9 files changed, 6421 insertions(+), 158 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 compiler/src/prog8/compiler/target/c64/codegen2/AnonymousScopeCleanup.kt create mode 100644 parser/src/prog8/parser/prog8Lexer.java create mode 100644 parser/src/prog8/parser/prog8Parser.java diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..8cb2c1595 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,2 @@ +# Default ignored files +/shelf/ \ No newline at end of file diff --git a/DeprecatedStackVm/src/compiler/target/c64/codegen/SimpleAsm.kt b/DeprecatedStackVm/src/compiler/target/c64/codegen/SimpleAsm.kt index c3c51c744..03481aed7 100644 --- a/DeprecatedStackVm/src/compiler/target/c64/codegen/SimpleAsm.kt +++ b/DeprecatedStackVm/src/compiler/target/c64/codegen/SimpleAsm.kt @@ -513,27 +513,27 @@ internal fun simpleInstr2Asm(ins: Instruction, block: IntermediateProgram.Progra Opcode.BITOR_WORD -> " jsr prog8_lib.bitor_w" Opcode.BITXOR_WORD -> " jsr prog8_lib.bitxor_w" - Opcode.REMAINDER_UB -> " jsr prog8_lib.remainder_ub" - Opcode.REMAINDER_UW -> " jsr prog8_lib.remainder_uw" + Opcode.REMAINDER_UB -> " jsr prog8_lib.remainder_ub" + Opcode.REMAINDER_UW -> " jsr prog8_lib.remainder_uw" - Opcode.GREATER_B -> " jsr prog8_lib.greater_b" - Opcode.GREATER_UB -> " jsr prog8_lib.greater_ub" - Opcode.GREATER_W -> " jsr prog8_lib.greater_w" - Opcode.GREATER_UW -> " jsr prog8_lib.greater_uw" - Opcode.GREATER_F -> " jsr c64flt.greater_f" + Opcode.GREATER_B -> " jsr prog8_lib.greater_b" + Opcode.GREATER_UB -> " jsr prog8_lib.greater_ub" + Opcode.GREATER_W -> " jsr prog8_lib.greater_w" + Opcode.GREATER_UW -> " jsr prog8_lib.greater_uw" + Opcode.GREATER_F -> " jsr c64flt.greater_f" - Opcode.GREATEREQ_B -> " jsr prog8_lib.greatereq_b" - Opcode.GREATEREQ_UB -> " jsr prog8_lib.greatereq_ub" - Opcode.GREATEREQ_W -> " jsr prog8_lib.greatereq_w" - Opcode.GREATEREQ_UW -> " jsr prog8_lib.greatereq_uw" - Opcode.GREATEREQ_F -> " jsr c64flt.greatereq_f" + Opcode.GREATEREQ_B -> " jsr prog8_lib.greatereq_b" + Opcode.GREATEREQ_UB -> " jsr prog8_lib.greatereq_ub" + Opcode.GREATEREQ_W -> " jsr prog8_lib.greatereq_w" + Opcode.GREATEREQ_UW -> " jsr prog8_lib.greatereq_uw" + Opcode.GREATEREQ_F -> " jsr c64flt.greatereq_f" - Opcode.EQUAL_BYTE -> " jsr prog8_lib.equal_b" - Opcode.EQUAL_WORD -> " jsr prog8_lib.equal_w" - Opcode.EQUAL_F -> " jsr c64flt.equal_f" + Opcode.EQUAL_BYTE -> " jsr prog8_lib.equal_b" + Opcode.EQUAL_WORD -> " jsr prog8_lib.equal_w" + Opcode.EQUAL_F -> " jsr c64flt.equal_f" Opcode.NOTEQUAL_BYTE -> " jsr prog8_lib.notequal_b" Opcode.NOTEQUAL_WORD -> " jsr prog8_lib.notequal_w" - Opcode.NOTEQUAL_F -> " jsr c64flt.notequal_f" + Opcode.NOTEQUAL_F -> " jsr c64flt.notequal_f" Opcode.LESS_UB -> " jsr prog8_lib.less_ub" Opcode.LESS_B -> " jsr prog8_lib.less_b" diff --git a/compiler/src/prog8/ast/processing/AstChecker.kt b/compiler/src/prog8/ast/processing/AstChecker.kt index ba1ab217f..7ba14c91e 100644 --- a/compiler/src/prog8/ast/processing/AstChecker.kt +++ b/compiler/src/prog8/ast/processing/AstChecker.kt @@ -104,6 +104,12 @@ internal class AstChecker(private val program: Program, super.visit(returnStmt) } + override fun visit(ifStatement: IfStatement) { + if(ifStatement.condition.inferType(program) !in IntegerDatatypes) + checkResult.add(ExpressionError("condition value should be an integer type", ifStatement.condition.position)) + super.visit(ifStatement) + } + override fun visit(forLoop: ForLoop) { if(forLoop.body.containsNoCodeNorVars()) printWarning("for loop body is empty", forLoop.position) @@ -313,12 +319,16 @@ internal class AstChecker(private val program: Program, override fun visit(repeatLoop: RepeatLoop) { if(repeatLoop.untilCondition.referencesIdentifiers("A", "X", "Y")) printWarning("using a register in the loop condition is risky (it could get clobbered)", repeatLoop.untilCondition.position) + if(repeatLoop.untilCondition.inferType(program) !in IntegerDatatypes) + checkResult.add(ExpressionError("condition value should be an integer type", repeatLoop.untilCondition.position)) super.visit(repeatLoop) } override fun visit(whileLoop: WhileLoop) { if(whileLoop.condition.referencesIdentifiers("A", "X", "Y")) printWarning("using a register in the loop condition is risky (it could get clobbered)", whileLoop.condition.position) + if(whileLoop.condition.inferType(program) !in IntegerDatatypes) + checkResult.add(ExpressionError("condition value should be an integer type", whileLoop.condition.position)) super.visit(whileLoop) } diff --git a/compiler/src/prog8/compiler/Main.kt b/compiler/src/prog8/compiler/Main.kt index d0199f678..5d3f299e4 100644 --- a/compiler/src/prog8/compiler/Main.kt +++ b/compiler/src/prog8/compiler/Main.kt @@ -5,6 +5,7 @@ import prog8.ast.Program import prog8.ast.base.* import prog8.ast.statements.Directive import prog8.compiler.target.c64.MachineDefinition +import prog8.compiler.target.c64.codegen2.AnonymousScopeCleanup import prog8.compiler.target.c64.codegen2.AsmGen2 import prog8.optimizer.constantFold import prog8.optimizer.optimizeStatements @@ -91,6 +92,7 @@ fun compileProgram(filepath: Path, if(writeAssembly) { // asm generation directly from the Ast, no need for intermediate code val zeropage = MachineDefinition.C64Zeropage(compilerOptions) + AnonymousScopeCleanup.moveVarsFromAnonymousScopesToSubroutines(programAst) val assembly = AsmGen2(programAst, compilerOptions, zeropage).compileToAssembly(optimize) assembly.assemble(compilerOptions) programName = assembly.name diff --git a/compiler/src/prog8/compiler/target/c64/codegen2/AnonymousScopeCleanup.kt b/compiler/src/prog8/compiler/target/c64/codegen2/AnonymousScopeCleanup.kt new file mode 100644 index 000000000..cf493c1d9 --- /dev/null +++ b/compiler/src/prog8/compiler/target/c64/codegen2/AnonymousScopeCleanup.kt @@ -0,0 +1,31 @@ +package prog8.compiler.target.c64.codegen2 + +import prog8.ast.Program +import prog8.ast.processing.IAstVisitor +import prog8.ast.statements.AnonymousScope +import prog8.ast.statements.VarDecl + +class AnonymousScopeCleanup(val program: Program): IAstVisitor { + companion object { + fun moveVarsFromAnonymousScopesToSubroutines(programAst: Program) { + val cleanup = AnonymousScopeCleanup(programAst) + cleanup.visit(programAst) + + for((scope, decls) in cleanup.varsToMove) { + decls.forEach { scope.remove(it) } + val sub = scope.definingSubroutine()!! + sub.statements.addAll(0, decls) + decls.forEach { it.parent=sub } + } + } + } + + private val varsToMove: MutableMap> = mutableMapOf() + + override fun visit(scope: AnonymousScope) { + val vardecls = scope.statements.filterIsInstance() + varsToMove[scope] = vardecls + super.visit(scope) + } +} + diff --git a/compiler/src/prog8/compiler/target/c64/codegen2/AsmGen2.kt b/compiler/src/prog8/compiler/target/c64/codegen2/AsmGen2.kt index 6b109a35d..473db39b9 100644 --- a/compiler/src/prog8/compiler/target/c64/codegen2/AsmGen2.kt +++ b/compiler/src/prog8/compiler/target/c64/codegen2/AsmGen2.kt @@ -158,11 +158,18 @@ internal class AsmGen2(val program: Program, // first translate regular statements, and then put the subroutines at the end. val (subroutine, stmts) = block.statements.partition { it is Subroutine } stmts.forEach { translate(it) } - subroutine.forEach { translate(it as Subroutine) } + subroutine.forEach { translateSubroutine(it as Subroutine) } out("\n\t.pend\n") // TODO not if force_output? } + private var generatedLabelSequenceNumber: Int = 0 + + private fun makeLabel(postfix: String): String { + generatedLabelSequenceNumber++ + return "_prog8_label_${generatedLabelSequenceNumber}_$postfix" + } + private fun outputSourceLine(node: Node) { out(" ;\tsrc line: ${node.position.file}:${node.position.line}") } @@ -460,13 +467,52 @@ internal class AsmGen2(val program: Program, } } + private fun argumentTypeCompatible(argType: DataType, paramType: DataType): Boolean { + if(argType isAssignableTo paramType) + return true + + // we have a special rule for some types. + // strings are assignable to UWORD, for example, and vice versa + if(argType in StringDatatypes && paramType==DataType.UWORD) + return true + if(argType==DataType.UWORD && paramType in StringDatatypes) + return true + + return false + } + + private fun translateSubroutine(sub: Subroutine) { + out("") + outputSourceLine(sub) + + if(sub.isAsmSubroutine) { + if(sub.asmAddress!=null) + return // already done at the memvars section + + // asmsub with most likely just an inline asm in it + out("${sub.name}\t.proc") + sub.statements.forEach{ translate(it) } + out(" .pend\n") + } else { + // regular subroutine + out("${sub.name}\t.proc") + zeropagevars2asm(sub.statements) + memdefs2asm(sub.statements) + out("; statements") + sub.statements.forEach{ translate(it) } + out("; variables") + vardecls2asm(sub.statements) + out(" .pend\n") + } + } + private fun translate(stmt: Statement) { outputSourceLine(stmt) when(stmt) { is VarDecl, is StructDecl, is NopStatement -> {} is Directive -> translate(stmt) is Return -> translate(stmt) - is Subroutine -> translate(stmt) + is Subroutine -> translateSubroutine(stmt) is InlineAssembly -> translate(stmt) is FunctionCallStatement -> { val functionName = stmt.target.nameInSource.last() @@ -488,39 +534,25 @@ internal class AsmGen2(val program: Program, is PostIncrDecr -> translate(stmt) is Label -> translate(stmt) is BranchStatement -> translate(stmt) + is IfStatement -> translate(stmt) is ForLoop -> translate(stmt) - is Continue -> TODO() - is Break -> TODO() - is IfStatement -> TODO() - is WhileLoop -> TODO() - is RepeatLoop -> TODO() - is WhenStatement -> TODO() + is Continue -> TODO("continue") + is Break -> TODO("break") + is WhileLoop -> translate(stmt) + is RepeatLoop -> translate(stmt) + is WhenStatement -> translate(stmt) is BuiltinFunctionStatementPlaceholder -> throw AssemblyError("builtin function should not have placeholder anymore?") is AnonymousScope -> translate(stmt) is Block -> throw AssemblyError("block should have been handled elsewhere") } } - private fun argumentTypeCompatible(argType: DataType, paramType: DataType): Boolean { - if(argType isAssignableTo paramType) - return true - - // we have a special rule for some types. - // strings are assignable to UWORD, for example, and vice versa - if(argType in StringDatatypes && paramType==DataType.UWORD) - return true - if(argType==DataType.UWORD && paramType in StringDatatypes) - return true - - return false - } - private fun translateSubroutineCall(stmt: IFunctionCall) { val sub = stmt.target.targetSubroutine(program.namespace)!! if(Register.X in sub.asmClobbers) out(" stx c64.SCRATCH_ZPREGX") // we only save X for now (required! is the eval stack pointer), screw A and Y... - val subName = stmt.target.nameInSource.joinToString(".") + val subName = asmIdentifierName(stmt.target) if(stmt.arglist.isNotEmpty()) { for(arg in sub.parameters.withIndex().zip(stmt.arglist)) { translateSubroutineArgument(arg.first, arg.second, sub) @@ -579,14 +611,27 @@ internal class AsmGen2(val program: Program, else throw AssemblyError("can only use Carry as status flag parameter") } register!=null && register.name.length==1 -> { - val target = AssignTarget(Register.valueOf(register.name), null, null, null, sub.position) - target.linkParents(value.parent) val literal = value as? NumericLiteralValue - if(literal!=null) { - // optimize when the argument is a constant literal - assignByteConstant(target, literal.number.toShort()) - } else { - TODO("single register param non-const") + when { + literal!=null -> { + val target = AssignTarget(Register.valueOf(register.name), null, null, null, sub.position) + target.linkParents(value.parent) + assignByteConstant(target, literal.number.toShort()) + } + value is IdentifierReference -> { + val target = AssignTarget(Register.valueOf(register.name), null, null, null, sub.position) + target.linkParents(value.parent) + assignByteVariable(target, value) + } + else -> { + translateExpression(value) + when(register) { + RegisterOrPair.A -> out(" inx | lda $ESTACK_LO_HEX,x") + RegisterOrPair.X -> throw AssemblyError("can't pop into X register - use a variable instead") + RegisterOrPair.Y -> out(" inx | ldy $ESTACK_LO_HEX,x") + else -> throw AssemblyError("cannot assign to register pair") + } + } } } register!=null && register.name.length==2 -> { @@ -600,7 +645,7 @@ internal class AsmGen2(val program: Program, else if (register == RegisterOrPair.XY) out(" ldx #<$hex | ldy #>$hex") } else if(value is AddressOf) { // optimize when the argument is an address of something - val sourceName = value.identifier.nameInSource.joinToString(".") + val sourceName = asmIdentifierName(value.identifier) if (register == RegisterOrPair.AX) out(" lda #<$sourceName | ldx #>$sourceName") else if (register == RegisterOrPair.AY) out(" lda #<$sourceName | ldy #>$sourceName") else if (register == RegisterOrPair.XY) out(" ldx #<$sourceName | ldy #>$sourceName") @@ -612,12 +657,47 @@ internal class AsmGen2(val program: Program, } } + private fun translate(stmt: IfStatement) { + translateExpression(stmt.condition) + translateTestStack(stmt.condition.inferType(program)!!) + val elseLabel = makeLabel("if_else") + val endLabel = makeLabel("if_end") + out(" beq $elseLabel") + translate(stmt.truepart) + out(" jmp $endLabel") + out(elseLabel) + translate(stmt.elsepart) + out(endLabel) + } + + private fun translateTestStack(dataType: DataType) { + when(dataType) { + in ByteDatatypes -> out(" inx | lda $ESTACK_LO_HEX,x") + in WordDatatypes -> out(" inx | lda $ESTACK_LO_HEX,x | ora $ESTACK_HI_HEX,x") + DataType.FLOAT -> throw AssemblyError("conditional value should be an integer (boolean)") + else -> throw AssemblyError("non-numerical dt") + } + } + + private fun translate(stmt: WhileLoop) { + TODO("while $stmt") + } + + private fun translate(stmt: RepeatLoop) { + TODO("repeat $stmt") + } + + private fun translate(stmt: WhenStatement) { + TODO("when $stmt") + } + private fun translate(stmt: Label) { out(stmt.name) } private fun translate(scope: AnonymousScope) { - scope.statements.forEach { translate(it) } + // note: the variables defined in an anonymous scope are moved to their defining subroutine's scope + scope.statements.forEach{ translate(it) } } private fun translate(stmt: BranchStatement) { @@ -633,17 +713,20 @@ internal class AsmGen2(val program: Program, } else { if(stmt.elsepart.containsNoCodeNorVars()) { val instruction = branchInstruction(stmt.condition, true) - out(" $instruction _prog8_branch_else") + val elseLabel = makeLabel("branch_else") + out(" $instruction $elseLabel") translate(stmt.truepart) - out("_prog8_branch_else") + out(elseLabel) } else { val instruction = branchInstruction(stmt.condition, false) - out(" $instruction _prog8_branch_true") + val trueLabel = makeLabel("branch_true") + val endLabel = makeLabel("branch_end") + out(" $instruction $trueLabel") translate(stmt.elsepart) - out(" jmp _prog8_branch_end") - out("_prog8_branch_true") + out(" jmp $endLabel") + out(trueLabel) translate(stmt.truepart) - out("_prog8_branch_end") + out(endLabel) } } } @@ -673,7 +756,7 @@ internal class AsmGen2(val program: Program, } private fun translate(stmt: ForLoop) { - out("; TODO forloop $stmt") // TODO + TODO("forloop $stmt") } private fun translate(stmt: PostIncrDecr) { @@ -697,7 +780,21 @@ internal class AsmGen2(val program: Program, } stmt.target.identifier!=null -> { val what = asmIdentifierName(stmt.target.identifier!!) - out(if(incr) " inc $what" else " dec $what") + val dt = stmt.target.inferType(program, stmt) + when (dt) { + in ByteDatatypes -> out(if (incr) " inc $what" else " dec $what") + in WordDatatypes -> { + if(incr) + out(" inc $what | bne + | inc $what+1 |+") + else + out(" lda $what | bne + | dec $what+1 |+ | dec $what") + } + DataType.FLOAT -> { + out(" lda #<$what | ldy #>$what") + out(if(incr) " jsr c64flt.inc_var_f" else " jsr c64flt.dec_var_f") + } + else -> throw AssemblyError("need numeric type") + } } stmt.target.memoryAddress!=null -> { val target = stmt.target.memoryAddress!!.addressExpression @@ -707,7 +804,7 @@ internal class AsmGen2(val program: Program, out(if(incr) " inc $what" else " dec $what") } is IdentifierReference -> { - val what = target.nameInSource.joinToString(".") + val what = asmIdentifierName(target) out(if(incr) " inc $what" else " dec $what") } else -> throw AssemblyError("weird target type $target") @@ -738,31 +835,6 @@ internal class AsmGen2(val program: Program, out(" rts") } - private fun translate(sub: Subroutine) { - out("") - outputSourceLine(sub) - - if(sub.isAsmSubroutine) { - if(sub.asmAddress!=null) - return // already done at the memvars section - - // asmsub with most likely just an inline asm in it - out("${sub.name}\t.proc") - sub.statements.forEach{ translate(it) } - out(" .pend\n") - } else { - // regular subroutine - out("${sub.name}\t.proc") - zeropagevars2asm(sub.statements) - memdefs2asm(sub.statements) - out("; statements") - sub.statements.forEach{ translate(it) } - out("; variables") - vardecls2asm(sub.statements) - out(" .pend\n") - } - } - private fun translate(asm: InlineAssembly) { val assembly = asm.assembly.trimEnd().trimStart('\n') assemblyLines.add(assembly) @@ -812,7 +884,7 @@ internal class AsmGen2(val program: Program, } else -> { translateExpression(read.addressExpression) - TODO("; TODO read memory byte from result and put that in ${assign.target}") + TODO("read memory byte from result and put that in ${assign.target}") } } } @@ -853,7 +925,7 @@ internal class AsmGen2(val program: Program, } private fun translateExpression(expr: ArrayIndexedExpression) { - out("; TODO evaluate arrayindexed $expr") // TODO + TODO("evaluate arrayindexed $expr") } private fun translateExpression(expr: TypecastExpression) { @@ -938,11 +1010,11 @@ internal class AsmGen2(val program: Program, } private fun translateExpression(expr: AddressOf) { - out("; TODO take address of $expr") // TODO + TODO("take address of; $expr") } private fun translateExpression(expr: DirectMemoryRead) { - out("; TODO memread $expr") // TODO + TODO("memread $expr") } private fun translateExpression(expr: NumericLiteralValue) { @@ -972,7 +1044,7 @@ internal class AsmGen2(val program: Program, } private fun translateExpression(expr: IdentifierReference) { - val varname = expr.nameInSource.joinToString(".") + val varname = asmIdentifierName(expr) when(expr.inferType(program)!!) { DataType.UBYTE, DataType.BYTE -> { out(" lda $varname | sta $ESTACK_LO_HEX,x | dex") @@ -990,7 +1062,16 @@ internal class AsmGen2(val program: Program, private fun translateExpression(expr: BinaryExpression) { translateExpression(expr.left) translateExpression(expr.right) - out("; TODO evaluate binary ${expr.operator}") // TODO + val leftDt = expr.left.inferType(program)!! + val rightDt = expr.right.inferType(program)!! + if(leftDt!=rightDt) + throw AssemblyError("binary operator ${expr.operator} left/right dt not identical") // is this strictly required always? + when (leftDt) { + in ByteDatatypes -> translateBinaryOperatorBytes(expr.operator, leftDt) + in WordDatatypes -> translateBinaryOperatorWords(expr.operator, leftDt) + DataType.FLOAT -> translateBinaryOperatorFloats(expr.operator) + else -> throw AssemblyError("non-numerical datatype") + } } private fun translateExpression(expr: PrefixExpression) { @@ -1029,13 +1110,93 @@ internal class AsmGen2(val program: Program, } } + private fun translateBinaryOperatorBytes(operator: String, types: DataType) { + when(operator) { + "**" -> throw AssemblyError("** operator requires floats") + "*" -> out(" jsr prog8_lib.mul_byte") + "/" -> out(if(types==DataType.UBYTE) " jsr prog8_lib.idiv_ub" else " jsr prog8_lib.idiv_b") + "%" -> { + if(types==DataType.BYTE) + throw AssemblyError("remainder of signed integers is not properly defined/implemented, use unsigned instead") + out(" jsr prog8_lib.remainder_ub") + } + "+" -> {TODO("plus bytes")} + "-" -> {TODO("minus bytes")} + "<<" -> throw AssemblyError("<< should not operate via stack") + ">>" -> throw AssemblyError(">> should not operate via stack") + "<" -> out(if(types==DataType.UBYTE) " jsr prog8_lib.less_ub" else " jsr prog8_lib.less_b") + ">" -> out(if(types==DataType.UBYTE) " jsr prog8_lib.greater_ub" else " jsr prog8_lib.greater_b") + "<=" -> out(if(types==DataType.UBYTE) " jsr prog8_lib.lesseq_ub" else " jsr prog8_lib.lesseq_b") + ">=" -> out(if(types==DataType.UBYTE) " jsr prog8_lib.greatereq_ub" else " jsr prog8_lib.greatereq_b") + "==" -> out(" jsr prog8_lib.equal_b") + "!=" -> out(" jsr prog8_lib.notequal_b") + "&" -> out(" jsr prog8_lib.bitand_b") + "^" -> out(" jsr prog8_lib.bitxor_b") + "|" -> out(" jsr prog8_lib.bitor_b") + "and" -> out(" jsr prog8_lib.and_b") + "or" -> out(" jsr prog8_lib.or_b") + "xor" -> out(" jsr prog8_lib.xor_b") + else -> throw AssemblyError("invalid operator $operator") + } + } + + private fun translateBinaryOperatorWords(operator: String, types: DataType) { + when(operator) { + "**" -> throw AssemblyError("** operator requires floats") + "*" -> out(" jsr prog8_lib.mul_word") + "/" -> out(if(types==DataType.UWORD) " jsr prog8_lib.idiv_uw" else " jsr prog8_lib.idiv_w") + "%" -> { + if(types==DataType.WORD) + throw AssemblyError("remainder of signed integers is not properly defined/implemented, use unsigned instead") + out(" jsr prog8_lib.remainder_uw") + } + "+" -> {TODO("plus word")} + "-" -> {TODO("minus word")} + "<<" -> throw AssemblyError("<< should not operate via stack") + ">>" -> throw AssemblyError(">> should not operate via stack") + "<" -> out(if(types==DataType.UWORD) " jsr prog8_lib.less_uw" else " jsr prog8_lib.less_w") + ">" -> out(if(types==DataType.UWORD) " jsr prog8_lib.greater_uw" else " jsr prog8_lib.greater_w") + "<=" -> out(if(types==DataType.UWORD) " jsr prog8_lib.lesseq_uw" else " jsr prog8_lib.lesseq_w") + ">=" -> out(if(types==DataType.UWORD) " jsr prog8_lib.greatereq_uw" else " jsr prog8_lib.greatereq_w") + "==" -> out(" jsr prog8_lib.equal_w") + "!=" -> out(" jsr prog8_lib.notequal_w") + "&" -> out(" jsr prog8_lib.bitand_w") + "^" -> out(" jsr prog8_lib.bitxor_w") + "|" -> out(" jsr prog8_lib.bitor_w") + "and" -> out(" jsr prog8_lib.and_w") + "or" -> out(" jsr prog8_lib.or_w") + "xor" -> out(" jsr prog8_lib.xor_w") + else -> throw AssemblyError("invalid operator $operator") + } + } + + private fun translateBinaryOperatorFloats(operator: String) { + when(operator) { + "**" -> out(" jsr c64flt.pow_f") + "*" -> out(" jsr c64flt.mul_f") + "/" -> out(" jsr c64flt.div_f") + "+" -> out(" jsr c64flt.add_f") + "-" -> out(" jsr c64flt.sub_f") + "<" -> out(" jsr c64flt.less_f") + ">" -> out(" jsr c64flt.greater_f") + "<=" -> out(" jsr c64flt.lesseq_f") + ">=" -> out(" jsr c64flt.greatereq_f") + "==" -> out(" jsr c64flt.equal_f") + "!=" -> out(" jsr c64flt.notequal_f") + "%", "<<", ">>", "&", "^", "|", "and", "or", "xor" -> throw AssemblyError("requires integer datatype") + else -> throw AssemblyError("invalid operator $operator") + } + } + private fun assignEvalResult(target: AssignTarget) { when { target.register!=null -> { + if(target.register==Register.X) + throw AssemblyError("can't pop into X register - use variable instead") out(" inx | ld${target.register.name.toLowerCase()} $ESTACK_LO_HEX,x ") } target.identifier!=null -> { - val targetName = target.identifier.nameInSource.joinToString(".") + val targetName = asmIdentifierName(target.identifier) val targetDt = target.identifier.inferType(program)!! when(targetDt) { DataType.UBYTE, DataType.BYTE -> { @@ -1061,10 +1222,15 @@ internal class AsmGen2(val program: Program, } } target.memoryAddress!=null -> { - out("; TODO put result in $target") // TODO + val address = target.memoryAddress!!.addressExpression + if(address is NumericLiteralValue) { + out(" inx | lda $ESTACK_LO_HEX,x | sta ${address.number.toHex()}") + } else { + TODO("put result in memory $target") + } } target.arrayindexed!=null -> { - out("; TODO put result in $target") // TODO + TODO("put result in arrayindexed $target") } else -> throw AssemblyError("weird assignment target $target") } @@ -1104,7 +1270,7 @@ internal class AsmGen2(val program: Program, } private fun assignWordVariable(target: AssignTarget, variable: IdentifierReference) { - val sourceName = variable.nameInSource.joinToString(".") + val sourceName = asmIdentifierName(variable) when { target.identifier!=null -> { val targetName = asmIdentifierName(target.identifier) @@ -1120,7 +1286,7 @@ internal class AsmGen2(val program: Program, } private fun assignFloatVariable(target: AssignTarget, variable: IdentifierReference) { - val sourceName = variable.nameInSource.joinToString(".") + val sourceName = asmIdentifierName(variable) when { target.identifier!=null -> { val targetName = asmIdentifierName(target.identifier) @@ -1142,7 +1308,7 @@ internal class AsmGen2(val program: Program, } private fun assignByteVariable(target: AssignTarget, variable: IdentifierReference) { - val sourceName = variable.nameInSource.joinToString(".") + val sourceName = asmIdentifierName(variable) when { target.register!=null -> { out(" ld${target.register.name.toLowerCase()} $sourceName") @@ -1222,7 +1388,7 @@ internal class AsmGen2(val program: Program, """) } } else { - out("; TODO assign word $word to $target") // TODO + TODO("assign word $word to $target") } } @@ -1235,7 +1401,7 @@ internal class AsmGen2(val program: Program, val targetName = asmIdentifierName(target.identifier) out(" lda #${byte.toHex()} | sta $targetName ") } - else -> out("; TODO assign byte $byte to $target") // TODO + else -> TODO("assign byte $byte to $target") } } @@ -1253,7 +1419,7 @@ internal class AsmGen2(val program: Program, sta $targetName+4 """) } else { - out("; TODO assign float 0.0 to $target") // TODO + TODO("assign float 0.0 to $target") } } else { // non-zero value @@ -1273,7 +1439,7 @@ internal class AsmGen2(val program: Program, sta $targetName+4 """) } else { - out("; TODO assign float $float ($constFloat) to $target") // TODO + TODO("assign float $float ($constFloat) to $target") } } } diff --git a/examples/test.p8 b/examples/test.p8 index ce06041f5..5de06c7f5 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -6,69 +6,18 @@ sub start() { - float f1 + float f1 = 1.1 + float f2 = 2.2 - ; these are all floating point constants defined in the ROM so no allocation required - ; TODO actually read these from ROM + @(1024) = f1==f2 - f1 = 3.141592653589793 - c64flt.print_f(f1) + c64.CHROUT('\n') + c64scr.print_ub(f1==f2) c64.CHROUT('\n') - f1 = -32768.0 - c64flt.print_f(f1) - c64.CHROUT('\n') - - f1 = 1.0 - c64flt.print_f(f1) - c64.CHROUT('\n') - - f1 = 0.7071067811865476 - c64flt.print_f(f1) - c64.CHROUT('\n') - - f1 = 1.4142135623730951 - c64flt.print_f(f1) - c64.CHROUT('\n') - - f1 = -0.5 - c64flt.print_f(f1) - c64.CHROUT('\n') - - f1 = 0.6931471805599453 - c64flt.print_f(f1) - c64.CHROUT('\n') - - f1 = 10.0 - c64flt.print_f(f1) - c64.CHROUT('\n') - - f1 = 1.0e9 - c64flt.print_f(f1) - c64.CHROUT('\n') - - f1 = 0.5 - c64flt.print_f(f1) - c64.CHROUT('\n') - - f1 = 1.4426950408889634 - c64flt.print_f(f1) - c64.CHROUT('\n') - - f1 = 1.5707963267948966 - c64flt.print_f(f1) - c64.CHROUT('\n') - - f1 = 6.283185307179586 - c64flt.print_f(f1) - c64.CHROUT('\n') - - f1 = 0.25 - c64flt.print_f(f1) - c64.CHROUT('\n') - - f1 = 0.0 - c64flt.print_f(f1) - c64.CHROUT('\n') + if f1 ==0.0 + c64scr.print("error\n") + else + c64scr.print("ok\n") } } diff --git a/parser/src/prog8/parser/prog8Lexer.java b/parser/src/prog8/parser/prog8Lexer.java new file mode 100644 index 000000000..3018b9ab0 --- /dev/null +++ b/parser/src/prog8/parser/prog8Lexer.java @@ -0,0 +1,516 @@ +// Generated from prog8.g4 by ANTLR 4.7.2 + +package prog8.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 prog8Lexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.7.2", 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, T__65=66, + T__66=67, T__67=68, T__68=69, T__69=70, T__70=71, T__71=72, T__72=73, + T__73=74, T__74=75, T__75=76, T__76=77, T__77=78, T__78=79, T__79=80, + T__80=81, T__81=82, T__82=83, T__83=84, T__84=85, T__85=86, T__86=87, + T__87=88, T__88=89, T__89=90, T__90=91, T__91=92, T__92=93, T__93=94, + T__94=95, T__95=96, T__96=97, T__97=98, T__98=99, T__99=100, T__100=101, + T__101=102, T__102=103, T__103=104, T__104=105, T__105=106, T__106=107, + T__107=108, T__108=109, T__109=110, LINECOMMENT=111, COMMENT=112, WS=113, + EOL=114, NAME=115, DEC_INTEGER=116, HEX_INTEGER=117, BIN_INTEGER=118, + ADDRESS_OF=119, FLOAT_NUMBER=120, STRING=121, INLINEASMBLOCK=122, SINGLECHAR=123, + ZEROPAGE=124, ARRAYSIG=125; + public static String[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + private static String[] makeRuleNames() { + return new String[] { + "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", + "T__65", "T__66", "T__67", "T__68", "T__69", "T__70", "T__71", "T__72", + "T__73", "T__74", "T__75", "T__76", "T__77", "T__78", "T__79", "T__80", + "T__81", "T__82", "T__83", "T__84", "T__85", "T__86", "T__87", "T__88", + "T__89", "T__90", "T__91", "T__92", "T__93", "T__94", "T__95", "T__96", + "T__97", "T__98", "T__99", "T__100", "T__101", "T__102", "T__103", "T__104", + "T__105", "T__106", "T__107", "T__108", "T__109", "LINECOMMENT", "COMMENT", + "WS", "EOL", "NAME", "DEC_INTEGER", "HEX_INTEGER", "BIN_INTEGER", "ADDRESS_OF", + "FLOAT_NUMBER", "FNUMBER", "STRING_ESCAPE_SEQ", "STRING", "INLINEASMBLOCK", + "SINGLECHAR", "ZEROPAGE", "ARRAYSIG" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, "'~'", "':'", "'goto'", "'%output'", "'%launcher'", "'%zeropage'", + "'%zpreserved'", "'%address'", "'%import'", "'%breakpoint'", "'%asminclude'", + "'%asmbinary'", "'%option'", "','", "'='", "'const'", "'struct'", "'{'", + "'}'", "'ubyte'", "'byte'", "'uword'", "'word'", "'float'", "'str'", + "'str_s'", "'['", "']'", "'+='", "'-='", "'/='", "'*='", "'**='", "'&='", + "'|='", "'^='", "'%='", "'<<='", "'>>='", "'++'", "'--'", "'+'", "'-'", + "'**'", "'*'", "'/'", "'%'", "'<<'", "'>>'", "'<'", "'>'", "'<='", "'>='", + "'=='", "'!='", "'^'", "'|'", "'to'", "'step'", "'and'", "'or'", "'xor'", + "'not'", "'('", "')'", "'as'", "'@'", "'return'", "'break'", "'continue'", + "'.'", "'A'", "'X'", "'Y'", "'AX'", "'AY'", "'XY'", "'Pc'", "'Pz'", "'Pn'", + "'Pv'", "'.w'", "'true'", "'false'", "'%asm'", "'sub'", "'->'", "'asmsub'", + "'stack'", "'clobbers'", "'if'", "'else'", "'if_cs'", "'if_cc'", "'if_eq'", + "'if_z'", "'if_ne'", "'if_nz'", "'if_pl'", "'if_pos'", "'if_mi'", "'if_neg'", + "'if_vs'", "'if_vc'", "'for'", "'in'", "'while'", "'repeat'", "'until'", + "'when'", null, null, null, null, null, null, null, null, "'&'", null, + null, null, null, "'@zp'", "'[]'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + 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, 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, "LINECOMMENT", "COMMENT", "WS", "EOL", "NAME", "DEC_INTEGER", + "HEX_INTEGER", "BIN_INTEGER", "ADDRESS_OF", "FLOAT_NUMBER", "STRING", + "INLINEASMBLOCK", "SINGLECHAR", "ZEROPAGE", "ARRAYSIG" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + 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 prog8Lexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "prog8.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 122: + STRING_action((RuleContext)_localctx, actionIndex); + break; + case 123: + INLINEASMBLOCK_action((RuleContext)_localctx, actionIndex); + break; + case 124: + SINGLECHAR_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; + } + } + private void INLINEASMBLOCK_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 1: + + // get rid of the enclosing double braces + String s = getText(); + setText(s.substring(2, s.length() - 2)); + + break; + } + } + private void SINGLECHAR_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 2: + + // 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\2\177\u036e\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\4"+ + "I\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\t"+ + "T\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\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\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv"+ + "\4w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t"+ + "\u0080\3\2\3\2\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\5\3\5\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\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3"+ + "\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t"+ + "\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13"+ + "\3\13\3\13\3\13\3\13\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\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\r\3\r\3\r\3"+ + "\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\20\3\20\3\21\3"+ + "\21\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3"+ + "\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\26\3\27\3"+ + "\27\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\31\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3\34\3"+ + "\35\3\35\3\36\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/\3/\3\60\3\60\3\61\3\61\3"+ + "\61\3\62\3\62\3\62\3\63\3\63\3\64\3\64\3\65\3\65\3\65\3\66\3\66\3\66\3"+ + "\67\3\67\3\67\38\38\38\39\39\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@\3A\3A\3B\3B\3C\3C\3C\3D\3D\3E\3E\3"+ + "E\3E\3E\3E\3E\3F\3F\3F\3F\3F\3F\3G\3G\3G\3G\3G\3G\3G\3G\3G\3H\3H\3I\3"+ + "I\3J\3J\3K\3K\3L\3L\3L\3M\3M\3M\3N\3N\3N\3O\3O\3O\3P\3P\3P\3Q\3Q\3Q\3"+ + "R\3R\3R\3S\3S\3S\3T\3T\3T\3T\3T\3U\3U\3U\3U\3U\3U\3V\3V\3V\3V\3V\3W\3"+ + "W\3W\3W\3X\3X\3X\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Z\3Z\3Z\3Z\3Z\3Z\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`\3a\3a\3a\3a\3a\3b\3b\3b\3b\3b\3b\3c\3c\3c\3"+ + "c\3c\3c\3d\3d\3d\3d\3d\3d\3e\3e\3e\3e\3e\3e\3e\3f\3f\3f\3f\3f\3f\3g\3"+ + "g\3g\3g\3g\3g\3g\3h\3h\3h\3h\3h\3h\3i\3i\3i\3i\3i\3i\3j\3j\3j\3j\3k\3"+ + "k\3k\3l\3l\3l\3l\3l\3l\3m\3m\3m\3m\3m\3m\3m\3n\3n\3n\3n\3n\3n\3o\3o\3"+ + "o\3o\3o\3p\3p\7p\u02f4\np\fp\16p\u02f7\13p\3p\3p\3p\3p\3q\3q\7q\u02ff"+ + "\nq\fq\16q\u0302\13q\3q\3q\3r\3r\3r\3r\3s\6s\u030b\ns\rs\16s\u030c\3t"+ + "\3t\7t\u0311\nt\ft\16t\u0314\13t\3u\3u\3u\6u\u0319\nu\ru\16u\u031a\5u"+ + "\u031d\nu\3v\3v\6v\u0321\nv\rv\16v\u0322\3w\3w\6w\u0327\nw\rw\16w\u0328"+ + "\3x\3x\3y\3y\3y\5y\u0330\ny\3y\5y\u0333\ny\3z\6z\u0336\nz\rz\16z\u0337"+ + "\3z\3z\6z\u033c\nz\rz\16z\u033d\5z\u0340\nz\3{\3{\3{\3{\5{\u0346\n{\3"+ + "|\3|\3|\7|\u034b\n|\f|\16|\u034e\13|\3|\3|\3|\3}\3}\3}\3}\6}\u0357\n}"+ + "\r}\16}\u0358\3}\3}\3}\3}\3}\3~\3~\3~\5~\u0363\n~\3~\3~\3~\3\177\3\177"+ + "\3\177\3\177\3\u0080\3\u0080\3\u0080\3\u0358\2\u0081\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{?}@\177"+ + "A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG\u008dH\u008fI\u0091J\u0093"+ + "K\u0095L\u0097M\u0099N\u009bO\u009dP\u009fQ\u00a1R\u00a3S\u00a5T\u00a7"+ + "U\u00a9V\u00abW\u00adX\u00afY\u00b1Z\u00b3[\u00b5\\\u00b7]\u00b9^\u00bb"+ + "_\u00bd`\u00bfa\u00c1b\u00c3c\u00c5d\u00c7e\u00c9f\u00cbg\u00cdh\u00cf"+ + "i\u00d1j\u00d3k\u00d5l\u00d7m\u00d9n\u00dbo\u00ddp\u00dfq\u00e1r\u00e3"+ + "s\u00e5t\u00e7u\u00e9v\u00ebw\u00edx\u00efy\u00f1z\u00f3\2\u00f5\2\u00f7"+ + "{\u00f9|\u00fb}\u00fd~\u00ff\177\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"+ + "\u037d\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\u0095"+ + "\3\2\2\2\2\u0097\3\2\2\2\2\u0099\3\2\2\2\2\u009b\3\2\2\2\2\u009d\3\2\2"+ + "\2\2\u009f\3\2\2\2\2\u00a1\3\2\2\2\2\u00a3\3\2\2\2\2\u00a5\3\2\2\2\2\u00a7"+ + "\3\2\2\2\2\u00a9\3\2\2\2\2\u00ab\3\2\2\2\2\u00ad\3\2\2\2\2\u00af\3\2\2"+ + "\2\2\u00b1\3\2\2\2\2\u00b3\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7\3\2\2\2\2\u00b9"+ + "\3\2\2\2\2\u00bb\3\2\2\2\2\u00bd\3\2\2\2\2\u00bf\3\2\2\2\2\u00c1\3\2\2"+ + "\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9\3\2\2\2\2\u00cb"+ + "\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\u00d1\3\2\2\2\2\u00d3\3\2\2"+ + "\2\2\u00d5\3\2\2\2\2\u00d7\3\2\2\2\2\u00d9\3\2\2\2\2\u00db\3\2\2\2\2\u00dd"+ + "\3\2\2\2\2\u00df\3\2\2\2\2\u00e1\3\2\2\2\2\u00e3\3\2\2\2\2\u00e5\3\2\2"+ + "\2\2\u00e7\3\2\2\2\2\u00e9\3\2\2\2\2\u00eb\3\2\2\2\2\u00ed\3\2\2\2\2\u00ef"+ + "\3\2\2\2\2\u00f1\3\2\2\2\2\u00f7\3\2\2\2\2\u00f9\3\2\2\2\2\u00fb\3\2\2"+ + "\2\2\u00fd\3\2\2\2\2\u00ff\3\2\2\2\3\u0101\3\2\2\2\5\u0103\3\2\2\2\7\u0105"+ + "\3\2\2\2\t\u010a\3\2\2\2\13\u0112\3\2\2\2\r\u011c\3\2\2\2\17\u0126\3\2"+ + "\2\2\21\u0132\3\2\2\2\23\u013b\3\2\2\2\25\u0143\3\2\2\2\27\u014f\3\2\2"+ + "\2\31\u015b\3\2\2\2\33\u0166\3\2\2\2\35\u016e\3\2\2\2\37\u0170\3\2\2\2"+ + "!\u0172\3\2\2\2#\u0178\3\2\2\2%\u017f\3\2\2\2\'\u0181\3\2\2\2)\u0183\3"+ + "\2\2\2+\u0189\3\2\2\2-\u018e\3\2\2\2/\u0194\3\2\2\2\61\u0199\3\2\2\2\63"+ + "\u019f\3\2\2\2\65\u01a3\3\2\2\2\67\u01a9\3\2\2\29\u01ab\3\2\2\2;\u01ad"+ + "\3\2\2\2=\u01b0\3\2\2\2?\u01b3\3\2\2\2A\u01b6\3\2\2\2C\u01b9\3\2\2\2E"+ + "\u01bd\3\2\2\2G\u01c0\3\2\2\2I\u01c3\3\2\2\2K\u01c6\3\2\2\2M\u01c9\3\2"+ + "\2\2O\u01cd\3\2\2\2Q\u01d1\3\2\2\2S\u01d4\3\2\2\2U\u01d7\3\2\2\2W\u01d9"+ + "\3\2\2\2Y\u01db\3\2\2\2[\u01de\3\2\2\2]\u01e0\3\2\2\2_\u01e2\3\2\2\2a"+ + "\u01e4\3\2\2\2c\u01e7\3\2\2\2e\u01ea\3\2\2\2g\u01ec\3\2\2\2i\u01ee\3\2"+ + "\2\2k\u01f1\3\2\2\2m\u01f4\3\2\2\2o\u01f7\3\2\2\2q\u01fa\3\2\2\2s\u01fc"+ + "\3\2\2\2u\u01fe\3\2\2\2w\u0201\3\2\2\2y\u0206\3\2\2\2{\u020a\3\2\2\2}"+ + "\u020d\3\2\2\2\177\u0211\3\2\2\2\u0081\u0215\3\2\2\2\u0083\u0217\3\2\2"+ + "\2\u0085\u0219\3\2\2\2\u0087\u021c\3\2\2\2\u0089\u021e\3\2\2\2\u008b\u0225"+ + "\3\2\2\2\u008d\u022b\3\2\2\2\u008f\u0234\3\2\2\2\u0091\u0236\3\2\2\2\u0093"+ + "\u0238\3\2\2\2\u0095\u023a\3\2\2\2\u0097\u023c\3\2\2\2\u0099\u023f\3\2"+ + "\2\2\u009b\u0242\3\2\2\2\u009d\u0245\3\2\2\2\u009f\u0248\3\2\2\2\u00a1"+ + "\u024b\3\2\2\2\u00a3\u024e\3\2\2\2\u00a5\u0251\3\2\2\2\u00a7\u0254\3\2"+ + "\2\2\u00a9\u0259\3\2\2\2\u00ab\u025f\3\2\2\2\u00ad\u0264\3\2\2\2\u00af"+ + "\u0268\3\2\2\2\u00b1\u026b\3\2\2\2\u00b3\u0272\3\2\2\2\u00b5\u0278\3\2"+ + "\2\2\u00b7\u0281\3\2\2\2\u00b9\u0284\3\2\2\2\u00bb\u0289\3\2\2\2\u00bd"+ + "\u028f\3\2\2\2\u00bf\u0295\3\2\2\2\u00c1\u029b\3\2\2\2\u00c3\u02a0\3\2"+ + "\2\2\u00c5\u02a6\3\2\2\2\u00c7\u02ac\3\2\2\2\u00c9\u02b2\3\2\2\2\u00cb"+ + "\u02b9\3\2\2\2\u00cd\u02bf\3\2\2\2\u00cf\u02c6\3\2\2\2\u00d1\u02cc\3\2"+ + "\2\2\u00d3\u02d2\3\2\2\2\u00d5\u02d6\3\2\2\2\u00d7\u02d9\3\2\2\2\u00d9"+ + "\u02df\3\2\2\2\u00db\u02e6\3\2\2\2\u00dd\u02ec\3\2\2\2\u00df\u02f1\3\2"+ + "\2\2\u00e1\u02fc\3\2\2\2\u00e3\u0305\3\2\2\2\u00e5\u030a\3\2\2\2\u00e7"+ + "\u030e\3\2\2\2\u00e9\u031c\3\2\2\2\u00eb\u031e\3\2\2\2\u00ed\u0324\3\2"+ + "\2\2\u00ef\u032a\3\2\2\2\u00f1\u032c\3\2\2\2\u00f3\u0335\3\2\2\2\u00f5"+ + "\u0345\3\2\2\2\u00f7\u0347\3\2\2\2\u00f9\u0352\3\2\2\2\u00fb\u035f\3\2"+ + "\2\2\u00fd\u0367\3\2\2\2\u00ff\u036b\3\2\2\2\u0101\u0102\7\u0080\2\2\u0102"+ + "\4\3\2\2\2\u0103\u0104\7<\2\2\u0104\6\3\2\2\2\u0105\u0106\7i\2\2\u0106"+ + "\u0107\7q\2\2\u0107\u0108\7v\2\2\u0108\u0109\7q\2\2\u0109\b\3\2\2\2\u010a"+ + "\u010b\7\'\2\2\u010b\u010c\7q\2\2\u010c\u010d\7w\2\2\u010d\u010e\7v\2"+ + "\2\u010e\u010f\7r\2\2\u010f\u0110\7w\2\2\u0110\u0111\7v\2\2\u0111\n\3"+ + "\2\2\2\u0112\u0113\7\'\2\2\u0113\u0114\7n\2\2\u0114\u0115\7c\2\2\u0115"+ + "\u0116\7w\2\2\u0116\u0117\7p\2\2\u0117\u0118\7e\2\2\u0118\u0119\7j\2\2"+ + "\u0119\u011a\7g\2\2\u011a\u011b\7t\2\2\u011b\f\3\2\2\2\u011c\u011d\7\'"+ + "\2\2\u011d\u011e\7|\2\2\u011e\u011f\7g\2\2\u011f\u0120\7t\2\2\u0120\u0121"+ + "\7q\2\2\u0121\u0122\7r\2\2\u0122\u0123\7c\2\2\u0123\u0124\7i\2\2\u0124"+ + "\u0125\7g\2\2\u0125\16\3\2\2\2\u0126\u0127\7\'\2\2\u0127\u0128\7|\2\2"+ + "\u0128\u0129\7r\2\2\u0129\u012a\7t\2\2\u012a\u012b\7g\2\2\u012b\u012c"+ + "\7u\2\2\u012c\u012d\7g\2\2\u012d\u012e\7t\2\2\u012e\u012f\7x\2\2\u012f"+ + "\u0130\7g\2\2\u0130\u0131\7f\2\2\u0131\20\3\2\2\2\u0132\u0133\7\'\2\2"+ + "\u0133\u0134\7c\2\2\u0134\u0135\7f\2\2\u0135\u0136\7f\2\2\u0136\u0137"+ + "\7t\2\2\u0137\u0138\7g\2\2\u0138\u0139\7u\2\2\u0139\u013a\7u\2\2\u013a"+ + "\22\3\2\2\2\u013b\u013c\7\'\2\2\u013c\u013d\7k\2\2\u013d\u013e\7o\2\2"+ + "\u013e\u013f\7r\2\2\u013f\u0140\7q\2\2\u0140\u0141\7t\2\2\u0141\u0142"+ + "\7v\2\2\u0142\24\3\2\2\2\u0143\u0144\7\'\2\2\u0144\u0145\7d\2\2\u0145"+ + "\u0146\7t\2\2\u0146\u0147\7g\2\2\u0147\u0148\7c\2\2\u0148\u0149\7m\2\2"+ + "\u0149\u014a\7r\2\2\u014a\u014b\7q\2\2\u014b\u014c\7k\2\2\u014c\u014d"+ + "\7p\2\2\u014d\u014e\7v\2\2\u014e\26\3\2\2\2\u014f\u0150\7\'\2\2\u0150"+ + "\u0151\7c\2\2\u0151\u0152\7u\2\2\u0152\u0153\7o\2\2\u0153\u0154\7k\2\2"+ + "\u0154\u0155\7p\2\2\u0155\u0156\7e\2\2\u0156\u0157\7n\2\2\u0157\u0158"+ + "\7w\2\2\u0158\u0159\7f\2\2\u0159\u015a\7g\2\2\u015a\30\3\2\2\2\u015b\u015c"+ + "\7\'\2\2\u015c\u015d\7c\2\2\u015d\u015e\7u\2\2\u015e\u015f\7o\2\2\u015f"+ + "\u0160\7d\2\2\u0160\u0161\7k\2\2\u0161\u0162\7p\2\2\u0162\u0163\7c\2\2"+ + "\u0163\u0164\7t\2\2\u0164\u0165\7{\2\2\u0165\32\3\2\2\2\u0166\u0167\7"+ + "\'\2\2\u0167\u0168\7q\2\2\u0168\u0169\7r\2\2\u0169\u016a\7v\2\2\u016a"+ + "\u016b\7k\2\2\u016b\u016c\7q\2\2\u016c\u016d\7p\2\2\u016d\34\3\2\2\2\u016e"+ + "\u016f\7.\2\2\u016f\36\3\2\2\2\u0170\u0171\7?\2\2\u0171 \3\2\2\2\u0172"+ + "\u0173\7e\2\2\u0173\u0174\7q\2\2\u0174\u0175\7p\2\2\u0175\u0176\7u\2\2"+ + "\u0176\u0177\7v\2\2\u0177\"\3\2\2\2\u0178\u0179\7u\2\2\u0179\u017a\7v"+ + "\2\2\u017a\u017b\7t\2\2\u017b\u017c\7w\2\2\u017c\u017d\7e\2\2\u017d\u017e"+ + "\7v\2\2\u017e$\3\2\2\2\u017f\u0180\7}\2\2\u0180&\3\2\2\2\u0181\u0182\7"+ + "\177\2\2\u0182(\3\2\2\2\u0183\u0184\7w\2\2\u0184\u0185\7d\2\2\u0185\u0186"+ + "\7{\2\2\u0186\u0187\7v\2\2\u0187\u0188\7g\2\2\u0188*\3\2\2\2\u0189\u018a"+ + "\7d\2\2\u018a\u018b\7{\2\2\u018b\u018c\7v\2\2\u018c\u018d\7g\2\2\u018d"+ + ",\3\2\2\2\u018e\u018f\7w\2\2\u018f\u0190\7y\2\2\u0190\u0191\7q\2\2\u0191"+ + "\u0192\7t\2\2\u0192\u0193\7f\2\2\u0193.\3\2\2\2\u0194\u0195\7y\2\2\u0195"+ + "\u0196\7q\2\2\u0196\u0197\7t\2\2\u0197\u0198\7f\2\2\u0198\60\3\2\2\2\u0199"+ + "\u019a\7h\2\2\u019a\u019b\7n\2\2\u019b\u019c\7q\2\2\u019c\u019d\7c\2\2"+ + "\u019d\u019e\7v\2\2\u019e\62\3\2\2\2\u019f\u01a0\7u\2\2\u01a0\u01a1\7"+ + "v\2\2\u01a1\u01a2\7t\2\2\u01a2\64\3\2\2\2\u01a3\u01a4\7u\2\2\u01a4\u01a5"+ + "\7v\2\2\u01a5\u01a6\7t\2\2\u01a6\u01a7\7a\2\2\u01a7\u01a8\7u\2\2\u01a8"+ + "\66\3\2\2\2\u01a9\u01aa\7]\2\2\u01aa8\3\2\2\2\u01ab\u01ac\7_\2\2\u01ac"+ + ":\3\2\2\2\u01ad\u01ae\7-\2\2\u01ae\u01af\7?\2\2\u01af<\3\2\2\2\u01b0\u01b1"+ + "\7/\2\2\u01b1\u01b2\7?\2\2\u01b2>\3\2\2\2\u01b3\u01b4\7\61\2\2\u01b4\u01b5"+ + "\7?\2\2\u01b5@\3\2\2\2\u01b6\u01b7\7,\2\2\u01b7\u01b8\7?\2\2\u01b8B\3"+ + "\2\2\2\u01b9\u01ba\7,\2\2\u01ba\u01bb\7,\2\2\u01bb\u01bc\7?\2\2\u01bc"+ + "D\3\2\2\2\u01bd\u01be\7(\2\2\u01be\u01bf\7?\2\2\u01bfF\3\2\2\2\u01c0\u01c1"+ + "\7~\2\2\u01c1\u01c2\7?\2\2\u01c2H\3\2\2\2\u01c3\u01c4\7`\2\2\u01c4\u01c5"+ + "\7?\2\2\u01c5J\3\2\2\2\u01c6\u01c7\7\'\2\2\u01c7\u01c8\7?\2\2\u01c8L\3"+ + "\2\2\2\u01c9\u01ca\7>\2\2\u01ca\u01cb\7>\2\2\u01cb\u01cc\7?\2\2\u01cc"+ + "N\3\2\2\2\u01cd\u01ce\7@\2\2\u01ce\u01cf\7@\2\2\u01cf\u01d0\7?\2\2\u01d0"+ + "P\3\2\2\2\u01d1\u01d2\7-\2\2\u01d2\u01d3\7-\2\2\u01d3R\3\2\2\2\u01d4\u01d5"+ + "\7/\2\2\u01d5\u01d6\7/\2\2\u01d6T\3\2\2\2\u01d7\u01d8\7-\2\2\u01d8V\3"+ + "\2\2\2\u01d9\u01da\7/\2\2\u01daX\3\2\2\2\u01db\u01dc\7,\2\2\u01dc\u01dd"+ + "\7,\2\2\u01ddZ\3\2\2\2\u01de\u01df\7,\2\2\u01df\\\3\2\2\2\u01e0\u01e1"+ + "\7\61\2\2\u01e1^\3\2\2\2\u01e2\u01e3\7\'\2\2\u01e3`\3\2\2\2\u01e4\u01e5"+ + "\7>\2\2\u01e5\u01e6\7>\2\2\u01e6b\3\2\2\2\u01e7\u01e8\7@\2\2\u01e8\u01e9"+ + "\7@\2\2\u01e9d\3\2\2\2\u01ea\u01eb\7>\2\2\u01ebf\3\2\2\2\u01ec\u01ed\7"+ + "@\2\2\u01edh\3\2\2\2\u01ee\u01ef\7>\2\2\u01ef\u01f0\7?\2\2\u01f0j\3\2"+ + "\2\2\u01f1\u01f2\7@\2\2\u01f2\u01f3\7?\2\2\u01f3l\3\2\2\2\u01f4\u01f5"+ + "\7?\2\2\u01f5\u01f6\7?\2\2\u01f6n\3\2\2\2\u01f7\u01f8\7#\2\2\u01f8\u01f9"+ + "\7?\2\2\u01f9p\3\2\2\2\u01fa\u01fb\7`\2\2\u01fbr\3\2\2\2\u01fc\u01fd\7"+ + "~\2\2\u01fdt\3\2\2\2\u01fe\u01ff\7v\2\2\u01ff\u0200\7q\2\2\u0200v\3\2"+ + "\2\2\u0201\u0202\7u\2\2\u0202\u0203\7v\2\2\u0203\u0204\7g\2\2\u0204\u0205"+ + "\7r\2\2\u0205x\3\2\2\2\u0206\u0207\7c\2\2\u0207\u0208\7p\2\2\u0208\u0209"+ + "\7f\2\2\u0209z\3\2\2\2\u020a\u020b\7q\2\2\u020b\u020c\7t\2\2\u020c|\3"+ + "\2\2\2\u020d\u020e\7z\2\2\u020e\u020f\7q\2\2\u020f\u0210\7t\2\2\u0210"+ + "~\3\2\2\2\u0211\u0212\7p\2\2\u0212\u0213\7q\2\2\u0213\u0214\7v\2\2\u0214"+ + "\u0080\3\2\2\2\u0215\u0216\7*\2\2\u0216\u0082\3\2\2\2\u0217\u0218\7+\2"+ + "\2\u0218\u0084\3\2\2\2\u0219\u021a\7c\2\2\u021a\u021b\7u\2\2\u021b\u0086"+ + "\3\2\2\2\u021c\u021d\7B\2\2\u021d\u0088\3\2\2\2\u021e\u021f\7t\2\2\u021f"+ + "\u0220\7g\2\2\u0220\u0221\7v\2\2\u0221\u0222\7w\2\2\u0222\u0223\7t\2\2"+ + "\u0223\u0224\7p\2\2\u0224\u008a\3\2\2\2\u0225\u0226\7d\2\2\u0226\u0227"+ + "\7t\2\2\u0227\u0228\7g\2\2\u0228\u0229\7c\2\2\u0229\u022a\7m\2\2\u022a"+ + "\u008c\3\2\2\2\u022b\u022c\7e\2\2\u022c\u022d\7q\2\2\u022d\u022e\7p\2"+ + "\2\u022e\u022f\7v\2\2\u022f\u0230\7k\2\2\u0230\u0231\7p\2\2\u0231\u0232"+ + "\7w\2\2\u0232\u0233\7g\2\2\u0233\u008e\3\2\2\2\u0234\u0235\7\60\2\2\u0235"+ + "\u0090\3\2\2\2\u0236\u0237\7C\2\2\u0237\u0092\3\2\2\2\u0238\u0239\7Z\2"+ + "\2\u0239\u0094\3\2\2\2\u023a\u023b\7[\2\2\u023b\u0096\3\2\2\2\u023c\u023d"+ + "\7C\2\2\u023d\u023e\7Z\2\2\u023e\u0098\3\2\2\2\u023f\u0240\7C\2\2\u0240"+ + "\u0241\7[\2\2\u0241\u009a\3\2\2\2\u0242\u0243\7Z\2\2\u0243\u0244\7[\2"+ + "\2\u0244\u009c\3\2\2\2\u0245\u0246\7R\2\2\u0246\u0247\7e\2\2\u0247\u009e"+ + "\3\2\2\2\u0248\u0249\7R\2\2\u0249\u024a\7|\2\2\u024a\u00a0\3\2\2\2\u024b"+ + "\u024c\7R\2\2\u024c\u024d\7p\2\2\u024d\u00a2\3\2\2\2\u024e\u024f\7R\2"+ + "\2\u024f\u0250\7x\2\2\u0250\u00a4\3\2\2\2\u0251\u0252\7\60\2\2\u0252\u0253"+ + "\7y\2\2\u0253\u00a6\3\2\2\2\u0254\u0255\7v\2\2\u0255\u0256\7t\2\2\u0256"+ + "\u0257\7w\2\2\u0257\u0258\7g\2\2\u0258\u00a8\3\2\2\2\u0259\u025a\7h\2"+ + "\2\u025a\u025b\7c\2\2\u025b\u025c\7n\2\2\u025c\u025d\7u\2\2\u025d\u025e"+ + "\7g\2\2\u025e\u00aa\3\2\2\2\u025f\u0260\7\'\2\2\u0260\u0261\7c\2\2\u0261"+ + "\u0262\7u\2\2\u0262\u0263\7o\2\2\u0263\u00ac\3\2\2\2\u0264\u0265\7u\2"+ + "\2\u0265\u0266\7w\2\2\u0266\u0267\7d\2\2\u0267\u00ae\3\2\2\2\u0268\u0269"+ + "\7/\2\2\u0269\u026a\7@\2\2\u026a\u00b0\3\2\2\2\u026b\u026c\7c\2\2\u026c"+ + "\u026d\7u\2\2\u026d\u026e\7o\2\2\u026e\u026f\7u\2\2\u026f\u0270\7w\2\2"+ + "\u0270\u0271\7d\2\2\u0271\u00b2\3\2\2\2\u0272\u0273\7u\2\2\u0273\u0274"+ + "\7v\2\2\u0274\u0275\7c\2\2\u0275\u0276\7e\2\2\u0276\u0277\7m\2\2\u0277"+ + "\u00b4\3\2\2\2\u0278\u0279\7e\2\2\u0279\u027a\7n\2\2\u027a\u027b\7q\2"+ + "\2\u027b\u027c\7d\2\2\u027c\u027d\7d\2\2\u027d\u027e\7g\2\2\u027e\u027f"+ + "\7t\2\2\u027f\u0280\7u\2\2\u0280\u00b6\3\2\2\2\u0281\u0282\7k\2\2\u0282"+ + "\u0283\7h\2\2\u0283\u00b8\3\2\2\2\u0284\u0285\7g\2\2\u0285\u0286\7n\2"+ + "\2\u0286\u0287\7u\2\2\u0287\u0288\7g\2\2\u0288\u00ba\3\2\2\2\u0289\u028a"+ + "\7k\2\2\u028a\u028b\7h\2\2\u028b\u028c\7a\2\2\u028c\u028d\7e\2\2\u028d"+ + "\u028e\7u\2\2\u028e\u00bc\3\2\2\2\u028f\u0290\7k\2\2\u0290\u0291\7h\2"+ + "\2\u0291\u0292\7a\2\2\u0292\u0293\7e\2\2\u0293\u0294\7e\2\2\u0294\u00be"+ + "\3\2\2\2\u0295\u0296\7k\2\2\u0296\u0297\7h\2\2\u0297\u0298\7a\2\2\u0298"+ + "\u0299\7g\2\2\u0299\u029a\7s\2\2\u029a\u00c0\3\2\2\2\u029b\u029c\7k\2"+ + "\2\u029c\u029d\7h\2\2\u029d\u029e\7a\2\2\u029e\u029f\7|\2\2\u029f\u00c2"+ + "\3\2\2\2\u02a0\u02a1\7k\2\2\u02a1\u02a2\7h\2\2\u02a2\u02a3\7a\2\2\u02a3"+ + "\u02a4\7p\2\2\u02a4\u02a5\7g\2\2\u02a5\u00c4\3\2\2\2\u02a6\u02a7\7k\2"+ + "\2\u02a7\u02a8\7h\2\2\u02a8\u02a9\7a\2\2\u02a9\u02aa\7p\2\2\u02aa\u02ab"+ + "\7|\2\2\u02ab\u00c6\3\2\2\2\u02ac\u02ad\7k\2\2\u02ad\u02ae\7h\2\2\u02ae"+ + "\u02af\7a\2\2\u02af\u02b0\7r\2\2\u02b0\u02b1\7n\2\2\u02b1\u00c8\3\2\2"+ + "\2\u02b2\u02b3\7k\2\2\u02b3\u02b4\7h\2\2\u02b4\u02b5\7a\2\2\u02b5\u02b6"+ + "\7r\2\2\u02b6\u02b7\7q\2\2\u02b7\u02b8\7u\2\2\u02b8\u00ca\3\2\2\2\u02b9"+ + "\u02ba\7k\2\2\u02ba\u02bb\7h\2\2\u02bb\u02bc\7a\2\2\u02bc\u02bd\7o\2\2"+ + "\u02bd\u02be\7k\2\2\u02be\u00cc\3\2\2\2\u02bf\u02c0\7k\2\2\u02c0\u02c1"+ + "\7h\2\2\u02c1\u02c2\7a\2\2\u02c2\u02c3\7p\2\2\u02c3\u02c4\7g\2\2\u02c4"+ + "\u02c5\7i\2\2\u02c5\u00ce\3\2\2\2\u02c6\u02c7\7k\2\2\u02c7\u02c8\7h\2"+ + "\2\u02c8\u02c9\7a\2\2\u02c9\u02ca\7x\2\2\u02ca\u02cb\7u\2\2\u02cb\u00d0"+ + "\3\2\2\2\u02cc\u02cd\7k\2\2\u02cd\u02ce\7h\2\2\u02ce\u02cf\7a\2\2\u02cf"+ + "\u02d0\7x\2\2\u02d0\u02d1\7e\2\2\u02d1\u00d2\3\2\2\2\u02d2\u02d3\7h\2"+ + "\2\u02d3\u02d4\7q\2\2\u02d4\u02d5\7t\2\2\u02d5\u00d4\3\2\2\2\u02d6\u02d7"+ + "\7k\2\2\u02d7\u02d8\7p\2\2\u02d8\u00d6\3\2\2\2\u02d9\u02da\7y\2\2\u02da"+ + "\u02db\7j\2\2\u02db\u02dc\7k\2\2\u02dc\u02dd\7n\2\2\u02dd\u02de\7g\2\2"+ + "\u02de\u00d8\3\2\2\2\u02df\u02e0\7t\2\2\u02e0\u02e1\7g\2\2\u02e1\u02e2"+ + "\7r\2\2\u02e2\u02e3\7g\2\2\u02e3\u02e4\7c\2\2\u02e4\u02e5\7v\2\2\u02e5"+ + "\u00da\3\2\2\2\u02e6\u02e7\7w\2\2\u02e7\u02e8\7p\2\2\u02e8\u02e9\7v\2"+ + "\2\u02e9\u02ea\7k\2\2\u02ea\u02eb\7n\2\2\u02eb\u00dc\3\2\2\2\u02ec\u02ed"+ + "\7y\2\2\u02ed\u02ee\7j\2\2\u02ee\u02ef\7g\2\2\u02ef\u02f0\7p\2\2\u02f0"+ + "\u00de\3\2\2\2\u02f1\u02f5\t\2\2\2\u02f2\u02f4\t\3\2\2\u02f3\u02f2\3\2"+ + "\2\2\u02f4\u02f7\3\2\2\2\u02f5\u02f3\3\2\2\2\u02f5\u02f6\3\2\2\2\u02f6"+ + "\u02f8\3\2\2\2\u02f7\u02f5\3\2\2\2\u02f8\u02f9\5\u00e1q\2\u02f9\u02fa"+ + "\3\2\2\2\u02fa\u02fb\bp\2\2\u02fb\u00e0\3\2\2\2\u02fc\u0300\7=\2\2\u02fd"+ + "\u02ff\n\2\2\2\u02fe\u02fd\3\2\2\2\u02ff\u0302\3\2\2\2\u0300\u02fe\3\2"+ + "\2\2\u0300\u0301\3\2\2\2\u0301\u0303\3\2\2\2\u0302\u0300\3\2\2\2\u0303"+ + "\u0304\bq\2\2\u0304\u00e2\3\2\2\2\u0305\u0306\t\3\2\2\u0306\u0307\3\2"+ + "\2\2\u0307\u0308\br\3\2\u0308\u00e4\3\2\2\2\u0309\u030b\t\2\2\2\u030a"+ + "\u0309\3\2\2\2\u030b\u030c\3\2\2\2\u030c\u030a\3\2\2\2\u030c\u030d\3\2"+ + "\2\2\u030d\u00e6\3\2\2\2\u030e\u0312\t\4\2\2\u030f\u0311\t\5\2\2\u0310"+ + "\u030f\3\2\2\2\u0311\u0314\3\2\2\2\u0312\u0310\3\2\2\2\u0312\u0313\3\2"+ + "\2\2\u0313\u00e8\3\2\2\2\u0314\u0312\3\2\2\2\u0315\u031d\4\62;\2\u0316"+ + "\u0318\4\63;\2\u0317\u0319\4\62;\2\u0318\u0317\3\2\2\2\u0319\u031a\3\2"+ + "\2\2\u031a\u0318\3\2\2\2\u031a\u031b\3\2\2\2\u031b\u031d\3\2\2\2\u031c"+ + "\u0315\3\2\2\2\u031c\u0316\3\2\2\2\u031d\u00ea\3\2\2\2\u031e\u0320\7&"+ + "\2\2\u031f\u0321\t\6\2\2\u0320\u031f\3\2\2\2\u0321\u0322\3\2\2\2\u0322"+ + "\u0320\3\2\2\2\u0322\u0323\3\2\2\2\u0323\u00ec\3\2\2\2\u0324\u0326\7\'"+ + "\2\2\u0325\u0327\4\62\63\2\u0326\u0325\3\2\2\2\u0327\u0328\3\2\2\2\u0328"+ + "\u0326\3\2\2\2\u0328\u0329\3\2\2\2\u0329\u00ee\3\2\2\2\u032a\u032b\7("+ + "\2\2\u032b\u00f0\3\2\2\2\u032c\u0332\5\u00f3z\2\u032d\u032f\t\7\2\2\u032e"+ + "\u0330\t\b\2\2\u032f\u032e\3\2\2\2\u032f\u0330\3\2\2\2\u0330\u0331\3\2"+ + "\2\2\u0331\u0333\5\u00f3z\2\u0332\u032d\3\2\2\2\u0332\u0333\3\2\2\2\u0333"+ + "\u00f2\3\2\2\2\u0334\u0336\4\62;\2\u0335\u0334\3\2\2\2\u0336\u0337\3\2"+ + "\2\2\u0337\u0335\3\2\2\2\u0337\u0338\3\2\2\2\u0338\u033f\3\2\2\2\u0339"+ + "\u033b\7\60\2\2\u033a\u033c\4\62;\2\u033b\u033a\3\2\2\2\u033c\u033d\3"+ + "\2\2\2\u033d\u033b\3\2\2\2\u033d\u033e\3\2\2\2\u033e\u0340\3\2\2\2\u033f"+ + "\u0339\3\2\2\2\u033f\u0340\3\2\2\2\u0340\u00f4\3\2\2\2\u0341\u0342\7^"+ + "\2\2\u0342\u0346\13\2\2\2\u0343\u0344\7^\2\2\u0344\u0346\5\u00e5s\2\u0345"+ + "\u0341\3\2\2\2\u0345\u0343\3\2\2\2\u0346\u00f6\3\2\2\2\u0347\u034c\7$"+ + "\2\2\u0348\u034b\5\u00f5{\2\u0349\u034b\n\t\2\2\u034a\u0348\3\2\2\2\u034a"+ + "\u0349\3\2\2\2\u034b\u034e\3\2\2\2\u034c\u034a\3\2\2\2\u034c\u034d\3\2"+ + "\2\2\u034d\u034f\3\2\2\2\u034e\u034c\3\2\2\2\u034f\u0350\7$\2\2\u0350"+ + "\u0351\b|\4\2\u0351\u00f8\3\2\2\2\u0352\u0353\7}\2\2\u0353\u0354\7}\2"+ + "\2\u0354\u0356\3\2\2\2\u0355\u0357\13\2\2\2\u0356\u0355\3\2\2\2\u0357"+ + "\u0358\3\2\2\2\u0358\u0359\3\2\2\2\u0358\u0356\3\2\2\2\u0359\u035a\3\2"+ + "\2\2\u035a\u035b\7\177\2\2\u035b\u035c\7\177\2\2\u035c\u035d\3\2\2\2\u035d"+ + "\u035e\b}\5\2\u035e\u00fa\3\2\2\2\u035f\u0362\7)\2\2\u0360\u0363\5\u00f5"+ + "{\2\u0361\u0363\n\t\2\2\u0362\u0360\3\2\2\2\u0362\u0361\3\2\2\2\u0363"+ + "\u0364\3\2\2\2\u0364\u0365\7)\2\2\u0365\u0366\b~\6\2\u0366\u00fc\3\2\2"+ + "\2\u0367\u0368\7B\2\2\u0368\u0369\7|\2\2\u0369\u036a\7r\2\2\u036a\u00fe"+ + "\3\2\2\2\u036b\u036c\7]\2\2\u036c\u036d\7_\2\2\u036d\u0100\3\2\2\2\26"+ + "\2\u02f5\u0300\u030c\u0312\u031a\u031c\u0320\u0322\u0328\u032f\u0332\u0337"+ + "\u033d\u033f\u0345\u034a\u034c\u0358\u0362\7\2\3\2\b\2\2\3|\2\3}\3\3~"+ + "\4"; + 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/parser/src/prog8/parser/prog8Parser.java b/parser/src/prog8/parser/prog8Parser.java new file mode 100644 index 000000000..26791c487 --- /dev/null +++ b/parser/src/prog8/parser/prog8Parser.java @@ -0,0 +1,5587 @@ +// Generated from prog8.g4 by ANTLR 4.7.2 + +package prog8.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 prog8Parser extends Parser { + static { RuntimeMetaData.checkVersion("4.7.2", 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, T__65=66, + T__66=67, T__67=68, T__68=69, T__69=70, T__70=71, T__71=72, T__72=73, + T__73=74, T__74=75, T__75=76, T__76=77, T__77=78, T__78=79, T__79=80, + T__80=81, T__81=82, T__82=83, T__83=84, T__84=85, T__85=86, T__86=87, + T__87=88, T__88=89, T__89=90, T__90=91, T__91=92, T__92=93, T__93=94, + T__94=95, T__95=96, T__96=97, T__97=98, T__98=99, T__99=100, T__100=101, + T__101=102, T__102=103, T__103=104, T__104=105, T__105=106, T__106=107, + T__107=108, T__108=109, T__109=110, LINECOMMENT=111, COMMENT=112, WS=113, + EOL=114, NAME=115, DEC_INTEGER=116, HEX_INTEGER=117, BIN_INTEGER=118, + ADDRESS_OF=119, FLOAT_NUMBER=120, STRING=121, INLINEASMBLOCK=122, SINGLECHAR=123, + ZEROPAGE=124, ARRAYSIG=125; + public static final int + RULE_module = 0, RULE_modulestatement = 1, RULE_block = 2, RULE_statement = 3, + RULE_labeldef = 4, RULE_unconditionaljump = 5, RULE_directive = 6, RULE_directivearg = 7, + RULE_vardecl = 8, RULE_structvardecl = 9, RULE_varinitializer = 10, RULE_structvarinitializer = 11, + RULE_constdecl = 12, RULE_memoryvardecl = 13, RULE_structdecl = 14, RULE_datatype = 15, + RULE_arrayindex = 16, RULE_assignment = 17, RULE_augassignment = 18, RULE_assign_target = 19, + RULE_postincrdecr = 20, RULE_expression = 21, RULE_typecast = 22, RULE_arrayindexed = 23, + RULE_directmemory = 24, RULE_addressof = 25, RULE_functioncall = 26, RULE_functioncall_stmt = 27, + RULE_expression_list = 28, RULE_returnstmt = 29, RULE_breakstmt = 30, + RULE_continuestmt = 31, RULE_identifier = 32, RULE_scoped_identifier = 33, + RULE_register = 34, RULE_registerorpair = 35, RULE_statusregister = 36, + RULE_integerliteral = 37, RULE_wordsuffix = 38, RULE_booleanliteral = 39, + RULE_arrayliteral = 40, RULE_structliteral = 41, RULE_stringliteral = 42, + RULE_charliteral = 43, RULE_floatliteral = 44, RULE_literalvalue = 45, + RULE_inlineasm = 46, RULE_subroutine = 47, RULE_sub_return_part = 48, + RULE_statement_block = 49, RULE_sub_params = 50, RULE_sub_returns = 51, + RULE_asmsubroutine = 52, RULE_asmsub_address = 53, RULE_asmsub_params = 54, + RULE_asmsub_param = 55, RULE_asmsub_clobbers = 56, RULE_clobber = 57, + RULE_asmsub_returns = 58, RULE_asmsub_return = 59, RULE_if_stmt = 60, + RULE_else_part = 61, RULE_branch_stmt = 62, RULE_branchcondition = 63, + RULE_forloop = 64, RULE_whileloop = 65, RULE_repeatloop = 66, RULE_whenstmt = 67, + RULE_when_choice = 68; + private static String[] makeRuleNames() { + return new String[] { + "module", "modulestatement", "block", "statement", "labeldef", "unconditionaljump", + "directive", "directivearg", "vardecl", "structvardecl", "varinitializer", + "structvarinitializer", "constdecl", "memoryvardecl", "structdecl", "datatype", + "arrayindex", "assignment", "augassignment", "assign_target", "postincrdecr", + "expression", "typecast", "arrayindexed", "directmemory", "addressof", + "functioncall", "functioncall_stmt", "expression_list", "returnstmt", + "breakstmt", "continuestmt", "identifier", "scoped_identifier", "register", + "registerorpair", "statusregister", "integerliteral", "wordsuffix", "booleanliteral", + "arrayliteral", "structliteral", "stringliteral", "charliteral", "floatliteral", + "literalvalue", "inlineasm", "subroutine", "sub_return_part", "statement_block", + "sub_params", "sub_returns", "asmsubroutine", "asmsub_address", "asmsub_params", + "asmsub_param", "asmsub_clobbers", "clobber", "asmsub_returns", "asmsub_return", + "if_stmt", "else_part", "branch_stmt", "branchcondition", "forloop", + "whileloop", "repeatloop", "whenstmt", "when_choice" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, "'~'", "':'", "'goto'", "'%output'", "'%launcher'", "'%zeropage'", + "'%zpreserved'", "'%address'", "'%import'", "'%breakpoint'", "'%asminclude'", + "'%asmbinary'", "'%option'", "','", "'='", "'const'", "'struct'", "'{'", + "'}'", "'ubyte'", "'byte'", "'uword'", "'word'", "'float'", "'str'", + "'str_s'", "'['", "']'", "'+='", "'-='", "'/='", "'*='", "'**='", "'&='", + "'|='", "'^='", "'%='", "'<<='", "'>>='", "'++'", "'--'", "'+'", "'-'", + "'**'", "'*'", "'/'", "'%'", "'<<'", "'>>'", "'<'", "'>'", "'<='", "'>='", + "'=='", "'!='", "'^'", "'|'", "'to'", "'step'", "'and'", "'or'", "'xor'", + "'not'", "'('", "')'", "'as'", "'@'", "'return'", "'break'", "'continue'", + "'.'", "'A'", "'X'", "'Y'", "'AX'", "'AY'", "'XY'", "'Pc'", "'Pz'", "'Pn'", + "'Pv'", "'.w'", "'true'", "'false'", "'%asm'", "'sub'", "'->'", "'asmsub'", + "'stack'", "'clobbers'", "'if'", "'else'", "'if_cs'", "'if_cc'", "'if_eq'", + "'if_z'", "'if_ne'", "'if_nz'", "'if_pl'", "'if_pos'", "'if_mi'", "'if_neg'", + "'if_vs'", "'if_vc'", "'for'", "'in'", "'while'", "'repeat'", "'until'", + "'when'", null, null, null, null, null, null, null, null, "'&'", null, + null, null, null, "'@zp'", "'[]'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + 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, 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, "LINECOMMENT", "COMMENT", "WS", "EOL", "NAME", "DEC_INTEGER", + "HEX_INTEGER", "BIN_INTEGER", "ADDRESS_OF", "FLOAT_NUMBER", "STRING", + "INLINEASMBLOCK", "SINGLECHAR", "ZEROPAGE", "ARRAYSIG" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + 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 "prog8.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public prog8Parser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + public static class ModuleContext extends ParserRuleContext { + public TerminalNode EOF() { return getToken(prog8Parser.EOF, 0); } + public List modulestatement() { + return getRuleContexts(ModulestatementContext.class); + } + public ModulestatementContext modulestatement(int i) { + return getRuleContext(ModulestatementContext.class,i); + } + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, 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(142); + _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__12))) != 0) || _la==EOL) { + { + setState(140); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__0: + case T__3: + case T__4: + case T__5: + case T__6: + case T__7: + case T__8: + case T__9: + case T__10: + case T__11: + case T__12: + { + setState(138); + modulestatement(); + } + break; + case EOL: + { + setState(139); + match(EOL); + } + break; + default: + throw new NoViableAltException(this); + } + } + setState(144); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(145); + match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ModulestatementContext extends ParserRuleContext { + public DirectiveContext directive() { + return getRuleContext(DirectiveContext.class,0); + } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public ModulestatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_modulestatement; } + } + + public final ModulestatementContext modulestatement() throws RecognitionException { + ModulestatementContext _localctx = new ModulestatementContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_modulestatement); + try { + setState(149); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__3: + case T__4: + case T__5: + case T__6: + case T__7: + case T__8: + case T__9: + case T__10: + case T__11: + case T__12: + enterOuterAlt(_localctx, 1); + { + setState(147); + directive(); + } + break; + case T__0: + enterOuterAlt(_localctx, 2); + { + setState(148); + block(); + } + 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 BlockContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public Statement_blockContext statement_block() { + return getRuleContext(Statement_blockContext.class,0); + } + public TerminalNode EOL() { return getToken(prog8Parser.EOL, 0); } + public IntegerliteralContext integerliteral() { + return getRuleContext(IntegerliteralContext.class,0); + } + public BlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_block; } + } + + public final BlockContext block() throws RecognitionException { + BlockContext _localctx = new BlockContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_block); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(151); + match(T__0); + setState(152); + identifier(); + setState(154); + _errHandler.sync(this); + _la = _input.LA(1); + if (((((_la - 116)) & ~0x3f) == 0 && ((1L << (_la - 116)) & ((1L << (DEC_INTEGER - 116)) | (1L << (HEX_INTEGER - 116)) | (1L << (BIN_INTEGER - 116)))) != 0)) { + { + setState(153); + integerliteral(); + } + } + + setState(156); + statement_block(); + setState(157); + match(EOL); + } + } + 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 VarinitializerContext varinitializer() { + return getRuleContext(VarinitializerContext.class,0); + } + public StructvarinitializerContext structvarinitializer() { + return getRuleContext(StructvarinitializerContext.class,0); + } + public VardeclContext vardecl() { + return getRuleContext(VardeclContext.class,0); + } + public StructvardeclContext structvardecl() { + return getRuleContext(StructvardeclContext.class,0); + } + public ConstdeclContext constdecl() { + return getRuleContext(ConstdeclContext.class,0); + } + public MemoryvardeclContext memoryvardecl() { + return getRuleContext(MemoryvardeclContext.class,0); + } + public StructdeclContext structdecl() { + return getRuleContext(StructdeclContext.class,0); + } + public AssignmentContext assignment() { + return getRuleContext(AssignmentContext.class,0); + } + public AugassignmentContext augassignment() { + return getRuleContext(AugassignmentContext.class,0); + } + public UnconditionaljumpContext unconditionaljump() { + return getRuleContext(UnconditionaljumpContext.class,0); + } + public PostincrdecrContext postincrdecr() { + return getRuleContext(PostincrdecrContext.class,0); + } + public Functioncall_stmtContext functioncall_stmt() { + return getRuleContext(Functioncall_stmtContext.class,0); + } + public If_stmtContext if_stmt() { + return getRuleContext(If_stmtContext.class,0); + } + public Branch_stmtContext branch_stmt() { + return getRuleContext(Branch_stmtContext.class,0); + } + public SubroutineContext subroutine() { + return getRuleContext(SubroutineContext.class,0); + } + public AsmsubroutineContext asmsubroutine() { + return getRuleContext(AsmsubroutineContext.class,0); + } + public InlineasmContext inlineasm() { + return getRuleContext(InlineasmContext.class,0); + } + public ReturnstmtContext returnstmt() { + return getRuleContext(ReturnstmtContext.class,0); + } + public ForloopContext forloop() { + return getRuleContext(ForloopContext.class,0); + } + public WhileloopContext whileloop() { + return getRuleContext(WhileloopContext.class,0); + } + public RepeatloopContext repeatloop() { + return getRuleContext(RepeatloopContext.class,0); + } + public WhenstmtContext whenstmt() { + return getRuleContext(WhenstmtContext.class,0); + } + public BreakstmtContext breakstmt() { + return getRuleContext(BreakstmtContext.class,0); + } + public ContinuestmtContext continuestmt() { + return getRuleContext(ContinuestmtContext.class,0); + } + public LabeldefContext labeldef() { + return getRuleContext(LabeldefContext.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, 6, RULE_statement); + try { + setState(185); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(159); + directive(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(160); + varinitializer(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(161); + structvarinitializer(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(162); + vardecl(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(163); + structvardecl(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(164); + constdecl(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(165); + memoryvardecl(); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(166); + structdecl(); + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(167); + assignment(); + } + break; + case 10: + enterOuterAlt(_localctx, 10); + { + setState(168); + augassignment(); + } + break; + case 11: + enterOuterAlt(_localctx, 11); + { + setState(169); + unconditionaljump(); + } + break; + case 12: + enterOuterAlt(_localctx, 12); + { + setState(170); + postincrdecr(); + } + break; + case 13: + enterOuterAlt(_localctx, 13); + { + setState(171); + functioncall_stmt(); + } + break; + case 14: + enterOuterAlt(_localctx, 14); + { + setState(172); + if_stmt(); + } + break; + case 15: + enterOuterAlt(_localctx, 15); + { + setState(173); + branch_stmt(); + } + break; + case 16: + enterOuterAlt(_localctx, 16); + { + setState(174); + subroutine(); + } + break; + case 17: + enterOuterAlt(_localctx, 17); + { + setState(175); + asmsubroutine(); + } + break; + case 18: + enterOuterAlt(_localctx, 18); + { + setState(176); + inlineasm(); + } + break; + case 19: + enterOuterAlt(_localctx, 19); + { + setState(177); + returnstmt(); + } + break; + case 20: + enterOuterAlt(_localctx, 20); + { + setState(178); + forloop(); + } + break; + case 21: + enterOuterAlt(_localctx, 21); + { + setState(179); + whileloop(); + } + break; + case 22: + enterOuterAlt(_localctx, 22); + { + setState(180); + repeatloop(); + } + break; + case 23: + enterOuterAlt(_localctx, 23); + { + setState(181); + whenstmt(); + } + break; + case 24: + enterOuterAlt(_localctx, 24); + { + setState(182); + breakstmt(); + } + break; + case 25: + enterOuterAlt(_localctx, 25); + { + setState(183); + continuestmt(); + } + break; + case 26: + enterOuterAlt(_localctx, 26); + { + setState(184); + labeldef(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LabeldefContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public LabeldefContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_labeldef; } + } + + public final LabeldefContext labeldef() throws RecognitionException { + LabeldefContext _localctx = new LabeldefContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_labeldef); + try { + enterOuterAlt(_localctx, 1); + { + setState(187); + identifier(); + setState(188); + match(T__1); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class UnconditionaljumpContext extends ParserRuleContext { + public IntegerliteralContext integerliteral() { + return getRuleContext(IntegerliteralContext.class,0); + } + public Scoped_identifierContext scoped_identifier() { + return getRuleContext(Scoped_identifierContext.class,0); + } + public UnconditionaljumpContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_unconditionaljump; } + } + + public final UnconditionaljumpContext unconditionaljump() throws RecognitionException { + UnconditionaljumpContext _localctx = new UnconditionaljumpContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_unconditionaljump); + try { + enterOuterAlt(_localctx, 1); + { + setState(190); + match(T__2); + setState(193); + _errHandler.sync(this); + switch (_input.LA(1)) { + case DEC_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + { + setState(191); + integerliteral(); + } + break; + case NAME: + { + setState(192); + scoped_identifier(); + } + 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 DirectiveContext extends ParserRuleContext { + public Token directivename; + 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, 12, RULE_directive); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(195); + ((DirectiveContext)_localctx).directivename = _input.LT(1); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((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__12))) != 0)) ) { + ((DirectiveContext)_localctx).directivename = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(207); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { + case 1: + { + setState(197); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) { + case 1: + { + setState(196); + directivearg(); + } + break; + } + } + break; + case 2: + { + setState(199); + directivearg(); + setState(204); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__13) { + { + { + setState(200); + match(T__13); + setState(201); + directivearg(); + } + } + setState(206); + _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 StringliteralContext stringliteral() { + return getRuleContext(StringliteralContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.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, 14, RULE_directivearg); + try { + setState(212); + _errHandler.sync(this); + switch (_input.LA(1)) { + case STRING: + enterOuterAlt(_localctx, 1); + { + setState(209); + stringliteral(); + } + break; + case NAME: + enterOuterAlt(_localctx, 2); + { + setState(210); + identifier(); + } + break; + case DEC_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + enterOuterAlt(_localctx, 3); + { + setState(211); + 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 IdentifierContext varname; + public DatatypeContext datatype() { + return getRuleContext(DatatypeContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public TerminalNode ZEROPAGE() { return getToken(prog8Parser.ZEROPAGE, 0); } + public ArrayindexContext arrayindex() { + return getRuleContext(ArrayindexContext.class,0); + } + public TerminalNode ARRAYSIG() { return getToken(prog8Parser.ARRAYSIG, 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, 16, RULE_vardecl); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(214); + datatype(); + setState(216); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ZEROPAGE) { + { + setState(215); + match(ZEROPAGE); + } + } + + setState(220); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__26: + { + setState(218); + arrayindex(); + } + break; + case ARRAYSIG: + { + setState(219); + match(ARRAYSIG); + } + break; + case NAME: + break; + default: + break; + } + setState(222); + ((VardeclContext)_localctx).varname = identifier(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StructvardeclContext extends ParserRuleContext { + public IdentifierContext structname; + public IdentifierContext varname; + public List identifier() { + return getRuleContexts(IdentifierContext.class); + } + public IdentifierContext identifier(int i) { + return getRuleContext(IdentifierContext.class,i); + } + public StructvardeclContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_structvardecl; } + } + + public final StructvardeclContext structvardecl() throws RecognitionException { + StructvardeclContext _localctx = new StructvardeclContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_structvardecl); + try { + enterOuterAlt(_localctx, 1); + { + setState(224); + ((StructvardeclContext)_localctx).structname = identifier(); + setState(225); + ((StructvardeclContext)_localctx).varname = identifier(); + } + } + 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 VardeclContext vardecl() { + return getRuleContext(VardeclContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.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, 20, RULE_varinitializer); + try { + enterOuterAlt(_localctx, 1); + { + setState(227); + vardecl(); + setState(228); + match(T__14); + setState(229); + expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StructvarinitializerContext extends ParserRuleContext { + public StructvardeclContext structvardecl() { + return getRuleContext(StructvardeclContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public StructvarinitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_structvarinitializer; } + } + + public final StructvarinitializerContext structvarinitializer() throws RecognitionException { + StructvarinitializerContext _localctx = new StructvarinitializerContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_structvarinitializer); + try { + enterOuterAlt(_localctx, 1); + { + setState(231); + structvardecl(); + setState(232); + match(T__14); + setState(233); + 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, 24, RULE_constdecl); + try { + enterOuterAlt(_localctx, 1); + { + setState(235); + match(T__15); + setState(236); + 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 TerminalNode ADDRESS_OF() { return getToken(prog8Parser.ADDRESS_OF, 0); } + 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, 26, RULE_memoryvardecl); + try { + enterOuterAlt(_localctx, 1); + { + setState(238); + match(ADDRESS_OF); + setState(239); + varinitializer(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StructdeclContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, i); + } + public List vardecl() { + return getRuleContexts(VardeclContext.class); + } + public VardeclContext vardecl(int i) { + return getRuleContext(VardeclContext.class,i); + } + public StructdeclContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_structdecl; } + } + + public final StructdeclContext structdecl() throws RecognitionException { + StructdeclContext _localctx = new StructdeclContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_structdecl); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(241); + match(T__16); + setState(242); + identifier(); + setState(243); + match(T__17); + setState(244); + match(EOL); + setState(245); + vardecl(); + setState(250); + _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 ) { + { + { + setState(246); + match(EOL); + setState(247); + vardecl(); + } + } + } + setState(252); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,12,_ctx); + } + setState(254); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(253); + match(EOL); + } + } + + setState(256); + match(T__18); + setState(257); + match(EOL); + } + } + 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, 30, RULE_datatype); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(259); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25))) != 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 ArrayindexContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ArrayindexContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayindex; } + } + + public final ArrayindexContext arrayindex() throws RecognitionException { + ArrayindexContext _localctx = new ArrayindexContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_arrayindex); + try { + enterOuterAlt(_localctx, 1); + { + setState(261); + match(T__26); + setState(262); + expression(0); + setState(263); + match(T__27); + } + } + 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, 34, RULE_assignment); + try { + enterOuterAlt(_localctx, 1); + { + setState(265); + assign_target(); + setState(266); + match(T__14); + setState(267); + 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 Token operator; + 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, 36, RULE_augassignment); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(269); + assign_target(); + setState(270); + ((AugassignmentContext)_localctx).operator = _input.LT(1); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__28) | (1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38))) != 0)) ) { + ((AugassignmentContext)_localctx).operator = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(271); + 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 Scoped_identifierContext scoped_identifier() { + return getRuleContext(Scoped_identifierContext.class,0); + } + public ArrayindexedContext arrayindexed() { + return getRuleContext(ArrayindexedContext.class,0); + } + public DirectmemoryContext directmemory() { + return getRuleContext(DirectmemoryContext.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, 38, RULE_assign_target); + try { + setState(277); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(273); + register(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(274); + scoped_identifier(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(275); + arrayindexed(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(276); + directmemory(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PostincrdecrContext extends ParserRuleContext { + public Token operator; + public Assign_targetContext assign_target() { + return getRuleContext(Assign_targetContext.class,0); + } + public PostincrdecrContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_postincrdecr; } + } + + public final PostincrdecrContext postincrdecr() throws RecognitionException { + PostincrdecrContext _localctx = new PostincrdecrContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_postincrdecr); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(279); + assign_target(); + setState(280); + ((PostincrdecrContext)_localctx).operator = _input.LT(1); + _la = _input.LA(1); + if ( !(_la==T__39 || _la==T__40) ) { + ((PostincrdecrContext)_localctx).operator = (Token)_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 ExpressionContext extends ParserRuleContext { + public ExpressionContext left; + public ExpressionContext rangefrom; + public Token prefix; + public Token bop; + public ExpressionContext right; + public ExpressionContext rangeto; + public ExpressionContext rangestep; + public FunctioncallContext functioncall() { + return getRuleContext(FunctioncallContext.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 Scoped_identifierContext scoped_identifier() { + return getRuleContext(Scoped_identifierContext.class,0); + } + public ArrayindexedContext arrayindexed() { + return getRuleContext(ArrayindexedContext.class,0); + } + public DirectmemoryContext directmemory() { + return getRuleContext(DirectmemoryContext.class,0); + } + public AddressofContext addressof() { + return getRuleContext(AddressofContext.class,0); + } + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, i); + } + public TerminalNode ADDRESS_OF() { return getToken(prog8Parser.ADDRESS_OF, 0); } + public TypecastContext typecast() { + return getRuleContext(TypecastContext.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 = 42; + enterRecursionRule(_localctx, 42, RULE_expression, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(298); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) { + case 1: + { + setState(283); + functioncall(); + } + break; + case 2: + { + setState(284); + ((ExpressionContext)_localctx).prefix = _input.LT(1); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__41) | (1L << T__42))) != 0)) ) { + ((ExpressionContext)_localctx).prefix = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(285); + expression(23); + } + break; + case 3: + { + setState(286); + ((ExpressionContext)_localctx).prefix = match(T__62); + setState(287); + expression(9); + } + break; + case 4: + { + setState(288); + literalvalue(); + } + break; + case 5: + { + setState(289); + register(); + } + break; + case 6: + { + setState(290); + scoped_identifier(); + } + break; + case 7: + { + setState(291); + arrayindexed(); + } + break; + case 8: + { + setState(292); + directmemory(); + } + break; + case 9: + { + setState(293); + addressof(); + } + break; + case 10: + { + setState(294); + match(T__63); + setState(295); + expression(0); + setState(296); + match(T__64); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(419); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,42,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(417); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,41,_ctx) ) { + case 1: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.left = _prevctx; + _localctx.left = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(300); + if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); + setState(302); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(301); + match(EOL); + } + } + + setState(304); + ((ExpressionContext)_localctx).bop = match(T__43); + setState(306); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(305); + match(EOL); + } + } + + setState(308); + ((ExpressionContext)_localctx).right = expression(23); + } + break; + case 2: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.left = _prevctx; + _localctx.left = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(309); + if (!(precpred(_ctx, 21))) throw new FailedPredicateException(this, "precpred(_ctx, 21)"); + setState(311); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(310); + match(EOL); + } + } + + setState(313); + ((ExpressionContext)_localctx).bop = _input.LT(1); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__44) | (1L << T__45) | (1L << T__46))) != 0)) ) { + ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(315); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(314); + match(EOL); + } + } + + setState(317); + ((ExpressionContext)_localctx).right = expression(22); + } + break; + case 3: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.left = _prevctx; + _localctx.left = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(318); + if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)"); + setState(320); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(319); + match(EOL); + } + } + + setState(322); + ((ExpressionContext)_localctx).bop = _input.LT(1); + _la = _input.LA(1); + if ( !(_la==T__41 || _la==T__42) ) { + ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(324); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(323); + match(EOL); + } + } + + setState(326); + ((ExpressionContext)_localctx).right = expression(21); + } + break; + case 4: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.left = _prevctx; + _localctx.left = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(327); + if (!(precpred(_ctx, 19))) throw new FailedPredicateException(this, "precpred(_ctx, 19)"); + setState(329); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(328); + match(EOL); + } + } + + setState(331); + ((ExpressionContext)_localctx).bop = _input.LT(1); + _la = _input.LA(1); + if ( !(_la==T__47 || _la==T__48) ) { + ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(333); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(332); + match(EOL); + } + } + + setState(335); + ((ExpressionContext)_localctx).right = expression(20); + } + break; + case 5: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.left = _prevctx; + _localctx.left = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(336); + if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); + setState(338); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(337); + match(EOL); + } + } + + setState(340); + ((ExpressionContext)_localctx).bop = _input.LT(1); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__49) | (1L << T__50) | (1L << T__51) | (1L << T__52))) != 0)) ) { + ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(342); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(341); + match(EOL); + } + } + + setState(344); + ((ExpressionContext)_localctx).right = expression(19); + } + break; + case 6: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.left = _prevctx; + _localctx.left = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(345); + if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)"); + setState(347); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(346); + match(EOL); + } + } + + setState(349); + ((ExpressionContext)_localctx).bop = _input.LT(1); + _la = _input.LA(1); + if ( !(_la==T__53 || _la==T__54) ) { + ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(351); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(350); + match(EOL); + } + } + + setState(353); + ((ExpressionContext)_localctx).right = expression(18); + } + break; + case 7: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.left = _prevctx; + _localctx.left = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(354); + if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); + setState(356); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(355); + match(EOL); + } + } + + setState(358); + ((ExpressionContext)_localctx).bop = match(ADDRESS_OF); + setState(360); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(359); + match(EOL); + } + } + + setState(362); + ((ExpressionContext)_localctx).right = expression(17); + } + break; + case 8: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.left = _prevctx; + _localctx.left = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(363); + if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)"); + setState(365); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(364); + match(EOL); + } + } + + setState(367); + ((ExpressionContext)_localctx).bop = match(T__55); + setState(369); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(368); + match(EOL); + } + } + + setState(371); + ((ExpressionContext)_localctx).right = expression(16); + } + break; + case 9: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.left = _prevctx; + _localctx.left = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(372); + if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); + setState(374); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(373); + match(EOL); + } + } + + setState(376); + ((ExpressionContext)_localctx).bop = match(T__56); + setState(378); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(377); + match(EOL); + } + } + + setState(380); + ((ExpressionContext)_localctx).right = expression(15); + } + break; + case 10: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.left = _prevctx; + _localctx.left = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(381); + if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); + setState(383); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(382); + match(EOL); + } + } + + setState(385); + ((ExpressionContext)_localctx).bop = match(T__59); + setState(387); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(386); + match(EOL); + } + } + + setState(389); + ((ExpressionContext)_localctx).right = expression(13); + } + break; + case 11: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.left = _prevctx; + _localctx.left = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(390); + if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); + setState(392); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(391); + match(EOL); + } + } + + setState(394); + ((ExpressionContext)_localctx).bop = match(T__60); + setState(396); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(395); + match(EOL); + } + } + + setState(398); + ((ExpressionContext)_localctx).right = expression(12); + } + break; + case 12: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.left = _prevctx; + _localctx.left = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(399); + if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); + setState(401); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(400); + match(EOL); + } + } + + setState(403); + ((ExpressionContext)_localctx).bop = match(T__61); + setState(405); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(404); + match(EOL); + } + } + + setState(407); + ((ExpressionContext)_localctx).right = expression(11); + } + break; + case 13: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.rangefrom = _prevctx; + _localctx.rangefrom = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(408); + if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); + setState(409); + match(T__57); + setState(410); + ((ExpressionContext)_localctx).rangeto = expression(0); + setState(413); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) { + case 1: + { + setState(411); + match(T__58); + setState(412); + ((ExpressionContext)_localctx).rangestep = expression(0); + } + break; + } + } + break; + case 14: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(415); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(416); + typecast(); + } + break; + } + } + } + setState(421); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,42,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class TypecastContext extends ParserRuleContext { + public DatatypeContext datatype() { + return getRuleContext(DatatypeContext.class,0); + } + public TypecastContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typecast; } + } + + public final TypecastContext typecast() throws RecognitionException { + TypecastContext _localctx = new TypecastContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_typecast); + try { + enterOuterAlt(_localctx, 1); + { + setState(422); + match(T__65); + setState(423); + datatype(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayindexedContext extends ParserRuleContext { + public Scoped_identifierContext scoped_identifier() { + return getRuleContext(Scoped_identifierContext.class,0); + } + public ArrayindexContext arrayindex() { + return getRuleContext(ArrayindexContext.class,0); + } + public ArrayindexedContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayindexed; } + } + + public final ArrayindexedContext arrayindexed() throws RecognitionException { + ArrayindexedContext _localctx = new ArrayindexedContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_arrayindexed); + try { + enterOuterAlt(_localctx, 1); + { + setState(425); + scoped_identifier(); + setState(426); + arrayindex(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DirectmemoryContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public DirectmemoryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_directmemory; } + } + + public final DirectmemoryContext directmemory() throws RecognitionException { + DirectmemoryContext _localctx = new DirectmemoryContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_directmemory); + try { + enterOuterAlt(_localctx, 1); + { + setState(428); + match(T__66); + setState(429); + match(T__63); + setState(430); + expression(0); + setState(431); + match(T__64); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AddressofContext extends ParserRuleContext { + public TerminalNode ADDRESS_OF() { return getToken(prog8Parser.ADDRESS_OF, 0); } + public Scoped_identifierContext scoped_identifier() { + return getRuleContext(Scoped_identifierContext.class,0); + } + public AddressofContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_addressof; } + } + + public final AddressofContext addressof() throws RecognitionException { + AddressofContext _localctx = new AddressofContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_addressof); + try { + enterOuterAlt(_localctx, 1); + { + setState(433); + match(ADDRESS_OF); + setState(434); + scoped_identifier(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctioncallContext extends ParserRuleContext { + public Scoped_identifierContext scoped_identifier() { + return getRuleContext(Scoped_identifierContext.class,0); + } + public Expression_listContext expression_list() { + return getRuleContext(Expression_listContext.class,0); + } + public FunctioncallContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functioncall; } + } + + public final FunctioncallContext functioncall() throws RecognitionException { + FunctioncallContext _localctx = new FunctioncallContext(_ctx, getState()); + enterRule(_localctx, 52, RULE_functioncall); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(436); + scoped_identifier(); + setState(437); + match(T__63); + setState(439); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__17) | (1L << T__26) | (1L << T__41) | (1L << T__42) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__66 - 64)) | (1L << (T__71 - 64)) | (1L << (T__72 - 64)) | (1L << (T__73 - 64)) | (1L << (T__82 - 64)) | (1L << (T__83 - 64)) | (1L << (NAME - 64)) | (1L << (DEC_INTEGER - 64)) | (1L << (HEX_INTEGER - 64)) | (1L << (BIN_INTEGER - 64)) | (1L << (ADDRESS_OF - 64)) | (1L << (FLOAT_NUMBER - 64)) | (1L << (STRING - 64)) | (1L << (SINGLECHAR - 64)))) != 0)) { + { + setState(438); + expression_list(); + } + } + + setState(441); + match(T__64); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Functioncall_stmtContext extends ParserRuleContext { + public Scoped_identifierContext scoped_identifier() { + return getRuleContext(Scoped_identifierContext.class,0); + } + public Expression_listContext expression_list() { + return getRuleContext(Expression_listContext.class,0); + } + public Functioncall_stmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functioncall_stmt; } + } + + public final Functioncall_stmtContext functioncall_stmt() throws RecognitionException { + Functioncall_stmtContext _localctx = new Functioncall_stmtContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_functioncall_stmt); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(443); + scoped_identifier(); + setState(444); + match(T__63); + setState(446); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__17) | (1L << T__26) | (1L << T__41) | (1L << T__42) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__66 - 64)) | (1L << (T__71 - 64)) | (1L << (T__72 - 64)) | (1L << (T__73 - 64)) | (1L << (T__82 - 64)) | (1L << (T__83 - 64)) | (1L << (NAME - 64)) | (1L << (DEC_INTEGER - 64)) | (1L << (HEX_INTEGER - 64)) | (1L << (BIN_INTEGER - 64)) | (1L << (ADDRESS_OF - 64)) | (1L << (FLOAT_NUMBER - 64)) | (1L << (STRING - 64)) | (1L << (SINGLECHAR - 64)))) != 0)) { + { + setState(445); + expression_list(); + } + } + + setState(448); + match(T__64); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Expression_listContext extends ParserRuleContext { + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, i); + } + public Expression_listContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expression_list; } + } + + public final Expression_listContext expression_list() throws RecognitionException { + Expression_listContext _localctx = new Expression_listContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_expression_list); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(450); + expression(0); + setState(458); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__13) { + { + { + setState(451); + match(T__13); + setState(453); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(452); + match(EOL); + } + } + + setState(455); + expression(0); + } + } + setState(460); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ReturnstmtContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ReturnstmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_returnstmt; } + } + + public final ReturnstmtContext returnstmt() throws RecognitionException { + ReturnstmtContext _localctx = new ReturnstmtContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_returnstmt); + try { + enterOuterAlt(_localctx, 1); + { + setState(461); + match(T__67); + setState(463); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,47,_ctx) ) { + case 1: + { + setState(462); + expression(0); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BreakstmtContext extends ParserRuleContext { + public BreakstmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_breakstmt; } + } + + public final BreakstmtContext breakstmt() throws RecognitionException { + BreakstmtContext _localctx = new BreakstmtContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_breakstmt); + try { + enterOuterAlt(_localctx, 1); + { + setState(465); + match(T__68); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ContinuestmtContext extends ParserRuleContext { + public ContinuestmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_continuestmt; } + } + + public final ContinuestmtContext continuestmt() throws RecognitionException { + ContinuestmtContext _localctx = new ContinuestmtContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_continuestmt); + try { + enterOuterAlt(_localctx, 1); + { + setState(467); + match(T__69); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IdentifierContext extends ParserRuleContext { + public TerminalNode NAME() { return getToken(prog8Parser.NAME, 0); } + public IdentifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_identifier; } + } + + public final IdentifierContext identifier() throws RecognitionException { + IdentifierContext _localctx = new IdentifierContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_identifier); + try { + enterOuterAlt(_localctx, 1); + { + setState(469); + match(NAME); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Scoped_identifierContext extends ParserRuleContext { + public List NAME() { return getTokens(prog8Parser.NAME); } + public TerminalNode NAME(int i) { + return getToken(prog8Parser.NAME, i); + } + public Scoped_identifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_scoped_identifier; } + } + + public final Scoped_identifierContext scoped_identifier() throws RecognitionException { + Scoped_identifierContext _localctx = new Scoped_identifierContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_scoped_identifier); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(471); + match(NAME); + setState(476); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,48,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(472); + match(T__70); + setState(473); + match(NAME); + } + } + } + setState(478); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,48,_ctx); + } + } + } + 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, 68, RULE_register); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(479); + _la = _input.LA(1); + if ( !(((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & ((1L << (T__71 - 72)) | (1L << (T__72 - 72)) | (1L << (T__73 - 72)))) != 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 RegisterorpairContext extends ParserRuleContext { + public RegisterorpairContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_registerorpair; } + } + + public final RegisterorpairContext registerorpair() throws RecognitionException { + RegisterorpairContext _localctx = new RegisterorpairContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_registerorpair); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(481); + _la = _input.LA(1); + if ( !(((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & ((1L << (T__71 - 72)) | (1L << (T__72 - 72)) | (1L << (T__73 - 72)) | (1L << (T__74 - 72)) | (1L << (T__75 - 72)) | (1L << (T__76 - 72)))) != 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 StatusregisterContext extends ParserRuleContext { + public StatusregisterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statusregister; } + } + + public final StatusregisterContext statusregister() throws RecognitionException { + StatusregisterContext _localctx = new StatusregisterContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_statusregister); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(483); + _la = _input.LA(1); + if ( !(((((_la - 78)) & ~0x3f) == 0 && ((1L << (_la - 78)) & ((1L << (T__77 - 78)) | (1L << (T__78 - 78)) | (1L << (T__79 - 78)) | (1L << (T__80 - 78)))) != 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 Token intpart; + public TerminalNode DEC_INTEGER() { return getToken(prog8Parser.DEC_INTEGER, 0); } + public TerminalNode HEX_INTEGER() { return getToken(prog8Parser.HEX_INTEGER, 0); } + public TerminalNode BIN_INTEGER() { return getToken(prog8Parser.BIN_INTEGER, 0); } + public WordsuffixContext wordsuffix() { + return getRuleContext(WordsuffixContext.class,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, 74, RULE_integerliteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(485); + ((IntegerliteralContext)_localctx).intpart = _input.LT(1); + _la = _input.LA(1); + if ( !(((((_la - 116)) & ~0x3f) == 0 && ((1L << (_la - 116)) & ((1L << (DEC_INTEGER - 116)) | (1L << (HEX_INTEGER - 116)) | (1L << (BIN_INTEGER - 116)))) != 0)) ) { + ((IntegerliteralContext)_localctx).intpart = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(487); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,49,_ctx) ) { + case 1: + { + setState(486); + wordsuffix(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class WordsuffixContext extends ParserRuleContext { + public WordsuffixContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_wordsuffix; } + } + + public final WordsuffixContext wordsuffix() throws RecognitionException { + WordsuffixContext _localctx = new WordsuffixContext(_ctx, getState()); + enterRule(_localctx, 76, RULE_wordsuffix); + try { + enterOuterAlt(_localctx, 1); + { + setState(489); + match(T__81); + } + } + 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, 78, RULE_booleanliteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(491); + _la = _input.LA(1); + if ( !(_la==T__82 || _la==T__83) ) { + _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 List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, 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, 80, RULE_arrayliteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(493); + match(T__26); + setState(495); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(494); + match(EOL); + } + } + + setState(497); + expression(0); + setState(505); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__13) { + { + { + setState(498); + match(T__13); + setState(500); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(499); + match(EOL); + } + } + + setState(502); + expression(0); + } + } + setState(507); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(509); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(508); + match(EOL); + } + } + + setState(511); + match(T__27); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StructliteralContext extends ParserRuleContext { + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, i); + } + public StructliteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_structliteral; } + } + + public final StructliteralContext structliteral() throws RecognitionException { + StructliteralContext _localctx = new StructliteralContext(_ctx, getState()); + enterRule(_localctx, 82, RULE_structliteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(513); + match(T__17); + setState(515); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(514); + match(EOL); + } + } + + setState(517); + expression(0); + setState(525); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__13) { + { + { + setState(518); + match(T__13); + setState(520); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(519); + match(EOL); + } + } + + setState(522); + expression(0); + } + } + setState(527); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(529); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(528); + match(EOL); + } + } + + setState(531); + match(T__18); + } + } + 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(prog8Parser.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, 84, RULE_stringliteral); + try { + enterOuterAlt(_localctx, 1); + { + setState(533); + match(STRING); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CharliteralContext extends ParserRuleContext { + public TerminalNode SINGLECHAR() { return getToken(prog8Parser.SINGLECHAR, 0); } + public CharliteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_charliteral; } + } + + public final CharliteralContext charliteral() throws RecognitionException { + CharliteralContext _localctx = new CharliteralContext(_ctx, getState()); + enterRule(_localctx, 86, RULE_charliteral); + try { + enterOuterAlt(_localctx, 1); + { + setState(535); + match(SINGLECHAR); + } + } + 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(prog8Parser.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, 88, RULE_floatliteral); + try { + enterOuterAlt(_localctx, 1); + { + setState(537); + 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 CharliteralContext charliteral() { + return getRuleContext(CharliteralContext.class,0); + } + public FloatliteralContext floatliteral() { + return getRuleContext(FloatliteralContext.class,0); + } + public StructliteralContext structliteral() { + return getRuleContext(StructliteralContext.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, 90, RULE_literalvalue); + try { + setState(546); + _errHandler.sync(this); + switch (_input.LA(1)) { + case DEC_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + enterOuterAlt(_localctx, 1); + { + setState(539); + integerliteral(); + } + break; + case T__82: + case T__83: + enterOuterAlt(_localctx, 2); + { + setState(540); + booleanliteral(); + } + break; + case T__26: + enterOuterAlt(_localctx, 3); + { + setState(541); + arrayliteral(); + } + break; + case STRING: + enterOuterAlt(_localctx, 4); + { + setState(542); + stringliteral(); + } + break; + case SINGLECHAR: + enterOuterAlt(_localctx, 5); + { + setState(543); + charliteral(); + } + break; + case FLOAT_NUMBER: + enterOuterAlt(_localctx, 6); + { + setState(544); + floatliteral(); + } + break; + case T__17: + enterOuterAlt(_localctx, 7); + { + setState(545); + structliteral(); + } + 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 InlineasmContext extends ParserRuleContext { + public TerminalNode INLINEASMBLOCK() { return getToken(prog8Parser.INLINEASMBLOCK, 0); } + public InlineasmContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_inlineasm; } + } + + public final InlineasmContext inlineasm() throws RecognitionException { + InlineasmContext _localctx = new InlineasmContext(_ctx, getState()); + enterRule(_localctx, 92, RULE_inlineasm); + try { + enterOuterAlt(_localctx, 1); + { + setState(548); + match(T__84); + setState(549); + match(INLINEASMBLOCK); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SubroutineContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public Statement_blockContext statement_block() { + return getRuleContext(Statement_blockContext.class,0); + } + public TerminalNode EOL() { return getToken(prog8Parser.EOL, 0); } + public Sub_paramsContext sub_params() { + return getRuleContext(Sub_paramsContext.class,0); + } + public Sub_return_partContext sub_return_part() { + return getRuleContext(Sub_return_partContext.class,0); + } + public SubroutineContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_subroutine; } + } + + public final SubroutineContext subroutine() throws RecognitionException { + SubroutineContext _localctx = new SubroutineContext(_ctx, getState()); + enterRule(_localctx, 94, RULE_subroutine); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(551); + match(T__85); + setState(552); + identifier(); + setState(553); + match(T__63); + setState(555); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25))) != 0)) { + { + setState(554); + sub_params(); + } + } + + setState(557); + match(T__64); + setState(559); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==T__86) { + { + setState(558); + sub_return_part(); + } + } + + { + setState(561); + statement_block(); + setState(562); + match(EOL); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Sub_return_partContext extends ParserRuleContext { + public Sub_returnsContext sub_returns() { + return getRuleContext(Sub_returnsContext.class,0); + } + public Sub_return_partContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_sub_return_part; } + } + + public final Sub_return_partContext sub_return_part() throws RecognitionException { + Sub_return_partContext _localctx = new Sub_return_partContext(_ctx, getState()); + enterRule(_localctx, 96, RULE_sub_return_part); + try { + enterOuterAlt(_localctx, 1); + { + setState(564); + match(T__86); + setState(565); + sub_returns(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Statement_blockContext extends ParserRuleContext { + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, i); + } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public Statement_blockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement_block; } + } + + public final Statement_blockContext statement_block() throws RecognitionException { + Statement_blockContext _localctx = new Statement_blockContext(_ctx, getState()); + enterRule(_localctx, 98, RULE_statement_block); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(567); + match(T__17); + setState(568); + match(EOL); + setState(573); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__2) | (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__12) | (1L << T__15) | (1L << T__16) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (T__66 - 67)) | (1L << (T__67 - 67)) | (1L << (T__68 - 67)) | (1L << (T__69 - 67)) | (1L << (T__71 - 67)) | (1L << (T__72 - 67)) | (1L << (T__73 - 67)) | (1L << (T__84 - 67)) | (1L << (T__85 - 67)) | (1L << (T__87 - 67)) | (1L << (T__90 - 67)) | (1L << (T__92 - 67)) | (1L << (T__93 - 67)) | (1L << (T__94 - 67)) | (1L << (T__95 - 67)) | (1L << (T__96 - 67)) | (1L << (T__97 - 67)) | (1L << (T__98 - 67)) | (1L << (T__99 - 67)) | (1L << (T__100 - 67)) | (1L << (T__101 - 67)) | (1L << (T__102 - 67)) | (1L << (T__103 - 67)) | (1L << (T__104 - 67)) | (1L << (T__106 - 67)) | (1L << (T__107 - 67)) | (1L << (T__109 - 67)) | (1L << (EOL - 67)) | (1L << (NAME - 67)) | (1L << (ADDRESS_OF - 67)))) != 0)) { + { + setState(571); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__2: + case T__3: + case T__4: + case T__5: + case T__6: + case T__7: + case T__8: + case T__9: + case T__10: + case T__11: + case T__12: + case T__15: + case T__16: + case T__19: + case T__20: + case T__21: + case T__22: + case T__23: + case T__24: + case T__25: + case T__66: + case T__67: + case T__68: + case T__69: + case T__71: + case T__72: + case T__73: + case T__84: + case T__85: + case T__87: + case T__90: + case T__92: + case T__93: + case T__94: + case T__95: + case T__96: + case T__97: + case T__98: + case T__99: + case T__100: + case T__101: + case T__102: + case T__103: + case T__104: + case T__106: + case T__107: + case T__109: + case NAME: + case ADDRESS_OF: + { + setState(569); + statement(); + } + break; + case EOL: + { + setState(570); + match(EOL); + } + break; + default: + throw new NoViableAltException(this); + } + } + setState(575); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(576); + match(T__18); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Sub_paramsContext extends ParserRuleContext { + public List vardecl() { + return getRuleContexts(VardeclContext.class); + } + public VardeclContext vardecl(int i) { + return getRuleContext(VardeclContext.class,i); + } + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, i); + } + public Sub_paramsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_sub_params; } + } + + public final Sub_paramsContext sub_params() throws RecognitionException { + Sub_paramsContext _localctx = new Sub_paramsContext(_ctx, getState()); + enterRule(_localctx, 100, RULE_sub_params); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(578); + vardecl(); + setState(586); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__13) { + { + { + setState(579); + match(T__13); + setState(581); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(580); + match(EOL); + } + } + + setState(583); + vardecl(); + } + } + setState(588); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Sub_returnsContext extends ParserRuleContext { + public List datatype() { + return getRuleContexts(DatatypeContext.class); + } + public DatatypeContext datatype(int i) { + return getRuleContext(DatatypeContext.class,i); + } + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, i); + } + public Sub_returnsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_sub_returns; } + } + + public final Sub_returnsContext sub_returns() throws RecognitionException { + Sub_returnsContext _localctx = new Sub_returnsContext(_ctx, getState()); + enterRule(_localctx, 102, RULE_sub_returns); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(589); + datatype(); + setState(597); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__13) { + { + { + setState(590); + match(T__13); + setState(592); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(591); + match(EOL); + } + } + + setState(594); + datatype(); + } + } + setState(599); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AsmsubroutineContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public Asmsub_addressContext asmsub_address() { + return getRuleContext(Asmsub_addressContext.class,0); + } + public Statement_blockContext statement_block() { + return getRuleContext(Statement_blockContext.class,0); + } + public Asmsub_paramsContext asmsub_params() { + return getRuleContext(Asmsub_paramsContext.class,0); + } + public TerminalNode EOL() { return getToken(prog8Parser.EOL, 0); } + public Asmsub_clobbersContext asmsub_clobbers() { + return getRuleContext(Asmsub_clobbersContext.class,0); + } + public Asmsub_returnsContext asmsub_returns() { + return getRuleContext(Asmsub_returnsContext.class,0); + } + public AsmsubroutineContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_asmsubroutine; } + } + + public final AsmsubroutineContext asmsubroutine() throws RecognitionException { + AsmsubroutineContext _localctx = new AsmsubroutineContext(_ctx, getState()); + enterRule(_localctx, 104, RULE_asmsubroutine); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(600); + match(T__87); + setState(601); + identifier(); + setState(602); + match(T__63); + setState(604); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25))) != 0)) { + { + setState(603); + asmsub_params(); + } + } + + setState(606); + match(T__64); + setState(608); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(607); + match(EOL); + } + } + + setState(611); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==T__89) { + { + setState(610); + asmsub_clobbers(); + } + } + + setState(614); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==T__86) { + { + setState(613); + asmsub_returns(); + } + } + + setState(618); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__14: + { + setState(616); + asmsub_address(); + } + break; + case T__17: + { + setState(617); + statement_block(); + } + 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 Asmsub_addressContext extends ParserRuleContext { + public IntegerliteralContext address; + public IntegerliteralContext integerliteral() { + return getRuleContext(IntegerliteralContext.class,0); + } + public Asmsub_addressContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_asmsub_address; } + } + + public final Asmsub_addressContext asmsub_address() throws RecognitionException { + Asmsub_addressContext _localctx = new Asmsub_addressContext(_ctx, getState()); + enterRule(_localctx, 106, RULE_asmsub_address); + try { + enterOuterAlt(_localctx, 1); + { + setState(620); + match(T__14); + setState(621); + ((Asmsub_addressContext)_localctx).address = integerliteral(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Asmsub_paramsContext extends ParserRuleContext { + public List asmsub_param() { + return getRuleContexts(Asmsub_paramContext.class); + } + public Asmsub_paramContext asmsub_param(int i) { + return getRuleContext(Asmsub_paramContext.class,i); + } + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, i); + } + public Asmsub_paramsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_asmsub_params; } + } + + public final Asmsub_paramsContext asmsub_params() throws RecognitionException { + Asmsub_paramsContext _localctx = new Asmsub_paramsContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_asmsub_params); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(623); + asmsub_param(); + setState(631); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__13) { + { + { + setState(624); + match(T__13); + setState(626); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(625); + match(EOL); + } + } + + setState(628); + asmsub_param(); + } + } + setState(633); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Asmsub_paramContext extends ParserRuleContext { + public Token stack; + public VardeclContext vardecl() { + return getRuleContext(VardeclContext.class,0); + } + public RegisterorpairContext registerorpair() { + return getRuleContext(RegisterorpairContext.class,0); + } + public StatusregisterContext statusregister() { + return getRuleContext(StatusregisterContext.class,0); + } + public Asmsub_paramContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_asmsub_param; } + } + + public final Asmsub_paramContext asmsub_param() throws RecognitionException { + Asmsub_paramContext _localctx = new Asmsub_paramContext(_ctx, getState()); + enterRule(_localctx, 110, RULE_asmsub_param); + try { + enterOuterAlt(_localctx, 1); + { + setState(634); + vardecl(); + setState(635); + match(T__66); + setState(639); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__71: + case T__72: + case T__73: + case T__74: + case T__75: + case T__76: + { + setState(636); + registerorpair(); + } + break; + case T__77: + case T__78: + case T__79: + case T__80: + { + setState(637); + statusregister(); + } + break; + case T__88: + { + setState(638); + ((Asmsub_paramContext)_localctx).stack = match(T__88); + } + 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 Asmsub_clobbersContext extends ParserRuleContext { + public ClobberContext clobber() { + return getRuleContext(ClobberContext.class,0); + } + public Asmsub_clobbersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_asmsub_clobbers; } + } + + public final Asmsub_clobbersContext asmsub_clobbers() throws RecognitionException { + Asmsub_clobbersContext _localctx = new Asmsub_clobbersContext(_ctx, getState()); + enterRule(_localctx, 112, RULE_asmsub_clobbers); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(641); + match(T__89); + setState(642); + match(T__63); + setState(644); + _errHandler.sync(this); + _la = _input.LA(1); + if (((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & ((1L << (T__71 - 72)) | (1L << (T__72 - 72)) | (1L << (T__73 - 72)))) != 0)) { + { + setState(643); + clobber(); + } + } + + setState(646); + match(T__64); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClobberContext extends ParserRuleContext { + public List register() { + return getRuleContexts(RegisterContext.class); + } + public RegisterContext register(int i) { + return getRuleContext(RegisterContext.class,i); + } + public ClobberContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_clobber; } + } + + public final ClobberContext clobber() throws RecognitionException { + ClobberContext _localctx = new ClobberContext(_ctx, getState()); + enterRule(_localctx, 114, RULE_clobber); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(648); + register(); + setState(653); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__13) { + { + { + setState(649); + match(T__13); + setState(650); + register(); + } + } + setState(655); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Asmsub_returnsContext extends ParserRuleContext { + public List asmsub_return() { + return getRuleContexts(Asmsub_returnContext.class); + } + public Asmsub_returnContext asmsub_return(int i) { + return getRuleContext(Asmsub_returnContext.class,i); + } + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, i); + } + public Asmsub_returnsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_asmsub_returns; } + } + + public final Asmsub_returnsContext asmsub_returns() throws RecognitionException { + Asmsub_returnsContext _localctx = new Asmsub_returnsContext(_ctx, getState()); + enterRule(_localctx, 116, RULE_asmsub_returns); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(656); + match(T__86); + setState(657); + asmsub_return(); + setState(665); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__13) { + { + { + setState(658); + match(T__13); + setState(660); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(659); + match(EOL); + } + } + + setState(662); + asmsub_return(); + } + } + setState(667); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Asmsub_returnContext extends ParserRuleContext { + public Token stack; + public DatatypeContext datatype() { + return getRuleContext(DatatypeContext.class,0); + } + public RegisterorpairContext registerorpair() { + return getRuleContext(RegisterorpairContext.class,0); + } + public StatusregisterContext statusregister() { + return getRuleContext(StatusregisterContext.class,0); + } + public Asmsub_returnContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_asmsub_return; } + } + + public final Asmsub_returnContext asmsub_return() throws RecognitionException { + Asmsub_returnContext _localctx = new Asmsub_returnContext(_ctx, getState()); + enterRule(_localctx, 118, RULE_asmsub_return); + try { + enterOuterAlt(_localctx, 1); + { + setState(668); + datatype(); + setState(669); + match(T__66); + setState(673); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__71: + case T__72: + case T__73: + case T__74: + case T__75: + case T__76: + { + setState(670); + registerorpair(); + } + break; + case T__77: + case T__78: + case T__79: + case T__80: + { + setState(671); + statusregister(); + } + break; + case T__88: + { + setState(672); + ((Asmsub_returnContext)_localctx).stack = match(T__88); + } + 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 If_stmtContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public Statement_blockContext statement_block() { + return getRuleContext(Statement_blockContext.class,0); + } + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, i); + } + public Else_partContext else_part() { + return getRuleContext(Else_partContext.class,0); + } + public If_stmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_if_stmt; } + } + + public final If_stmtContext if_stmt() throws RecognitionException { + If_stmtContext _localctx = new If_stmtContext(_ctx, getState()); + enterRule(_localctx, 120, RULE_if_stmt); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(675); + match(T__90); + setState(676); + expression(0); + setState(678); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(677); + match(EOL); + } + } + + setState(682); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__2: + case T__3: + case T__4: + case T__5: + case T__6: + case T__7: + case T__8: + case T__9: + case T__10: + case T__11: + case T__12: + case T__15: + case T__16: + case T__19: + case T__20: + case T__21: + case T__22: + case T__23: + case T__24: + case T__25: + case T__66: + case T__67: + case T__68: + case T__69: + case T__71: + case T__72: + case T__73: + case T__84: + case T__85: + case T__87: + case T__90: + case T__92: + case T__93: + case T__94: + case T__95: + case T__96: + case T__97: + case T__98: + case T__99: + case T__100: + case T__101: + case T__102: + case T__103: + case T__104: + case T__106: + case T__107: + case T__109: + case NAME: + case ADDRESS_OF: + { + setState(680); + statement(); + } + break; + case T__17: + { + setState(681); + statement_block(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(685); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,82,_ctx) ) { + case 1: + { + setState(684); + match(EOL); + } + break; + } + setState(688); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,83,_ctx) ) { + case 1: + { + setState(687); + else_part(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Else_partContext extends ParserRuleContext { + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public Statement_blockContext statement_block() { + return getRuleContext(Statement_blockContext.class,0); + } + public TerminalNode EOL() { return getToken(prog8Parser.EOL, 0); } + public Else_partContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_else_part; } + } + + public final Else_partContext else_part() throws RecognitionException { + Else_partContext _localctx = new Else_partContext(_ctx, getState()); + enterRule(_localctx, 122, RULE_else_part); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(690); + match(T__91); + setState(692); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(691); + match(EOL); + } + } + + setState(696); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__2: + case T__3: + case T__4: + case T__5: + case T__6: + case T__7: + case T__8: + case T__9: + case T__10: + case T__11: + case T__12: + case T__15: + case T__16: + case T__19: + case T__20: + case T__21: + case T__22: + case T__23: + case T__24: + case T__25: + case T__66: + case T__67: + case T__68: + case T__69: + case T__71: + case T__72: + case T__73: + case T__84: + case T__85: + case T__87: + case T__90: + case T__92: + case T__93: + case T__94: + case T__95: + case T__96: + case T__97: + case T__98: + case T__99: + case T__100: + case T__101: + case T__102: + case T__103: + case T__104: + case T__106: + case T__107: + case T__109: + case NAME: + case ADDRESS_OF: + { + setState(694); + statement(); + } + break; + case T__17: + { + setState(695); + statement_block(); + } + 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 Branch_stmtContext extends ParserRuleContext { + public BranchconditionContext branchcondition() { + return getRuleContext(BranchconditionContext.class,0); + } + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, i); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public Statement_blockContext statement_block() { + return getRuleContext(Statement_blockContext.class,0); + } + public Else_partContext else_part() { + return getRuleContext(Else_partContext.class,0); + } + public Branch_stmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_branch_stmt; } + } + + public final Branch_stmtContext branch_stmt() throws RecognitionException { + Branch_stmtContext _localctx = new Branch_stmtContext(_ctx, getState()); + enterRule(_localctx, 124, RULE_branch_stmt); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(698); + branchcondition(); + setState(700); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(699); + match(EOL); + } + } + + setState(704); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__2: + case T__3: + case T__4: + case T__5: + case T__6: + case T__7: + case T__8: + case T__9: + case T__10: + case T__11: + case T__12: + case T__15: + case T__16: + case T__19: + case T__20: + case T__21: + case T__22: + case T__23: + case T__24: + case T__25: + case T__66: + case T__67: + case T__68: + case T__69: + case T__71: + case T__72: + case T__73: + case T__84: + case T__85: + case T__87: + case T__90: + case T__92: + case T__93: + case T__94: + case T__95: + case T__96: + case T__97: + case T__98: + case T__99: + case T__100: + case T__101: + case T__102: + case T__103: + case T__104: + case T__106: + case T__107: + case T__109: + case NAME: + case ADDRESS_OF: + { + setState(702); + statement(); + } + break; + case T__17: + { + setState(703); + statement_block(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(707); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) { + case 1: + { + setState(706); + match(EOL); + } + break; + } + setState(710); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==T__91) { + { + setState(709); + else_part(); + } + } + + setState(712); + match(EOL); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BranchconditionContext extends ParserRuleContext { + public BranchconditionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_branchcondition; } + } + + public final BranchconditionContext branchcondition() throws RecognitionException { + BranchconditionContext _localctx = new BranchconditionContext(_ctx, getState()); + enterRule(_localctx, 126, RULE_branchcondition); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(714); + _la = _input.LA(1); + if ( !(((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & ((1L << (T__92 - 93)) | (1L << (T__93 - 93)) | (1L << (T__94 - 93)) | (1L << (T__95 - 93)) | (1L << (T__96 - 93)) | (1L << (T__97 - 93)) | (1L << (T__98 - 93)) | (1L << (T__99 - 93)) | (1L << (T__100 - 93)) | (1L << (T__101 - 93)) | (1L << (T__102 - 93)) | (1L << (T__103 - 93)))) != 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 ForloopContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public RegisterContext register() { + return getRuleContext(RegisterContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public Statement_blockContext statement_block() { + return getRuleContext(Statement_blockContext.class,0); + } + public DatatypeContext datatype() { + return getRuleContext(DatatypeContext.class,0); + } + public TerminalNode ZEROPAGE() { return getToken(prog8Parser.ZEROPAGE, 0); } + public TerminalNode EOL() { return getToken(prog8Parser.EOL, 0); } + public ForloopContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forloop; } + } + + public final ForloopContext forloop() throws RecognitionException { + ForloopContext _localctx = new ForloopContext(_ctx, getState()); + enterRule(_localctx, 128, RULE_forloop); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(716); + match(T__104); + setState(718); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__24) | (1L << T__25))) != 0)) { + { + setState(717); + datatype(); + } + } + + setState(721); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ZEROPAGE) { + { + setState(720); + match(ZEROPAGE); + } + } + + setState(725); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__71: + case T__72: + case T__73: + { + setState(723); + register(); + } + break; + case NAME: + { + setState(724); + identifier(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(727); + match(T__105); + setState(728); + expression(0); + setState(730); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(729); + match(EOL); + } + } + + setState(734); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__2: + case T__3: + case T__4: + case T__5: + case T__6: + case T__7: + case T__8: + case T__9: + case T__10: + case T__11: + case T__12: + case T__15: + case T__16: + case T__19: + case T__20: + case T__21: + case T__22: + case T__23: + case T__24: + case T__25: + case T__66: + case T__67: + case T__68: + case T__69: + case T__71: + case T__72: + case T__73: + case T__84: + case T__85: + case T__87: + case T__90: + case T__92: + case T__93: + case T__94: + case T__95: + case T__96: + case T__97: + case T__98: + case T__99: + case T__100: + case T__101: + case T__102: + case T__103: + case T__104: + case T__106: + case T__107: + case T__109: + case NAME: + case ADDRESS_OF: + { + setState(732); + statement(); + } + break; + case T__17: + { + setState(733); + statement_block(); + } + 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 WhileloopContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public Statement_blockContext statement_block() { + return getRuleContext(Statement_blockContext.class,0); + } + public TerminalNode EOL() { return getToken(prog8Parser.EOL, 0); } + public WhileloopContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_whileloop; } + } + + public final WhileloopContext whileloop() throws RecognitionException { + WhileloopContext _localctx = new WhileloopContext(_ctx, getState()); + enterRule(_localctx, 130, RULE_whileloop); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(736); + match(T__106); + setState(737); + expression(0); + setState(739); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(738); + match(EOL); + } + } + + setState(743); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__2: + case T__3: + case T__4: + case T__5: + case T__6: + case T__7: + case T__8: + case T__9: + case T__10: + case T__11: + case T__12: + case T__15: + case T__16: + case T__19: + case T__20: + case T__21: + case T__22: + case T__23: + case T__24: + case T__25: + case T__66: + case T__67: + case T__68: + case T__69: + case T__71: + case T__72: + case T__73: + case T__84: + case T__85: + case T__87: + case T__90: + case T__92: + case T__93: + case T__94: + case T__95: + case T__96: + case T__97: + case T__98: + case T__99: + case T__100: + case T__101: + case T__102: + case T__103: + case T__104: + case T__106: + case T__107: + case T__109: + case NAME: + case ADDRESS_OF: + { + setState(741); + statement(); + } + break; + case T__17: + { + setState(742); + statement_block(); + } + 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 RepeatloopContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public Statement_blockContext statement_block() { + return getRuleContext(Statement_blockContext.class,0); + } + public TerminalNode EOL() { return getToken(prog8Parser.EOL, 0); } + public RepeatloopContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_repeatloop; } + } + + public final RepeatloopContext repeatloop() throws RecognitionException { + RepeatloopContext _localctx = new RepeatloopContext(_ctx, getState()); + enterRule(_localctx, 132, RULE_repeatloop); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(745); + match(T__107); + setState(748); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__2: + case T__3: + case T__4: + case T__5: + case T__6: + case T__7: + case T__8: + case T__9: + case T__10: + case T__11: + case T__12: + case T__15: + case T__16: + case T__19: + case T__20: + case T__21: + case T__22: + case T__23: + case T__24: + case T__25: + case T__66: + case T__67: + case T__68: + case T__69: + case T__71: + case T__72: + case T__73: + case T__84: + case T__85: + case T__87: + case T__90: + case T__92: + case T__93: + case T__94: + case T__95: + case T__96: + case T__97: + case T__98: + case T__99: + case T__100: + case T__101: + case T__102: + case T__103: + case T__104: + case T__106: + case T__107: + case T__109: + case NAME: + case ADDRESS_OF: + { + setState(746); + statement(); + } + break; + case T__17: + { + setState(747); + statement_block(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(751); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EOL) { + { + setState(750); + match(EOL); + } + } + + setState(753); + match(T__108); + setState(754); + expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class WhenstmtContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, i); + } + public List when_choice() { + return getRuleContexts(When_choiceContext.class); + } + public When_choiceContext when_choice(int i) { + return getRuleContext(When_choiceContext.class,i); + } + public WhenstmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_whenstmt; } + } + + public final WhenstmtContext whenstmt() throws RecognitionException { + WhenstmtContext _localctx = new WhenstmtContext(_ctx, getState()); + enterRule(_localctx, 134, RULE_whenstmt); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(756); + match(T__109); + setState(757); + expression(0); + setState(758); + match(T__17); + setState(759); + match(EOL); + setState(764); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__17) | (1L << T__26) | (1L << T__41) | (1L << T__42) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__66 - 64)) | (1L << (T__71 - 64)) | (1L << (T__72 - 64)) | (1L << (T__73 - 64)) | (1L << (T__82 - 64)) | (1L << (T__83 - 64)) | (1L << (T__91 - 64)) | (1L << (EOL - 64)) | (1L << (NAME - 64)) | (1L << (DEC_INTEGER - 64)) | (1L << (HEX_INTEGER - 64)) | (1L << (BIN_INTEGER - 64)) | (1L << (ADDRESS_OF - 64)) | (1L << (FLOAT_NUMBER - 64)) | (1L << (STRING - 64)) | (1L << (SINGLECHAR - 64)))) != 0)) { + { + setState(762); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__0: + case T__17: + case T__26: + case T__41: + case T__42: + case T__62: + case T__63: + case T__66: + case T__71: + case T__72: + case T__73: + case T__82: + case T__83: + case T__91: + case NAME: + case DEC_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case ADDRESS_OF: + case FLOAT_NUMBER: + case STRING: + case SINGLECHAR: + { + setState(760); + when_choice(); + } + break; + case EOL: + { + setState(761); + match(EOL); + } + break; + default: + throw new NoViableAltException(this); + } + } + setState(766); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(767); + match(T__18); + setState(769); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,101,_ctx) ) { + case 1: + { + setState(768); + match(EOL); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class When_choiceContext extends ParserRuleContext { + public Expression_listContext expression_list() { + return getRuleContext(Expression_listContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public Statement_blockContext statement_block() { + return getRuleContext(Statement_blockContext.class,0); + } + public When_choiceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_when_choice; } + } + + public final When_choiceContext when_choice() throws RecognitionException { + When_choiceContext _localctx = new When_choiceContext(_ctx, getState()); + enterRule(_localctx, 136, RULE_when_choice); + try { + enterOuterAlt(_localctx, 1); + { + setState(773); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__0: + case T__17: + case T__26: + case T__41: + case T__42: + case T__62: + case T__63: + case T__66: + case T__71: + case T__72: + case T__73: + case T__82: + case T__83: + case NAME: + case DEC_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case ADDRESS_OF: + case FLOAT_NUMBER: + case STRING: + case SINGLECHAR: + { + setState(771); + expression_list(); + } + break; + case T__91: + { + setState(772); + match(T__91); + } + break; + default: + throw new NoViableAltException(this); + } + setState(775); + match(T__86); + setState(778); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__2: + case T__3: + case T__4: + case T__5: + case T__6: + case T__7: + case T__8: + case T__9: + case T__10: + case T__11: + case T__12: + case T__15: + case T__16: + case T__19: + case T__20: + case T__21: + case T__22: + case T__23: + case T__24: + case T__25: + case T__66: + case T__67: + case T__68: + case T__69: + case T__71: + case T__72: + case T__73: + case T__84: + case T__85: + case T__87: + case T__90: + case T__92: + case T__93: + case T__94: + case T__95: + case T__96: + case T__97: + case T__98: + case T__99: + case T__100: + case T__101: + case T__102: + case T__103: + case T__104: + case T__106: + case T__107: + case T__109: + case NAME: + case ADDRESS_OF: + { + setState(776); + statement(); + } + break; + case T__17: + { + setState(777); + statement_block(); + } + 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 21: + return expression_sempred((ExpressionContext)_localctx, predIndex); + } + return true; + } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return precpred(_ctx, 22); + case 1: + return precpred(_ctx, 21); + case 2: + return precpred(_ctx, 20); + case 3: + return precpred(_ctx, 19); + case 4: + return precpred(_ctx, 18); + case 5: + return precpred(_ctx, 17); + case 6: + return precpred(_ctx, 16); + case 7: + return precpred(_ctx, 15); + case 8: + return precpred(_ctx, 14); + case 9: + return precpred(_ctx, 12); + case 10: + return precpred(_ctx, 11); + case 11: + return precpred(_ctx, 10); + case 12: + return precpred(_ctx, 13); + case 13: + return precpred(_ctx, 2); + } + return true; + } + + public static final String _serializedATN = + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\177\u030f\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\3\2\3\2\7\2\u008f"+ + "\n\2\f\2\16\2\u0092\13\2\3\2\3\2\3\3\3\3\5\3\u0098\n\3\3\4\3\4\3\4\5\4"+ + "\u009d\n\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5"+ + "\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5\u00bc\n\5"+ + "\3\6\3\6\3\6\3\7\3\7\3\7\5\7\u00c4\n\7\3\b\3\b\5\b\u00c8\n\b\3\b\3\b\3"+ + "\b\7\b\u00cd\n\b\f\b\16\b\u00d0\13\b\5\b\u00d2\n\b\3\t\3\t\3\t\5\t\u00d7"+ + "\n\t\3\n\3\n\5\n\u00db\n\n\3\n\3\n\5\n\u00df\n\n\3\n\3\n\3\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\3\17\3\17\3\17\3\20\3"+ + "\20\3\20\3\20\3\20\3\20\3\20\7\20\u00fb\n\20\f\20\16\20\u00fe\13\20\3"+ + "\20\5\20\u0101\n\20\3\20\3\20\3\20\3\21\3\21\3\22\3\22\3\22\3\22\3\23"+ + "\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\5\25\u0118\n\25"+ + "\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27"+ + "\3\27\3\27\3\27\3\27\3\27\5\27\u012d\n\27\3\27\3\27\5\27\u0131\n\27\3"+ + "\27\3\27\5\27\u0135\n\27\3\27\3\27\3\27\5\27\u013a\n\27\3\27\3\27\5\27"+ + "\u013e\n\27\3\27\3\27\3\27\5\27\u0143\n\27\3\27\3\27\5\27\u0147\n\27\3"+ + "\27\3\27\3\27\5\27\u014c\n\27\3\27\3\27\5\27\u0150\n\27\3\27\3\27\3\27"+ + "\5\27\u0155\n\27\3\27\3\27\5\27\u0159\n\27\3\27\3\27\3\27\5\27\u015e\n"+ + "\27\3\27\3\27\5\27\u0162\n\27\3\27\3\27\3\27\5\27\u0167\n\27\3\27\3\27"+ + "\5\27\u016b\n\27\3\27\3\27\3\27\5\27\u0170\n\27\3\27\3\27\5\27\u0174\n"+ + "\27\3\27\3\27\3\27\5\27\u0179\n\27\3\27\3\27\5\27\u017d\n\27\3\27\3\27"+ + "\3\27\5\27\u0182\n\27\3\27\3\27\5\27\u0186\n\27\3\27\3\27\3\27\5\27\u018b"+ + "\n\27\3\27\3\27\5\27\u018f\n\27\3\27\3\27\3\27\5\27\u0194\n\27\3\27\3"+ + "\27\5\27\u0198\n\27\3\27\3\27\3\27\3\27\3\27\3\27\5\27\u01a0\n\27\3\27"+ + "\3\27\7\27\u01a4\n\27\f\27\16\27\u01a7\13\27\3\30\3\30\3\30\3\31\3\31"+ + "\3\31\3\32\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\34\3\34\3\34\5\34\u01ba"+ + "\n\34\3\34\3\34\3\35\3\35\3\35\5\35\u01c1\n\35\3\35\3\35\3\36\3\36\3\36"+ + "\5\36\u01c8\n\36\3\36\7\36\u01cb\n\36\f\36\16\36\u01ce\13\36\3\37\3\37"+ + "\5\37\u01d2\n\37\3 \3 \3!\3!\3\"\3\"\3#\3#\3#\7#\u01dd\n#\f#\16#\u01e0"+ + "\13#\3$\3$\3%\3%\3&\3&\3\'\3\'\5\'\u01ea\n\'\3(\3(\3)\3)\3*\3*\5*\u01f2"+ + "\n*\3*\3*\3*\5*\u01f7\n*\3*\7*\u01fa\n*\f*\16*\u01fd\13*\3*\5*\u0200\n"+ + "*\3*\3*\3+\3+\5+\u0206\n+\3+\3+\3+\5+\u020b\n+\3+\7+\u020e\n+\f+\16+\u0211"+ + "\13+\3+\5+\u0214\n+\3+\3+\3,\3,\3-\3-\3.\3.\3/\3/\3/\3/\3/\3/\3/\5/\u0225"+ + "\n/\3\60\3\60\3\60\3\61\3\61\3\61\3\61\5\61\u022e\n\61\3\61\3\61\5\61"+ + "\u0232\n\61\3\61\3\61\3\61\3\62\3\62\3\62\3\63\3\63\3\63\3\63\7\63\u023e"+ + "\n\63\f\63\16\63\u0241\13\63\3\63\3\63\3\64\3\64\3\64\5\64\u0248\n\64"+ + "\3\64\7\64\u024b\n\64\f\64\16\64\u024e\13\64\3\65\3\65\3\65\5\65\u0253"+ + "\n\65\3\65\7\65\u0256\n\65\f\65\16\65\u0259\13\65\3\66\3\66\3\66\3\66"+ + "\5\66\u025f\n\66\3\66\3\66\5\66\u0263\n\66\3\66\5\66\u0266\n\66\3\66\5"+ + "\66\u0269\n\66\3\66\3\66\5\66\u026d\n\66\3\67\3\67\3\67\38\38\38\58\u0275"+ + "\n8\38\78\u0278\n8\f8\168\u027b\138\39\39\39\39\39\59\u0282\n9\3:\3:\3"+ + ":\5:\u0287\n:\3:\3:\3;\3;\3;\7;\u028e\n;\f;\16;\u0291\13;\3<\3<\3<\3<"+ + "\5<\u0297\n<\3<\7<\u029a\n<\f<\16<\u029d\13<\3=\3=\3=\3=\3=\5=\u02a4\n"+ + "=\3>\3>\3>\5>\u02a9\n>\3>\3>\5>\u02ad\n>\3>\5>\u02b0\n>\3>\5>\u02b3\n"+ + ">\3?\3?\5?\u02b7\n?\3?\3?\5?\u02bb\n?\3@\3@\5@\u02bf\n@\3@\3@\5@\u02c3"+ + "\n@\3@\5@\u02c6\n@\3@\5@\u02c9\n@\3@\3@\3A\3A\3B\3B\5B\u02d1\nB\3B\5B"+ + "\u02d4\nB\3B\3B\5B\u02d8\nB\3B\3B\3B\5B\u02dd\nB\3B\3B\5B\u02e1\nB\3C"+ + "\3C\3C\5C\u02e6\nC\3C\3C\5C\u02ea\nC\3D\3D\3D\5D\u02ef\nD\3D\5D\u02f2"+ + "\nD\3D\3D\3D\3E\3E\3E\3E\3E\3E\7E\u02fd\nE\fE\16E\u0300\13E\3E\3E\5E\u0304"+ + "\nE\3F\3F\5F\u0308\nF\3F\3F\3F\5F\u030d\nF\3F\2\3,G\2\4\6\b\n\f\16\20"+ + "\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhj"+ + "lnprtvxz|~\u0080\u0082\u0084\u0086\u0088\u008a\2\22\3\2\6\17\3\2\26\34"+ + "\3\2\37)\3\2*+\4\2\3\3,-\3\2/\61\3\2,-\3\2\62\63\3\2\64\67\3\289\3\2J"+ + "L\3\2JO\3\2PS\3\2vx\3\2UV\3\2_j\2\u0368\2\u0090\3\2\2\2\4\u0097\3\2\2"+ + "\2\6\u0099\3\2\2\2\b\u00bb\3\2\2\2\n\u00bd\3\2\2\2\f\u00c0\3\2\2\2\16"+ + "\u00c5\3\2\2\2\20\u00d6\3\2\2\2\22\u00d8\3\2\2\2\24\u00e2\3\2\2\2\26\u00e5"+ + "\3\2\2\2\30\u00e9\3\2\2\2\32\u00ed\3\2\2\2\34\u00f0\3\2\2\2\36\u00f3\3"+ + "\2\2\2 \u0105\3\2\2\2\"\u0107\3\2\2\2$\u010b\3\2\2\2&\u010f\3\2\2\2(\u0117"+ + "\3\2\2\2*\u0119\3\2\2\2,\u012c\3\2\2\2.\u01a8\3\2\2\2\60\u01ab\3\2\2\2"+ + "\62\u01ae\3\2\2\2\64\u01b3\3\2\2\2\66\u01b6\3\2\2\28\u01bd\3\2\2\2:\u01c4"+ + "\3\2\2\2<\u01cf\3\2\2\2>\u01d3\3\2\2\2@\u01d5\3\2\2\2B\u01d7\3\2\2\2D"+ + "\u01d9\3\2\2\2F\u01e1\3\2\2\2H\u01e3\3\2\2\2J\u01e5\3\2\2\2L\u01e7\3\2"+ + "\2\2N\u01eb\3\2\2\2P\u01ed\3\2\2\2R\u01ef\3\2\2\2T\u0203\3\2\2\2V\u0217"+ + "\3\2\2\2X\u0219\3\2\2\2Z\u021b\3\2\2\2\\\u0224\3\2\2\2^\u0226\3\2\2\2"+ + "`\u0229\3\2\2\2b\u0236\3\2\2\2d\u0239\3\2\2\2f\u0244\3\2\2\2h\u024f\3"+ + "\2\2\2j\u025a\3\2\2\2l\u026e\3\2\2\2n\u0271\3\2\2\2p\u027c\3\2\2\2r\u0283"+ + "\3\2\2\2t\u028a\3\2\2\2v\u0292\3\2\2\2x\u029e\3\2\2\2z\u02a5\3\2\2\2|"+ + "\u02b4\3\2\2\2~\u02bc\3\2\2\2\u0080\u02cc\3\2\2\2\u0082\u02ce\3\2\2\2"+ + "\u0084\u02e2\3\2\2\2\u0086\u02eb\3\2\2\2\u0088\u02f6\3\2\2\2\u008a\u0307"+ + "\3\2\2\2\u008c\u008f\5\4\3\2\u008d\u008f\7t\2\2\u008e\u008c\3\2\2\2\u008e"+ + "\u008d\3\2\2\2\u008f\u0092\3\2\2\2\u0090\u008e\3\2\2\2\u0090\u0091\3\2"+ + "\2\2\u0091\u0093\3\2\2\2\u0092\u0090\3\2\2\2\u0093\u0094\7\2\2\3\u0094"+ + "\3\3\2\2\2\u0095\u0098\5\16\b\2\u0096\u0098\5\6\4\2\u0097\u0095\3\2\2"+ + "\2\u0097\u0096\3\2\2\2\u0098\5\3\2\2\2\u0099\u009a\7\3\2\2\u009a\u009c"+ + "\5B\"\2\u009b\u009d\5L\'\2\u009c\u009b\3\2\2\2\u009c\u009d\3\2\2\2\u009d"+ + "\u009e\3\2\2\2\u009e\u009f\5d\63\2\u009f\u00a0\7t\2\2\u00a0\7\3\2\2\2"+ + "\u00a1\u00bc\5\16\b\2\u00a2\u00bc\5\26\f\2\u00a3\u00bc\5\30\r\2\u00a4"+ + "\u00bc\5\22\n\2\u00a5\u00bc\5\24\13\2\u00a6\u00bc\5\32\16\2\u00a7\u00bc"+ + "\5\34\17\2\u00a8\u00bc\5\36\20\2\u00a9\u00bc\5$\23\2\u00aa\u00bc\5&\24"+ + "\2\u00ab\u00bc\5\f\7\2\u00ac\u00bc\5*\26\2\u00ad\u00bc\58\35\2\u00ae\u00bc"+ + "\5z>\2\u00af\u00bc\5~@\2\u00b0\u00bc\5`\61\2\u00b1\u00bc\5j\66\2\u00b2"+ + "\u00bc\5^\60\2\u00b3\u00bc\5<\37\2\u00b4\u00bc\5\u0082B\2\u00b5\u00bc"+ + "\5\u0084C\2\u00b6\u00bc\5\u0086D\2\u00b7\u00bc\5\u0088E\2\u00b8\u00bc"+ + "\5> \2\u00b9\u00bc\5@!\2\u00ba\u00bc\5\n\6\2\u00bb\u00a1\3\2\2\2\u00bb"+ + "\u00a2\3\2\2\2\u00bb\u00a3\3\2\2\2\u00bb\u00a4\3\2\2\2\u00bb\u00a5\3\2"+ + "\2\2\u00bb\u00a6\3\2\2\2\u00bb\u00a7\3\2\2\2\u00bb\u00a8\3\2\2\2\u00bb"+ + "\u00a9\3\2\2\2\u00bb\u00aa\3\2\2\2\u00bb\u00ab\3\2\2\2\u00bb\u00ac\3\2"+ + "\2\2\u00bb\u00ad\3\2\2\2\u00bb\u00ae\3\2\2\2\u00bb\u00af\3\2\2\2\u00bb"+ + "\u00b0\3\2\2\2\u00bb\u00b1\3\2\2\2\u00bb\u00b2\3\2\2\2\u00bb\u00b3\3\2"+ + "\2\2\u00bb\u00b4\3\2\2\2\u00bb\u00b5\3\2\2\2\u00bb\u00b6\3\2\2\2\u00bb"+ + "\u00b7\3\2\2\2\u00bb\u00b8\3\2\2\2\u00bb\u00b9\3\2\2\2\u00bb\u00ba\3\2"+ + "\2\2\u00bc\t\3\2\2\2\u00bd\u00be\5B\"\2\u00be\u00bf\7\4\2\2\u00bf\13\3"+ + "\2\2\2\u00c0\u00c3\7\5\2\2\u00c1\u00c4\5L\'\2\u00c2\u00c4\5D#\2\u00c3"+ + "\u00c1\3\2\2\2\u00c3\u00c2\3\2\2\2\u00c4\r\3\2\2\2\u00c5\u00d1\t\2\2\2"+ + "\u00c6\u00c8\5\20\t\2\u00c7\u00c6\3\2\2\2\u00c7\u00c8\3\2\2\2\u00c8\u00d2"+ + "\3\2\2\2\u00c9\u00ce\5\20\t\2\u00ca\u00cb\7\20\2\2\u00cb\u00cd\5\20\t"+ + "\2\u00cc\u00ca\3\2\2\2\u00cd\u00d0\3\2\2\2\u00ce\u00cc\3\2\2\2\u00ce\u00cf"+ + "\3\2\2\2\u00cf\u00d2\3\2\2\2\u00d0\u00ce\3\2\2\2\u00d1\u00c7\3\2\2\2\u00d1"+ + "\u00c9\3\2\2\2\u00d2\17\3\2\2\2\u00d3\u00d7\5V,\2\u00d4\u00d7\5B\"\2\u00d5"+ + "\u00d7\5L\'\2\u00d6\u00d3\3\2\2\2\u00d6\u00d4\3\2\2\2\u00d6\u00d5\3\2"+ + "\2\2\u00d7\21\3\2\2\2\u00d8\u00da\5 \21\2\u00d9\u00db\7~\2\2\u00da\u00d9"+ + "\3\2\2\2\u00da\u00db\3\2\2\2\u00db\u00de\3\2\2\2\u00dc\u00df\5\"\22\2"+ + "\u00dd\u00df\7\177\2\2\u00de\u00dc\3\2\2\2\u00de\u00dd\3\2\2\2\u00de\u00df"+ + "\3\2\2\2\u00df\u00e0\3\2\2\2\u00e0\u00e1\5B\"\2\u00e1\23\3\2\2\2\u00e2"+ + "\u00e3\5B\"\2\u00e3\u00e4\5B\"\2\u00e4\25\3\2\2\2\u00e5\u00e6\5\22\n\2"+ + "\u00e6\u00e7\7\21\2\2\u00e7\u00e8\5,\27\2\u00e8\27\3\2\2\2\u00e9\u00ea"+ + "\5\24\13\2\u00ea\u00eb\7\21\2\2\u00eb\u00ec\5,\27\2\u00ec\31\3\2\2\2\u00ed"+ + "\u00ee\7\22\2\2\u00ee\u00ef\5\26\f\2\u00ef\33\3\2\2\2\u00f0\u00f1\7y\2"+ + "\2\u00f1\u00f2\5\26\f\2\u00f2\35\3\2\2\2\u00f3\u00f4\7\23\2\2\u00f4\u00f5"+ + "\5B\"\2\u00f5\u00f6\7\24\2\2\u00f6\u00f7\7t\2\2\u00f7\u00fc\5\22\n\2\u00f8"+ + "\u00f9\7t\2\2\u00f9\u00fb\5\22\n\2\u00fa\u00f8\3\2\2\2\u00fb\u00fe\3\2"+ + "\2\2\u00fc\u00fa\3\2\2\2\u00fc\u00fd\3\2\2\2\u00fd\u0100\3\2\2\2\u00fe"+ + "\u00fc\3\2\2\2\u00ff\u0101\7t\2\2\u0100\u00ff\3\2\2\2\u0100\u0101\3\2"+ + "\2\2\u0101\u0102\3\2\2\2\u0102\u0103\7\25\2\2\u0103\u0104\7t\2\2\u0104"+ + "\37\3\2\2\2\u0105\u0106\t\3\2\2\u0106!\3\2\2\2\u0107\u0108\7\35\2\2\u0108"+ + "\u0109\5,\27\2\u0109\u010a\7\36\2\2\u010a#\3\2\2\2\u010b\u010c\5(\25\2"+ + "\u010c\u010d\7\21\2\2\u010d\u010e\5,\27\2\u010e%\3\2\2\2\u010f\u0110\5"+ + "(\25\2\u0110\u0111\t\4\2\2\u0111\u0112\5,\27\2\u0112\'\3\2\2\2\u0113\u0118"+ + "\5F$\2\u0114\u0118\5D#\2\u0115\u0118\5\60\31\2\u0116\u0118\5\62\32\2\u0117"+ + "\u0113\3\2\2\2\u0117\u0114\3\2\2\2\u0117\u0115\3\2\2\2\u0117\u0116\3\2"+ + "\2\2\u0118)\3\2\2\2\u0119\u011a\5(\25\2\u011a\u011b\t\5\2\2\u011b+\3\2"+ + "\2\2\u011c\u011d\b\27\1\2\u011d\u012d\5\66\34\2\u011e\u011f\t\6\2\2\u011f"+ + "\u012d\5,\27\31\u0120\u0121\7A\2\2\u0121\u012d\5,\27\13\u0122\u012d\5"+ + "\\/\2\u0123\u012d\5F$\2\u0124\u012d\5D#\2\u0125\u012d\5\60\31\2\u0126"+ + "\u012d\5\62\32\2\u0127\u012d\5\64\33\2\u0128\u0129\7B\2\2\u0129\u012a"+ + "\5,\27\2\u012a\u012b\7C\2\2\u012b\u012d\3\2\2\2\u012c\u011c\3\2\2\2\u012c"+ + "\u011e\3\2\2\2\u012c\u0120\3\2\2\2\u012c\u0122\3\2\2\2\u012c\u0123\3\2"+ + "\2\2\u012c\u0124\3\2\2\2\u012c\u0125\3\2\2\2\u012c\u0126\3\2\2\2\u012c"+ + "\u0127\3\2\2\2\u012c\u0128\3\2\2\2\u012d\u01a5\3\2\2\2\u012e\u0130\f\30"+ + "\2\2\u012f\u0131\7t\2\2\u0130\u012f\3\2\2\2\u0130\u0131\3\2\2\2\u0131"+ + "\u0132\3\2\2\2\u0132\u0134\7.\2\2\u0133\u0135\7t\2\2\u0134\u0133\3\2\2"+ + "\2\u0134\u0135\3\2\2\2\u0135\u0136\3\2\2\2\u0136\u01a4\5,\27\31\u0137"+ + "\u0139\f\27\2\2\u0138\u013a\7t\2\2\u0139\u0138\3\2\2\2\u0139\u013a\3\2"+ + "\2\2\u013a\u013b\3\2\2\2\u013b\u013d\t\7\2\2\u013c\u013e\7t\2\2\u013d"+ + "\u013c\3\2\2\2\u013d\u013e\3\2\2\2\u013e\u013f\3\2\2\2\u013f\u01a4\5,"+ + "\27\30\u0140\u0142\f\26\2\2\u0141\u0143\7t\2\2\u0142\u0141\3\2\2\2\u0142"+ + "\u0143\3\2\2\2\u0143\u0144\3\2\2\2\u0144\u0146\t\b\2\2\u0145\u0147\7t"+ + "\2\2\u0146\u0145\3\2\2\2\u0146\u0147\3\2\2\2\u0147\u0148\3\2\2\2\u0148"+ + "\u01a4\5,\27\27\u0149\u014b\f\25\2\2\u014a\u014c\7t\2\2\u014b\u014a\3"+ + "\2\2\2\u014b\u014c\3\2\2\2\u014c\u014d\3\2\2\2\u014d\u014f\t\t\2\2\u014e"+ + "\u0150\7t\2\2\u014f\u014e\3\2\2\2\u014f\u0150\3\2\2\2\u0150\u0151\3\2"+ + "\2\2\u0151\u01a4\5,\27\26\u0152\u0154\f\24\2\2\u0153\u0155\7t\2\2\u0154"+ + "\u0153\3\2\2\2\u0154\u0155\3\2\2\2\u0155\u0156\3\2\2\2\u0156\u0158\t\n"+ + "\2\2\u0157\u0159\7t\2\2\u0158\u0157\3\2\2\2\u0158\u0159\3\2\2\2\u0159"+ + "\u015a\3\2\2\2\u015a\u01a4\5,\27\25\u015b\u015d\f\23\2\2\u015c\u015e\7"+ + "t\2\2\u015d\u015c\3\2\2\2\u015d\u015e\3\2\2\2\u015e\u015f\3\2\2\2\u015f"+ + "\u0161\t\13\2\2\u0160\u0162\7t\2\2\u0161\u0160\3\2\2\2\u0161\u0162\3\2"+ + "\2\2\u0162\u0163\3\2\2\2\u0163\u01a4\5,\27\24\u0164\u0166\f\22\2\2\u0165"+ + "\u0167\7t\2\2\u0166\u0165\3\2\2\2\u0166\u0167\3\2\2\2\u0167\u0168\3\2"+ + "\2\2\u0168\u016a\7y\2\2\u0169\u016b\7t\2\2\u016a\u0169\3\2\2\2\u016a\u016b"+ + "\3\2\2\2\u016b\u016c\3\2\2\2\u016c\u01a4\5,\27\23\u016d\u016f\f\21\2\2"+ + "\u016e\u0170\7t\2\2\u016f\u016e\3\2\2\2\u016f\u0170\3\2\2\2\u0170\u0171"+ + "\3\2\2\2\u0171\u0173\7:\2\2\u0172\u0174\7t\2\2\u0173\u0172\3\2\2\2\u0173"+ + "\u0174\3\2\2\2\u0174\u0175\3\2\2\2\u0175\u01a4\5,\27\22\u0176\u0178\f"+ + "\20\2\2\u0177\u0179\7t\2\2\u0178\u0177\3\2\2\2\u0178\u0179\3\2\2\2\u0179"+ + "\u017a\3\2\2\2\u017a\u017c\7;\2\2\u017b\u017d\7t\2\2\u017c\u017b\3\2\2"+ + "\2\u017c\u017d\3\2\2\2\u017d\u017e\3\2\2\2\u017e\u01a4\5,\27\21\u017f"+ + "\u0181\f\16\2\2\u0180\u0182\7t\2\2\u0181\u0180\3\2\2\2\u0181\u0182\3\2"+ + "\2\2\u0182\u0183\3\2\2\2\u0183\u0185\7>\2\2\u0184\u0186\7t\2\2\u0185\u0184"+ + "\3\2\2\2\u0185\u0186\3\2\2\2\u0186\u0187\3\2\2\2\u0187\u01a4\5,\27\17"+ + "\u0188\u018a\f\r\2\2\u0189\u018b\7t\2\2\u018a\u0189\3\2\2\2\u018a\u018b"+ + "\3\2\2\2\u018b\u018c\3\2\2\2\u018c\u018e\7?\2\2\u018d\u018f\7t\2\2\u018e"+ + "\u018d\3\2\2\2\u018e\u018f\3\2\2\2\u018f\u0190\3\2\2\2\u0190\u01a4\5,"+ + "\27\16\u0191\u0193\f\f\2\2\u0192\u0194\7t\2\2\u0193\u0192\3\2\2\2\u0193"+ + "\u0194\3\2\2\2\u0194\u0195\3\2\2\2\u0195\u0197\7@\2\2\u0196\u0198\7t\2"+ + "\2\u0197\u0196\3\2\2\2\u0197\u0198\3\2\2\2\u0198\u0199\3\2\2\2\u0199\u01a4"+ + "\5,\27\r\u019a\u019b\f\17\2\2\u019b\u019c\7<\2\2\u019c\u019f\5,\27\2\u019d"+ + "\u019e\7=\2\2\u019e\u01a0\5,\27\2\u019f\u019d\3\2\2\2\u019f\u01a0\3\2"+ + "\2\2\u01a0\u01a4\3\2\2\2\u01a1\u01a2\f\4\2\2\u01a2\u01a4\5.\30\2\u01a3"+ + "\u012e\3\2\2\2\u01a3\u0137\3\2\2\2\u01a3\u0140\3\2\2\2\u01a3\u0149\3\2"+ + "\2\2\u01a3\u0152\3\2\2\2\u01a3\u015b\3\2\2\2\u01a3\u0164\3\2\2\2\u01a3"+ + "\u016d\3\2\2\2\u01a3\u0176\3\2\2\2\u01a3\u017f\3\2\2\2\u01a3\u0188\3\2"+ + "\2\2\u01a3\u0191\3\2\2\2\u01a3\u019a\3\2\2\2\u01a3\u01a1\3\2\2\2\u01a4"+ + "\u01a7\3\2\2\2\u01a5\u01a3\3\2\2\2\u01a5\u01a6\3\2\2\2\u01a6-\3\2\2\2"+ + "\u01a7\u01a5\3\2\2\2\u01a8\u01a9\7D\2\2\u01a9\u01aa\5 \21\2\u01aa/\3\2"+ + "\2\2\u01ab\u01ac\5D#\2\u01ac\u01ad\5\"\22\2\u01ad\61\3\2\2\2\u01ae\u01af"+ + "\7E\2\2\u01af\u01b0\7B\2\2\u01b0\u01b1\5,\27\2\u01b1\u01b2\7C\2\2\u01b2"+ + "\63\3\2\2\2\u01b3\u01b4\7y\2\2\u01b4\u01b5\5D#\2\u01b5\65\3\2\2\2\u01b6"+ + "\u01b7\5D#\2\u01b7\u01b9\7B\2\2\u01b8\u01ba\5:\36\2\u01b9\u01b8\3\2\2"+ + "\2\u01b9\u01ba\3\2\2\2\u01ba\u01bb\3\2\2\2\u01bb\u01bc\7C\2\2\u01bc\67"+ + "\3\2\2\2\u01bd\u01be\5D#\2\u01be\u01c0\7B\2\2\u01bf\u01c1\5:\36\2\u01c0"+ + "\u01bf\3\2\2\2\u01c0\u01c1\3\2\2\2\u01c1\u01c2\3\2\2\2\u01c2\u01c3\7C"+ + "\2\2\u01c39\3\2\2\2\u01c4\u01cc\5,\27\2\u01c5\u01c7\7\20\2\2\u01c6\u01c8"+ + "\7t\2\2\u01c7\u01c6\3\2\2\2\u01c7\u01c8\3\2\2\2\u01c8\u01c9\3\2\2\2\u01c9"+ + "\u01cb\5,\27\2\u01ca\u01c5\3\2\2\2\u01cb\u01ce\3\2\2\2\u01cc\u01ca\3\2"+ + "\2\2\u01cc\u01cd\3\2\2\2\u01cd;\3\2\2\2\u01ce\u01cc\3\2\2\2\u01cf\u01d1"+ + "\7F\2\2\u01d0\u01d2\5,\27\2\u01d1\u01d0\3\2\2\2\u01d1\u01d2\3\2\2\2\u01d2"+ + "=\3\2\2\2\u01d3\u01d4\7G\2\2\u01d4?\3\2\2\2\u01d5\u01d6\7H\2\2\u01d6A"+ + "\3\2\2\2\u01d7\u01d8\7u\2\2\u01d8C\3\2\2\2\u01d9\u01de\7u\2\2\u01da\u01db"+ + "\7I\2\2\u01db\u01dd\7u\2\2\u01dc\u01da\3\2\2\2\u01dd\u01e0\3\2\2\2\u01de"+ + "\u01dc\3\2\2\2\u01de\u01df\3\2\2\2\u01dfE\3\2\2\2\u01e0\u01de\3\2\2\2"+ + "\u01e1\u01e2\t\f\2\2\u01e2G\3\2\2\2\u01e3\u01e4\t\r\2\2\u01e4I\3\2\2\2"+ + "\u01e5\u01e6\t\16\2\2\u01e6K\3\2\2\2\u01e7\u01e9\t\17\2\2\u01e8\u01ea"+ + "\5N(\2\u01e9\u01e8\3\2\2\2\u01e9\u01ea\3\2\2\2\u01eaM\3\2\2\2\u01eb\u01ec"+ + "\7T\2\2\u01ecO\3\2\2\2\u01ed\u01ee\t\20\2\2\u01eeQ\3\2\2\2\u01ef\u01f1"+ + "\7\35\2\2\u01f0\u01f2\7t\2\2\u01f1\u01f0\3\2\2\2\u01f1\u01f2\3\2\2\2\u01f2"+ + "\u01f3\3\2\2\2\u01f3\u01fb\5,\27\2\u01f4\u01f6\7\20\2\2\u01f5\u01f7\7"+ + "t\2\2\u01f6\u01f5\3\2\2\2\u01f6\u01f7\3\2\2\2\u01f7\u01f8\3\2\2\2\u01f8"+ + "\u01fa\5,\27\2\u01f9\u01f4\3\2\2\2\u01fa\u01fd\3\2\2\2\u01fb\u01f9\3\2"+ + "\2\2\u01fb\u01fc\3\2\2\2\u01fc\u01ff\3\2\2\2\u01fd\u01fb\3\2\2\2\u01fe"+ + "\u0200\7t\2\2\u01ff\u01fe\3\2\2\2\u01ff\u0200\3\2\2\2\u0200\u0201\3\2"+ + "\2\2\u0201\u0202\7\36\2\2\u0202S\3\2\2\2\u0203\u0205\7\24\2\2\u0204\u0206"+ + "\7t\2\2\u0205\u0204\3\2\2\2\u0205\u0206\3\2\2\2\u0206\u0207\3\2\2\2\u0207"+ + "\u020f\5,\27\2\u0208\u020a\7\20\2\2\u0209\u020b\7t\2\2\u020a\u0209\3\2"+ + "\2\2\u020a\u020b\3\2\2\2\u020b\u020c\3\2\2\2\u020c\u020e\5,\27\2\u020d"+ + "\u0208\3\2\2\2\u020e\u0211\3\2\2\2\u020f\u020d\3\2\2\2\u020f\u0210\3\2"+ + "\2\2\u0210\u0213\3\2\2\2\u0211\u020f\3\2\2\2\u0212\u0214\7t\2\2\u0213"+ + "\u0212\3\2\2\2\u0213\u0214\3\2\2\2\u0214\u0215\3\2\2\2\u0215\u0216\7\25"+ + "\2\2\u0216U\3\2\2\2\u0217\u0218\7{\2\2\u0218W\3\2\2\2\u0219\u021a\7}\2"+ + "\2\u021aY\3\2\2\2\u021b\u021c\7z\2\2\u021c[\3\2\2\2\u021d\u0225\5L\'\2"+ + "\u021e\u0225\5P)\2\u021f\u0225\5R*\2\u0220\u0225\5V,\2\u0221\u0225\5X"+ + "-\2\u0222\u0225\5Z.\2\u0223\u0225\5T+\2\u0224\u021d\3\2\2\2\u0224\u021e"+ + "\3\2\2\2\u0224\u021f\3\2\2\2\u0224\u0220\3\2\2\2\u0224\u0221\3\2\2\2\u0224"+ + "\u0222\3\2\2\2\u0224\u0223\3\2\2\2\u0225]\3\2\2\2\u0226\u0227\7W\2\2\u0227"+ + "\u0228\7|\2\2\u0228_\3\2\2\2\u0229\u022a\7X\2\2\u022a\u022b\5B\"\2\u022b"+ + "\u022d\7B\2\2\u022c\u022e\5f\64\2\u022d\u022c\3\2\2\2\u022d\u022e\3\2"+ + "\2\2\u022e\u022f\3\2\2\2\u022f\u0231\7C\2\2\u0230\u0232\5b\62\2\u0231"+ + "\u0230\3\2\2\2\u0231\u0232\3\2\2\2\u0232\u0233\3\2\2\2\u0233\u0234\5d"+ + "\63\2\u0234\u0235\7t\2\2\u0235a\3\2\2\2\u0236\u0237\7Y\2\2\u0237\u0238"+ + "\5h\65\2\u0238c\3\2\2\2\u0239\u023a\7\24\2\2\u023a\u023f\7t\2\2\u023b"+ + "\u023e\5\b\5\2\u023c\u023e\7t\2\2\u023d\u023b\3\2\2\2\u023d\u023c\3\2"+ + "\2\2\u023e\u0241\3\2\2\2\u023f\u023d\3\2\2\2\u023f\u0240\3\2\2\2\u0240"+ + "\u0242\3\2\2\2\u0241\u023f\3\2\2\2\u0242\u0243\7\25\2\2\u0243e\3\2\2\2"+ + "\u0244\u024c\5\22\n\2\u0245\u0247\7\20\2\2\u0246\u0248\7t\2\2\u0247\u0246"+ + "\3\2\2\2\u0247\u0248\3\2\2\2\u0248\u0249\3\2\2\2\u0249\u024b\5\22\n\2"+ + "\u024a\u0245\3\2\2\2\u024b\u024e\3\2\2\2\u024c\u024a\3\2\2\2\u024c\u024d"+ + "\3\2\2\2\u024dg\3\2\2\2\u024e\u024c\3\2\2\2\u024f\u0257\5 \21\2\u0250"+ + "\u0252\7\20\2\2\u0251\u0253\7t\2\2\u0252\u0251\3\2\2\2\u0252\u0253\3\2"+ + "\2\2\u0253\u0254\3\2\2\2\u0254\u0256\5 \21\2\u0255\u0250\3\2\2\2\u0256"+ + "\u0259\3\2\2\2\u0257\u0255\3\2\2\2\u0257\u0258\3\2\2\2\u0258i\3\2\2\2"+ + "\u0259\u0257\3\2\2\2\u025a\u025b\7Z\2\2\u025b\u025c\5B\"\2\u025c\u025e"+ + "\7B\2\2\u025d\u025f\5n8\2\u025e\u025d\3\2\2\2\u025e\u025f\3\2\2\2\u025f"+ + "\u0260\3\2\2\2\u0260\u0262\7C\2\2\u0261\u0263\7t\2\2\u0262\u0261\3\2\2"+ + "\2\u0262\u0263\3\2\2\2\u0263\u0265\3\2\2\2\u0264\u0266\5r:\2\u0265\u0264"+ + "\3\2\2\2\u0265\u0266\3\2\2\2\u0266\u0268\3\2\2\2\u0267\u0269\5v<\2\u0268"+ + "\u0267\3\2\2\2\u0268\u0269\3\2\2\2\u0269\u026c\3\2\2\2\u026a\u026d\5l"+ + "\67\2\u026b\u026d\5d\63\2\u026c\u026a\3\2\2\2\u026c\u026b\3\2\2\2\u026d"+ + "k\3\2\2\2\u026e\u026f\7\21\2\2\u026f\u0270\5L\'\2\u0270m\3\2\2\2\u0271"+ + "\u0279\5p9\2\u0272\u0274\7\20\2\2\u0273\u0275\7t\2\2\u0274\u0273\3\2\2"+ + "\2\u0274\u0275\3\2\2\2\u0275\u0276\3\2\2\2\u0276\u0278\5p9\2\u0277\u0272"+ + "\3\2\2\2\u0278\u027b\3\2\2\2\u0279\u0277\3\2\2\2\u0279\u027a\3\2\2\2\u027a"+ + "o\3\2\2\2\u027b\u0279\3\2\2\2\u027c\u027d\5\22\n\2\u027d\u0281\7E\2\2"+ + "\u027e\u0282\5H%\2\u027f\u0282\5J&\2\u0280\u0282\7[\2\2\u0281\u027e\3"+ + "\2\2\2\u0281\u027f\3\2\2\2\u0281\u0280\3\2\2\2\u0282q\3\2\2\2\u0283\u0284"+ + "\7\\\2\2\u0284\u0286\7B\2\2\u0285\u0287\5t;\2\u0286\u0285\3\2\2\2\u0286"+ + "\u0287\3\2\2\2\u0287\u0288\3\2\2\2\u0288\u0289\7C\2\2\u0289s\3\2\2\2\u028a"+ + "\u028f\5F$\2\u028b\u028c\7\20\2\2\u028c\u028e\5F$\2\u028d\u028b\3\2\2"+ + "\2\u028e\u0291\3\2\2\2\u028f\u028d\3\2\2\2\u028f\u0290\3\2\2\2\u0290u"+ + "\3\2\2\2\u0291\u028f\3\2\2\2\u0292\u0293\7Y\2\2\u0293\u029b\5x=\2\u0294"+ + "\u0296\7\20\2\2\u0295\u0297\7t\2\2\u0296\u0295\3\2\2\2\u0296\u0297\3\2"+ + "\2\2\u0297\u0298\3\2\2\2\u0298\u029a\5x=\2\u0299\u0294\3\2\2\2\u029a\u029d"+ + "\3\2\2\2\u029b\u0299\3\2\2\2\u029b\u029c\3\2\2\2\u029cw\3\2\2\2\u029d"+ + "\u029b\3\2\2\2\u029e\u029f\5 \21\2\u029f\u02a3\7E\2\2\u02a0\u02a4\5H%"+ + "\2\u02a1\u02a4\5J&\2\u02a2\u02a4\7[\2\2\u02a3\u02a0\3\2\2\2\u02a3\u02a1"+ + "\3\2\2\2\u02a3\u02a2\3\2\2\2\u02a4y\3\2\2\2\u02a5\u02a6\7]\2\2\u02a6\u02a8"+ + "\5,\27\2\u02a7\u02a9\7t\2\2\u02a8\u02a7\3\2\2\2\u02a8\u02a9\3\2\2\2\u02a9"+ + "\u02ac\3\2\2\2\u02aa\u02ad\5\b\5\2\u02ab\u02ad\5d\63\2\u02ac\u02aa\3\2"+ + "\2\2\u02ac\u02ab\3\2\2\2\u02ad\u02af\3\2\2\2\u02ae\u02b0\7t\2\2\u02af"+ + "\u02ae\3\2\2\2\u02af\u02b0\3\2\2\2\u02b0\u02b2\3\2\2\2\u02b1\u02b3\5|"+ + "?\2\u02b2\u02b1\3\2\2\2\u02b2\u02b3\3\2\2\2\u02b3{\3\2\2\2\u02b4\u02b6"+ + "\7^\2\2\u02b5\u02b7\7t\2\2\u02b6\u02b5\3\2\2\2\u02b6\u02b7\3\2\2\2\u02b7"+ + "\u02ba\3\2\2\2\u02b8\u02bb\5\b\5\2\u02b9\u02bb\5d\63\2\u02ba\u02b8\3\2"+ + "\2\2\u02ba\u02b9\3\2\2\2\u02bb}\3\2\2\2\u02bc\u02be\5\u0080A\2\u02bd\u02bf"+ + "\7t\2\2\u02be\u02bd\3\2\2\2\u02be\u02bf\3\2\2\2\u02bf\u02c2\3\2\2\2\u02c0"+ + "\u02c3\5\b\5\2\u02c1\u02c3\5d\63\2\u02c2\u02c0\3\2\2\2\u02c2\u02c1\3\2"+ + "\2\2\u02c3\u02c5\3\2\2\2\u02c4\u02c6\7t\2\2\u02c5\u02c4\3\2\2\2\u02c5"+ + "\u02c6\3\2\2\2\u02c6\u02c8\3\2\2\2\u02c7\u02c9\5|?\2\u02c8\u02c7\3\2\2"+ + "\2\u02c8\u02c9\3\2\2\2\u02c9\u02ca\3\2\2\2\u02ca\u02cb\7t\2\2\u02cb\177"+ + "\3\2\2\2\u02cc\u02cd\t\21\2\2\u02cd\u0081\3\2\2\2\u02ce\u02d0\7k\2\2\u02cf"+ + "\u02d1\5 \21\2\u02d0\u02cf\3\2\2\2\u02d0\u02d1\3\2\2\2\u02d1\u02d3\3\2"+ + "\2\2\u02d2\u02d4\7~\2\2\u02d3\u02d2\3\2\2\2\u02d3\u02d4\3\2\2\2\u02d4"+ + "\u02d7\3\2\2\2\u02d5\u02d8\5F$\2\u02d6\u02d8\5B\"\2\u02d7\u02d5\3\2\2"+ + "\2\u02d7\u02d6\3\2\2\2\u02d8\u02d9\3\2\2\2\u02d9\u02da\7l\2\2\u02da\u02dc"+ + "\5,\27\2\u02db\u02dd\7t\2\2\u02dc\u02db\3\2\2\2\u02dc\u02dd\3\2\2\2\u02dd"+ + "\u02e0\3\2\2\2\u02de\u02e1\5\b\5\2\u02df\u02e1\5d\63\2\u02e0\u02de\3\2"+ + "\2\2\u02e0\u02df\3\2\2\2\u02e1\u0083\3\2\2\2\u02e2\u02e3\7m\2\2\u02e3"+ + "\u02e5\5,\27\2\u02e4\u02e6\7t\2\2\u02e5\u02e4\3\2\2\2\u02e5\u02e6\3\2"+ + "\2\2\u02e6\u02e9\3\2\2\2\u02e7\u02ea\5\b\5\2\u02e8\u02ea\5d\63\2\u02e9"+ + "\u02e7\3\2\2\2\u02e9\u02e8\3\2\2\2\u02ea\u0085\3\2\2\2\u02eb\u02ee\7n"+ + "\2\2\u02ec\u02ef\5\b\5\2\u02ed\u02ef\5d\63\2\u02ee\u02ec\3\2\2\2\u02ee"+ + "\u02ed\3\2\2\2\u02ef\u02f1\3\2\2\2\u02f0\u02f2\7t\2\2\u02f1\u02f0\3\2"+ + "\2\2\u02f1\u02f2\3\2\2\2\u02f2\u02f3\3\2\2\2\u02f3\u02f4\7o\2\2\u02f4"+ + "\u02f5\5,\27\2\u02f5\u0087\3\2\2\2\u02f6\u02f7\7p\2\2\u02f7\u02f8\5,\27"+ + "\2\u02f8\u02f9\7\24\2\2\u02f9\u02fe\7t\2\2\u02fa\u02fd\5\u008aF\2\u02fb"+ + "\u02fd\7t\2\2\u02fc\u02fa\3\2\2\2\u02fc\u02fb\3\2\2\2\u02fd\u0300\3\2"+ + "\2\2\u02fe\u02fc\3\2\2\2\u02fe\u02ff\3\2\2\2\u02ff\u0301\3\2\2\2\u0300"+ + "\u02fe\3\2\2\2\u0301\u0303\7\25\2\2\u0302\u0304\7t\2\2\u0303\u0302\3\2"+ + "\2\2\u0303\u0304\3\2\2\2\u0304\u0089\3\2\2\2\u0305\u0308\5:\36\2\u0306"+ + "\u0308\7^\2\2\u0307\u0305\3\2\2\2\u0307\u0306\3\2\2\2\u0308\u0309\3\2"+ + "\2\2\u0309\u030c\7Y\2\2\u030a\u030d\5\b\5\2\u030b\u030d\5d\63\2\u030c"+ + "\u030a\3\2\2\2\u030c\u030b\3\2\2\2\u030d\u008b\3\2\2\2j\u008e\u0090\u0097"+ + "\u009c\u00bb\u00c3\u00c7\u00ce\u00d1\u00d6\u00da\u00de\u00fc\u0100\u0117"+ + "\u012c\u0130\u0134\u0139\u013d\u0142\u0146\u014b\u014f\u0154\u0158\u015d"+ + "\u0161\u0166\u016a\u016f\u0173\u0178\u017c\u0181\u0185\u018a\u018e\u0193"+ + "\u0197\u019f\u01a3\u01a5\u01b9\u01c0\u01c7\u01cc\u01d1\u01de\u01e9\u01f1"+ + "\u01f6\u01fb\u01ff\u0205\u020a\u020f\u0213\u0224\u022d\u0231\u023d\u023f"+ + "\u0247\u024c\u0252\u0257\u025e\u0262\u0265\u0268\u026c\u0274\u0279\u0281"+ + "\u0286\u028f\u0296\u029b\u02a3\u02a8\u02ac\u02af\u02b2\u02b6\u02ba\u02be"+ + "\u02c2\u02c5\u02c8\u02d0\u02d3\u02d7\u02dc\u02e0\u02e5\u02e9\u02ee\u02f1"+ + "\u02fc\u02fe\u0303\u0307\u030c"; + 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