From 44f9d5e69e9ad7b6093c2d972c91f4b537e2d663 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Fri, 12 Jul 2019 06:14:59 +0200 Subject: [PATCH] added struct syntax --- compiler/res/version.txt | 2 +- compiler/src/prog8/ast/AstToplevel.kt | 9 +- compiler/src/prog8/ast/Interfaces.kt | 21 +- compiler/src/prog8/ast/antlr/Antr2Kotlin.kt | 78 +- compiler/src/prog8/ast/base/Base.kt | 6 +- .../src/prog8/ast/processing/AstChecker.kt | 32 + .../ast/processing/AstIdentifiersChecker.kt | 51 +- .../ast/processing/IAstModifyingVisitor.kt | 5 + .../src/prog8/ast/processing/IAstVisitor.kt | 4 + .../VarInitValueAndAddressOfCreator.kt | 4 +- .../src/prog8/ast/statements/AstStatements.kt | 29 +- .../src/prog8/compiler/AstToSourceCode.kt | 22 +- compiler/src/prog8/compiler/Compiler.kt | 3 + compiler/src/prog8/compiler/Main.kt | 2 +- .../intermediate/IntermediateProgram.kt | 13 +- .../src/prog8/compiler/target/c64/AsmGen.kt | 1 + compiler/src/prog8/optimizer/CallGraph.kt | 7 +- .../src/prog8/optimizer/StatementOptimizer.kt | 4 +- compiler/src/prog8/vm/astvm/AstVm.kt | 1 + .../src/prog8/vm/astvm/VariablesCreator.kt | 10 +- examples/test.p8 | 43 +- parser/antlr/prog8.g4 | 6 +- parser/src/prog8/parser/prog8Lexer.java | 512 -- parser/src/prog8/parser/prog8Parser.java | 5264 ----------------- 24 files changed, 280 insertions(+), 5849 deletions(-) delete mode 100644 parser/src/prog8/parser/prog8Lexer.java delete mode 100644 parser/src/prog8/parser/prog8Parser.java diff --git a/compiler/res/version.txt b/compiler/res/version.txt index c044b1a32..655297a20 100644 --- a/compiler/res/version.txt +++ b/compiler/res/version.txt @@ -1 +1 @@ -1.10 +1.11-dev diff --git a/compiler/src/prog8/ast/AstToplevel.kt b/compiler/src/prog8/ast/AstToplevel.kt index 94e761af3..b25c8dbc1 100644 --- a/compiler/src/prog8/ast/AstToplevel.kt +++ b/compiler/src/prog8/ast/AstToplevel.kt @@ -1,9 +1,6 @@ package prog8.ast -import prog8.ast.base.FatalAstException -import prog8.ast.base.NameError -import prog8.ast.base.ParentSentinel -import prog8.ast.base.Position +import prog8.ast.base.* import prog8.ast.statements.Block import prog8.ast.statements.Label import prog8.ast.statements.Subroutine @@ -90,3 +87,7 @@ object BuiltinFunctionScopePlaceholder : INameScope { override var parent: Node = ParentSentinel override fun linkParents(parent: Node) {} } + + +// prefix for struct member variables +internal fun mangledStructMemberName(varName: String, memberName: String) = "_prog8struct_${varName}_$memberName" diff --git a/compiler/src/prog8/ast/Interfaces.kt b/compiler/src/prog8/ast/Interfaces.kt index 87ec29c5a..35641296d 100644 --- a/compiler/src/prog8/ast/Interfaces.kt +++ b/compiler/src/prog8/ast/Interfaces.kt @@ -80,8 +80,7 @@ interface INameScope { val subscopes = mutableMapOf() for(stmt in statements) { when(stmt) { - // NOTE: if other nodes are introduced that are a scope of contain subscopes, they must be added here! - is INameScope -> subscopes[stmt.name] = stmt + // NOTE: if other nodes are introduced that are a scope, or contain subscopes, they must be added here! is ForLoop -> subscopes[stmt.body.name] = stmt.body is RepeatLoop -> subscopes[stmt.body.name] = stmt.body is WhileLoop -> subscopes[stmt.body.name] = stmt.body @@ -98,6 +97,7 @@ interface INameScope { is WhenStatement -> { stmt.choices.forEach { subscopes[it.statements.name] = it.statements } } + is INameScope -> subscopes[stmt.name] = stmt } } return subscopes @@ -109,6 +109,11 @@ interface INameScope { for (stmt in statements) { if (stmt is VarDecl && stmt.name==name) return stmt if (stmt is Label && stmt.name==name) return stmt + if (stmt is AnonymousScope) { + val sub = stmt.getLabelOrVariable(name) + if(sub!=null) + return sub + } } return null } @@ -127,6 +132,18 @@ interface INameScope { fun lookup(scopedName: List, localContext: Node) : IStatement? { if(scopedName.size>1) { + // it's a qualified name, can either be: + // - the name of a field in a struct + // - the name of a symbol somewhere else starting from the root of the namespace. + + // check struct first + if(scopedName.size==2) { // TODO support for referencing structs in other scopes + val mangledname = mangledStructMemberName(scopedName[0], scopedName[1]) + val vardecl = localContext.definingScope().getLabelOrVariable(mangledname) + if(vardecl!=null) + return vardecl + } + // it's a qualified name, look it up from the root of the module's namespace (consider all modules in the program) for(module in localContext.definingModule().program.modules) { var scope: INameScope? = module diff --git a/compiler/src/prog8/ast/antlr/Antr2Kotlin.kt b/compiler/src/prog8/ast/antlr/Antr2Kotlin.kt index f762f8117..cc9065283 100644 --- a/compiler/src/prog8/ast/antlr/Antr2Kotlin.kt +++ b/compiler/src/prog8/ast/antlr/Antr2Kotlin.kt @@ -59,57 +59,56 @@ private fun prog8Parser.Statement_blockContext.toAst(): MutableList private fun prog8Parser.StatementContext.toAst() : IStatement { - vardecl()?.let { - return VarDecl(VarDeclType.VAR, - it.datatype().toAst(), - it.ZEROPAGE() != null, - it.arrayindex()?.toAst(), - it.identifier().text, - null, - it.ARRAYSIG() != null || it.arrayindex() != null, - false, - it.toPosition()) - } + vardecl()?.let { return it.toAst() } varinitializer()?.let { val vd = it.vardecl() - return VarDecl(VarDeclType.VAR, - vd.datatype().toAst(), + return VarDecl( + VarDeclType.VAR, + vd.datatype()?.toAst() ?: DataType.STRUCT, vd.ZEROPAGE() != null, vd.arrayindex()?.toAst(), - vd.identifier().text, + vd.varname.text, + vd.structname?.text, it.expression().toAst(), vd.ARRAYSIG() != null || vd.arrayindex() != null, false, - it.toPosition()) + it.toPosition() + ) } constdecl()?.let { val cvarinit = it.varinitializer() val vd = cvarinit.vardecl() - return VarDecl(VarDeclType.CONST, - vd.datatype().toAst(), + return VarDecl( + VarDeclType.CONST, + vd.datatype()?.toAst() ?: DataType.STRUCT, vd.ZEROPAGE() != null, vd.arrayindex()?.toAst(), - vd.identifier().text, + vd.varname.text, + vd.structname?.text, cvarinit.expression().toAst(), vd.ARRAYSIG() != null || vd.arrayindex() != null, false, - cvarinit.toPosition()) + cvarinit.toPosition() + ) } memoryvardecl()?.let { val mvarinit = it.varinitializer() val vd = mvarinit.vardecl() - return VarDecl(VarDeclType.MEMORY, - vd.datatype().toAst(), + return VarDecl( + VarDeclType.MEMORY, + vd.datatype()?.toAst() ?: DataType.STRUCT, vd.ZEROPAGE() != null, vd.arrayindex()?.toAst(), - vd.identifier().text, + vd.varname.text, + vd.structname?.text, mvarinit.expression().toAst(), vd.ARRAYSIG() != null || vd.arrayindex() != null, false, - mvarinit.toPosition()) + mvarinit.toPosition() + ) } assignment()?.let { @@ -175,6 +174,12 @@ private fun prog8Parser.StatementContext.toAst() : IStatement { val whenstmt = whenstmt()?.toAst() if(whenstmt!=null) return whenstmt + structdecl()?.let { + return StructDecl(it.identifier().text, + it.vardecl().map { vd->vd.toAst() }.toMutableList(), + toPosition()) + } + throw FatalAstException("unprocessed source text (are we missing ast conversion rules for parser elements?): $text") } @@ -215,8 +220,12 @@ private fun prog8Parser.Asmsub_returnsContext.toAst(): List private fun prog8Parser.Asmsub_paramsContext.toAst(): List = asmsub_param().map { - AsmSubroutineParameter(it.vardecl().identifier().text, it.vardecl().datatype().toAst(), - it.registerorpair()?.toAst(), it.statusregister()?.toAst(), !it.stack?.text.isNullOrEmpty(), toPosition()) + val vardecl = it.vardecl() + val datatype = vardecl.datatype()?.toAst() ?: DataType.STRUCT + AsmSubroutineParameter(vardecl.varname.text, datatype, + it.registerorpair()?.toAst(), + it.statusregister()?.toAst(), + !it.stack?.text.isNullOrEmpty(), toPosition()) } @@ -281,7 +290,8 @@ private fun prog8Parser.Sub_return_partContext.toAst(): List { private fun prog8Parser.Sub_paramsContext.toAst(): List = vardecl().map { - SubroutineParameter(it.identifier().text, it.datatype().toAst(), it.toPosition()) + val datatype = it.datatype()?.toAst() ?: DataType.STRUCT + SubroutineParameter(it.varname.text, datatype, it.toPosition()) } @@ -559,6 +569,21 @@ private fun prog8Parser.When_choiceContext.toAst(): WhenChoice { return WhenChoice(values, scope, toPosition()) } +private fun prog8Parser.VardeclContext.toAst(): VarDecl { + return VarDecl( + if(structname!=null) VarDeclType.STRUCT else VarDeclType.VAR, + datatype()?.toAst() ?: DataType.STRUCT, + ZEROPAGE() != null, + arrayindex()?.toAst(), + varname.text, + structname?.text, + null, + ARRAYSIG() != null || arrayindex() != null, + false, + toPosition() + ) +} + internal fun escape(str: String) = str.replace("\t", "\\t").replace("\n", "\\n").replace("\r", "\\r") internal fun unescape(str: String, position: Position): String { @@ -584,3 +609,4 @@ internal fun unescape(str: String, position: Position): String { } return result.joinToString("") } + diff --git a/compiler/src/prog8/ast/base/Base.kt b/compiler/src/prog8/ast/base/Base.kt index 513d94713..27f08bea8 100644 --- a/compiler/src/prog8/ast/base/Base.kt +++ b/compiler/src/prog8/ast/base/Base.kt @@ -16,7 +16,8 @@ enum class DataType { ARRAY_B, ARRAY_UW, ARRAY_W, - ARRAY_F; + ARRAY_F, + STRUCT; /** * is the type assignable to the given other type? @@ -93,7 +94,8 @@ enum class BranchCondition { enum class VarDeclType { VAR, CONST, - MEMORY + MEMORY, + STRUCT } val IterableDatatypes = setOf( diff --git a/compiler/src/prog8/ast/processing/AstChecker.kt b/compiler/src/prog8/ast/processing/AstChecker.kt index 53a50e5b8..64c22f350 100644 --- a/compiler/src/prog8/ast/processing/AstChecker.kt +++ b/compiler/src/prog8/ast/processing/AstChecker.kt @@ -1,5 +1,6 @@ package prog8.ast.processing +import com.sun.org.apache.bcel.internal.generic.ISTORE import prog8.ast.* import prog8.ast.base.* import prog8.ast.base.printWarning @@ -555,6 +556,16 @@ internal class AstChecker(private val program: Program, } } } + VarDeclType.STRUCT -> { + if(decl.struct==null) + throw FatalAstException("struct vardecl should be linked to its struct $decl") + if(decl.datatype!=DataType.STRUCT) + throw FatalAstException("struct vardecl should be of data type struct $decl") + if(decl.zeropage) + err("struct can not be in zeropage") + if(decl.value!=null) + err("struct can not have an initialization value") // TODO allow struct to have initalization values + } } return super.visit(decl) @@ -1127,6 +1138,7 @@ internal class AstChecker(private val program: Program, } return err("invalid float array initialization value ${value.type}, expected $targetDt") } + DataType.STRUCT -> TODO("struct dt") } return true } @@ -1212,4 +1224,24 @@ internal class AstChecker(private val program: Program, return false } + + override fun visit(structDecl: StructDecl): IStatement { + // a struct can only contain 1 or more vardecls and can not be nested + if(structDecl.statements.isEmpty()) + checkResult.add(SyntaxError("struct must contain at least one member", structDecl.position)) + + for(member in structDecl.statements){ + val decl = member as? VarDecl + if(decl==null) + checkResult.add(SyntaxError("struct can only contain variable declarations", structDecl.position)) + else { + if(decl.zeropage) + checkResult.add(SyntaxError("struct can not contain zeropage members", decl.position)) + if(decl.type == VarDeclType.STRUCT) + checkResult.add(SyntaxError("structs can not be nested", decl.position)) + } + } + + return structDecl + } } diff --git a/compiler/src/prog8/ast/processing/AstIdentifiersChecker.kt b/compiler/src/prog8/ast/processing/AstIdentifiersChecker.kt index afca7da20..373eff949 100644 --- a/compiler/src/prog8/ast/processing/AstIdentifiersChecker.kt +++ b/compiler/src/prog8/ast/processing/AstIdentifiersChecker.kt @@ -11,7 +11,8 @@ import prog8.functions.BuiltinFunctions internal class AstIdentifiersChecker(private val namespace: INameScope) : IAstModifyingVisitor { private val checkResult: MutableList = mutableListOf() - private var blocks: MutableMap = mutableMapOf() + private var blocks = mutableMapOf() + internal val anonymousVariablesFromHeap = mutableMapOf>() internal fun result(): List { return checkResult @@ -55,6 +56,34 @@ internal class AstIdentifiersChecker(private val namespace: INameScope) : IAstMo // the builtin functions can't be redefined checkResult.add(NameError("builtin function cannot be redefined", decl.position)) + // is it a struct variable? then define all its struct members as mangled names, + // and include the original decl as well. + if(decl.type==VarDeclType.STRUCT) { + if(decl.structHasBeenFlattened) + return decl // don't do this multiple times + + val decls: MutableList = decl.struct!!.statements.map { + val member = it as VarDecl + VarDecl( + VarDeclType.VAR, + member.datatype, + false, + member.arraysize, + mangledStructMemberName(decl.name, member.name), + null, + member.value, + member.isArray, + true, + member.position + ) + }.toMutableList() + decls.add(decl) + decl.structHasBeenFlattened = true + val result = AnonymousScope(decls, decl.position) + result.linkParents(decl.parent) + return result + } + val existing = namespace.lookup(listOf(decl.name), decl) if (existing != null && existing !== decl) nameError(decl.name, decl.position, existing) @@ -98,8 +127,8 @@ internal class AstIdentifiersChecker(private val namespace: INameScope) : IAstMo subroutine.parameters .filter { it.name !in namesInSub } .forEach { - val vardecl = VarDecl(VarDeclType.VAR, it.type, false, null, it.name, null, - isArray = false, autoGenerated = true, position = subroutine.position) + val vardecl = VarDecl(VarDeclType.VAR, it.type, false, null, it.name, null, null, + isArray = false, hiddenButDoNotRemove = true, position = subroutine.position) vardecl.linkParents(subroutine) subroutine.statements.add(0, vardecl) } @@ -137,8 +166,8 @@ internal class AstIdentifiersChecker(private val namespace: INameScope) : IAstMo val existing = if(forLoop.body.containsNoCodeNorVars()) null else forLoop.body.lookup(forLoop.loopVar.nameInSource, forLoop.body.statements.first()) if(existing==null) { // create the local scoped for loop variable itself - val vardecl = VarDecl(VarDeclType.VAR, forLoop.decltype, forLoop.zeropage, null, varName, null, - isArray = false, autoGenerated = true, position = forLoop.loopVar.position) + val vardecl = VarDecl(VarDeclType.VAR, forLoop.decltype, forLoop.zeropage, null, varName, null, null, + isArray = false, hiddenButDoNotRemove = true, position = forLoop.loopVar.position) vardecl.linkParents(forLoop.body) forLoop.body.statements.add(0, vardecl) forLoop.loopVar.parent = forLoop.body // loopvar 'is defined in the body' @@ -150,8 +179,8 @@ internal class AstIdentifiersChecker(private val namespace: INameScope) : IAstMo val existing = if(forLoop.body.containsNoCodeNorVars()) null else forLoop.body.lookup(listOf(ForLoop.iteratorLoopcounterVarname), forLoop.body.statements.first()) if(existing==null) { // create loop iteration counter variable (without value, to avoid an assignment) - val vardecl = VarDecl(VarDeclType.VAR, DataType.UBYTE, true, null, ForLoop.iteratorLoopcounterVarname, null, - isArray = false, autoGenerated = true, position = forLoop.loopVar.position) + val vardecl = VarDecl(VarDeclType.VAR, DataType.UBYTE, true, null, ForLoop.iteratorLoopcounterVarname, null, null, + isArray = false, hiddenButDoNotRemove = true, position = forLoop.loopVar.position) vardecl.linkParents(forLoop.body) forLoop.body.statements.add(0, vardecl) forLoop.loopVar.parent = forLoop.body // loopvar 'is defined in the body' @@ -189,17 +218,13 @@ internal class AstIdentifiersChecker(private val namespace: INameScope) : IAstMo return super.visit(returnStmt) } - - internal val anonymousVariablesFromHeap = mutableMapOf>() - - override fun visit(literalValue: LiteralValue): LiteralValue { if(literalValue.heapId!=null && literalValue.parent !is VarDecl) { // a literal value that's not declared as a variable, which refers to something on the heap. // we need to introduce an auto-generated variable for this to be able to refer to the value! // (note: ususally, this has been taken care of already when the var was created) - val variable = VarDecl(VarDeclType.VAR, literalValue.type, false, null, "$autoHeapValuePrefix${literalValue.heapId}", literalValue, - isArray = false, autoGenerated = false, position = literalValue.position) + val variable = VarDecl(VarDeclType.VAR, literalValue.type, false, null, "$autoHeapValuePrefix${literalValue.heapId}", null, literalValue, + isArray = false, hiddenButDoNotRemove = false, position = literalValue.position) anonymousVariablesFromHeap[variable.name] = Pair(literalValue, variable) } return super.visit(literalValue) diff --git a/compiler/src/prog8/ast/processing/IAstModifyingVisitor.kt b/compiler/src/prog8/ast/processing/IAstModifyingVisitor.kt index 07751adc6..6bd8676ad 100644 --- a/compiler/src/prog8/ast/processing/IAstModifyingVisitor.kt +++ b/compiler/src/prog8/ast/processing/IAstModifyingVisitor.kt @@ -216,4 +216,9 @@ interface IAstModifyingVisitor { whenChoice.values?.forEach { it.accept(this) } whenChoice.statements.accept(this) } + + fun visit(structDecl: StructDecl): IStatement { + structDecl.statements = structDecl.statements.map{ it.accept(this) }.toMutableList() + return structDecl + } } diff --git a/compiler/src/prog8/ast/processing/IAstVisitor.kt b/compiler/src/prog8/ast/processing/IAstVisitor.kt index 7a885efa1..695b6a9a8 100644 --- a/compiler/src/prog8/ast/processing/IAstVisitor.kt +++ b/compiler/src/prog8/ast/processing/IAstVisitor.kt @@ -166,4 +166,8 @@ interface IAstVisitor { whenChoice.values?.forEach { it.accept(this) } whenChoice.statements.accept(this) } + + fun visit(structDecl: StructDecl) { + structDecl.statements.forEach { it.accept(this) } + } } diff --git a/compiler/src/prog8/ast/processing/VarInitValueAndAddressOfCreator.kt b/compiler/src/prog8/ast/processing/VarInitValueAndAddressOfCreator.kt index c76ef5aff..5c6ab76b7 100644 --- a/compiler/src/prog8/ast/processing/VarInitValueAndAddressOfCreator.kt +++ b/compiler/src/prog8/ast/processing/VarInitValueAndAddressOfCreator.kt @@ -107,8 +107,8 @@ internal class VarInitValueAndAddressOfCreator(private val namespace: INameScope pointerExpr.linkParents(arglist[argparam.first.index].parent) arglist[argparam.first.index] = pointerExpr // add a vardecl so that the autovar can be resolved in later lookups - val variable = VarDecl(VarDeclType.VAR, strvalue.type, false, null, autoVarName, strvalue, - isArray = false, autoGenerated = false, position = strvalue.position) + val variable = VarDecl(VarDeclType.VAR, strvalue.type, false, null, autoVarName, null, strvalue, + isArray = false, hiddenButDoNotRemove = false, position = strvalue.position) addVarDecl(strvalue.definingScope(), variable) } } diff --git a/compiler/src/prog8/ast/statements/AstStatements.kt b/compiler/src/prog8/ast/statements/AstStatements.kt index eca01777b..4f1d84b4d 100644 --- a/compiler/src/prog8/ast/statements/AstStatements.kt +++ b/compiler/src/prog8/ast/statements/AstStatements.kt @@ -139,11 +139,15 @@ class VarDecl(val type: VarDeclType, val zeropage: Boolean, var arraysize: ArrayIndex?, val name: String, + private val structName: String?, var value: IExpression?, val isArray: Boolean, - val autoGenerated: Boolean, + val hiddenButDoNotRemove: Boolean, override val position: Position) : IStatement { override lateinit var parent: Node + var struct: StructDecl? = null // set later + var structHasBeenFlattened = false + override val expensiveToInline get() = value!=null && value !is LiteralValue @@ -166,6 +170,9 @@ class VarDecl(val type: VarDeclType, this.parent = parent arraysize?.linkParents(this) value?.linkParents(this) + if(structName!=null) { + struct = definingScope().lookup(listOf(structName), this) as StructDecl + } } override fun accept(visitor: IAstModifyingVisitor) = visitor.visit(this) @@ -174,7 +181,7 @@ class VarDecl(val type: VarDeclType, val scopedname: String by lazy { makeScopedName(name) } override fun toString(): String { - return "VarDecl(name=$name, vartype=$type, datatype=$datatype, array=$isArray, value=$value, pos=$position)" + return "VarDecl(name=$name, vartype=$type, datatype=$datatype, struct=$structName, value=$value, pos=$position)" } fun asDefaultValueDecl(parent: Node?): VarDecl { @@ -186,7 +193,7 @@ class VarDecl(val type: VarDeclType, DataType.FLOAT -> LiteralValue(DataType.FLOAT, floatvalue = 0.0, position = position) else -> throw FatalAstException("can only set a default value for a numeric type") } - val decl = VarDecl(type, declaredDatatype, zeropage, arraysize, name, constValue, isArray, true, position) + val decl = VarDecl(type, declaredDatatype, zeropage, arraysize, name, null, constValue, isArray, true, position) if(parent!=null) decl.linkParents(parent) return decl @@ -721,6 +728,22 @@ class WhenChoice(val values: List?, // if null, this is } +class StructDecl(override val name: String, + override var statements: MutableList, // actually, only vardecls here + override val position: Position): IStatement, INameScope { + + override lateinit var parent: Node + override val expensiveToInline: Boolean = true + + override fun linkParents(parent: Node) { + this.parent = parent + this.statements.forEach { it.linkParents(this) } + } + + override fun accept(visitor: IAstVisitor) = visitor.visit(this) + override fun accept(visitor: IAstModifyingVisitor) = visitor.visit(this) +} + class DirectMemoryWrite(var addressExpression: IExpression, override val position: Position) : Node { override lateinit var parent: Node diff --git a/compiler/src/prog8/compiler/AstToSourceCode.kt b/compiler/src/prog8/compiler/AstToSourceCode.kt index 75a5654c4..eaf60ce10 100644 --- a/compiler/src/prog8/compiler/AstToSourceCode.kt +++ b/compiler/src/prog8/compiler/AstToSourceCode.kt @@ -85,12 +85,25 @@ class AstToSourceCode(val output: (text: String) -> Unit): IAstVisitor { DataType.ARRAY_UW -> "uword[" DataType.ARRAY_W -> "word[" DataType.ARRAY_F -> "float[" - else -> "?????" + DataType.STRUCT -> "" // the name of the struct is enough + else -> "?????2" } } + override fun visit(structDecl: StructDecl) { + outputln("struct ${structDecl.name} {") + scopelevel++ + for(decl in structDecl.statements) { + outputi("") + decl.accept(this) + output("\n") + } + scopelevel-- + outputlni("}") + } + override fun visit(decl: VarDecl) { - if(decl.autoGenerated) { + if(decl.hiddenButDoNotRemove) { // skip autogenerated vardecl return } @@ -99,6 +112,7 @@ class AstToSourceCode(val output: (text: String) -> Unit): IAstVisitor { VarDeclType.VAR -> {} VarDeclType.CONST -> output("const ") VarDeclType.MEMORY -> output("&") + VarDeclType.STRUCT -> output("${decl.struct!!.name} ") } output(datatypeString(decl.datatype)) if(decl.arraysize!=null) { @@ -126,7 +140,7 @@ class AstToSourceCode(val output: (text: String) -> Unit): IAstVisitor { true==param.second.stack -> "stack" param.second.registerOrPair!=null -> param.second.registerOrPair.toString() param.second.statusflag!=null -> param.second.statusflag.toString() - else -> "?????" + else -> "?????1" } output("${datatypeString(param.first.type)} ${param.first.name} @$reg") if(param.first!==subroutine.parameters.last()) @@ -169,7 +183,7 @@ class AstToSourceCode(val output: (text: String) -> Unit): IAstVisitor { private fun outputStatements(statements: List) { for(stmt in statements) { - if(stmt is VarDecl && stmt.autoGenerated) + if(stmt is VarDecl && stmt.hiddenButDoNotRemove) continue // skip autogenerated decls outputi("") stmt.accept(this) diff --git a/compiler/src/prog8/compiler/Compiler.kt b/compiler/src/prog8/compiler/Compiler.kt index 9ae7118a8..b911e43d3 100644 --- a/compiler/src/prog8/compiler/Compiler.kt +++ b/compiler/src/prog8/compiler/Compiler.kt @@ -213,6 +213,7 @@ internal class Compiler(private val program: Program) { is NopStatement -> {} is InlineAssembly -> translate(stmt) is WhenStatement -> translate(stmt) + is StructDecl -> {} else -> TODO("translate statement $stmt to stackvm") } } @@ -681,6 +682,7 @@ internal class Compiler(private val program: Program) { else -> throw CompilerException("invalid datatype for memory variable expression: $target") } } + VarDeclType.STRUCT -> TODO("decltype struct") } } @@ -1497,6 +1499,7 @@ internal class Compiler(private val program: Program) { prog.instr(opcode, RuntimeValue(DataType.UWORD, address)) } VarDeclType.CONST -> throw CompilerException("cannot assign to const") + VarDeclType.STRUCT -> TODO("decltype struct") } } else throw CompilerException("invalid assignment target type ${target::class}") } diff --git a/compiler/src/prog8/compiler/Main.kt b/compiler/src/prog8/compiler/Main.kt index 1e9917632..cf92d4cda 100644 --- a/compiler/src/prog8/compiler/Main.kt +++ b/compiler/src/prog8/compiler/Main.kt @@ -88,7 +88,7 @@ fun compileProgram(filepath: Path, programAst.checkValid(compilerOptions) // check if final tree is valid programAst.checkRecursion() // check if there are recursive subroutine calls - // printAst(programAst) + printAst(programAst) // namespace.debugPrint() if(generateVmCode) { diff --git a/compiler/src/prog8/compiler/intermediate/IntermediateProgram.kt b/compiler/src/prog8/compiler/intermediate/IntermediateProgram.kt index 2c424942e..ebd7b3957 100644 --- a/compiler/src/prog8/compiler/intermediate/IntermediateProgram.kt +++ b/compiler/src/prog8/compiler/intermediate/IntermediateProgram.kt @@ -4,6 +4,7 @@ import prog8.ast.antlr.escape import prog8.ast.base.* import prog8.ast.base.printWarning import prog8.ast.expressions.LiteralValue +import prog8.ast.statements.StructDecl import prog8.ast.statements.VarDecl import prog8.vm.RuntimeValue import prog8.compiler.CompilerException @@ -393,8 +394,15 @@ class IntermediateProgram(val name: String, var loadAddress: Int, val heap: Heap fun variable(scopedname: String, decl: VarDecl) { when(decl.type) { VarDeclType.VAR -> { + // var decls that are defined inside of a StructDecl are skipped in the output + // because every occurrence of the members will have a separate mangled vardecl for that occurrence + if(decl.parent is StructDecl) + return + val value = when(decl.datatype) { - in NumericDatatypes -> RuntimeValue(decl.datatype, (decl.value as LiteralValue).asNumericValue!!) + in NumericDatatypes -> { + RuntimeValue(decl.datatype, (decl.value as LiteralValue).asNumericValue!!) + } in StringDatatypes -> { val litval = (decl.value as LiteralValue) if(litval.heapId==null) @@ -427,6 +435,9 @@ class IntermediateProgram(val name: String, var loadAddress: Int, val heap: Heap if(lv.type in IntegerDatatypes) currentBlock.memoryPointers[scopedname] = Pair(lv.asIntegerValue!!, decl.datatype) } + VarDeclType.STRUCT -> { + // the struct decl itself will be replaced by mangled declarations for each of their members. + } } } diff --git a/compiler/src/prog8/compiler/target/c64/AsmGen.kt b/compiler/src/prog8/compiler/target/c64/AsmGen.kt index 6d86d9fca..4d0ac055b 100644 --- a/compiler/src/prog8/compiler/target/c64/AsmGen.kt +++ b/compiler/src/prog8/compiler/target/c64/AsmGen.kt @@ -357,6 +357,7 @@ class AsmGen(private val options: CompilationOptions, private val program: Inter for(f in array.zip(floatFills)) out(" .byte ${f.second} ; float ${f.first}") } + DataType.STRUCT -> TODO("datatype struct") } } } diff --git a/compiler/src/prog8/optimizer/CallGraph.kt b/compiler/src/prog8/optimizer/CallGraph.kt index 715cbc303..ffba9fbbf 100644 --- a/compiler/src/prog8/optimizer/CallGraph.kt +++ b/compiler/src/prog8/optimizer/CallGraph.kt @@ -118,7 +118,7 @@ class CallGraph(private val program: Program): IAstVisitor { } override fun visit(decl: VarDecl) { - if(decl.autoGenerated || (decl.definingModule().isLibraryModule && decl.type!=VarDeclType.VAR)) { + if(decl.hiddenButDoNotRemove || (decl.definingModule().isLibraryModule && decl.type!=VarDeclType.VAR)) { // make sure autogenerated vardecls are in the used symbols addNodeAndParentScopes(decl) } @@ -158,6 +158,11 @@ class CallGraph(private val program: Program): IAstVisitor { super.visit(jump) } + override fun visit(structDecl: StructDecl) { + usedSymbols.add(structDecl) + usedSymbols.addAll(structDecl.statements) + } + override fun visit(inlineAssembly: InlineAssembly) { // parse inline asm for subroutine calls (jmp, jsr) val scope = inlineAssembly.definingScope() diff --git a/compiler/src/prog8/optimizer/StatementOptimizer.kt b/compiler/src/prog8/optimizer/StatementOptimizer.kt index 6bcbe7a18..b6cb3066d 100644 --- a/compiler/src/prog8/optimizer/StatementOptimizer.kt +++ b/compiler/src/prog8/optimizer/StatementOptimizer.kt @@ -195,8 +195,8 @@ internal class StatementOptimizer(private val program: Program, private val opti override fun visit(decl: VarDecl): IStatement { val forceOutput = "force_output" in decl.definingBlock().options() if(decl !in callgraph.usedSymbols && !forceOutput) { - if(decl.type!=VarDeclType.CONST) - printWarning("removing unused variable '${decl.name}'", decl.position) + if(decl.type == VarDeclType.VAR) + printWarning("removing unused variable ${decl.type} '${decl.name}'", decl.position) optimizationsDone++ return NopStatement.insteadOf(decl) } diff --git a/compiler/src/prog8/vm/astvm/AstVm.kt b/compiler/src/prog8/vm/astvm/AstVm.kt index 281820b50..de01898b6 100644 --- a/compiler/src/prog8/vm/astvm/AstVm.kt +++ b/compiler/src/prog8/vm/astvm/AstVm.kt @@ -396,6 +396,7 @@ class AstVm(val program: Program) { mem.setUByte(addr,newval.toShort()) } VarDeclType.CONST -> throw VmExecutionException("can't be const") + VarDeclType.STRUCT -> TODO("struct decltype") } } stmt.target.memoryAddress != null -> { diff --git a/compiler/src/prog8/vm/astvm/VariablesCreator.kt b/compiler/src/prog8/vm/astvm/VariablesCreator.kt index b101bda20..34e9a2c20 100644 --- a/compiler/src/prog8/vm/astvm/VariablesCreator.kt +++ b/compiler/src/prog8/vm/astvm/VariablesCreator.kt @@ -17,9 +17,12 @@ class VariablesCreator(private val runtimeVariables: RuntimeVariables, private v runtimeVariables.define(program.namespace, Register.Y.name, RuntimeValue(DataType.UBYTE, 0)) val globalpos = Position("<>", 0, 0, 0) - val vdA = VarDecl(VarDeclType.VAR, DataType.UBYTE, false, null, Register.A.name, LiteralValue.optimalInteger(0, globalpos), isArray = false, autoGenerated = true, position = globalpos) - val vdX = VarDecl(VarDeclType.VAR, DataType.UBYTE, false, null, Register.X.name, LiteralValue.optimalInteger(255, globalpos), isArray = false, autoGenerated = true, position = globalpos) - val vdY = VarDecl(VarDeclType.VAR, DataType.UBYTE, false, null, Register.Y.name, LiteralValue.optimalInteger(0, globalpos), isArray = false, autoGenerated = true, position = globalpos) + val vdA = VarDecl(VarDeclType.VAR, DataType.UBYTE, false, null, Register.A.name, null, + LiteralValue.optimalInteger(0, globalpos), isArray = false, hiddenButDoNotRemove = true, position = globalpos) + val vdX = VarDecl(VarDeclType.VAR, DataType.UBYTE, false, null, Register.X.name, null, + LiteralValue.optimalInteger(255, globalpos), isArray = false, hiddenButDoNotRemove = true, position = globalpos) + val vdY = VarDecl(VarDeclType.VAR, DataType.UBYTE, false, null, Register.Y.name, null, + LiteralValue.optimalInteger(0, globalpos), isArray = false, hiddenButDoNotRemove = true, position = globalpos) vdA.linkParents(program.namespace) vdX.linkParents(program.namespace) vdY.linkParents(program.namespace) @@ -43,6 +46,7 @@ class VariablesCreator(private val runtimeVariables: RuntimeVariables, private v VarDeclType.CONST -> { // consts should have been const-folded away } + VarDeclType.STRUCT -> TODO("struct decltype") } return super.visit(decl) } diff --git a/examples/test.p8 b/examples/test.p8 index 3a5982bc5..e9a4c7249 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -5,17 +5,46 @@ sub start() { - foo(42) + Color foreground ; = [0,1,2] @todo init values + Color background + Color cursor + + foreground.red=99 + background.blue=foreground.red + + ;cursor=foreground ; @todo full by-value copy + + c64scr.print_ub(foreground.red) + c64.CHROUT(':') + c64scr.print_ub(foreground.green) + c64.CHROUT(':') + c64scr.print_ub(foreground.blue) + c64.CHROUT('\n') + c64scr.print_ub(background.red) + c64.CHROUT(':') + c64scr.print_ub(background.green) + c64.CHROUT(':') + c64scr.print_ub(background.blue) + c64.CHROUT('\n') + c64scr.print_ub(cursor.red) + c64.CHROUT(':') + c64scr.print_ub(cursor.green) + c64.CHROUT(':') + c64scr.print_ub(cursor.blue) + c64.CHROUT('\n') + return } - sub foo(ubyte arg) -> ubyte { - bar(arg) - return 33 + struct Color { + ubyte red + ubyte green + ubyte blue } - sub bar(ubyte a2) { - ;nothing - } + ; @todo structs as sub args. After strings and arrays as sub-args. +; sub foo(Color arg) -> ubyte { +; return arg.red+arg.green+arg.blue +; } } diff --git a/parser/antlr/prog8.g4 b/parser/antlr/prog8.g4 index b442201cb..23787a2fc 100644 --- a/parser/antlr/prog8.g4 +++ b/parser/antlr/prog8.g4 @@ -76,6 +76,7 @@ statement : | vardecl | constdecl | memoryvardecl + | structdecl | assignment | augassignment | unconditionaljump @@ -109,7 +110,7 @@ directive : directivearg : stringliteral | identifier | integerliteral ; -vardecl: datatype ZEROPAGE? (arrayindex | ARRAYSIG) ? identifier ; +vardecl: (datatype | structname=identifier) ZEROPAGE? (arrayindex | ARRAYSIG) ? varname=identifier ; varinitializer : vardecl '=' expression ; @@ -117,6 +118,8 @@ constdecl: 'const' varinitializer ; memoryvardecl: ADDRESS_OF varinitializer; +structdecl: 'struct' identifier '{' EOL vardecl ( EOL vardecl)* EOL? '}' EOL; + datatype: 'ubyte' | 'byte' | 'uword' | 'word' | 'float' | 'str' | 'str_s' ; arrayindex: '[' expression ']' ; @@ -281,3 +284,4 @@ repeatloop: 'repeat' (statement | statement_block) EOL? 'until' expression ; whenstmt: 'when' expression '{' EOL (when_choice | EOL) * '}' EOL? ; when_choice: (expression_list | 'else' ) '->' (statement | statement_block ) ; + diff --git a/parser/src/prog8/parser/prog8Lexer.java b/parser/src/prog8/parser/prog8Lexer.java deleted file mode 100644 index efe8c9c15..000000000 --- a/parser/src/prog8/parser/prog8Lexer.java +++ /dev/null @@ -1,512 +0,0 @@ -// 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, LINECOMMENT=110, COMMENT=111, WS=112, EOL=113, - NAME=114, DEC_INTEGER=115, HEX_INTEGER=116, BIN_INTEGER=117, ADDRESS_OF=118, - FLOAT_NUMBER=119, STRING=120, INLINEASMBLOCK=121, SINGLECHAR=122, ZEROPAGE=123, - ARRAYSIG=124; - 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", "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'", "'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, "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 121: - STRING_action((RuleContext)_localctx, actionIndex); - break; - case 122: - INLINEASMBLOCK_action((RuleContext)_localctx, actionIndex); - break; - case 123: - 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~\u0365\b\1\4\2\t"+ - "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ - "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ - "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ - "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ - "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ - ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ - "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ - "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ - "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\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_\t_\4"+ - "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ - "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4"+ - "w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\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\23\3\23\3\23\3\23\3\23\3\24\3\24"+ - "\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\26"+ - "\3\26\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\32"+ - "\3\32\3\33\3\33\3\33\3\34\3\34\3\34\3\35\3\35\3\35\3\36\3\36\3\36\3\37"+ - "\3\37\3\37\3\37\3 \3 \3 \3!\3!\3!\3\"\3\"\3\"\3#\3#\3#\3$\3$\3$\3$\3%"+ - "\3%\3%\3%\3&\3&\3&\3\'\3\'\3\'\3(\3(\3)\3)\3*\3*\3*\3+\3+\3,\3,\3-\3-"+ - "\3.\3.\3.\3/\3/\3/\3\60\3\60\3\61\3\61\3\62\3\62\3\62\3\63\3\63\3\63\3"+ - "\64\3\64\3\64\3\65\3\65\3\65\3\66\3\66\3\67\3\67\38\38\38\39\39\39\39"+ - "\39\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\3B\3B\3B\3B\3B\3C\3C\3C\3C\3C\3C\3D\3D\3D\3D\3D\3D\3D\3D"+ - "\3D\3E\3E\3F\3F\3G\3G\3H\3H\3I\3I\3I\3J\3J\3J\3K\3K\3K\3L\3L\3L\3M\3M"+ - "\3M\3N\3N\3N\3O\3O\3O\3P\3P\3P\3Q\3Q\3Q\3Q\3Q\3R\3R\3R\3R\3R\3R\3S\3S"+ - "\3S\3S\3S\3T\3T\3T\3T\3U\3U\3U\3V\3V\3W\3W\3X\3X\3X\3X\3X\3X\3X\3Y\3Y"+ - "\3Y\3Y\3Y\3Y\3Z\3Z\3Z\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"+ - "a\3a\3a\3a\3a\3a\3b\3b\3b\3b\3b\3b\3c\3c\3c\3c\3c\3c\3d\3d\3d\3d\3d\3"+ - "d\3d\3e\3e\3e\3e\3e\3e\3f\3f\3f\3f\3f\3f\3f\3g\3g\3g\3g\3g\3g\3h\3h\3"+ - "h\3h\3h\3h\3i\3i\3i\3i\3j\3j\3j\3k\3k\3k\3k\3k\3k\3l\3l\3l\3l\3l\3l\3"+ - "l\3m\3m\3m\3m\3m\3m\3n\3n\3n\3n\3n\3o\3o\7o\u02eb\no\fo\16o\u02ee\13o"+ - "\3o\3o\3o\3o\3p\3p\7p\u02f6\np\fp\16p\u02f9\13p\3p\3p\3q\3q\3q\3q\3r\6"+ - "r\u0302\nr\rr\16r\u0303\3s\3s\7s\u0308\ns\fs\16s\u030b\13s\3t\3t\3t\6"+ - "t\u0310\nt\rt\16t\u0311\5t\u0314\nt\3u\3u\6u\u0318\nu\ru\16u\u0319\3v"+ - "\3v\6v\u031e\nv\rv\16v\u031f\3w\3w\3x\3x\3x\5x\u0327\nx\3x\5x\u032a\n"+ - "x\3y\6y\u032d\ny\ry\16y\u032e\3y\3y\6y\u0333\ny\ry\16y\u0334\5y\u0337"+ - "\ny\3z\3z\3z\3z\5z\u033d\nz\3{\3{\3{\7{\u0342\n{\f{\16{\u0345\13{\3{\3"+ - "{\3{\3|\3|\3|\3|\6|\u034e\n|\r|\16|\u034f\3|\3|\3|\3|\3|\3}\3}\3}\5}\u035a"+ - "\n}\3}\3}\3}\3~\3~\3~\3~\3\177\3\177\3\177\3\u034f\2\u0080\3\3\5\4\7\5"+ - "\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23"+ - "%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G"+ - "%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u{"+ - "?}@\177A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG\u008dH\u008fI\u0091"+ - "J\u0093K\u0095L\u0097M\u0099N\u009bO\u009dP\u009fQ\u00a1R\u00a3S\u00a5"+ - "T\u00a7U\u00a9V\u00abW\u00adX\u00afY\u00b1Z\u00b3[\u00b5\\\u00b7]\u00b9"+ - "^\u00bb_\u00bd`\u00bfa\u00c1b\u00c3c\u00c5d\u00c7e\u00c9f\u00cbg\u00cd"+ - "h\u00cfi\u00d1j\u00d3k\u00d5l\u00d7m\u00d9n\u00dbo\u00ddp\u00dfq\u00e1"+ - "r\u00e3s\u00e5t\u00e7u\u00e9v\u00ebw\u00edx\u00efy\u00f1\2\u00f3\2\u00f5"+ - "z\u00f7{\u00f9|\u00fb}\u00fd~\3\2\n\4\2\f\f\17\17\4\2\13\13\"\"\5\2C\\"+ - "aac|\6\2\62;C\\aac|\5\2\62;CHch\4\2GGgg\4\2--//\6\2\f\f\16\17$$^^\2\u0374"+ - "\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\2G\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\2"+ - "U\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\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\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\u00f5"+ - "\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\3\u00ff\3\2\2\2\5\u0101\3\2\2\2\7\u0103\3\2\2\2\t\u0108\3\2\2\2\13"+ - "\u0110\3\2\2\2\r\u011a\3\2\2\2\17\u0124\3\2\2\2\21\u0130\3\2\2\2\23\u0139"+ - "\3\2\2\2\25\u0141\3\2\2\2\27\u014d\3\2\2\2\31\u0159\3\2\2\2\33\u0164\3"+ - "\2\2\2\35\u016c\3\2\2\2\37\u016e\3\2\2\2!\u0170\3\2\2\2#\u0176\3\2\2\2"+ - "%\u017c\3\2\2\2\'\u0181\3\2\2\2)\u0187\3\2\2\2+\u018c\3\2\2\2-\u0192\3"+ - "\2\2\2/\u0196\3\2\2\2\61\u019c\3\2\2\2\63\u019e\3\2\2\2\65\u01a0\3\2\2"+ - "\2\67\u01a3\3\2\2\29\u01a6\3\2\2\2;\u01a9\3\2\2\2=\u01ac\3\2\2\2?\u01b0"+ - "\3\2\2\2A\u01b3\3\2\2\2C\u01b6\3\2\2\2E\u01b9\3\2\2\2G\u01bc\3\2\2\2I"+ - "\u01c0\3\2\2\2K\u01c4\3\2\2\2M\u01c7\3\2\2\2O\u01ca\3\2\2\2Q\u01cc\3\2"+ - "\2\2S\u01ce\3\2\2\2U\u01d1\3\2\2\2W\u01d3\3\2\2\2Y\u01d5\3\2\2\2[\u01d7"+ - "\3\2\2\2]\u01da\3\2\2\2_\u01dd\3\2\2\2a\u01df\3\2\2\2c\u01e1\3\2\2\2e"+ - "\u01e4\3\2\2\2g\u01e7\3\2\2\2i\u01ea\3\2\2\2k\u01ed\3\2\2\2m\u01ef\3\2"+ - "\2\2o\u01f1\3\2\2\2q\u01f4\3\2\2\2s\u01f9\3\2\2\2u\u01fd\3\2\2\2w\u0200"+ - "\3\2\2\2y\u0204\3\2\2\2{\u0208\3\2\2\2}\u020a\3\2\2\2\177\u020c\3\2\2"+ - "\2\u0081\u020f\3\2\2\2\u0083\u0211\3\2\2\2\u0085\u0218\3\2\2\2\u0087\u021e"+ - "\3\2\2\2\u0089\u0227\3\2\2\2\u008b\u0229\3\2\2\2\u008d\u022b\3\2\2\2\u008f"+ - "\u022d\3\2\2\2\u0091\u022f\3\2\2\2\u0093\u0232\3\2\2\2\u0095\u0235\3\2"+ - "\2\2\u0097\u0238\3\2\2\2\u0099\u023b\3\2\2\2\u009b\u023e\3\2\2\2\u009d"+ - "\u0241\3\2\2\2\u009f\u0244\3\2\2\2\u00a1\u0247\3\2\2\2\u00a3\u024c\3\2"+ - "\2\2\u00a5\u0252\3\2\2\2\u00a7\u0257\3\2\2\2\u00a9\u025b\3\2\2\2\u00ab"+ - "\u025e\3\2\2\2\u00ad\u0260\3\2\2\2\u00af\u0262\3\2\2\2\u00b1\u0269\3\2"+ - "\2\2\u00b3\u026f\3\2\2\2\u00b5\u0278\3\2\2\2\u00b7\u027b\3\2\2\2\u00b9"+ - "\u0280\3\2\2\2\u00bb\u0286\3\2\2\2\u00bd\u028c\3\2\2\2\u00bf\u0292\3\2"+ - "\2\2\u00c1\u0297\3\2\2\2\u00c3\u029d\3\2\2\2\u00c5\u02a3\3\2\2\2\u00c7"+ - "\u02a9\3\2\2\2\u00c9\u02b0\3\2\2\2\u00cb\u02b6\3\2\2\2\u00cd\u02bd\3\2"+ - "\2\2\u00cf\u02c3\3\2\2\2\u00d1\u02c9\3\2\2\2\u00d3\u02cd\3\2\2\2\u00d5"+ - "\u02d0\3\2\2\2\u00d7\u02d6\3\2\2\2\u00d9\u02dd\3\2\2\2\u00db\u02e3\3\2"+ - "\2\2\u00dd\u02e8\3\2\2\2\u00df\u02f3\3\2\2\2\u00e1\u02fc\3\2\2\2\u00e3"+ - "\u0301\3\2\2\2\u00e5\u0305\3\2\2\2\u00e7\u0313\3\2\2\2\u00e9\u0315\3\2"+ - "\2\2\u00eb\u031b\3\2\2\2\u00ed\u0321\3\2\2\2\u00ef\u0323\3\2\2\2\u00f1"+ - "\u032c\3\2\2\2\u00f3\u033c\3\2\2\2\u00f5\u033e\3\2\2\2\u00f7\u0349\3\2"+ - "\2\2\u00f9\u0356\3\2\2\2\u00fb\u035e\3\2\2\2\u00fd\u0362\3\2\2\2\u00ff"+ - "\u0100\7\u0080\2\2\u0100\4\3\2\2\2\u0101\u0102\7<\2\2\u0102\6\3\2\2\2"+ - "\u0103\u0104\7i\2\2\u0104\u0105\7q\2\2\u0105\u0106\7v\2\2\u0106\u0107"+ - "\7q\2\2\u0107\b\3\2\2\2\u0108\u0109\7\'\2\2\u0109\u010a\7q\2\2\u010a\u010b"+ - "\7w\2\2\u010b\u010c\7v\2\2\u010c\u010d\7r\2\2\u010d\u010e\7w\2\2\u010e"+ - "\u010f\7v\2\2\u010f\n\3\2\2\2\u0110\u0111\7\'\2\2\u0111\u0112\7n\2\2\u0112"+ - "\u0113\7c\2\2\u0113\u0114\7w\2\2\u0114\u0115\7p\2\2\u0115\u0116\7e\2\2"+ - "\u0116\u0117\7j\2\2\u0117\u0118\7g\2\2\u0118\u0119\7t\2\2\u0119\f\3\2"+ - "\2\2\u011a\u011b\7\'\2\2\u011b\u011c\7|\2\2\u011c\u011d\7g\2\2\u011d\u011e"+ - "\7t\2\2\u011e\u011f\7q\2\2\u011f\u0120\7r\2\2\u0120\u0121\7c\2\2\u0121"+ - "\u0122\7i\2\2\u0122\u0123\7g\2\2\u0123\16\3\2\2\2\u0124\u0125\7\'\2\2"+ - "\u0125\u0126\7|\2\2\u0126\u0127\7r\2\2\u0127\u0128\7t\2\2\u0128\u0129"+ - "\7g\2\2\u0129\u012a\7u\2\2\u012a\u012b\7g\2\2\u012b\u012c\7t\2\2\u012c"+ - "\u012d\7x\2\2\u012d\u012e\7g\2\2\u012e\u012f\7f\2\2\u012f\20\3\2\2\2\u0130"+ - "\u0131\7\'\2\2\u0131\u0132\7c\2\2\u0132\u0133\7f\2\2\u0133\u0134\7f\2"+ - "\2\u0134\u0135\7t\2\2\u0135\u0136\7g\2\2\u0136\u0137\7u\2\2\u0137\u0138"+ - "\7u\2\2\u0138\22\3\2\2\2\u0139\u013a\7\'\2\2\u013a\u013b\7k\2\2\u013b"+ - "\u013c\7o\2\2\u013c\u013d\7r\2\2\u013d\u013e\7q\2\2\u013e\u013f\7t\2\2"+ - "\u013f\u0140\7v\2\2\u0140\24\3\2\2\2\u0141\u0142\7\'\2\2\u0142\u0143\7"+ - "d\2\2\u0143\u0144\7t\2\2\u0144\u0145\7g\2\2\u0145\u0146\7c\2\2\u0146\u0147"+ - "\7m\2\2\u0147\u0148\7r\2\2\u0148\u0149\7q\2\2\u0149\u014a\7k\2\2\u014a"+ - "\u014b\7p\2\2\u014b\u014c\7v\2\2\u014c\26\3\2\2\2\u014d\u014e\7\'\2\2"+ - "\u014e\u014f\7c\2\2\u014f\u0150\7u\2\2\u0150\u0151\7o\2\2\u0151\u0152"+ - "\7k\2\2\u0152\u0153\7p\2\2\u0153\u0154\7e\2\2\u0154\u0155\7n\2\2\u0155"+ - "\u0156\7w\2\2\u0156\u0157\7f\2\2\u0157\u0158\7g\2\2\u0158\30\3\2\2\2\u0159"+ - "\u015a\7\'\2\2\u015a\u015b\7c\2\2\u015b\u015c\7u\2\2\u015c\u015d\7o\2"+ - "\2\u015d\u015e\7d\2\2\u015e\u015f\7k\2\2\u015f\u0160\7p\2\2\u0160\u0161"+ - "\7c\2\2\u0161\u0162\7t\2\2\u0162\u0163\7{\2\2\u0163\32\3\2\2\2\u0164\u0165"+ - "\7\'\2\2\u0165\u0166\7q\2\2\u0166\u0167\7r\2\2\u0167\u0168\7v\2\2\u0168"+ - "\u0169\7k\2\2\u0169\u016a\7q\2\2\u016a\u016b\7p\2\2\u016b\34\3\2\2\2\u016c"+ - "\u016d\7.\2\2\u016d\36\3\2\2\2\u016e\u016f\7?\2\2\u016f \3\2\2\2\u0170"+ - "\u0171\7e\2\2\u0171\u0172\7q\2\2\u0172\u0173\7p\2\2\u0173\u0174\7u\2\2"+ - "\u0174\u0175\7v\2\2\u0175\"\3\2\2\2\u0176\u0177\7w\2\2\u0177\u0178\7d"+ - "\2\2\u0178\u0179\7{\2\2\u0179\u017a\7v\2\2\u017a\u017b\7g\2\2\u017b$\3"+ - "\2\2\2\u017c\u017d\7d\2\2\u017d\u017e\7{\2\2\u017e\u017f\7v\2\2\u017f"+ - "\u0180\7g\2\2\u0180&\3\2\2\2\u0181\u0182\7w\2\2\u0182\u0183\7y\2\2\u0183"+ - "\u0184\7q\2\2\u0184\u0185\7t\2\2\u0185\u0186\7f\2\2\u0186(\3\2\2\2\u0187"+ - "\u0188\7y\2\2\u0188\u0189\7q\2\2\u0189\u018a\7t\2\2\u018a\u018b\7f\2\2"+ - "\u018b*\3\2\2\2\u018c\u018d\7h\2\2\u018d\u018e\7n\2\2\u018e\u018f\7q\2"+ - "\2\u018f\u0190\7c\2\2\u0190\u0191\7v\2\2\u0191,\3\2\2\2\u0192\u0193\7"+ - "u\2\2\u0193\u0194\7v\2\2\u0194\u0195\7t\2\2\u0195.\3\2\2\2\u0196\u0197"+ - "\7u\2\2\u0197\u0198\7v\2\2\u0198\u0199\7t\2\2\u0199\u019a\7a\2\2\u019a"+ - "\u019b\7u\2\2\u019b\60\3\2\2\2\u019c\u019d\7]\2\2\u019d\62\3\2\2\2\u019e"+ - "\u019f\7_\2\2\u019f\64\3\2\2\2\u01a0\u01a1\7-\2\2\u01a1\u01a2\7?\2\2\u01a2"+ - "\66\3\2\2\2\u01a3\u01a4\7/\2\2\u01a4\u01a5\7?\2\2\u01a58\3\2\2\2\u01a6"+ - "\u01a7\7\61\2\2\u01a7\u01a8\7?\2\2\u01a8:\3\2\2\2\u01a9\u01aa\7,\2\2\u01aa"+ - "\u01ab\7?\2\2\u01ab<\3\2\2\2\u01ac\u01ad\7,\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~\2\2\u01b4\u01b5\7?\2\2\u01b5B\3\2\2\2\u01b6\u01b7"+ - "\7`\2\2\u01b7\u01b8\7?\2\2\u01b8D\3\2\2\2\u01b9\u01ba\7\'\2\2\u01ba\u01bb"+ - "\7?\2\2\u01bbF\3\2\2\2\u01bc\u01bd\7>\2\2\u01bd\u01be\7>\2\2\u01be\u01bf"+ - "\7?\2\2\u01bfH\3\2\2\2\u01c0\u01c1\7@\2\2\u01c1\u01c2\7@\2\2\u01c2\u01c3"+ - "\7?\2\2\u01c3J\3\2\2\2\u01c4\u01c5\7-\2\2\u01c5\u01c6\7-\2\2\u01c6L\3"+ - "\2\2\2\u01c7\u01c8\7/\2\2\u01c8\u01c9\7/\2\2\u01c9N\3\2\2\2\u01ca\u01cb"+ - "\7-\2\2\u01cbP\3\2\2\2\u01cc\u01cd\7/\2\2\u01cdR\3\2\2\2\u01ce\u01cf\7"+ - ",\2\2\u01cf\u01d0\7,\2\2\u01d0T\3\2\2\2\u01d1\u01d2\7,\2\2\u01d2V\3\2"+ - "\2\2\u01d3\u01d4\7\61\2\2\u01d4X\3\2\2\2\u01d5\u01d6\7\'\2\2\u01d6Z\3"+ - "\2\2\2\u01d7\u01d8\7>\2\2\u01d8\u01d9\7>\2\2\u01d9\\\3\2\2\2\u01da\u01db"+ - "\7@\2\2\u01db\u01dc\7@\2\2\u01dc^\3\2\2\2\u01dd\u01de\7>\2\2\u01de`\3"+ - "\2\2\2\u01df\u01e0\7@\2\2\u01e0b\3\2\2\2\u01e1\u01e2\7>\2\2\u01e2\u01e3"+ - "\7?\2\2\u01e3d\3\2\2\2\u01e4\u01e5\7@\2\2\u01e5\u01e6\7?\2\2\u01e6f\3"+ - "\2\2\2\u01e7\u01e8\7?\2\2\u01e8\u01e9\7?\2\2\u01e9h\3\2\2\2\u01ea\u01eb"+ - "\7#\2\2\u01eb\u01ec\7?\2\2\u01ecj\3\2\2\2\u01ed\u01ee\7`\2\2\u01eel\3"+ - "\2\2\2\u01ef\u01f0\7~\2\2\u01f0n\3\2\2\2\u01f1\u01f2\7v\2\2\u01f2\u01f3"+ - "\7q\2\2\u01f3p\3\2\2\2\u01f4\u01f5\7u\2\2\u01f5\u01f6\7v\2\2\u01f6\u01f7"+ - "\7g\2\2\u01f7\u01f8\7r\2\2\u01f8r\3\2\2\2\u01f9\u01fa\7c\2\2\u01fa\u01fb"+ - "\7p\2\2\u01fb\u01fc\7f\2\2\u01fct\3\2\2\2\u01fd\u01fe\7q\2\2\u01fe\u01ff"+ - "\7t\2\2\u01ffv\3\2\2\2\u0200\u0201\7z\2\2\u0201\u0202\7q\2\2\u0202\u0203"+ - "\7t\2\2\u0203x\3\2\2\2\u0204\u0205\7p\2\2\u0205\u0206\7q\2\2\u0206\u0207"+ - "\7v\2\2\u0207z\3\2\2\2\u0208\u0209\7*\2\2\u0209|\3\2\2\2\u020a\u020b\7"+ - "+\2\2\u020b~\3\2\2\2\u020c\u020d\7c\2\2\u020d\u020e\7u\2\2\u020e\u0080"+ - "\3\2\2\2\u020f\u0210\7B\2\2\u0210\u0082\3\2\2\2\u0211\u0212\7t\2\2\u0212"+ - "\u0213\7g\2\2\u0213\u0214\7v\2\2\u0214\u0215\7w\2\2\u0215\u0216\7t\2\2"+ - "\u0216\u0217\7p\2\2\u0217\u0084\3\2\2\2\u0218\u0219\7d\2\2\u0219\u021a"+ - "\7t\2\2\u021a\u021b\7g\2\2\u021b\u021c\7c\2\2\u021c\u021d\7m\2\2\u021d"+ - "\u0086\3\2\2\2\u021e\u021f\7e\2\2\u021f\u0220\7q\2\2\u0220\u0221\7p\2"+ - "\2\u0221\u0222\7v\2\2\u0222\u0223\7k\2\2\u0223\u0224\7p\2\2\u0224\u0225"+ - "\7w\2\2\u0225\u0226\7g\2\2\u0226\u0088\3\2\2\2\u0227\u0228\7\60\2\2\u0228"+ - "\u008a\3\2\2\2\u0229\u022a\7C\2\2\u022a\u008c\3\2\2\2\u022b\u022c\7Z\2"+ - "\2\u022c\u008e\3\2\2\2\u022d\u022e\7[\2\2\u022e\u0090\3\2\2\2\u022f\u0230"+ - "\7C\2\2\u0230\u0231\7Z\2\2\u0231\u0092\3\2\2\2\u0232\u0233\7C\2\2\u0233"+ - "\u0234\7[\2\2\u0234\u0094\3\2\2\2\u0235\u0236\7Z\2\2\u0236\u0237\7[\2"+ - "\2\u0237\u0096\3\2\2\2\u0238\u0239\7R\2\2\u0239\u023a\7e\2\2\u023a\u0098"+ - "\3\2\2\2\u023b\u023c\7R\2\2\u023c\u023d\7|\2\2\u023d\u009a\3\2\2\2\u023e"+ - "\u023f\7R\2\2\u023f\u0240\7p\2\2\u0240\u009c\3\2\2\2\u0241\u0242\7R\2"+ - "\2\u0242\u0243\7x\2\2\u0243\u009e\3\2\2\2\u0244\u0245\7\60\2\2\u0245\u0246"+ - "\7y\2\2\u0246\u00a0\3\2\2\2\u0247\u0248\7v\2\2\u0248\u0249\7t\2\2\u0249"+ - "\u024a\7w\2\2\u024a\u024b\7g\2\2\u024b\u00a2\3\2\2\2\u024c\u024d\7h\2"+ - "\2\u024d\u024e\7c\2\2\u024e\u024f\7n\2\2\u024f\u0250\7u\2\2\u0250\u0251"+ - "\7g\2\2\u0251\u00a4\3\2\2\2\u0252\u0253\7\'\2\2\u0253\u0254\7c\2\2\u0254"+ - "\u0255\7u\2\2\u0255\u0256\7o\2\2\u0256\u00a6\3\2\2\2\u0257\u0258\7u\2"+ - "\2\u0258\u0259\7w\2\2\u0259\u025a\7d\2\2\u025a\u00a8\3\2\2\2\u025b\u025c"+ - "\7/\2\2\u025c\u025d\7@\2\2\u025d\u00aa\3\2\2\2\u025e\u025f\7}\2\2\u025f"+ - "\u00ac\3\2\2\2\u0260\u0261\7\177\2\2\u0261\u00ae\3\2\2\2\u0262\u0263\7"+ - "c\2\2\u0263\u0264\7u\2\2\u0264\u0265\7o\2\2\u0265\u0266\7u\2\2\u0266\u0267"+ - "\7w\2\2\u0267\u0268\7d\2\2\u0268\u00b0\3\2\2\2\u0269\u026a\7u\2\2\u026a"+ - "\u026b\7v\2\2\u026b\u026c\7c\2\2\u026c\u026d\7e\2\2\u026d\u026e\7m\2\2"+ - "\u026e\u00b2\3\2\2\2\u026f\u0270\7e\2\2\u0270\u0271\7n\2\2\u0271\u0272"+ - "\7q\2\2\u0272\u0273\7d\2\2\u0273\u0274\7d\2\2\u0274\u0275\7g\2\2\u0275"+ - "\u0276\7t\2\2\u0276\u0277\7u\2\2\u0277\u00b4\3\2\2\2\u0278\u0279\7k\2"+ - "\2\u0279\u027a\7h\2\2\u027a\u00b6\3\2\2\2\u027b\u027c\7g\2\2\u027c\u027d"+ - "\7n\2\2\u027d\u027e\7u\2\2\u027e\u027f\7g\2\2\u027f\u00b8\3\2\2\2\u0280"+ - "\u0281\7k\2\2\u0281\u0282\7h\2\2\u0282\u0283\7a\2\2\u0283\u0284\7e\2\2"+ - "\u0284\u0285\7u\2\2\u0285\u00ba\3\2\2\2\u0286\u0287\7k\2\2\u0287\u0288"+ - "\7h\2\2\u0288\u0289\7a\2\2\u0289\u028a\7e\2\2\u028a\u028b\7e\2\2\u028b"+ - "\u00bc\3\2\2\2\u028c\u028d\7k\2\2\u028d\u028e\7h\2\2\u028e\u028f\7a\2"+ - "\2\u028f\u0290\7g\2\2\u0290\u0291\7s\2\2\u0291\u00be\3\2\2\2\u0292\u0293"+ - "\7k\2\2\u0293\u0294\7h\2\2\u0294\u0295\7a\2\2\u0295\u0296\7|\2\2\u0296"+ - "\u00c0\3\2\2\2\u0297\u0298\7k\2\2\u0298\u0299\7h\2\2\u0299\u029a\7a\2"+ - "\2\u029a\u029b\7p\2\2\u029b\u029c\7g\2\2\u029c\u00c2\3\2\2\2\u029d\u029e"+ - "\7k\2\2\u029e\u029f\7h\2\2\u029f\u02a0\7a\2\2\u02a0\u02a1\7p\2\2\u02a1"+ - "\u02a2\7|\2\2\u02a2\u00c4\3\2\2\2\u02a3\u02a4\7k\2\2\u02a4\u02a5\7h\2"+ - "\2\u02a5\u02a6\7a\2\2\u02a6\u02a7\7r\2\2\u02a7\u02a8\7n\2\2\u02a8\u00c6"+ - "\3\2\2\2\u02a9\u02aa\7k\2\2\u02aa\u02ab\7h\2\2\u02ab\u02ac\7a\2\2\u02ac"+ - "\u02ad\7r\2\2\u02ad\u02ae\7q\2\2\u02ae\u02af\7u\2\2\u02af\u00c8\3\2\2"+ - "\2\u02b0\u02b1\7k\2\2\u02b1\u02b2\7h\2\2\u02b2\u02b3\7a\2\2\u02b3\u02b4"+ - "\7o\2\2\u02b4\u02b5\7k\2\2\u02b5\u00ca\3\2\2\2\u02b6\u02b7\7k\2\2\u02b7"+ - "\u02b8\7h\2\2\u02b8\u02b9\7a\2\2\u02b9\u02ba\7p\2\2\u02ba\u02bb\7g\2\2"+ - "\u02bb\u02bc\7i\2\2\u02bc\u00cc\3\2\2\2\u02bd\u02be\7k\2\2\u02be\u02bf"+ - "\7h\2\2\u02bf\u02c0\7a\2\2\u02c0\u02c1\7x\2\2\u02c1\u02c2\7u\2\2\u02c2"+ - "\u00ce\3\2\2\2\u02c3\u02c4\7k\2\2\u02c4\u02c5\7h\2\2\u02c5\u02c6\7a\2"+ - "\2\u02c6\u02c7\7x\2\2\u02c7\u02c8\7e\2\2\u02c8\u00d0\3\2\2\2\u02c9\u02ca"+ - "\7h\2\2\u02ca\u02cb\7q\2\2\u02cb\u02cc\7t\2\2\u02cc\u00d2\3\2\2\2\u02cd"+ - "\u02ce\7k\2\2\u02ce\u02cf\7p\2\2\u02cf\u00d4\3\2\2\2\u02d0\u02d1\7y\2"+ - "\2\u02d1\u02d2\7j\2\2\u02d2\u02d3\7k\2\2\u02d3\u02d4\7n\2\2\u02d4\u02d5"+ - "\7g\2\2\u02d5\u00d6\3\2\2\2\u02d6\u02d7\7t\2\2\u02d7\u02d8\7g\2\2\u02d8"+ - "\u02d9\7r\2\2\u02d9\u02da\7g\2\2\u02da\u02db\7c\2\2\u02db\u02dc\7v\2\2"+ - "\u02dc\u00d8\3\2\2\2\u02dd\u02de\7w\2\2\u02de\u02df\7p\2\2\u02df\u02e0"+ - "\7v\2\2\u02e0\u02e1\7k\2\2\u02e1\u02e2\7n\2\2\u02e2\u00da\3\2\2\2\u02e3"+ - "\u02e4\7y\2\2\u02e4\u02e5\7j\2\2\u02e5\u02e6\7g\2\2\u02e6\u02e7\7p\2\2"+ - "\u02e7\u00dc\3\2\2\2\u02e8\u02ec\t\2\2\2\u02e9\u02eb\t\3\2\2\u02ea\u02e9"+ - "\3\2\2\2\u02eb\u02ee\3\2\2\2\u02ec\u02ea\3\2\2\2\u02ec\u02ed\3\2\2\2\u02ed"+ - "\u02ef\3\2\2\2\u02ee\u02ec\3\2\2\2\u02ef\u02f0\5\u00dfp\2\u02f0\u02f1"+ - "\3\2\2\2\u02f1\u02f2\bo\2\2\u02f2\u00de\3\2\2\2\u02f3\u02f7\7=\2\2\u02f4"+ - "\u02f6\n\2\2\2\u02f5\u02f4\3\2\2\2\u02f6\u02f9\3\2\2\2\u02f7\u02f5\3\2"+ - "\2\2\u02f7\u02f8\3\2\2\2\u02f8\u02fa\3\2\2\2\u02f9\u02f7\3\2\2\2\u02fa"+ - "\u02fb\bp\2\2\u02fb\u00e0\3\2\2\2\u02fc\u02fd\t\3\2\2\u02fd\u02fe\3\2"+ - "\2\2\u02fe\u02ff\bq\3\2\u02ff\u00e2\3\2\2\2\u0300\u0302\t\2\2\2\u0301"+ - "\u0300\3\2\2\2\u0302\u0303\3\2\2\2\u0303\u0301\3\2\2\2\u0303\u0304\3\2"+ - "\2\2\u0304\u00e4\3\2\2\2\u0305\u0309\t\4\2\2\u0306\u0308\t\5\2\2\u0307"+ - "\u0306\3\2\2\2\u0308\u030b\3\2\2\2\u0309\u0307\3\2\2\2\u0309\u030a\3\2"+ - "\2\2\u030a\u00e6\3\2\2\2\u030b\u0309\3\2\2\2\u030c\u0314\4\62;\2\u030d"+ - "\u030f\4\63;\2\u030e\u0310\4\62;\2\u030f\u030e\3\2\2\2\u0310\u0311\3\2"+ - "\2\2\u0311\u030f\3\2\2\2\u0311\u0312\3\2\2\2\u0312\u0314\3\2\2\2\u0313"+ - "\u030c\3\2\2\2\u0313\u030d\3\2\2\2\u0314\u00e8\3\2\2\2\u0315\u0317\7&"+ - "\2\2\u0316\u0318\t\6\2\2\u0317\u0316\3\2\2\2\u0318\u0319\3\2\2\2\u0319"+ - "\u0317\3\2\2\2\u0319\u031a\3\2\2\2\u031a\u00ea\3\2\2\2\u031b\u031d\7\'"+ - "\2\2\u031c\u031e\4\62\63\2\u031d\u031c\3\2\2\2\u031e\u031f\3\2\2\2\u031f"+ - "\u031d\3\2\2\2\u031f\u0320\3\2\2\2\u0320\u00ec\3\2\2\2\u0321\u0322\7("+ - "\2\2\u0322\u00ee\3\2\2\2\u0323\u0329\5\u00f1y\2\u0324\u0326\t\7\2\2\u0325"+ - "\u0327\t\b\2\2\u0326\u0325\3\2\2\2\u0326\u0327\3\2\2\2\u0327\u0328\3\2"+ - "\2\2\u0328\u032a\5\u00f1y\2\u0329\u0324\3\2\2\2\u0329\u032a\3\2\2\2\u032a"+ - "\u00f0\3\2\2\2\u032b\u032d\4\62;\2\u032c\u032b\3\2\2\2\u032d\u032e\3\2"+ - "\2\2\u032e\u032c\3\2\2\2\u032e\u032f\3\2\2\2\u032f\u0336\3\2\2\2\u0330"+ - "\u0332\7\60\2\2\u0331\u0333\4\62;\2\u0332\u0331\3\2\2\2\u0333\u0334\3"+ - "\2\2\2\u0334\u0332\3\2\2\2\u0334\u0335\3\2\2\2\u0335\u0337\3\2\2\2\u0336"+ - "\u0330\3\2\2\2\u0336\u0337\3\2\2\2\u0337\u00f2\3\2\2\2\u0338\u0339\7^"+ - "\2\2\u0339\u033d\13\2\2\2\u033a\u033b\7^\2\2\u033b\u033d\5\u00e3r\2\u033c"+ - "\u0338\3\2\2\2\u033c\u033a\3\2\2\2\u033d\u00f4\3\2\2\2\u033e\u0343\7$"+ - "\2\2\u033f\u0342\5\u00f3z\2\u0340\u0342\n\t\2\2\u0341\u033f\3\2\2\2\u0341"+ - "\u0340\3\2\2\2\u0342\u0345\3\2\2\2\u0343\u0341\3\2\2\2\u0343\u0344\3\2"+ - "\2\2\u0344\u0346\3\2\2\2\u0345\u0343\3\2\2\2\u0346\u0347\7$\2\2\u0347"+ - "\u0348\b{\4\2\u0348\u00f6\3\2\2\2\u0349\u034a\7}\2\2\u034a\u034b\7}\2"+ - "\2\u034b\u034d\3\2\2\2\u034c\u034e\13\2\2\2\u034d\u034c\3\2\2\2\u034e"+ - "\u034f\3\2\2\2\u034f\u0350\3\2\2\2\u034f\u034d\3\2\2\2\u0350\u0351\3\2"+ - "\2\2\u0351\u0352\7\177\2\2\u0352\u0353\7\177\2\2\u0353\u0354\3\2\2\2\u0354"+ - "\u0355\b|\5\2\u0355\u00f8\3\2\2\2\u0356\u0359\7)\2\2\u0357\u035a\5\u00f3"+ - "z\2\u0358\u035a\n\t\2\2\u0359\u0357\3\2\2\2\u0359\u0358\3\2\2\2\u035a"+ - "\u035b\3\2\2\2\u035b\u035c\7)\2\2\u035c\u035d\b}\6\2\u035d\u00fa\3\2\2"+ - "\2\u035e\u035f\7B\2\2\u035f\u0360\7|\2\2\u0360\u0361\7r\2\2\u0361\u00fc"+ - "\3\2\2\2\u0362\u0363\7]\2\2\u0363\u0364\7_\2\2\u0364\u00fe\3\2\2\2\26"+ - "\2\u02ec\u02f7\u0303\u0309\u0311\u0313\u0317\u0319\u031f\u0326\u0329\u032e"+ - "\u0334\u0336\u033c\u0341\u0343\u034f\u0359\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 deleted file mode 100644 index 0a2e18f18..000000000 --- a/parser/src/prog8/parser/prog8Parser.java +++ /dev/null @@ -1,5264 +0,0 @@ -// 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, LINECOMMENT=110, COMMENT=111, WS=112, EOL=113, - NAME=114, DEC_INTEGER=115, HEX_INTEGER=116, BIN_INTEGER=117, ADDRESS_OF=118, - FLOAT_NUMBER=119, STRING=120, INLINEASMBLOCK=121, SINGLECHAR=122, ZEROPAGE=123, - ARRAYSIG=124; - 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_varinitializer = 9, RULE_constdecl = 10, RULE_memoryvardecl = 11, - RULE_datatype = 12, RULE_arrayindex = 13, RULE_assignment = 14, RULE_augassignment = 15, - RULE_assign_target = 16, RULE_postincrdecr = 17, RULE_expression = 18, - RULE_typecast = 19, RULE_arrayindexed = 20, RULE_directmemory = 21, RULE_addressof = 22, - RULE_functioncall = 23, RULE_functioncall_stmt = 24, RULE_expression_list = 25, - RULE_returnstmt = 26, RULE_breakstmt = 27, RULE_continuestmt = 28, RULE_identifier = 29, - RULE_scoped_identifier = 30, RULE_register = 31, RULE_registerorpair = 32, - RULE_statusregister = 33, RULE_integerliteral = 34, RULE_wordsuffix = 35, - RULE_booleanliteral = 36, RULE_arrayliteral = 37, RULE_stringliteral = 38, - RULE_charliteral = 39, RULE_floatliteral = 40, RULE_literalvalue = 41, - RULE_inlineasm = 42, RULE_subroutine = 43, RULE_sub_return_part = 44, - RULE_statement_block = 45, RULE_sub_params = 46, RULE_sub_returns = 47, - RULE_asmsubroutine = 48, RULE_asmsub_address = 49, RULE_asmsub_params = 50, - RULE_asmsub_param = 51, RULE_asmsub_clobbers = 52, RULE_clobber = 53, - RULE_asmsub_returns = 54, RULE_asmsub_return = 55, RULE_if_stmt = 56, - RULE_else_part = 57, RULE_branch_stmt = 58, RULE_branchcondition = 59, - RULE_forloop = 60, RULE_whileloop = 61, RULE_repeatloop = 62, RULE_whenstmt = 63, - RULE_when_choice = 64; - private static String[] makeRuleNames() { - return new String[] { - "module", "modulestatement", "block", "statement", "labeldef", "unconditionaljump", - "directive", "directivearg", "vardecl", "varinitializer", "constdecl", - "memoryvardecl", "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", "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'", "'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, "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(134); - _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(132); - _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(130); - modulestatement(); - } - break; - case EOL: - { - setState(131); - match(EOL); - } - break; - default: - throw new NoViableAltException(this); - } - } - setState(136); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(137); - 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(141); - _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(139); - directive(); - } - break; - case T__0: - enterOuterAlt(_localctx, 2); - { - setState(140); - 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(143); - match(T__0); - setState(144); - identifier(); - setState(146); - _errHandler.sync(this); - _la = _input.LA(1); - if (((((_la - 115)) & ~0x3f) == 0 && ((1L << (_la - 115)) & ((1L << (DEC_INTEGER - 115)) | (1L << (HEX_INTEGER - 115)) | (1L << (BIN_INTEGER - 115)))) != 0)) { - { - setState(145); - integerliteral(); - } - } - - setState(148); - statement_block(); - setState(149); - 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 VardeclContext vardecl() { - return getRuleContext(VardeclContext.class,0); - } - public ConstdeclContext constdecl() { - return getRuleContext(ConstdeclContext.class,0); - } - public MemoryvardeclContext memoryvardecl() { - return getRuleContext(MemoryvardeclContext.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(174); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(151); - directive(); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(152); - varinitializer(); - } - break; - case 3: - enterOuterAlt(_localctx, 3); - { - setState(153); - vardecl(); - } - break; - case 4: - enterOuterAlt(_localctx, 4); - { - setState(154); - constdecl(); - } - break; - case 5: - enterOuterAlt(_localctx, 5); - { - setState(155); - memoryvardecl(); - } - break; - case 6: - enterOuterAlt(_localctx, 6); - { - setState(156); - assignment(); - } - break; - case 7: - enterOuterAlt(_localctx, 7); - { - setState(157); - augassignment(); - } - break; - case 8: - enterOuterAlt(_localctx, 8); - { - setState(158); - unconditionaljump(); - } - break; - case 9: - enterOuterAlt(_localctx, 9); - { - setState(159); - postincrdecr(); - } - break; - case 10: - enterOuterAlt(_localctx, 10); - { - setState(160); - functioncall_stmt(); - } - break; - case 11: - enterOuterAlt(_localctx, 11); - { - setState(161); - if_stmt(); - } - break; - case 12: - enterOuterAlt(_localctx, 12); - { - setState(162); - branch_stmt(); - } - break; - case 13: - enterOuterAlt(_localctx, 13); - { - setState(163); - subroutine(); - } - break; - case 14: - enterOuterAlt(_localctx, 14); - { - setState(164); - asmsubroutine(); - } - break; - case 15: - enterOuterAlt(_localctx, 15); - { - setState(165); - inlineasm(); - } - break; - case 16: - enterOuterAlt(_localctx, 16); - { - setState(166); - returnstmt(); - } - break; - case 17: - enterOuterAlt(_localctx, 17); - { - setState(167); - forloop(); - } - break; - case 18: - enterOuterAlt(_localctx, 18); - { - setState(168); - whileloop(); - } - break; - case 19: - enterOuterAlt(_localctx, 19); - { - setState(169); - repeatloop(); - } - break; - case 20: - enterOuterAlt(_localctx, 20); - { - setState(170); - whenstmt(); - } - break; - case 21: - enterOuterAlt(_localctx, 21); - { - setState(171); - breakstmt(); - } - break; - case 22: - enterOuterAlt(_localctx, 22); - { - setState(172); - continuestmt(); - } - break; - case 23: - enterOuterAlt(_localctx, 23); - { - setState(173); - 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(176); - identifier(); - setState(177); - 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(179); - match(T__2); - setState(182); - _errHandler.sync(this); - switch (_input.LA(1)) { - case DEC_INTEGER: - case HEX_INTEGER: - case BIN_INTEGER: - { - setState(180); - integerliteral(); - } - break; - case NAME: - { - setState(181); - 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(184); - ((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(196); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { - case 1: - { - setState(186); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) { - case 1: - { - setState(185); - directivearg(); - } - break; - } - } - break; - case 2: - { - setState(188); - directivearg(); - setState(193); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==T__13) { - { - { - setState(189); - match(T__13); - setState(190); - directivearg(); - } - } - setState(195); - _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(201); - _errHandler.sync(this); - switch (_input.LA(1)) { - case STRING: - enterOuterAlt(_localctx, 1); - { - setState(198); - stringliteral(); - } - break; - case NAME: - enterOuterAlt(_localctx, 2); - { - setState(199); - identifier(); - } - break; - case DEC_INTEGER: - case HEX_INTEGER: - case BIN_INTEGER: - enterOuterAlt(_localctx, 3); - { - setState(200); - integerliteral(); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class VardeclContext extends ParserRuleContext { - public DatatypeContext datatype() { - return getRuleContext(DatatypeContext.class,0); - } - public 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(203); - datatype(); - setState(205); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==ZEROPAGE) { - { - setState(204); - match(ZEROPAGE); - } - } - - setState(209); - _errHandler.sync(this); - switch (_input.LA(1)) { - case T__23: - { - setState(207); - arrayindex(); - } - break; - case ARRAYSIG: - { - setState(208); - match(ARRAYSIG); - } - break; - case NAME: - break; - default: - break; - } - setState(211); - 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, 18, RULE_varinitializer); - try { - enterOuterAlt(_localctx, 1); - { - setState(213); - vardecl(); - setState(214); - match(T__14); - setState(215); - 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, 20, RULE_constdecl); - try { - enterOuterAlt(_localctx, 1); - { - setState(217); - match(T__15); - setState(218); - 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, 22, RULE_memoryvardecl); - try { - enterOuterAlt(_localctx, 1); - { - setState(220); - match(ADDRESS_OF); - setState(221); - varinitializer(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class DatatypeContext extends ParserRuleContext { - public DatatypeContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_datatype; } - } - - public final DatatypeContext datatype() throws RecognitionException { - DatatypeContext _localctx = new DatatypeContext(_ctx, getState()); - enterRule(_localctx, 24, RULE_datatype); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(223); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22))) != 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, 26, RULE_arrayindex); - try { - enterOuterAlt(_localctx, 1); - { - setState(225); - match(T__23); - setState(226); - expression(0); - setState(227); - match(T__24); - } - } - 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, 28, RULE_assignment); - try { - enterOuterAlt(_localctx, 1); - { - setState(229); - assign_target(); - setState(230); - match(T__14); - setState(231); - 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, 30, RULE_augassignment); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(233); - assign_target(); - setState(234); - ((AugassignmentContext)_localctx).operator = _input.LT(1); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35))) != 0)) ) { - ((AugassignmentContext)_localctx).operator = (Token)_errHandler.recoverInline(this); - } - else { - if ( _input.LA(1)==Token.EOF ) matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - setState(235); - 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, 32, RULE_assign_target); - try { - setState(241); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { - case 1: - enterOuterAlt(_localctx, 1); - { - setState(237); - register(); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(238); - scoped_identifier(); - } - break; - case 3: - enterOuterAlt(_localctx, 3); - { - setState(239); - arrayindexed(); - } - break; - case 4: - enterOuterAlt(_localctx, 4); - { - setState(240); - 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, 34, RULE_postincrdecr); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(243); - assign_target(); - setState(244); - ((PostincrdecrContext)_localctx).operator = _input.LT(1); - _la = _input.LA(1); - if ( !(_la==T__36 || _la==T__37) ) { - ((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 = 36; - enterRecursionRule(_localctx, 36, RULE_expression, _p); - int _la; - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - setState(262); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) { - case 1: - { - setState(247); - functioncall(); - } - break; - case 2: - { - setState(248); - ((ExpressionContext)_localctx).prefix = _input.LT(1); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__38) | (1L << T__39))) != 0)) ) { - ((ExpressionContext)_localctx).prefix = (Token)_errHandler.recoverInline(this); - } - else { - if ( _input.LA(1)==Token.EOF ) matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - setState(249); - expression(23); - } - break; - case 3: - { - setState(250); - ((ExpressionContext)_localctx).prefix = match(T__59); - setState(251); - expression(9); - } - break; - case 4: - { - setState(252); - literalvalue(); - } - break; - case 5: - { - setState(253); - register(); - } - break; - case 6: - { - setState(254); - scoped_identifier(); - } - break; - case 7: - { - setState(255); - arrayindexed(); - } - break; - case 8: - { - setState(256); - directmemory(); - } - break; - case 9: - { - setState(257); - addressof(); - } - break; - case 10: - { - setState(258); - match(T__60); - setState(259); - expression(0); - setState(260); - match(T__61); - } - break; - } - _ctx.stop = _input.LT(-1); - setState(383); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,40,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - if ( _parseListeners!=null ) triggerExitRuleEvent(); - _prevctx = _localctx; - { - setState(381); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) { - case 1: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - _localctx.left = _prevctx; - _localctx.left = _prevctx; - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(264); - if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); - setState(266); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(265); - match(EOL); - } - } - - setState(268); - ((ExpressionContext)_localctx).bop = match(T__40); - setState(270); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(269); - match(EOL); - } - } - - setState(272); - ((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(273); - if (!(precpred(_ctx, 21))) throw new FailedPredicateException(this, "precpred(_ctx, 21)"); - setState(275); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(274); - match(EOL); - } - } - - setState(277); - ((ExpressionContext)_localctx).bop = _input.LT(1); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__41) | (1L << T__42) | (1L << T__43))) != 0)) ) { - ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); - } - else { - if ( _input.LA(1)==Token.EOF ) matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - setState(279); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(278); - match(EOL); - } - } - - setState(281); - ((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(282); - if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)"); - setState(284); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(283); - match(EOL); - } - } - - setState(286); - ((ExpressionContext)_localctx).bop = _input.LT(1); - _la = _input.LA(1); - if ( !(_la==T__38 || _la==T__39) ) { - ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); - } - else { - if ( _input.LA(1)==Token.EOF ) matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - setState(288); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(287); - match(EOL); - } - } - - setState(290); - ((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(291); - if (!(precpred(_ctx, 19))) throw new FailedPredicateException(this, "precpred(_ctx, 19)"); - setState(293); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(292); - match(EOL); - } - } - - setState(295); - ((ExpressionContext)_localctx).bop = _input.LT(1); - _la = _input.LA(1); - if ( !(_la==T__44 || _la==T__45) ) { - ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); - } - else { - if ( _input.LA(1)==Token.EOF ) matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - setState(297); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(296); - match(EOL); - } - } - - setState(299); - ((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(300); - if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); - setState(302); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(301); - match(EOL); - } - } - - setState(304); - ((ExpressionContext)_localctx).bop = _input.LT(1); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__46) | (1L << T__47) | (1L << T__48) | (1L << T__49))) != 0)) ) { - ((ExpressionContext)_localctx).bop = (Token)_errHandler.recoverInline(this); - } - else { - if ( _input.LA(1)==Token.EOF ) matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - setState(306); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(305); - match(EOL); - } - } - - setState(308); - ((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(309); - if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)"); - 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==T__50 || _la==T__51) ) { - ((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(18); - } - break; - case 7: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - _localctx.left = _prevctx; - _localctx.left = _prevctx; - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(318); - if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); - setState(320); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(319); - match(EOL); - } - } - - setState(322); - ((ExpressionContext)_localctx).bop = match(ADDRESS_OF); - setState(324); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(323); - match(EOL); - } - } - - setState(326); - ((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(327); - if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)"); - setState(329); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(328); - match(EOL); - } - } - - setState(331); - ((ExpressionContext)_localctx).bop = match(T__52); - setState(333); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(332); - match(EOL); - } - } - - setState(335); - ((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(336); - if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); - setState(338); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(337); - match(EOL); - } - } - - setState(340); - ((ExpressionContext)_localctx).bop = match(T__53); - setState(342); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(341); - match(EOL); - } - } - - setState(344); - ((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(345); - if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); - setState(347); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(346); - match(EOL); - } - } - - setState(349); - ((ExpressionContext)_localctx).bop = match(T__56); - setState(351); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(350); - match(EOL); - } - } - - setState(353); - ((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(354); - if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); - setState(356); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(355); - match(EOL); - } - } - - setState(358); - ((ExpressionContext)_localctx).bop = match(T__57); - setState(360); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(359); - match(EOL); - } - } - - setState(362); - ((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(363); - if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); - setState(365); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(364); - match(EOL); - } - } - - setState(367); - ((ExpressionContext)_localctx).bop = match(T__58); - setState(369); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(368); - match(EOL); - } - } - - setState(371); - ((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(372); - if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); - setState(373); - match(T__54); - setState(374); - ((ExpressionContext)_localctx).rangeto = expression(0); - setState(377); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) { - case 1: - { - setState(375); - match(T__55); - setState(376); - ((ExpressionContext)_localctx).rangestep = expression(0); - } - break; - } - } - break; - case 14: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(379); - if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); - setState(380); - typecast(); - } - break; - } - } - } - setState(385); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,40,_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, 38, RULE_typecast); - try { - enterOuterAlt(_localctx, 1); - { - setState(386); - match(T__62); - setState(387); - 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, 40, RULE_arrayindexed); - try { - enterOuterAlt(_localctx, 1); - { - setState(389); - scoped_identifier(); - setState(390); - 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, 42, RULE_directmemory); - try { - enterOuterAlt(_localctx, 1); - { - setState(392); - match(T__63); - setState(393); - match(T__60); - setState(394); - expression(0); - setState(395); - match(T__61); - } - } - 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, 44, RULE_addressof); - try { - enterOuterAlt(_localctx, 1); - { - setState(397); - match(ADDRESS_OF); - setState(398); - 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, 46, RULE_functioncall); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(400); - scoped_identifier(); - setState(401); - match(T__60); - setState(403); - _errHandler.sync(this); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__23) | (1L << T__38) | (1L << T__39) | (1L << T__59) | (1L << T__60))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__68 - 64)) | (1L << (T__69 - 64)) | (1L << (T__70 - 64)) | (1L << (T__79 - 64)) | (1L << (T__80 - 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(402); - expression_list(); - } - } - - setState(405); - match(T__61); - } - } - 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, 48, RULE_functioncall_stmt); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(407); - scoped_identifier(); - setState(408); - match(T__60); - setState(410); - _errHandler.sync(this); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__23) | (1L << T__38) | (1L << T__39) | (1L << T__59) | (1L << T__60))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__68 - 64)) | (1L << (T__69 - 64)) | (1L << (T__70 - 64)) | (1L << (T__79 - 64)) | (1L << (T__80 - 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(409); - expression_list(); - } - } - - setState(412); - match(T__61); - } - } - 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, 50, RULE_expression_list); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(414); - expression(0); - setState(422); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==T__13) { - { - { - setState(415); - match(T__13); - setState(417); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(416); - match(EOL); - } - } - - setState(419); - expression(0); - } - } - setState(424); - _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, 52, RULE_returnstmt); - try { - enterOuterAlt(_localctx, 1); - { - setState(425); - match(T__64); - setState(427); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { - case 1: - { - setState(426); - 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, 54, RULE_breakstmt); - try { - enterOuterAlt(_localctx, 1); - { - setState(429); - match(T__65); - } - } - 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, 56, RULE_continuestmt); - try { - enterOuterAlt(_localctx, 1); - { - setState(431); - match(T__66); - } - } - 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, 58, RULE_identifier); - try { - enterOuterAlt(_localctx, 1); - { - setState(433); - 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, 60, RULE_scoped_identifier); - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - setState(435); - match(NAME); - setState(440); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,46,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(436); - match(T__67); - setState(437); - match(NAME); - } - } - } - setState(442); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,46,_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, 62, RULE_register); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(443); - _la = _input.LA(1); - if ( !(((((_la - 69)) & ~0x3f) == 0 && ((1L << (_la - 69)) & ((1L << (T__68 - 69)) | (1L << (T__69 - 69)) | (1L << (T__70 - 69)))) != 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, 64, RULE_registerorpair); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(445); - _la = _input.LA(1); - if ( !(((((_la - 69)) & ~0x3f) == 0 && ((1L << (_la - 69)) & ((1L << (T__68 - 69)) | (1L << (T__69 - 69)) | (1L << (T__70 - 69)) | (1L << (T__71 - 69)) | (1L << (T__72 - 69)) | (1L << (T__73 - 69)))) != 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, 66, RULE_statusregister); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(447); - _la = _input.LA(1); - if ( !(((((_la - 75)) & ~0x3f) == 0 && ((1L << (_la - 75)) & ((1L << (T__74 - 75)) | (1L << (T__75 - 75)) | (1L << (T__76 - 75)) | (1L << (T__77 - 75)))) != 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, 68, RULE_integerliteral); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(449); - ((IntegerliteralContext)_localctx).intpart = _input.LT(1); - _la = _input.LA(1); - if ( !(((((_la - 115)) & ~0x3f) == 0 && ((1L << (_la - 115)) & ((1L << (DEC_INTEGER - 115)) | (1L << (HEX_INTEGER - 115)) | (1L << (BIN_INTEGER - 115)))) != 0)) ) { - ((IntegerliteralContext)_localctx).intpart = (Token)_errHandler.recoverInline(this); - } - else { - if ( _input.LA(1)==Token.EOF ) matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - setState(451); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,47,_ctx) ) { - case 1: - { - setState(450); - 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, 70, RULE_wordsuffix); - try { - enterOuterAlt(_localctx, 1); - { - setState(453); - match(T__78); - } - } - 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, 72, RULE_booleanliteral); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(455); - _la = _input.LA(1); - if ( !(_la==T__79 || _la==T__80) ) { - _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, 74, RULE_arrayliteral); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(457); - match(T__23); - setState(459); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(458); - match(EOL); - } - } - - setState(461); - expression(0); - setState(469); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==T__13) { - { - { - setState(462); - match(T__13); - setState(464); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(463); - match(EOL); - } - } - - setState(466); - expression(0); - } - } - setState(471); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(473); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(472); - match(EOL); - } - } - - setState(475); - match(T__24); - } - } - 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, 76, RULE_stringliteral); - try { - enterOuterAlt(_localctx, 1); - { - setState(477); - 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, 78, RULE_charliteral); - try { - enterOuterAlt(_localctx, 1); - { - setState(479); - 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, 80, RULE_floatliteral); - try { - enterOuterAlt(_localctx, 1); - { - setState(481); - 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 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, 82, RULE_literalvalue); - try { - setState(489); - _errHandler.sync(this); - switch (_input.LA(1)) { - case DEC_INTEGER: - case HEX_INTEGER: - case BIN_INTEGER: - enterOuterAlt(_localctx, 1); - { - setState(483); - integerliteral(); - } - break; - case T__79: - case T__80: - enterOuterAlt(_localctx, 2); - { - setState(484); - booleanliteral(); - } - break; - case T__23: - enterOuterAlt(_localctx, 3); - { - setState(485); - arrayliteral(); - } - break; - case STRING: - enterOuterAlt(_localctx, 4); - { - setState(486); - stringliteral(); - } - break; - case SINGLECHAR: - enterOuterAlt(_localctx, 5); - { - setState(487); - charliteral(); - } - break; - case FLOAT_NUMBER: - enterOuterAlt(_localctx, 6); - { - setState(488); - floatliteral(); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public 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, 84, RULE_inlineasm); - try { - enterOuterAlt(_localctx, 1); - { - setState(491); - match(T__81); - setState(492); - 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, 86, RULE_subroutine); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(494); - match(T__82); - setState(495); - identifier(); - setState(496); - match(T__60); - setState(498); - _errHandler.sync(this); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22))) != 0)) { - { - setState(497); - sub_params(); - } - } - - setState(500); - match(T__61); - setState(502); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==T__83) { - { - setState(501); - sub_return_part(); - } - } - - { - setState(504); - statement_block(); - setState(505); - 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, 88, RULE_sub_return_part); - try { - enterOuterAlt(_localctx, 1); - { - setState(507); - match(T__83); - setState(508); - 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, 90, RULE_statement_block); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(510); - match(T__84); - setState(511); - match(EOL); - setState(516); - _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__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__64 - 64)) | (1L << (T__65 - 64)) | (1L << (T__66 - 64)) | (1L << (T__68 - 64)) | (1L << (T__69 - 64)) | (1L << (T__70 - 64)) | (1L << (T__81 - 64)) | (1L << (T__82 - 64)) | (1L << (T__86 - 64)) | (1L << (T__89 - 64)) | (1L << (T__91 - 64)) | (1L << (T__92 - 64)) | (1L << (T__93 - 64)) | (1L << (T__94 - 64)) | (1L << (T__95 - 64)) | (1L << (T__96 - 64)) | (1L << (T__97 - 64)) | (1L << (T__98 - 64)) | (1L << (T__99 - 64)) | (1L << (T__100 - 64)) | (1L << (T__101 - 64)) | (1L << (T__102 - 64)) | (1L << (T__103 - 64)) | (1L << (T__105 - 64)) | (1L << (T__106 - 64)) | (1L << (T__108 - 64)) | (1L << (EOL - 64)) | (1L << (NAME - 64)) | (1L << (ADDRESS_OF - 64)))) != 0)) { - { - setState(514); - _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__17: - case T__18: - case T__19: - case T__20: - case T__21: - case T__22: - case T__63: - case T__64: - case T__65: - case T__66: - case T__68: - case T__69: - case T__70: - case T__81: - case T__82: - case T__86: - case T__89: - case T__91: - 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__105: - case T__106: - case T__108: - case NAME: - case ADDRESS_OF: - { - setState(512); - statement(); - } - break; - case EOL: - { - setState(513); - match(EOL); - } - break; - default: - throw new NoViableAltException(this); - } - } - setState(518); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(519); - match(T__85); - } - } - 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, 92, RULE_sub_params); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(521); - vardecl(); - setState(529); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==T__13) { - { - { - setState(522); - match(T__13); - setState(524); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(523); - match(EOL); - } - } - - setState(526); - vardecl(); - } - } - setState(531); - _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, 94, RULE_sub_returns); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(532); - datatype(); - setState(540); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==T__13) { - { - { - setState(533); - match(T__13); - setState(535); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(534); - match(EOL); - } - } - - setState(537); - datatype(); - } - } - setState(542); - _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, 96, RULE_asmsubroutine); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(543); - match(T__86); - setState(544); - identifier(); - setState(545); - match(T__60); - setState(547); - _errHandler.sync(this); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22))) != 0)) { - { - setState(546); - asmsub_params(); - } - } - - setState(549); - match(T__61); - setState(551); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(550); - match(EOL); - } - } - - setState(554); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==T__88) { - { - setState(553); - asmsub_clobbers(); - } - } - - setState(557); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==T__83) { - { - setState(556); - asmsub_returns(); - } - } - - setState(561); - _errHandler.sync(this); - switch (_input.LA(1)) { - case T__14: - { - setState(559); - asmsub_address(); - } - break; - case T__84: - { - setState(560); - 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, 98, RULE_asmsub_address); - try { - enterOuterAlt(_localctx, 1); - { - setState(563); - match(T__14); - setState(564); - ((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, 100, RULE_asmsub_params); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(566); - asmsub_param(); - setState(574); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==T__13) { - { - { - setState(567); - match(T__13); - setState(569); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(568); - match(EOL); - } - } - - setState(571); - asmsub_param(); - } - } - setState(576); - _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, 102, RULE_asmsub_param); - try { - enterOuterAlt(_localctx, 1); - { - setState(577); - vardecl(); - setState(578); - match(T__63); - setState(582); - _errHandler.sync(this); - switch (_input.LA(1)) { - case T__68: - case T__69: - case T__70: - case T__71: - case T__72: - case T__73: - { - setState(579); - registerorpair(); - } - break; - case T__74: - case T__75: - case T__76: - case T__77: - { - setState(580); - statusregister(); - } - break; - case T__87: - { - setState(581); - ((Asmsub_paramContext)_localctx).stack = match(T__87); - } - 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, 104, RULE_asmsub_clobbers); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(584); - match(T__88); - setState(585); - match(T__60); - setState(587); - _errHandler.sync(this); - _la = _input.LA(1); - if (((((_la - 69)) & ~0x3f) == 0 && ((1L << (_la - 69)) & ((1L << (T__68 - 69)) | (1L << (T__69 - 69)) | (1L << (T__70 - 69)))) != 0)) { - { - setState(586); - clobber(); - } - } - - setState(589); - match(T__61); - } - } - 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, 106, RULE_clobber); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(591); - register(); - setState(596); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==T__13) { - { - { - setState(592); - match(T__13); - setState(593); - register(); - } - } - setState(598); - _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, 108, RULE_asmsub_returns); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(599); - match(T__83); - setState(600); - asmsub_return(); - setState(608); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==T__13) { - { - { - setState(601); - match(T__13); - setState(603); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(602); - match(EOL); - } - } - - setState(605); - asmsub_return(); - } - } - setState(610); - _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, 110, RULE_asmsub_return); - try { - enterOuterAlt(_localctx, 1); - { - setState(611); - datatype(); - setState(612); - match(T__63); - setState(616); - _errHandler.sync(this); - switch (_input.LA(1)) { - case T__68: - case T__69: - case T__70: - case T__71: - case T__72: - case T__73: - { - setState(613); - registerorpair(); - } - break; - case T__74: - case T__75: - case T__76: - case T__77: - { - setState(614); - statusregister(); - } - break; - case T__87: - { - setState(615); - ((Asmsub_returnContext)_localctx).stack = match(T__87); - } - 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, 112, RULE_if_stmt); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(618); - match(T__89); - setState(619); - expression(0); - setState(621); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(620); - match(EOL); - } - } - - setState(625); - _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__17: - case T__18: - case T__19: - case T__20: - case T__21: - case T__22: - case T__63: - case T__64: - case T__65: - case T__66: - case T__68: - case T__69: - case T__70: - case T__81: - case T__82: - case T__86: - case T__89: - case T__91: - 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__105: - case T__106: - case T__108: - case NAME: - case ADDRESS_OF: - { - setState(623); - statement(); - } - break; - case T__84: - { - setState(624); - statement_block(); - } - break; - default: - throw new NoViableAltException(this); - } - setState(628); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,76,_ctx) ) { - case 1: - { - setState(627); - match(EOL); - } - break; - } - setState(631); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,77,_ctx) ) { - case 1: - { - setState(630); - 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, 114, RULE_else_part); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(633); - match(T__90); - setState(635); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(634); - match(EOL); - } - } - - setState(639); - _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__17: - case T__18: - case T__19: - case T__20: - case T__21: - case T__22: - case T__63: - case T__64: - case T__65: - case T__66: - case T__68: - case T__69: - case T__70: - case T__81: - case T__82: - case T__86: - case T__89: - case T__91: - 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__105: - case T__106: - case T__108: - case NAME: - case ADDRESS_OF: - { - setState(637); - statement(); - } - break; - case T__84: - { - setState(638); - 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, 116, RULE_branch_stmt); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(641); - branchcondition(); - setState(643); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(642); - match(EOL); - } - } - - setState(647); - _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__17: - case T__18: - case T__19: - case T__20: - case T__21: - case T__22: - case T__63: - case T__64: - case T__65: - case T__66: - case T__68: - case T__69: - case T__70: - case T__81: - case T__82: - case T__86: - case T__89: - case T__91: - 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__105: - case T__106: - case T__108: - case NAME: - case ADDRESS_OF: - { - setState(645); - statement(); - } - break; - case T__84: - { - setState(646); - statement_block(); - } - break; - default: - throw new NoViableAltException(this); - } - setState(650); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,82,_ctx) ) { - case 1: - { - setState(649); - match(EOL); - } - break; - } - setState(653); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==T__90) { - { - setState(652); - else_part(); - } - } - - setState(655); - 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, 118, RULE_branchcondition); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(657); - _la = _input.LA(1); - if ( !(((((_la - 92)) & ~0x3f) == 0 && ((1L << (_la - 92)) & ((1L << (T__91 - 92)) | (1L << (T__92 - 92)) | (1L << (T__93 - 92)) | (1L << (T__94 - 92)) | (1L << (T__95 - 92)) | (1L << (T__96 - 92)) | (1L << (T__97 - 92)) | (1L << (T__98 - 92)) | (1L << (T__99 - 92)) | (1L << (T__100 - 92)) | (1L << (T__101 - 92)) | (1L << (T__102 - 92)))) != 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, 120, RULE_forloop); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(659); - match(T__103); - setState(661); - _errHandler.sync(this); - _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22))) != 0)) { - { - setState(660); - datatype(); - } - } - - setState(664); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==ZEROPAGE) { - { - setState(663); - match(ZEROPAGE); - } - } - - setState(668); - _errHandler.sync(this); - switch (_input.LA(1)) { - case T__68: - case T__69: - case T__70: - { - setState(666); - register(); - } - break; - case NAME: - { - setState(667); - identifier(); - } - break; - default: - throw new NoViableAltException(this); - } - setState(670); - match(T__104); - setState(671); - expression(0); - setState(673); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(672); - match(EOL); - } - } - - setState(677); - _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__17: - case T__18: - case T__19: - case T__20: - case T__21: - case T__22: - case T__63: - case T__64: - case T__65: - case T__66: - case T__68: - case T__69: - case T__70: - case T__81: - case T__82: - case T__86: - case T__89: - case T__91: - 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__105: - case T__106: - case T__108: - case NAME: - case ADDRESS_OF: - { - setState(675); - statement(); - } - break; - case T__84: - { - setState(676); - 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, 122, RULE_whileloop); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(679); - match(T__105); - setState(680); - expression(0); - setState(682); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(681); - match(EOL); - } - } - - setState(686); - _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__17: - case T__18: - case T__19: - case T__20: - case T__21: - case T__22: - case T__63: - case T__64: - case T__65: - case T__66: - case T__68: - case T__69: - case T__70: - case T__81: - case T__82: - case T__86: - case T__89: - case T__91: - 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__105: - case T__106: - case T__108: - case NAME: - case ADDRESS_OF: - { - setState(684); - statement(); - } - break; - case T__84: - { - setState(685); - 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, 124, RULE_repeatloop); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(688); - match(T__106); - setState(691); - _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__17: - case T__18: - case T__19: - case T__20: - case T__21: - case T__22: - case T__63: - case T__64: - case T__65: - case T__66: - case T__68: - case T__69: - case T__70: - case T__81: - case T__82: - case T__86: - case T__89: - case T__91: - 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__105: - case T__106: - case T__108: - case NAME: - case ADDRESS_OF: - { - setState(689); - statement(); - } - break; - case T__84: - { - setState(690); - statement_block(); - } - break; - default: - throw new NoViableAltException(this); - } - setState(694); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(693); - match(EOL); - } - } - - setState(696); - match(T__107); - setState(697); - 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, 126, RULE_whenstmt); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(699); - match(T__108); - setState(700); - expression(0); - setState(701); - match(T__84); - setState(702); - match(EOL); - setState(707); - _errHandler.sync(this); - _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__23) | (1L << T__38) | (1L << T__39) | (1L << T__59) | (1L << T__60))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__68 - 64)) | (1L << (T__69 - 64)) | (1L << (T__70 - 64)) | (1L << (T__79 - 64)) | (1L << (T__80 - 64)) | (1L << (T__90 - 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(705); - _errHandler.sync(this); - switch (_input.LA(1)) { - case T__0: - case T__23: - case T__38: - case T__39: - case T__59: - case T__60: - case T__63: - case T__68: - case T__69: - case T__70: - case T__79: - case T__80: - case T__90: - case NAME: - case DEC_INTEGER: - case HEX_INTEGER: - case BIN_INTEGER: - case ADDRESS_OF: - case FLOAT_NUMBER: - case STRING: - case SINGLECHAR: - { - setState(703); - when_choice(); - } - break; - case EOL: - { - setState(704); - match(EOL); - } - break; - default: - throw new NoViableAltException(this); - } - } - setState(709); - _errHandler.sync(this); - _la = _input.LA(1); - } - setState(710); - match(T__85); - setState(712); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,95,_ctx) ) { - case 1: - { - setState(711); - 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, 128, RULE_when_choice); - try { - enterOuterAlt(_localctx, 1); - { - setState(716); - _errHandler.sync(this); - switch (_input.LA(1)) { - case T__0: - case T__23: - case T__38: - case T__39: - case T__59: - case T__60: - case T__63: - case T__68: - case T__69: - case T__70: - case T__79: - case T__80: - case NAME: - case DEC_INTEGER: - case HEX_INTEGER: - case BIN_INTEGER: - case ADDRESS_OF: - case FLOAT_NUMBER: - case STRING: - case SINGLECHAR: - { - setState(714); - expression_list(); - } - break; - case T__90: - { - setState(715); - match(T__90); - } - break; - default: - throw new NoViableAltException(this); - } - setState(718); - match(T__83); - setState(721); - _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__17: - case T__18: - case T__19: - case T__20: - case T__21: - case T__22: - case T__63: - case T__64: - case T__65: - case T__66: - case T__68: - case T__69: - case T__70: - case T__81: - case T__82: - case T__86: - case T__89: - case T__91: - 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__105: - case T__106: - case T__108: - case NAME: - case ADDRESS_OF: - { - setState(719); - statement(); - } - break; - case T__84: - { - setState(720); - 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 18: - 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~\u02d6\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\3\2\3\2\7\2\u0087\n\2\f\2\16\2\u008a\13"+ - "\2\3\2\3\2\3\3\3\3\5\3\u0090\n\3\3\4\3\4\3\4\5\4\u0095\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\5\5\u00b1\n\5\3\6\3\6\3\6\3\7\3\7\3\7\5\7\u00b9"+ - "\n\7\3\b\3\b\5\b\u00bd\n\b\3\b\3\b\3\b\7\b\u00c2\n\b\f\b\16\b\u00c5\13"+ - "\b\5\b\u00c7\n\b\3\t\3\t\3\t\5\t\u00cc\n\t\3\n\3\n\5\n\u00d0\n\n\3\n\3"+ - "\n\5\n\u00d4\n\n\3\n\3\n\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\r\3\r\3\r\3"+ - "\16\3\16\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3"+ - "\22\3\22\3\22\3\22\5\22\u00f4\n\22\3\23\3\23\3\23\3\24\3\24\3\24\3\24"+ - "\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\5\24\u0109"+ - "\n\24\3\24\3\24\5\24\u010d\n\24\3\24\3\24\5\24\u0111\n\24\3\24\3\24\3"+ - "\24\5\24\u0116\n\24\3\24\3\24\5\24\u011a\n\24\3\24\3\24\3\24\5\24\u011f"+ - "\n\24\3\24\3\24\5\24\u0123\n\24\3\24\3\24\3\24\5\24\u0128\n\24\3\24\3"+ - "\24\5\24\u012c\n\24\3\24\3\24\3\24\5\24\u0131\n\24\3\24\3\24\5\24\u0135"+ - "\n\24\3\24\3\24\3\24\5\24\u013a\n\24\3\24\3\24\5\24\u013e\n\24\3\24\3"+ - "\24\3\24\5\24\u0143\n\24\3\24\3\24\5\24\u0147\n\24\3\24\3\24\3\24\5\24"+ - "\u014c\n\24\3\24\3\24\5\24\u0150\n\24\3\24\3\24\3\24\5\24\u0155\n\24\3"+ - "\24\3\24\5\24\u0159\n\24\3\24\3\24\3\24\5\24\u015e\n\24\3\24\3\24\5\24"+ - "\u0162\n\24\3\24\3\24\3\24\5\24\u0167\n\24\3\24\3\24\5\24\u016b\n\24\3"+ - "\24\3\24\3\24\5\24\u0170\n\24\3\24\3\24\5\24\u0174\n\24\3\24\3\24\3\24"+ - "\3\24\3\24\3\24\5\24\u017c\n\24\3\24\3\24\7\24\u0180\n\24\f\24\16\24\u0183"+ - "\13\24\3\25\3\25\3\25\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\30\3\30"+ - "\3\30\3\31\3\31\3\31\5\31\u0196\n\31\3\31\3\31\3\32\3\32\3\32\5\32\u019d"+ - "\n\32\3\32\3\32\3\33\3\33\3\33\5\33\u01a4\n\33\3\33\7\33\u01a7\n\33\f"+ - "\33\16\33\u01aa\13\33\3\34\3\34\5\34\u01ae\n\34\3\35\3\35\3\36\3\36\3"+ - "\37\3\37\3 \3 \3 \7 \u01b9\n \f \16 \u01bc\13 \3!\3!\3\"\3\"\3#\3#\3$"+ - "\3$\5$\u01c6\n$\3%\3%\3&\3&\3\'\3\'\5\'\u01ce\n\'\3\'\3\'\3\'\5\'\u01d3"+ - "\n\'\3\'\7\'\u01d6\n\'\f\'\16\'\u01d9\13\'\3\'\5\'\u01dc\n\'\3\'\3\'\3"+ - "(\3(\3)\3)\3*\3*\3+\3+\3+\3+\3+\3+\5+\u01ec\n+\3,\3,\3,\3-\3-\3-\3-\5"+ - "-\u01f5\n-\3-\3-\5-\u01f9\n-\3-\3-\3-\3.\3.\3.\3/\3/\3/\3/\7/\u0205\n"+ - "/\f/\16/\u0208\13/\3/\3/\3\60\3\60\3\60\5\60\u020f\n\60\3\60\7\60\u0212"+ - "\n\60\f\60\16\60\u0215\13\60\3\61\3\61\3\61\5\61\u021a\n\61\3\61\7\61"+ - "\u021d\n\61\f\61\16\61\u0220\13\61\3\62\3\62\3\62\3\62\5\62\u0226\n\62"+ - "\3\62\3\62\5\62\u022a\n\62\3\62\5\62\u022d\n\62\3\62\5\62\u0230\n\62\3"+ - "\62\3\62\5\62\u0234\n\62\3\63\3\63\3\63\3\64\3\64\3\64\5\64\u023c\n\64"+ - "\3\64\7\64\u023f\n\64\f\64\16\64\u0242\13\64\3\65\3\65\3\65\3\65\3\65"+ - "\5\65\u0249\n\65\3\66\3\66\3\66\5\66\u024e\n\66\3\66\3\66\3\67\3\67\3"+ - "\67\7\67\u0255\n\67\f\67\16\67\u0258\13\67\38\38\38\38\58\u025e\n8\38"+ - "\78\u0261\n8\f8\168\u0264\138\39\39\39\39\39\59\u026b\n9\3:\3:\3:\5:\u0270"+ - "\n:\3:\3:\5:\u0274\n:\3:\5:\u0277\n:\3:\5:\u027a\n:\3;\3;\5;\u027e\n;"+ - "\3;\3;\5;\u0282\n;\3<\3<\5<\u0286\n<\3<\3<\5<\u028a\n<\3<\5<\u028d\n<"+ - "\3<\5<\u0290\n<\3<\3<\3=\3=\3>\3>\5>\u0298\n>\3>\5>\u029b\n>\3>\3>\5>"+ - "\u029f\n>\3>\3>\3>\5>\u02a4\n>\3>\3>\5>\u02a8\n>\3?\3?\3?\5?\u02ad\n?"+ - "\3?\3?\5?\u02b1\n?\3@\3@\3@\5@\u02b6\n@\3@\5@\u02b9\n@\3@\3@\3@\3A\3A"+ - "\3A\3A\3A\3A\7A\u02c4\nA\fA\16A\u02c7\13A\3A\3A\5A\u02cb\nA\3B\3B\5B\u02cf"+ - "\nB\3B\3B\3B\5B\u02d4\nB\3B\2\3&C\2\4\6\b\n\f\16\20\22\24\26\30\32\34"+ - "\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080\u0082"+ - "\2\22\3\2\6\17\3\2\23\31\3\2\34&\3\2\'(\4\2\3\3)*\3\2,.\3\2)*\3\2/\60"+ - "\3\2\61\64\3\2\65\66\3\2GI\3\2GL\3\2MP\3\2uw\3\2RS\3\2^i\2\u0329\2\u0088"+ - "\3\2\2\2\4\u008f\3\2\2\2\6\u0091\3\2\2\2\b\u00b0\3\2\2\2\n\u00b2\3\2\2"+ - "\2\f\u00b5\3\2\2\2\16\u00ba\3\2\2\2\20\u00cb\3\2\2\2\22\u00cd\3\2\2\2"+ - "\24\u00d7\3\2\2\2\26\u00db\3\2\2\2\30\u00de\3\2\2\2\32\u00e1\3\2\2\2\34"+ - "\u00e3\3\2\2\2\36\u00e7\3\2\2\2 \u00eb\3\2\2\2\"\u00f3\3\2\2\2$\u00f5"+ - "\3\2\2\2&\u0108\3\2\2\2(\u0184\3\2\2\2*\u0187\3\2\2\2,\u018a\3\2\2\2."+ - "\u018f\3\2\2\2\60\u0192\3\2\2\2\62\u0199\3\2\2\2\64\u01a0\3\2\2\2\66\u01ab"+ - "\3\2\2\28\u01af\3\2\2\2:\u01b1\3\2\2\2<\u01b3\3\2\2\2>\u01b5\3\2\2\2@"+ - "\u01bd\3\2\2\2B\u01bf\3\2\2\2D\u01c1\3\2\2\2F\u01c3\3\2\2\2H\u01c7\3\2"+ - "\2\2J\u01c9\3\2\2\2L\u01cb\3\2\2\2N\u01df\3\2\2\2P\u01e1\3\2\2\2R\u01e3"+ - "\3\2\2\2T\u01eb\3\2\2\2V\u01ed\3\2\2\2X\u01f0\3\2\2\2Z\u01fd\3\2\2\2\\"+ - "\u0200\3\2\2\2^\u020b\3\2\2\2`\u0216\3\2\2\2b\u0221\3\2\2\2d\u0235\3\2"+ - "\2\2f\u0238\3\2\2\2h\u0243\3\2\2\2j\u024a\3\2\2\2l\u0251\3\2\2\2n\u0259"+ - "\3\2\2\2p\u0265\3\2\2\2r\u026c\3\2\2\2t\u027b\3\2\2\2v\u0283\3\2\2\2x"+ - "\u0293\3\2\2\2z\u0295\3\2\2\2|\u02a9\3\2\2\2~\u02b2\3\2\2\2\u0080\u02bd"+ - "\3\2\2\2\u0082\u02ce\3\2\2\2\u0084\u0087\5\4\3\2\u0085\u0087\7s\2\2\u0086"+ - "\u0084\3\2\2\2\u0086\u0085\3\2\2\2\u0087\u008a\3\2\2\2\u0088\u0086\3\2"+ - "\2\2\u0088\u0089\3\2\2\2\u0089\u008b\3\2\2\2\u008a\u0088\3\2\2\2\u008b"+ - "\u008c\7\2\2\3\u008c\3\3\2\2\2\u008d\u0090\5\16\b\2\u008e\u0090\5\6\4"+ - "\2\u008f\u008d\3\2\2\2\u008f\u008e\3\2\2\2\u0090\5\3\2\2\2\u0091\u0092"+ - "\7\3\2\2\u0092\u0094\5<\37\2\u0093\u0095\5F$\2\u0094\u0093\3\2\2\2\u0094"+ - "\u0095\3\2\2\2\u0095\u0096\3\2\2\2\u0096\u0097\5\\/\2\u0097\u0098\7s\2"+ - "\2\u0098\7\3\2\2\2\u0099\u00b1\5\16\b\2\u009a\u00b1\5\24\13\2\u009b\u00b1"+ - "\5\22\n\2\u009c\u00b1\5\26\f\2\u009d\u00b1\5\30\r\2\u009e\u00b1\5\36\20"+ - "\2\u009f\u00b1\5 \21\2\u00a0\u00b1\5\f\7\2\u00a1\u00b1\5$\23\2\u00a2\u00b1"+ - "\5\62\32\2\u00a3\u00b1\5r:\2\u00a4\u00b1\5v<\2\u00a5\u00b1\5X-\2\u00a6"+ - "\u00b1\5b\62\2\u00a7\u00b1\5V,\2\u00a8\u00b1\5\66\34\2\u00a9\u00b1\5z"+ - ">\2\u00aa\u00b1\5|?\2\u00ab\u00b1\5~@\2\u00ac\u00b1\5\u0080A\2\u00ad\u00b1"+ - "\58\35\2\u00ae\u00b1\5:\36\2\u00af\u00b1\5\n\6\2\u00b0\u0099\3\2\2\2\u00b0"+ - "\u009a\3\2\2\2\u00b0\u009b\3\2\2\2\u00b0\u009c\3\2\2\2\u00b0\u009d\3\2"+ - "\2\2\u00b0\u009e\3\2\2\2\u00b0\u009f\3\2\2\2\u00b0\u00a0\3\2\2\2\u00b0"+ - "\u00a1\3\2\2\2\u00b0\u00a2\3\2\2\2\u00b0\u00a3\3\2\2\2\u00b0\u00a4\3\2"+ - "\2\2\u00b0\u00a5\3\2\2\2\u00b0\u00a6\3\2\2\2\u00b0\u00a7\3\2\2\2\u00b0"+ - "\u00a8\3\2\2\2\u00b0\u00a9\3\2\2\2\u00b0\u00aa\3\2\2\2\u00b0\u00ab\3\2"+ - "\2\2\u00b0\u00ac\3\2\2\2\u00b0\u00ad\3\2\2\2\u00b0\u00ae\3\2\2\2\u00b0"+ - "\u00af\3\2\2\2\u00b1\t\3\2\2\2\u00b2\u00b3\5<\37\2\u00b3\u00b4\7\4\2\2"+ - "\u00b4\13\3\2\2\2\u00b5\u00b8\7\5\2\2\u00b6\u00b9\5F$\2\u00b7\u00b9\5"+ - "> \2\u00b8\u00b6\3\2\2\2\u00b8\u00b7\3\2\2\2\u00b9\r\3\2\2\2\u00ba\u00c6"+ - "\t\2\2\2\u00bb\u00bd\5\20\t\2\u00bc\u00bb\3\2\2\2\u00bc\u00bd\3\2\2\2"+ - "\u00bd\u00c7\3\2\2\2\u00be\u00c3\5\20\t\2\u00bf\u00c0\7\20\2\2\u00c0\u00c2"+ - "\5\20\t\2\u00c1\u00bf\3\2\2\2\u00c2\u00c5\3\2\2\2\u00c3\u00c1\3\2\2\2"+ - "\u00c3\u00c4\3\2\2\2\u00c4\u00c7\3\2\2\2\u00c5\u00c3\3\2\2\2\u00c6\u00bc"+ - "\3\2\2\2\u00c6\u00be\3\2\2\2\u00c7\17\3\2\2\2\u00c8\u00cc\5N(\2\u00c9"+ - "\u00cc\5<\37\2\u00ca\u00cc\5F$\2\u00cb\u00c8\3\2\2\2\u00cb\u00c9\3\2\2"+ - "\2\u00cb\u00ca\3\2\2\2\u00cc\21\3\2\2\2\u00cd\u00cf\5\32\16\2\u00ce\u00d0"+ - "\7}\2\2\u00cf\u00ce\3\2\2\2\u00cf\u00d0\3\2\2\2\u00d0\u00d3\3\2\2\2\u00d1"+ - "\u00d4\5\34\17\2\u00d2\u00d4\7~\2\2\u00d3\u00d1\3\2\2\2\u00d3\u00d2\3"+ - "\2\2\2\u00d3\u00d4\3\2\2\2\u00d4\u00d5\3\2\2\2\u00d5\u00d6\5<\37\2\u00d6"+ - "\23\3\2\2\2\u00d7\u00d8\5\22\n\2\u00d8\u00d9\7\21\2\2\u00d9\u00da\5&\24"+ - "\2\u00da\25\3\2\2\2\u00db\u00dc\7\22\2\2\u00dc\u00dd\5\24\13\2\u00dd\27"+ - "\3\2\2\2\u00de\u00df\7x\2\2\u00df\u00e0\5\24\13\2\u00e0\31\3\2\2\2\u00e1"+ - "\u00e2\t\3\2\2\u00e2\33\3\2\2\2\u00e3\u00e4\7\32\2\2\u00e4\u00e5\5&\24"+ - "\2\u00e5\u00e6\7\33\2\2\u00e6\35\3\2\2\2\u00e7\u00e8\5\"\22\2\u00e8\u00e9"+ - "\7\21\2\2\u00e9\u00ea\5&\24\2\u00ea\37\3\2\2\2\u00eb\u00ec\5\"\22\2\u00ec"+ - "\u00ed\t\4\2\2\u00ed\u00ee\5&\24\2\u00ee!\3\2\2\2\u00ef\u00f4\5@!\2\u00f0"+ - "\u00f4\5> \2\u00f1\u00f4\5*\26\2\u00f2\u00f4\5,\27\2\u00f3\u00ef\3\2\2"+ - "\2\u00f3\u00f0\3\2\2\2\u00f3\u00f1\3\2\2\2\u00f3\u00f2\3\2\2\2\u00f4#"+ - "\3\2\2\2\u00f5\u00f6\5\"\22\2\u00f6\u00f7\t\5\2\2\u00f7%\3\2\2\2\u00f8"+ - "\u00f9\b\24\1\2\u00f9\u0109\5\60\31\2\u00fa\u00fb\t\6\2\2\u00fb\u0109"+ - "\5&\24\31\u00fc\u00fd\7>\2\2\u00fd\u0109\5&\24\13\u00fe\u0109\5T+\2\u00ff"+ - "\u0109\5@!\2\u0100\u0109\5> \2\u0101\u0109\5*\26\2\u0102\u0109\5,\27\2"+ - "\u0103\u0109\5.\30\2\u0104\u0105\7?\2\2\u0105\u0106\5&\24\2\u0106\u0107"+ - "\7@\2\2\u0107\u0109\3\2\2\2\u0108\u00f8\3\2\2\2\u0108\u00fa\3\2\2\2\u0108"+ - "\u00fc\3\2\2\2\u0108\u00fe\3\2\2\2\u0108\u00ff\3\2\2\2\u0108\u0100\3\2"+ - "\2\2\u0108\u0101\3\2\2\2\u0108\u0102\3\2\2\2\u0108\u0103\3\2\2\2\u0108"+ - "\u0104\3\2\2\2\u0109\u0181\3\2\2\2\u010a\u010c\f\30\2\2\u010b\u010d\7"+ - "s\2\2\u010c\u010b\3\2\2\2\u010c\u010d\3\2\2\2\u010d\u010e\3\2\2\2\u010e"+ - "\u0110\7+\2\2\u010f\u0111\7s\2\2\u0110\u010f\3\2\2\2\u0110\u0111\3\2\2"+ - "\2\u0111\u0112\3\2\2\2\u0112\u0180\5&\24\31\u0113\u0115\f\27\2\2\u0114"+ - "\u0116\7s\2\2\u0115\u0114\3\2\2\2\u0115\u0116\3\2\2\2\u0116\u0117\3\2"+ - "\2\2\u0117\u0119\t\7\2\2\u0118\u011a\7s\2\2\u0119\u0118\3\2\2\2\u0119"+ - "\u011a\3\2\2\2\u011a\u011b\3\2\2\2\u011b\u0180\5&\24\30\u011c\u011e\f"+ - "\26\2\2\u011d\u011f\7s\2\2\u011e\u011d\3\2\2\2\u011e\u011f\3\2\2\2\u011f"+ - "\u0120\3\2\2\2\u0120\u0122\t\b\2\2\u0121\u0123\7s\2\2\u0122\u0121\3\2"+ - "\2\2\u0122\u0123\3\2\2\2\u0123\u0124\3\2\2\2\u0124\u0180\5&\24\27\u0125"+ - "\u0127\f\25\2\2\u0126\u0128\7s\2\2\u0127\u0126\3\2\2\2\u0127\u0128\3\2"+ - "\2\2\u0128\u0129\3\2\2\2\u0129\u012b\t\t\2\2\u012a\u012c\7s\2\2\u012b"+ - "\u012a\3\2\2\2\u012b\u012c\3\2\2\2\u012c\u012d\3\2\2\2\u012d\u0180\5&"+ - "\24\26\u012e\u0130\f\24\2\2\u012f\u0131\7s\2\2\u0130\u012f\3\2\2\2\u0130"+ - "\u0131\3\2\2\2\u0131\u0132\3\2\2\2\u0132\u0134\t\n\2\2\u0133\u0135\7s"+ - "\2\2\u0134\u0133\3\2\2\2\u0134\u0135\3\2\2\2\u0135\u0136\3\2\2\2\u0136"+ - "\u0180\5&\24\25\u0137\u0139\f\23\2\2\u0138\u013a\7s\2\2\u0139\u0138\3"+ - "\2\2\2\u0139\u013a\3\2\2\2\u013a\u013b\3\2\2\2\u013b\u013d\t\13\2\2\u013c"+ - "\u013e\7s\2\2\u013d\u013c\3\2\2\2\u013d\u013e\3\2\2\2\u013e\u013f\3\2"+ - "\2\2\u013f\u0180\5&\24\24\u0140\u0142\f\22\2\2\u0141\u0143\7s\2\2\u0142"+ - "\u0141\3\2\2\2\u0142\u0143\3\2\2\2\u0143\u0144\3\2\2\2\u0144\u0146\7x"+ - "\2\2\u0145\u0147\7s\2\2\u0146\u0145\3\2\2\2\u0146\u0147\3\2\2\2\u0147"+ - "\u0148\3\2\2\2\u0148\u0180\5&\24\23\u0149\u014b\f\21\2\2\u014a\u014c\7"+ - "s\2\2\u014b\u014a\3\2\2\2\u014b\u014c\3\2\2\2\u014c\u014d\3\2\2\2\u014d"+ - "\u014f\7\67\2\2\u014e\u0150\7s\2\2\u014f\u014e\3\2\2\2\u014f\u0150\3\2"+ - "\2\2\u0150\u0151\3\2\2\2\u0151\u0180\5&\24\22\u0152\u0154\f\20\2\2\u0153"+ - "\u0155\7s\2\2\u0154\u0153\3\2\2\2\u0154\u0155\3\2\2\2\u0155\u0156\3\2"+ - "\2\2\u0156\u0158\78\2\2\u0157\u0159\7s\2\2\u0158\u0157\3\2\2\2\u0158\u0159"+ - "\3\2\2\2\u0159\u015a\3\2\2\2\u015a\u0180\5&\24\21\u015b\u015d\f\16\2\2"+ - "\u015c\u015e\7s\2\2\u015d\u015c\3\2\2\2\u015d\u015e\3\2\2\2\u015e\u015f"+ - "\3\2\2\2\u015f\u0161\7;\2\2\u0160\u0162\7s\2\2\u0161\u0160\3\2\2\2\u0161"+ - "\u0162\3\2\2\2\u0162\u0163\3\2\2\2\u0163\u0180\5&\24\17\u0164\u0166\f"+ - "\r\2\2\u0165\u0167\7s\2\2\u0166\u0165\3\2\2\2\u0166\u0167\3\2\2\2\u0167"+ - "\u0168\3\2\2\2\u0168\u016a\7<\2\2\u0169\u016b\7s\2\2\u016a\u0169\3\2\2"+ - "\2\u016a\u016b\3\2\2\2\u016b\u016c\3\2\2\2\u016c\u0180\5&\24\16\u016d"+ - "\u016f\f\f\2\2\u016e\u0170\7s\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\7s\2\2\u0173\u0172"+ - "\3\2\2\2\u0173\u0174\3\2\2\2\u0174\u0175\3\2\2\2\u0175\u0180\5&\24\r\u0176"+ - "\u0177\f\17\2\2\u0177\u0178\79\2\2\u0178\u017b\5&\24\2\u0179\u017a\7:"+ - "\2\2\u017a\u017c\5&\24\2\u017b\u0179\3\2\2\2\u017b\u017c\3\2\2\2\u017c"+ - "\u0180\3\2\2\2\u017d\u017e\f\4\2\2\u017e\u0180\5(\25\2\u017f\u010a\3\2"+ - "\2\2\u017f\u0113\3\2\2\2\u017f\u011c\3\2\2\2\u017f\u0125\3\2\2\2\u017f"+ - "\u012e\3\2\2\2\u017f\u0137\3\2\2\2\u017f\u0140\3\2\2\2\u017f\u0149\3\2"+ - "\2\2\u017f\u0152\3\2\2\2\u017f\u015b\3\2\2\2\u017f\u0164\3\2\2\2\u017f"+ - "\u016d\3\2\2\2\u017f\u0176\3\2\2\2\u017f\u017d\3\2\2\2\u0180\u0183\3\2"+ - "\2\2\u0181\u017f\3\2\2\2\u0181\u0182\3\2\2\2\u0182\'\3\2\2\2\u0183\u0181"+ - "\3\2\2\2\u0184\u0185\7A\2\2\u0185\u0186\5\32\16\2\u0186)\3\2\2\2\u0187"+ - "\u0188\5> \2\u0188\u0189\5\34\17\2\u0189+\3\2\2\2\u018a\u018b\7B\2\2\u018b"+ - "\u018c\7?\2\2\u018c\u018d\5&\24\2\u018d\u018e\7@\2\2\u018e-\3\2\2\2\u018f"+ - "\u0190\7x\2\2\u0190\u0191\5> \2\u0191/\3\2\2\2\u0192\u0193\5> \2\u0193"+ - "\u0195\7?\2\2\u0194\u0196\5\64\33\2\u0195\u0194\3\2\2\2\u0195\u0196\3"+ - "\2\2\2\u0196\u0197\3\2\2\2\u0197\u0198\7@\2\2\u0198\61\3\2\2\2\u0199\u019a"+ - "\5> \2\u019a\u019c\7?\2\2\u019b\u019d\5\64\33\2\u019c\u019b\3\2\2\2\u019c"+ - "\u019d\3\2\2\2\u019d\u019e\3\2\2\2\u019e\u019f\7@\2\2\u019f\63\3\2\2\2"+ - "\u01a0\u01a8\5&\24\2\u01a1\u01a3\7\20\2\2\u01a2\u01a4\7s\2\2\u01a3\u01a2"+ - "\3\2\2\2\u01a3\u01a4\3\2\2\2\u01a4\u01a5\3\2\2\2\u01a5\u01a7\5&\24\2\u01a6"+ - "\u01a1\3\2\2\2\u01a7\u01aa\3\2\2\2\u01a8\u01a6\3\2\2\2\u01a8\u01a9\3\2"+ - "\2\2\u01a9\65\3\2\2\2\u01aa\u01a8\3\2\2\2\u01ab\u01ad\7C\2\2\u01ac\u01ae"+ - "\5&\24\2\u01ad\u01ac\3\2\2\2\u01ad\u01ae\3\2\2\2\u01ae\67\3\2\2\2\u01af"+ - "\u01b0\7D\2\2\u01b09\3\2\2\2\u01b1\u01b2\7E\2\2\u01b2;\3\2\2\2\u01b3\u01b4"+ - "\7t\2\2\u01b4=\3\2\2\2\u01b5\u01ba\7t\2\2\u01b6\u01b7\7F\2\2\u01b7\u01b9"+ - "\7t\2\2\u01b8\u01b6\3\2\2\2\u01b9\u01bc\3\2\2\2\u01ba\u01b8\3\2\2\2\u01ba"+ - "\u01bb\3\2\2\2\u01bb?\3\2\2\2\u01bc\u01ba\3\2\2\2\u01bd\u01be\t\f\2\2"+ - "\u01beA\3\2\2\2\u01bf\u01c0\t\r\2\2\u01c0C\3\2\2\2\u01c1\u01c2\t\16\2"+ - "\2\u01c2E\3\2\2\2\u01c3\u01c5\t\17\2\2\u01c4\u01c6\5H%\2\u01c5\u01c4\3"+ - "\2\2\2\u01c5\u01c6\3\2\2\2\u01c6G\3\2\2\2\u01c7\u01c8\7Q\2\2\u01c8I\3"+ - "\2\2\2\u01c9\u01ca\t\20\2\2\u01caK\3\2\2\2\u01cb\u01cd\7\32\2\2\u01cc"+ - "\u01ce\7s\2\2\u01cd\u01cc\3\2\2\2\u01cd\u01ce\3\2\2\2\u01ce\u01cf\3\2"+ - "\2\2\u01cf\u01d7\5&\24\2\u01d0\u01d2\7\20\2\2\u01d1\u01d3\7s\2\2\u01d2"+ - "\u01d1\3\2\2\2\u01d2\u01d3\3\2\2\2\u01d3\u01d4\3\2\2\2\u01d4\u01d6\5&"+ - "\24\2\u01d5\u01d0\3\2\2\2\u01d6\u01d9\3\2\2\2\u01d7\u01d5\3\2\2\2\u01d7"+ - "\u01d8\3\2\2\2\u01d8\u01db\3\2\2\2\u01d9\u01d7\3\2\2\2\u01da\u01dc\7s"+ - "\2\2\u01db\u01da\3\2\2\2\u01db\u01dc\3\2\2\2\u01dc\u01dd\3\2\2\2\u01dd"+ - "\u01de\7\33\2\2\u01deM\3\2\2\2\u01df\u01e0\7z\2\2\u01e0O\3\2\2\2\u01e1"+ - "\u01e2\7|\2\2\u01e2Q\3\2\2\2\u01e3\u01e4\7y\2\2\u01e4S\3\2\2\2\u01e5\u01ec"+ - "\5F$\2\u01e6\u01ec\5J&\2\u01e7\u01ec\5L\'\2\u01e8\u01ec\5N(\2\u01e9\u01ec"+ - "\5P)\2\u01ea\u01ec\5R*\2\u01eb\u01e5\3\2\2\2\u01eb\u01e6\3\2\2\2\u01eb"+ - "\u01e7\3\2\2\2\u01eb\u01e8\3\2\2\2\u01eb\u01e9\3\2\2\2\u01eb\u01ea\3\2"+ - "\2\2\u01ecU\3\2\2\2\u01ed\u01ee\7T\2\2\u01ee\u01ef\7{\2\2\u01efW\3\2\2"+ - "\2\u01f0\u01f1\7U\2\2\u01f1\u01f2\5<\37\2\u01f2\u01f4\7?\2\2\u01f3\u01f5"+ - "\5^\60\2\u01f4\u01f3\3\2\2\2\u01f4\u01f5\3\2\2\2\u01f5\u01f6\3\2\2\2\u01f6"+ - "\u01f8\7@\2\2\u01f7\u01f9\5Z.\2\u01f8\u01f7\3\2\2\2\u01f8\u01f9\3\2\2"+ - "\2\u01f9\u01fa\3\2\2\2\u01fa\u01fb\5\\/\2\u01fb\u01fc\7s\2\2\u01fcY\3"+ - "\2\2\2\u01fd\u01fe\7V\2\2\u01fe\u01ff\5`\61\2\u01ff[\3\2\2\2\u0200\u0201"+ - "\7W\2\2\u0201\u0206\7s\2\2\u0202\u0205\5\b\5\2\u0203\u0205\7s\2\2\u0204"+ - "\u0202\3\2\2\2\u0204\u0203\3\2\2\2\u0205\u0208\3\2\2\2\u0206\u0204\3\2"+ - "\2\2\u0206\u0207\3\2\2\2\u0207\u0209\3\2\2\2\u0208\u0206\3\2\2\2\u0209"+ - "\u020a\7X\2\2\u020a]\3\2\2\2\u020b\u0213\5\22\n\2\u020c\u020e\7\20\2\2"+ - "\u020d\u020f\7s\2\2\u020e\u020d\3\2\2\2\u020e\u020f\3\2\2\2\u020f\u0210"+ - "\3\2\2\2\u0210\u0212\5\22\n\2\u0211\u020c\3\2\2\2\u0212\u0215\3\2\2\2"+ - "\u0213\u0211\3\2\2\2\u0213\u0214\3\2\2\2\u0214_\3\2\2\2\u0215\u0213\3"+ - "\2\2\2\u0216\u021e\5\32\16\2\u0217\u0219\7\20\2\2\u0218\u021a\7s\2\2\u0219"+ - "\u0218\3\2\2\2\u0219\u021a\3\2\2\2\u021a\u021b\3\2\2\2\u021b\u021d\5\32"+ - "\16\2\u021c\u0217\3\2\2\2\u021d\u0220\3\2\2\2\u021e\u021c\3\2\2\2\u021e"+ - "\u021f\3\2\2\2\u021fa\3\2\2\2\u0220\u021e\3\2\2\2\u0221\u0222\7Y\2\2\u0222"+ - "\u0223\5<\37\2\u0223\u0225\7?\2\2\u0224\u0226\5f\64\2\u0225\u0224\3\2"+ - "\2\2\u0225\u0226\3\2\2\2\u0226\u0227\3\2\2\2\u0227\u0229\7@\2\2\u0228"+ - "\u022a\7s\2\2\u0229\u0228\3\2\2\2\u0229\u022a\3\2\2\2\u022a\u022c\3\2"+ - "\2\2\u022b\u022d\5j\66\2\u022c\u022b\3\2\2\2\u022c\u022d\3\2\2\2\u022d"+ - "\u022f\3\2\2\2\u022e\u0230\5n8\2\u022f\u022e\3\2\2\2\u022f\u0230\3\2\2"+ - "\2\u0230\u0233\3\2\2\2\u0231\u0234\5d\63\2\u0232\u0234\5\\/\2\u0233\u0231"+ - "\3\2\2\2\u0233\u0232\3\2\2\2\u0234c\3\2\2\2\u0235\u0236\7\21\2\2\u0236"+ - "\u0237\5F$\2\u0237e\3\2\2\2\u0238\u0240\5h\65\2\u0239\u023b\7\20\2\2\u023a"+ - "\u023c\7s\2\2\u023b\u023a\3\2\2\2\u023b\u023c\3\2\2\2\u023c\u023d\3\2"+ - "\2\2\u023d\u023f\5h\65\2\u023e\u0239\3\2\2\2\u023f\u0242\3\2\2\2\u0240"+ - "\u023e\3\2\2\2\u0240\u0241\3\2\2\2\u0241g\3\2\2\2\u0242\u0240\3\2\2\2"+ - "\u0243\u0244\5\22\n\2\u0244\u0248\7B\2\2\u0245\u0249\5B\"\2\u0246\u0249"+ - "\5D#\2\u0247\u0249\7Z\2\2\u0248\u0245\3\2\2\2\u0248\u0246\3\2\2\2\u0248"+ - "\u0247\3\2\2\2\u0249i\3\2\2\2\u024a\u024b\7[\2\2\u024b\u024d\7?\2\2\u024c"+ - "\u024e\5l\67\2\u024d\u024c\3\2\2\2\u024d\u024e\3\2\2\2\u024e\u024f\3\2"+ - "\2\2\u024f\u0250\7@\2\2\u0250k\3\2\2\2\u0251\u0256\5@!\2\u0252\u0253\7"+ - "\20\2\2\u0253\u0255\5@!\2\u0254\u0252\3\2\2\2\u0255\u0258\3\2\2\2\u0256"+ - "\u0254\3\2\2\2\u0256\u0257\3\2\2\2\u0257m\3\2\2\2\u0258\u0256\3\2\2\2"+ - "\u0259\u025a\7V\2\2\u025a\u0262\5p9\2\u025b\u025d\7\20\2\2\u025c\u025e"+ - "\7s\2\2\u025d\u025c\3\2\2\2\u025d\u025e\3\2\2\2\u025e\u025f\3\2\2\2\u025f"+ - "\u0261\5p9\2\u0260\u025b\3\2\2\2\u0261\u0264\3\2\2\2\u0262\u0260\3\2\2"+ - "\2\u0262\u0263\3\2\2\2\u0263o\3\2\2\2\u0264\u0262\3\2\2\2\u0265\u0266"+ - "\5\32\16\2\u0266\u026a\7B\2\2\u0267\u026b\5B\"\2\u0268\u026b\5D#\2\u0269"+ - "\u026b\7Z\2\2\u026a\u0267\3\2\2\2\u026a\u0268\3\2\2\2\u026a\u0269\3\2"+ - "\2\2\u026bq\3\2\2\2\u026c\u026d\7\\\2\2\u026d\u026f\5&\24\2\u026e\u0270"+ - "\7s\2\2\u026f\u026e\3\2\2\2\u026f\u0270\3\2\2\2\u0270\u0273\3\2\2\2\u0271"+ - "\u0274\5\b\5\2\u0272\u0274\5\\/\2\u0273\u0271\3\2\2\2\u0273\u0272\3\2"+ - "\2\2\u0274\u0276\3\2\2\2\u0275\u0277\7s\2\2\u0276\u0275\3\2\2\2\u0276"+ - "\u0277\3\2\2\2\u0277\u0279\3\2\2\2\u0278\u027a\5t;\2\u0279\u0278\3\2\2"+ - "\2\u0279\u027a\3\2\2\2\u027as\3\2\2\2\u027b\u027d\7]\2\2\u027c\u027e\7"+ - "s\2\2\u027d\u027c\3\2\2\2\u027d\u027e\3\2\2\2\u027e\u0281\3\2\2\2\u027f"+ - "\u0282\5\b\5\2\u0280\u0282\5\\/\2\u0281\u027f\3\2\2\2\u0281\u0280\3\2"+ - "\2\2\u0282u\3\2\2\2\u0283\u0285\5x=\2\u0284\u0286\7s\2\2\u0285\u0284\3"+ - "\2\2\2\u0285\u0286\3\2\2\2\u0286\u0289\3\2\2\2\u0287\u028a\5\b\5\2\u0288"+ - "\u028a\5\\/\2\u0289\u0287\3\2\2\2\u0289\u0288\3\2\2\2\u028a\u028c\3\2"+ - "\2\2\u028b\u028d\7s\2\2\u028c\u028b\3\2\2\2\u028c\u028d\3\2\2\2\u028d"+ - "\u028f\3\2\2\2\u028e\u0290\5t;\2\u028f\u028e\3\2\2\2\u028f\u0290\3\2\2"+ - "\2\u0290\u0291\3\2\2\2\u0291\u0292\7s\2\2\u0292w\3\2\2\2\u0293\u0294\t"+ - "\21\2\2\u0294y\3\2\2\2\u0295\u0297\7j\2\2\u0296\u0298\5\32\16\2\u0297"+ - "\u0296\3\2\2\2\u0297\u0298\3\2\2\2\u0298\u029a\3\2\2\2\u0299\u029b\7}"+ - "\2\2\u029a\u0299\3\2\2\2\u029a\u029b\3\2\2\2\u029b\u029e\3\2\2\2\u029c"+ - "\u029f\5@!\2\u029d\u029f\5<\37\2\u029e\u029c\3\2\2\2\u029e\u029d\3\2\2"+ - "\2\u029f\u02a0\3\2\2\2\u02a0\u02a1\7k\2\2\u02a1\u02a3\5&\24\2\u02a2\u02a4"+ - "\7s\2\2\u02a3\u02a2\3\2\2\2\u02a3\u02a4\3\2\2\2\u02a4\u02a7\3\2\2\2\u02a5"+ - "\u02a8\5\b\5\2\u02a6\u02a8\5\\/\2\u02a7\u02a5\3\2\2\2\u02a7\u02a6\3\2"+ - "\2\2\u02a8{\3\2\2\2\u02a9\u02aa\7l\2\2\u02aa\u02ac\5&\24\2\u02ab\u02ad"+ - "\7s\2\2\u02ac\u02ab\3\2\2\2\u02ac\u02ad\3\2\2\2\u02ad\u02b0\3\2\2\2\u02ae"+ - "\u02b1\5\b\5\2\u02af\u02b1\5\\/\2\u02b0\u02ae\3\2\2\2\u02b0\u02af\3\2"+ - "\2\2\u02b1}\3\2\2\2\u02b2\u02b5\7m\2\2\u02b3\u02b6\5\b\5\2\u02b4\u02b6"+ - "\5\\/\2\u02b5\u02b3\3\2\2\2\u02b5\u02b4\3\2\2\2\u02b6\u02b8\3\2\2\2\u02b7"+ - "\u02b9\7s\2\2\u02b8\u02b7\3\2\2\2\u02b8\u02b9\3\2\2\2\u02b9\u02ba\3\2"+ - "\2\2\u02ba\u02bb\7n\2\2\u02bb\u02bc\5&\24\2\u02bc\177\3\2\2\2\u02bd\u02be"+ - "\7o\2\2\u02be\u02bf\5&\24\2\u02bf\u02c0\7W\2\2\u02c0\u02c5\7s\2\2\u02c1"+ - "\u02c4\5\u0082B\2\u02c2\u02c4\7s\2\2\u02c3\u02c1\3\2\2\2\u02c3\u02c2\3"+ - "\2\2\2\u02c4\u02c7\3\2\2\2\u02c5\u02c3\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6"+ - "\u02c8\3\2\2\2\u02c7\u02c5\3\2\2\2\u02c8\u02ca\7X\2\2\u02c9\u02cb\7s\2"+ - "\2\u02ca\u02c9\3\2\2\2\u02ca\u02cb\3\2\2\2\u02cb\u0081\3\2\2\2\u02cc\u02cf"+ - "\5\64\33\2\u02cd\u02cf\7]\2\2\u02ce\u02cc\3\2\2\2\u02ce\u02cd\3\2\2\2"+ - "\u02cf\u02d0\3\2\2\2\u02d0\u02d3\7V\2\2\u02d1\u02d4\5\b\5\2\u02d2\u02d4"+ - "\5\\/\2\u02d3\u02d1\3\2\2\2\u02d3\u02d2\3\2\2\2\u02d4\u0083\3\2\2\2d\u0086"+ - "\u0088\u008f\u0094\u00b0\u00b8\u00bc\u00c3\u00c6\u00cb\u00cf\u00d3\u00f3"+ - "\u0108\u010c\u0110\u0115\u0119\u011e\u0122\u0127\u012b\u0130\u0134\u0139"+ - "\u013d\u0142\u0146\u014b\u014f\u0154\u0158\u015d\u0161\u0166\u016a\u016f"+ - "\u0173\u017b\u017f\u0181\u0195\u019c\u01a3\u01a8\u01ad\u01ba\u01c5\u01cd"+ - "\u01d2\u01d7\u01db\u01eb\u01f4\u01f8\u0204\u0206\u020e\u0213\u0219\u021e"+ - "\u0225\u0229\u022c\u022f\u0233\u023b\u0240\u0248\u024d\u0256\u025d\u0262"+ - "\u026a\u026f\u0273\u0276\u0279\u027d\u0281\u0285\u0289\u028c\u028f\u0297"+ - "\u029a\u029e\u02a3\u02a7\u02ac\u02b0\u02b5\u02b8\u02c3\u02c5\u02ca\u02ce"+ - "\u02d3"; - 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