diff --git a/docs/source/syntaxreference.rst b/docs/source/syntaxreference.rst index c1b42b61c..7530466cc 100644 --- a/docs/source/syntaxreference.rst +++ b/docs/source/syntaxreference.rst @@ -248,6 +248,18 @@ type identifier type storage size example var declara =============== ======================= ================= ========================================= +**hexadecimal numbers:** you can use a dollar prefix to write hexadecimal numbers: ``$20ac`` + +**binary numbers:** you can use a percent prefix to write binary numbers: ``%10010011`` + +**``byte`` versus ``word`` values:** + +- When an integer value ranges from 0..255 the compiler sees it as a ``byte``. +- When an integer value ranges from 256..65535 the compiler sees it as a ``word``. +- When a hex number has 3 or 4 digits, for example ``$0004``, it is seen as a ``word`` otherwise as a ``byte``. +- When a binary number has 9 to 16 digits, for example ``%1100110011``, it is seen as a ``word`` otherwise as a ``byte``. +- You can force a byte value into a word value by adding the ``.w`` datatype suffix to the number: ``$2a.w`` is equivalent to ``$002a``. + **@todo pointers/addresses? (as opposed to normal WORDs)** **@todo signed integers (byte and word)?** diff --git a/il65/antlr/il65.g4 b/il65/antlr/il65.g4 index fcedcb1ee..068a2578e 100644 --- a/il65/antlr/il65.g4 +++ b/il65/antlr/il65.g4 @@ -1,10 +1,10 @@ /* -IL65 combined lexer bitand parser grammar +IL65 combined lexer and parser grammar NOTES: - whitespace is ignored. (tabs/spaces) -- every position can be empty, be a comment, bitor contain ONE statement. +- every position can be empty, be a comment, or contain ONE statement. */ @@ -155,7 +155,9 @@ register : 'A' | 'X' | 'Y' | 'AX' | 'AY' | 'XY' ; statusflag : 'Pc' | 'Pz' | 'Pn' | 'Pv' ; -integerliteral : DEC_INTEGER | HEX_INTEGER | BIN_INTEGER ; +integerliteral : intpart=(DEC_INTEGER | HEX_INTEGER | BIN_INTEGER) wordsuffix? ; + +wordsuffix : '.w' ; booleanliteral : 'true' | 'false' ; diff --git a/il65/examples/test.ill b/il65/examples/test.ill index 4685d6cc3..567060a86 100644 --- a/il65/examples/test.ill +++ b/il65/examples/test.ill @@ -9,8 +9,8 @@ byte [2,3] matrix1 = 2 byte [2,3] matrix2 = [1,2,3,4,5,6] - const byte [100] carray1 = 0 - const word [100] carray2 = 1 + const byte [100] carray1 = 2 + const word [100] carray2 = 1.w const byte [2,3] cmatrix1 = [1,2,3,4,5,255] @@ -30,7 +30,13 @@ const word len1 = len([1,2,3,wa1, wa2, ws1, all1]) const word wa1 = ceil(abs(-999.22)) + const byte wa1b = abs(99) + const byte wa1c = -(1-99) + const byte wa1d = -0 const byte wa2 = abs(-99) + const byte wa2b= abs(-99.w) + const byte wa2c = abs(-99) + const word wa2d = abs(-999) const float wa3 = abs(-1.23456) const float wa4 = abs(-133) const float avg1 = avg([-1.23456, 99999]) @@ -44,7 +50,7 @@ const word all2 = all([0.0]) const word all3 = all([wa1, wa2, ws1, all1]) - const word max1 = max([-1,-2,3,99+22]) + const word max1 = max([-1,-2,3.33,99+22]) const word min1 = min([1,2,3,99+22]) word dinges = round(not_main.len1) @@ -154,12 +160,21 @@ sub start () -> () { word dinges = 0 - word blerp1 =99 + word blerp1 =999 + word blerp3 = 1 byte blerp2 =99 dinges=blerp1 A=blerp1 ; @todo error can't assign word to byte + A=blerp3 ; @todo error can't assign word to byte + blerp2=blerp3; @todo error can't assign word to byte + blerp3 = blerp2 A=blerp2 - A=9999 + A=$02 + A=$002 + A=$00ff + A=%11001100 + A=%0010011001 + A=99.w XY=blerp1 X=blerp1 ; @todo error can't assign word to byte X=blerp2 diff --git a/il65/src/il65/Main.kt b/il65/src/il65/Main.kt index 186b7bbef..16b4b5d2a 100644 --- a/il65/src/il65/Main.kt +++ b/il65/src/il65/Main.kt @@ -15,7 +15,7 @@ fun main(args: Array) { println("\nIL65 compiler by Irmen de Jong (irmen@razorvine.net)") println("This software is licensed under the GNU GPL 3.0, see https://www.gnu.org/licenses/gpl.html\n") - // import main module bitand process additional imports + // import main module and process additional imports if(args.size != 1) { System.err.println("module filename argument missing") @@ -46,7 +46,7 @@ fun main(args: Array) { ) - // perform syntax checks bitand optimizations + // perform syntax checks and optimizations moduleAst.checkIdentifiers() moduleAst.optimizeExpressions(globalNameSpaceBeforeOptimization) moduleAst.checkValid(globalNameSpaceBeforeOptimization, compilerOptions) // check if tree is valid @@ -59,7 +59,7 @@ fun main(args: Array) { // globalNamespaceAfterOptimize.debugPrint() - // compile the syntax tree into stackvmProg form, bitand optimize that + // compile the syntax tree into stackvmProg form, and optimize that val compiler = Compiler(compilerOptions) val intermediate = compiler.compile(moduleAst) intermediate.optimize() diff --git a/il65/src/il65/ast/AST.kt b/il65/src/il65/ast/AST.kt index 137661fb0..d508d7ae9 100644 --- a/il65/src/il65/ast/AST.kt +++ b/il65/src/il65/ast/AST.kt @@ -5,6 +5,7 @@ import il65.parser.il65Parser import org.antlr.v4.runtime.ParserRuleContext import org.antlr.v4.runtime.tree.TerminalNode import java.nio.file.Paths +import kotlin.math.floor /**************************** AST Data classes ****************************/ @@ -86,7 +87,7 @@ data class Position(val file: String, val line: Int, val startCol: Int, val endC interface IAstProcessor { fun process(module: Module) { - module.statements = module.statements.map { it.process(this) }.toMutableList() + module.statements = module.statements.asSequence().map { it.process(this) }.toMutableList() } fun process(expr: PrefixExpression): IExpression { @@ -105,7 +106,7 @@ interface IAstProcessor { } fun process(block: Block): IStatement { - block.statements = block.statements.map { it.process(this) }.toMutableList() + block.statements = block.statements.asSequence().map { it.process(this) }.toMutableList() return block } @@ -116,7 +117,7 @@ interface IAstProcessor { } fun process(subroutine: Subroutine): IStatement { - subroutine.statements = subroutine.statements.map { it.process(this) }.toMutableList() + subroutine.statements = subroutine.statements.asSequence().map { it.process(this) }.toMutableList() return subroutine } @@ -197,7 +198,7 @@ interface Node { } -// find the parent node of a specific type bitor interface +// find the parent node of a specific type or interface // (useful to figure out in what namespace/block something is defined, etc) inline fun findParentNode(node: Node): T? { var candidate = node.parent @@ -243,9 +244,9 @@ interface INameScope { fun registerUsedName(name: String) - fun subScopes() = statements.filter { it is INameScope } .map { it as INameScope }.associate { it.name to it } + fun subScopes() = statements.asSequence().filter { it is INameScope }.map { it as INameScope }.associate { it.name to it } - fun labelsAndVariables() = statements.filter { it is Label || it is VarDecl } + fun labelsAndVariables() = statements.asSequence().filter { it is Label || it is VarDecl } .associate {((it as? Label)?.name ?: (it as? VarDecl)?.name) to it } fun lookup(scopedName: List, statement: Node) : IStatement? { @@ -302,7 +303,7 @@ interface INameScope { /** * Inserted into the Ast in place of modified nodes (not inserted directly as a parser result) - * It can hold zero bitor more replacement statements that have to be inserted at that point. + * It can hold zero or more replacement statements that have to be inserted at that point. */ class AnonymousStatementList(override var parent: Node, var statements: List) : IStatement { override var position: Position? = null @@ -371,7 +372,7 @@ private class GlobalNamespace(override val name: String, override var statements: MutableList, override val position: Position?) : INameScope { - private val scopedNamesUsed: MutableSet = mutableSetOf("main", "main.start") // main bitand main.start are always used + private val scopedNamesUsed: MutableSet = mutableSetOf("main", "main.start") // main and main.start are always used override fun usedNames(): Set = scopedNamesUsed @@ -548,16 +549,16 @@ class VarDecl(val type: VarDeclType, } DataType.ARRAY -> { val aX = arrayspec?.x as? LiteralValue ?: throw ExpressionError("need constant value expression for arrayspec", position) - aX.intvalue!! + aX.asIntegerValue!! } DataType.ARRAY_W -> { val aX = arrayspec?.x as? LiteralValue ?: throw ExpressionError("need constant value expression for arrayspec", position) - 2*aX.intvalue!! + 2*aX.asIntegerValue!! } DataType.MATRIX -> { val aX = arrayspec?.x as? LiteralValue ?: throw ExpressionError("need constant value expression for arrayspec", position) val aY = arrayspec.y as? LiteralValue ?: throw ExpressionError("need constant value expression for arrayspec", position) - aX.intvalue!! * aY.intvalue!! + aX.asIntegerValue!! * aY.asIntegerValue!! } } @@ -576,7 +577,7 @@ class VarDecl(val type: VarDeclType, else -> when (declaredDatatype) { DataType.BYTE -> DataType.ARRAY DataType.WORD -> DataType.ARRAY_W - else -> throw SyntaxError("array can only contain bytes bitor words", position) + else -> throw SyntaxError("array can only contain bytes or words", position) } } } @@ -666,7 +667,13 @@ class BinaryExpression(var left: IExpression, val operator: String, var right: I override fun referencesIdentifier(name: String) = left.referencesIdentifier(name) || right.referencesIdentifier(name) } -data class LiteralValue(val intvalue: Int? = null, +private data class ByteOrWordLiteral(val intvalue: Int, val datatype: DataType) { + fun asWord() = ByteOrWordLiteral(intvalue, DataType.WORD) + fun asByte() = ByteOrWordLiteral(intvalue, DataType.BYTE) +} + +data class LiteralValue(val bytevalue: Short? = null, + val wordvalue: Int? = null, val floatvalue: Double? = null, val strvalue: String? = null, val arrayvalue: MutableList? = null) : IExpression { @@ -674,21 +681,52 @@ data class LiteralValue(val intvalue: Int? = null, override lateinit var parent: Node override fun referencesIdentifier(name: String) = arrayvalue?.any { it.referencesIdentifier(name) } ?: false - val isInteger = intvalue!=null + companion object { + fun optimalNumeric(value: Number): LiteralValue { + val floatval = value.toDouble() + return if(floatval == floor(floatval) && floatval in -32768..65535) { + // the floating point value is actually an integer. + when (floatval) { + // note: we cheat a little here and allow negative integers during expression evaluations + in -128..255 -> LiteralValue(bytevalue = floatval.toShort()) + in -32768..65535 -> LiteralValue(wordvalue = floatval.toInt()) + else -> throw FatalAstException("integer overflow: $floatval") + } + } else { + LiteralValue(floatvalue = floatval) + } + } + } + + val isByte = bytevalue!=null + val isWord = wordvalue!=null + val isInteger = isByte or isWord val isFloat = floatvalue!=null - val isNumeric = intvalue!=null || floatvalue!=null - val isArray = arrayvalue!=null + val isArray = arrayvalue!=null // @todo: array / word-array / matrix ? val isString = strvalue!=null + init { + if(bytevalue==null && wordvalue==null && floatvalue==null && arrayvalue==null && strvalue==null) + throw FatalAstException("literal value without actual value") + } + val asNumericValue: Number? = when { - intvalue!=null -> intvalue + bytevalue!=null -> bytevalue + wordvalue!=null -> wordvalue floatvalue!=null -> floatvalue else -> null } + val asIntegerValue: Int? = when { + bytevalue!=null -> bytevalue.toInt() + wordvalue!=null -> wordvalue + else -> null + } + val asBooleanValue: Boolean = (floatvalue!=null && floatvalue != 0.0) || - (intvalue!=null && intvalue != 0) || + (bytevalue!=null && bytevalue != 0.toShort()) || + (wordvalue!=null && wordvalue != 0) || (strvalue!=null && strvalue.isNotEmpty()) || (arrayvalue != null && arrayvalue.isNotEmpty()) @@ -701,7 +739,7 @@ data class LiteralValue(val intvalue: Int? = null, override fun process(processor: IAstProcessor) = processor.process(this) override fun toString(): String { - return "LiteralValue(int=$intvalue, float=$floatvalue, str=$strvalue, array=$arrayvalue pos=$position)" + return "LiteralValue(byte=$bytevalue, word=$wordvalue, float=$floatvalue, str=$strvalue, array=$arrayvalue pos=$position)" } } @@ -816,7 +854,7 @@ class FunctionCall(override var target: IdentifierReference, override var arglis } override fun constValue(namespace: INameScope): LiteralValue? { - // if the function is a built-in function bitand the args are consts, should try to const-evaluate! + // if the function is a built-in function and the args are consts, should try to const-evaluate! if(target.nameInSource.size>1) return null try { return when (target.nameInSource[0]) { @@ -988,7 +1026,7 @@ class BranchStatement(var condition: BranchCondition, /***************** Antlr Extension methods to create AST ****************/ fun il65Parser.ModuleContext.toAst(name: String, withPosition: Boolean) : Module { - val module = Module(name, modulestatement().map { it.toAst(withPosition) }.toMutableList()) + val module = Module(name, modulestatement().asSequence().map { it.toAst(withPosition) }.toMutableList()) module.position = toPosition(withPosition) return module } @@ -1019,7 +1057,7 @@ private fun il65Parser.ModulestatementContext.toAst(withPosition: Boolean) : ISt private fun il65Parser.BlockContext.toAst(withPosition: Boolean) : IStatement { val block= Block(identifier().text, - integerliteral()?.toAst(), + integerliteral()?.toAst()?.intvalue, statement_block().toAst(withPosition)) block.position = toPosition(withPosition) return block @@ -1027,7 +1065,7 @@ private fun il65Parser.BlockContext.toAst(withPosition: Boolean) : IStatement { private fun il65Parser.Statement_blockContext.toAst(withPosition: Boolean): MutableList - = statement().map { it.toAst(withPosition) }.toMutableList() + = statement().asSequence().map { it.toAst(withPosition) }.toMutableList() private fun il65Parser.StatementContext.toAst(withPosition: Boolean) : IStatement { @@ -1164,7 +1202,7 @@ private fun il65Parser.ReturnstmtContext.toAst(withPosition: Boolean) : IStateme private fun il65Parser.UnconditionaljumpContext.toAst(withPosition: Boolean): IStatement { - val address = integerliteral()?.toAst() + val address = integerliteral()?.toAst()?.intvalue val identifier = if(identifier()!=null) identifier()?.toAst(withPosition) else scoped_identifier()?.toAst(withPosition) @@ -1186,7 +1224,7 @@ private fun il65Parser.SubroutineContext.toAst(withPosition: Boolean) : Subrouti val sub = Subroutine(identifier().text, if(sub_params()==null) emptyList() else sub_params().toAst(), if(sub_returns()==null) emptyList() else sub_returns().toAst(), - sub_address()?.integerliteral()?.toAst(), + sub_address()?.integerliteral()?.toAst()?.intvalue, if(statement_block()==null) mutableListOf() else statement_block().toAst(withPosition)) sub.position = toPosition(withPosition) return sub @@ -1244,18 +1282,39 @@ private fun il65Parser.DirectiveContext.toAst(withPosition: Boolean) : Directive private fun il65Parser.DirectiveargContext.toAst(withPosition: Boolean) : DirectiveArg { val darg = DirectiveArg(stringliteral()?.text, identifier()?.text, - integerliteral()?.toAst()) + integerliteral()?.toAst()?.intvalue) darg.position = toPosition(withPosition) return darg } -private fun il65Parser.IntegerliteralContext.toAst(): Int { +private fun il65Parser.IntegerliteralContext.toAst(): ByteOrWordLiteral { + fun makeLiteral(text: String, radix: Int, forceWord: Boolean): ByteOrWordLiteral { + val integer: Int + var datatype = DataType.BYTE + if(radix==10) { + integer = text.toInt() + if(integer in 256..65535) + datatype = DataType.WORD + } else if(radix==2) { + if(text.length>8) + datatype = DataType.WORD + integer = text.toInt(2) + } else if(radix==16) { + if(text.length>2) + datatype = DataType.WORD + integer = text.toInt(16) + } else { + throw FatalAstException("invalid radix") + } + return ByteOrWordLiteral(integer, if(forceWord) DataType.WORD else datatype) + } val terminal: TerminalNode = children[0] as TerminalNode + val integerPart = this.intpart.text return when (terminal.symbol.type) { - il65Parser.DEC_INTEGER -> text.toInt() - il65Parser.HEX_INTEGER -> text.substring(1).toInt(16) - il65Parser.BIN_INTEGER -> text.substring(1).toInt(2) + il65Parser.DEC_INTEGER -> makeLiteral(integerPart, 10, wordsuffix()!=null) + il65Parser.HEX_INTEGER -> makeLiteral(integerPart.substring(1), 16, wordsuffix()!=null) + il65Parser.BIN_INTEGER -> makeLiteral(integerPart.substring(1), 2, wordsuffix()!=null) else -> throw FatalAstException(terminal.text) } } @@ -1268,12 +1327,22 @@ private fun il65Parser.ExpressionContext.toAst(withPosition: Boolean) : IExpress val booleanlit = litval.booleanliteral()?.toAst() val value = if(booleanlit!=null) - LiteralValue(intvalue = if(booleanlit) 1 else 0) - else - LiteralValue(litval.integerliteral()?.toAst(), - litval.floatliteral()?.toAst(), - litval.stringliteral()?.text, - litval.arrayliteral()?.toAst(withPosition)) + LiteralValue(bytevalue = if(booleanlit) 1 else 0) + else { + val intLit = litval.integerliteral()?.toAst() + if(intLit!=null) { + when(intLit.datatype) { + DataType.BYTE -> LiteralValue(bytevalue = intLit.intvalue.toShort()) + DataType.WORD -> LiteralValue(wordvalue = intLit.intvalue) + else -> throw FatalAstException("invalid datatype for integer literal") + } + } else { + LiteralValue(null, null, + litval.floatliteral()?.toAst(), + litval.stringliteral()?.text, + litval.arrayliteral()?.toAst(withPosition)) + } + } value.position = litval.toPosition(withPosition) return value } @@ -1349,7 +1418,7 @@ private fun il65Parser.BooleanliteralContext.toAst() = when(text) { private fun il65Parser.ArrayliteralContext.toAst(withPosition: Boolean) = - expression().map { it.toAst(withPosition) }.toMutableList() + expression().asSequence().map { it.toAst(withPosition) }.toMutableList() private fun il65Parser.If_stmtContext.toAst(withPosition: Boolean): IfStatement { diff --git a/il65/src/il65/ast/AstChecker.kt b/il65/src/il65/ast/AstChecker.kt index 7342d1d4f..ca3e0b9a7 100644 --- a/il65/src/il65/ast/AstChecker.kt +++ b/il65/src/il65/ast/AstChecker.kt @@ -34,7 +34,7 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: override fun process(module: Module) { super.process(module) - val directives = module.statements.filter { it is Directive }.groupBy { (it as Directive).directive } + val directives = module.statements.asSequence().filter { it is Directive }.groupBy { (it as Directive).directive } directives.filter { it.value.size > 1 }.forEach{ entry -> when(entry.key) { "%output", "%launcher", "%zeropage", "%address" -> @@ -88,31 +88,32 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: if(BuiltinFunctionNames.contains(subroutine.name)) err("cannot redefine a built-in function") - val uniqueNames = subroutine.parameters.map { it.name }.toSet() + val uniqueNames = subroutine.parameters.asSequence().map { it.name }.toSet() if(uniqueNames.size!=subroutine.parameters.size) err("parameter names should be unique") - val uniqueParamRegs = subroutine.parameters.map {it.register}.toSet() + val uniqueParamRegs = subroutine.parameters.asSequence().map {it.register}.toSet() if(uniqueParamRegs.size!=subroutine.parameters.size) err("parameter registers should be unique") - val uniqueResultRegisters = subroutine.returnvalues.filter{it.register!=null}.map {it.register.toString()}.toMutableSet() - uniqueResultRegisters.addAll(subroutine.returnvalues.filter{it.statusflag!=null}.map{it.statusflag.toString()}) + val uniqueResultRegisters = subroutine.returnvalues.asSequence().filter{it.register!=null}.map {it.register.toString()}.toMutableSet() + uniqueResultRegisters.addAll(subroutine.returnvalues.asSequence().filter{it.statusflag!=null}.map{it.statusflag.toString()}.toList()) if(uniqueResultRegisters.size!=subroutine.returnvalues.size) err("return registers should be unique") super.process(subroutine) checkSubroutinesPrecededByReturnOrJump(subroutine.statements) - // subroutine must contain at least one 'return' bitor 'goto' - // (bitor if it has an asm block, that must contain a 'rts' bitor 'jmp') + // subroutine must contain at least one 'return' or 'goto' + // (or if it has an asm block, that must contain a 'rts' or 'jmp') if(subroutine.statements.count { it is Return || it is Jump } == 0) { if(subroutine.address==null) { val amount = subroutine.statements + .asSequence() .filter { it is InlineAssembly } .map {(it as InlineAssembly).assembly} .count { it.contains(" rts") || it.contains("\trts") || it.contains(" jmp") || it.contains("\tjmp")} if(amount==0 ) - err("subroutine must have at least one 'return' bitor 'goto' in it (bitor 'rts' / 'jmp' in case of %asm)") + err("subroutine must have at least one 'return' or 'goto' in it (or 'rts' / 'jmp' in case of %asm)") } } @@ -128,7 +129,7 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: && preceding !is Subroutine && preceding !is VarDecl && preceding !is BuiltinFunctionStatementPlaceholder) { - checkResult.add(SyntaxError("subroutine definition should be preceded by a return, jump, vardecl, bitor another subroutine statement", stmt.position)) + checkResult.add(SyntaxError("subroutine definition should be preceded by a return, jump, vardecl, or another subroutine statement", stmt.position)) } } preceding = stmt @@ -136,7 +137,7 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: } /** - * Assignment target must be register, bitor a variable name + * Assignment target must be register, or a variable name * for constant-value assignments, check the datatype as well */ override fun process(assignment: Assignment): IStatement { @@ -149,7 +150,7 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: return super.process(assignment) } targetSymbol !is VarDecl -> { - checkResult.add(SyntaxError("assignment LHS must be register bitor variable", assignment.position)) + checkResult.add(SyntaxError("assignment LHS must be register or variable", assignment.position)) return super.process(assignment) } targetSymbol.type == VarDeclType.CONST -> { @@ -204,7 +205,7 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: err("value of memory var decl is not a literal (it is a ${decl.value!!::class.simpleName}).", decl.value?.position) } else { val value = decl.value as LiteralValue - if (value.intvalue == null || value.intvalue < 0 || value.intvalue > 65535) { + if (value.asIntegerValue == null || value.asIntegerValue< 0 || value.asIntegerValue > 65535) { err("memory address must be valid integer 0..\$ffff") } } @@ -238,12 +239,12 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: "%output" -> { if(directive.parent !is Module) err("this directive may only occur at module level") if(directive.args.size!=1 || directive.args[0].name != "raw" && directive.args[0].name != "prg") - err("invalid output directive type, expected raw bitor prg") + err("invalid output directive type, expected raw or prg") } "%launcher" -> { if(directive.parent !is Module) err("this directive may only occur at module level") if(directive.args.size!=1 || directive.args[0].name != "basic" && directive.args[0].name != "none") - err("invalid launcher directive type, expected basic bitor none") + err("invalid launcher directive type, expected basic or none") } "%zeropage" -> { if(directive.parent !is Module) err("this directive may only occur at module level") @@ -251,7 +252,7 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: directive.args[0].name != "basicsafe" && directive.args[0].name != "kernalsafe" && directive.args[0].name != "full") - err("invalid zp directive style, expected basicsafe, kernalsafe, bitor full") + err("invalid zp directive style, expected basicsafe, kernalsafe, or full") } "%address" -> { if(directive.parent !is Module) err("this directive may only occur at module level") @@ -298,6 +299,11 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: if(!compilerOptions.floats && literalValue.isFloat) { checkResult.add(SyntaxError("floating point value used, but floating point is not enabled via options", literalValue.position)) } + when { + literalValue.isByte -> checkValueTypeAndRange(DataType.BYTE, null, literalValue, literalValue.position) + literalValue.isWord -> checkValueTypeAndRange(DataType.WORD, null, literalValue, literalValue.position) + literalValue.isFloat -> checkValueTypeAndRange(DataType.FLOAT, null, literalValue, literalValue.position) + } return super.process(literalValue) } @@ -310,17 +316,17 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: val to = range.to.constValue(namespace) if(from!=null && to != null) { when { - from.intvalue!=null && to.intvalue!=null -> { - if(from.intvalue > to.intvalue) + from.asIntegerValue!=null && to.asIntegerValue!=null -> { + if(from.asIntegerValue > to.asIntegerValue) err("range from is larger than to value") } from.strvalue!=null && to.strvalue!=null -> { if(from.strvalue.length!=1 || to.strvalue.length!=1) - err("range from bitand to must be a single character") + err("range from and to must be a single character") if(from.strvalue[0] > to.strvalue[0]) err("range from is larger than to value") } - else -> err("range expression must be over integers bitor over characters") + else -> err("range expression must be over integers or over characters") } } return range @@ -352,9 +358,9 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: checkResult.add(SyntaxError("undefined symbol: ${targetName.joinToString(".")}", postIncrDecr.position)) } else { if(target !is VarDecl || target.type==VarDeclType.CONST) { - checkResult.add(SyntaxError("can only increment bitor decrement a variable", postIncrDecr.position)) + checkResult.add(SyntaxError("can only increment or decrement a variable", postIncrDecr.position)) } else if(target.datatype!=DataType.FLOAT && target.datatype!=DataType.WORD && target.datatype!=DataType.BYTE) { - checkResult.add(SyntaxError("can only increment bitor decrement a byte/float/word variable", postIncrDecr.position)) + checkResult.add(SyntaxError("can only increment or decrement a byte/float/word variable", postIncrDecr.position)) } } } @@ -365,7 +371,7 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: val targetStatement = target.targetStatement(namespace) if(targetStatement is Label || targetStatement is Subroutine || targetStatement is BuiltinFunctionStatementPlaceholder) return targetStatement - checkResult.add(SyntaxError("undefined function bitor subroutine: ${target.nameInSource.joinToString(".")}", statement.position)) + checkResult.add(SyntaxError("undefined function or subroutine: ${target.nameInSource.joinToString(".")}", statement.position)) return null } @@ -373,13 +379,13 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: if(call.target.nameInSource.size==1 && BuiltinFunctionNames.contains(call.target.nameInSource[0])) { val functionName = call.target.nameInSource[0] if(functionName=="P_carry" || functionName=="P_irqd") { - // these functions allow only 0 bitor 1 as argument + // these functions allow only 0 or 1 as argument if(call.arglist.size!=1 || call.arglist[0] !is LiteralValue) { - checkResult.add(SyntaxError("$functionName requires one argument, 0 bitor 1", position)) + checkResult.add(SyntaxError("$functionName requires one argument, 0 or 1", position)) } else { val value = call.arglist[0] as LiteralValue - if(value.intvalue==null || value.intvalue < 0 || value.intvalue > 1) { - checkResult.add(SyntaxError("$functionName requires one argument, 0 bitor 1", position)) + if(value.asIntegerValue==null || value.asIntegerValue < 0 || value.asIntegerValue > 1) { + checkResult.add(SyntaxError("$functionName requires one argument, 0 or 1", position)) } } } @@ -399,14 +405,18 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: return err("floating point value '$number' out of range for MFLPT format") } DataType.BYTE -> { - val number = value.intvalue - ?: return err("byte integer value expected") + val number = value.asIntegerValue ?: return if (value.floatvalue!=null) + err("unsigned byte integer value expected instead of float; possible loss of precision") + else + err("unsigned byte integer value expected") if (number < 0 || number > 255) return err("value '$number' out of range for unsigned byte") } DataType.WORD -> { - val number = value.intvalue - ?: return err("word integer value expected") + val number = value.asIntegerValue ?: return if (value.floatvalue!=null) + err("unsigned word integer value expected instead of float; possible loss of precision") + else + err("unsigned word integer value expected") if (number < 0 || number > 65535) return err("value '$number' out of range for unsigned word") } @@ -417,13 +427,13 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: return err("string length must be 1..65535") } DataType.ARRAY -> { - // value may be either a single byte, bitor a byte array + // value may be either a single byte, or a byte array if(value.isArray) { for (av in value.arrayvalue!!) { - val number = (av as LiteralValue).intvalue + val number = (av as LiteralValue).bytevalue ?: return err("array must be all bytes") - val expectedSize = arrayspec?.x?.constValue(namespace)?.intvalue + val expectedSize = arrayspec?.x?.constValue(namespace)?.asIntegerValue if (value.arrayvalue.size != expectedSize) return err("initializer array size mismatch (expecting $expectedSize, got ${value.arrayvalue.size})") @@ -431,20 +441,22 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: return err("value '$number' in byte array is out of range for unsigned byte") } } else { - val number = value.intvalue - ?: return err("byte integer value expected") + val number = value.bytevalue ?: return if (value.floatvalue!=null) + err("unsigned byte integer value expected instead of float; possible loss of precision") + else + err("unsigned byte integer value expected") if (number < 0 || number > 255) return err("value '$number' out of range for unsigned byte") } } DataType.ARRAY_W -> { - // value may be either a single word, bitor a word array + // value may be either a single word, or a word array if(value.isArray) { for (av in value.arrayvalue!!) { - val number = (av as LiteralValue).intvalue + val number = (av as LiteralValue).asIntegerValue // both byte and word are acceptable ?: return err("array must be all words") - val expectedSize = arrayspec!!.x.constValue(namespace)?.intvalue!! + val expectedSize = arrayspec!!.x.constValue(namespace)?.asIntegerValue if (value.arrayvalue.size != expectedSize) return err("initializer array size mismatch (expecting $expectedSize, got ${value.arrayvalue.size})") @@ -452,21 +464,24 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: return err("value '$number' in word array is out of range for unsigned word") } } else { - val number = value.intvalue - ?: return err("word integer value expected") + val number = value.asIntegerValue // both byte and word are acceptable + ?: return if (value.floatvalue!=null) + err("unsigned word integer value expected instead of float; possible loss of precision") + else + err("unsigned word integer value expected") if (number < 0 || number > 65535) return err("value '$number' out of range for unsigned word") } } DataType.MATRIX -> { - // value can only be a single byte, bitor a byte array (which represents the matrix) + // value can only be a single byte, or a byte array (which represents the matrix) if(value.isArray) { for (av in value.arrayvalue!!) { - val number = (av as LiteralValue).intvalue + val number = (av as LiteralValue).bytevalue ?: return err("array must be all bytes") - val expectedSizeX = arrayspec!!.x.constValue(namespace)?.intvalue!! - val expectedSizeY = arrayspec.y!!.constValue(namespace)?.intvalue!! + val expectedSizeX = arrayspec!!.x.constValue(namespace)?.asIntegerValue!! + val expectedSizeY = arrayspec.y!!.constValue(namespace)?.asIntegerValue!! val expectedSize = expectedSizeX * expectedSizeY if (value.arrayvalue.size != expectedSize) return err("initializer array size mismatch (expecting $expectedSize, got ${value.arrayvalue.size})") @@ -475,8 +490,8 @@ class AstChecker(private val namespace: INameScope, private val compilerOptions: return err("value '$number' in byte array is out of range for unsigned byte") } } else { - val number = value.intvalue - ?: return err("byte integer value expected") + val number = value.bytevalue + ?: return err("unsigned byte integer value expected") if (number < 0 || number > 255) return err("value '$number' out of range for unsigned byte") } diff --git a/il65/src/il65/ast/AstRecursionChecker.kt b/il65/src/il65/ast/AstRecursionChecker.kt index a8effc6b3..f9acbcb2f 100644 --- a/il65/src/il65/ast/AstRecursionChecker.kt +++ b/il65/src/il65/ast/AstRecursionChecker.kt @@ -66,7 +66,7 @@ class DirectedGraph { if(recStack[node]==true) return true if(visited[node]==true) return false - // mark current node as visited bitand add to recursion stack + // mark current node as visited and add to recursion stack visited[node] = true recStack[node] = true diff --git a/il65/src/il65/ast/StmtReorderer.kt b/il65/src/il65/ast/StmtReorderer.kt index 5fd339dfb..8def7d2da 100644 --- a/il65/src/il65/ast/StmtReorderer.kt +++ b/il65/src/il65/ast/StmtReorderer.kt @@ -4,7 +4,7 @@ class StatementReorderer: IAstProcessor { // Reorders the statements in a way the compiler needs. // - 'main' block must be the very first statement. // - in every scope: - // -- the directives '%output', '%launcher', '%zeropage', '%address' bitand '%option' will come first. + // -- the directives '%output', '%launcher', '%zeropage', '%address' and '%option' will come first. // -- all vardecls then follow. // -- the remaining statements then follow in their original order. // - the 'start' subroutine in the 'main' block will be moved to the top immediately following the directives. diff --git a/il65/src/il65/compiler/Compiler.kt b/il65/src/il65/compiler/Compiler.kt index 1d08187c0..4ae0db54a 100644 --- a/il65/src/il65/compiler/Compiler.kt +++ b/il65/src/il65/compiler/Compiler.kt @@ -34,8 +34,8 @@ data class Mflpt5(val b0: Short, val b1: Short, val b2: Short, val b3: Short, va val zero = Mflpt5(0, 0,0,0,0) fun fromNumber(num: Number): Mflpt5 { // see https://en.wikipedia.org/wiki/Microsoft_Binary_Format - // bitand https://sourceforge.net/p/acme-crossass/code-0/62/tree/trunk/ACME_Lib/cbm/mflpt.a - // bitand https://en.wikipedia.org/wiki/IEEE_754-1985 + // and https://sourceforge.net/p/acme-crossass/code-0/62/tree/trunk/ACME_Lib/cbm/mflpt.a + // and https://en.wikipedia.org/wiki/IEEE_754-1985 val flt = num.toDouble() if(flt < FLOAT_MAX_NEGATIVE || flt > FLOAT_MAX_POSITIVE) @@ -47,12 +47,12 @@ data class Mflpt5(val b0: Short, val b1: Short, val b2: Short, val b3: Short, va var exponent = 128 + 32 // 128 is cbm's bias, 32 is this algo's bias var mantissa = flt.absoluteValue - // if mantissa is too large, shift right bitand adjust exponent + // if mantissa is too large, shift right and adjust exponent while(mantissa >= 0x100000000) { mantissa /= 2.0 exponent ++ } - // if mantissa is too small, shift left bitand adjust exponent + // if mantissa is too small, shift left and adjust exponent while(mantissa < 0x80000000) { mantissa *= 2.0 exponent -- @@ -95,10 +95,10 @@ class Compiler(private val options: CompilationOptions) { val intermediate = StackVmProgram(module.name) namespace.debugPrint() - // create the pool of all variables used in all blocks bitand scopes + // create the pool of all variables used in all blocks and scopes val varGather = VarGatherer(intermediate) varGather.process(module) - println("Number of allocated variables bitand constants: ${intermediate.variables.size} (${intermediate.variablesMemSize} bytes)") + println("Number of allocated variables and constants: ${intermediate.variables.size} (${intermediate.variablesMemSize} bytes)") val translator = StatementTranslator(intermediate, namespace) translator.process(module) @@ -271,14 +271,9 @@ class Compiler(private val options: CompilationOptions) { val lv = expr.constValue(namespace) ?: throw CompilerException("constant expression required, not $expr") when { lv.isString -> stackvmProg.instruction("push \"${lv.strvalue}\"") - lv.isInteger -> { - val intval = lv.intvalue!! - if(intval<=255) - stackvmProg.instruction("push b:${intval.toString(16)}") - else if(intval <= 65535) - stackvmProg.instruction("push w:${intval.toString(16)}") - } - lv.isNumeric -> stackvmProg.instruction("push f:${lv.asNumericValue}") + lv.isByte -> stackvmProg.instruction("push b:${lv.bytevalue!!.toString(16)}") + lv.isWord -> stackvmProg.instruction("push w:${lv.wordvalue!!.toString(16)}") + lv.isFloat -> stackvmProg.instruction("push f:${lv.floatvalue}") lv.isArray -> { lv.arrayvalue?.forEach { translate(it) } stackvmProg.instruction("array w:${lv.arrayvalue!!.size.toString(16)}") @@ -299,9 +294,9 @@ class Compiler(private val options: CompilationOptions) { "&" -> "bitand" "|" -> "bitor" "^" -> "bitxor" - "bitand" -> "bitand" - "bitor" -> "bitor" - "bitxor" -> "bitxor" + "and" -> "and" + "or" -> "or" + "xor" -> "xor" "<" -> "less" ">" -> "greater" "<=" -> "lesseq" @@ -450,11 +445,12 @@ class StackVmProgram(val name: String) { result.add("%variables") for(v in variables) { if (!(v.value.type == VarDeclType.VAR || v.value.type == VarDeclType.CONST)) { - throw AssertionError("Should be only VAR bitor CONST variables") + throw AssertionError("Should be only VAR or CONST variables") } val litval = v.value.value as LiteralValue val litvalStr = when { - litval.isInteger -> litval.intvalue!!.toString(16) + litval.isByte -> litval.bytevalue!!.toString(16) + litval.isWord -> litval.wordvalue!!.toString(16) litval.isFloat -> litval.floatvalue.toString() litval.isString -> "\"${litval.strvalue}\"" else -> TODO("non-scalar value") diff --git a/il65/src/il65/compiler/Zeropage.kt b/il65/src/il65/compiler/Zeropage.kt index 80c73fb30..cd5bcc445 100644 --- a/il65/src/il65/compiler/Zeropage.kt +++ b/il65/src/il65/compiler/Zeropage.kt @@ -56,19 +56,19 @@ class Zeropage(private val options: CompilationOptions) { if(vardecl.position!=null) print(vardecl.position) println(" warning: allocating a large value (array) in zeropage") - val y = (vardecl.arrayspec.y as? LiteralValue)?.intvalue + val y = (vardecl.arrayspec.y as? LiteralValue)?.asIntegerValue if(y==null) { // 1 dimensional array when(vardecl.datatype) { - DataType.BYTE -> (vardecl.arrayspec.x as LiteralValue).intvalue!! - DataType.WORD -> (vardecl.arrayspec.x as LiteralValue).intvalue!! * 2 - DataType.FLOAT -> (vardecl.arrayspec.x as LiteralValue).intvalue!! * 5 + DataType.BYTE -> (vardecl.arrayspec.x as LiteralValue).asIntegerValue!! + DataType.WORD -> (vardecl.arrayspec.x as LiteralValue).asIntegerValue!! * 2 + DataType.FLOAT -> (vardecl.arrayspec.x as LiteralValue).asIntegerValue!! * 5 else -> throw CompilerException("array can only be of byte, word, float") } } else { // 2 dimensional matrix (only bytes for now) when(vardecl.datatype) { - DataType.BYTE -> (vardecl.arrayspec.x as LiteralValue).intvalue!! * y + DataType.BYTE -> (vardecl.arrayspec.x as LiteralValue).asIntegerValue!! * y else -> throw CompilerException("matrix can only contain bytes") } } diff --git a/il65/src/il65/functions/BuiltinFunctions.kt b/il65/src/il65/functions/BuiltinFunctions.kt index 04bae9941..f75962a71 100644 --- a/il65/src/il65/functions/BuiltinFunctions.kt +++ b/il65/src/il65/functions/BuiltinFunctions.kt @@ -23,9 +23,7 @@ private fun oneDoubleArg(args: List, position: Position?, namespace throw SyntaxError("built-in function requires one floating point argument", position) val float = constval.asNumericValue?.toDouble()!! - val result = numericLiteral(function(float), args[0].position) - result.position = args[0].position - return result + return numericLiteral(function(float), args[0].position) } private fun oneDoubleArgOutputInt(args: List, position: Position?, namespace:INameScope, function: (arg: Double)->Number): LiteralValue { @@ -36,9 +34,7 @@ private fun oneDoubleArgOutputInt(args: List, position: Position?, throw SyntaxError("built-in function requires one floating point argument", position) val float = constval.asNumericValue?.toDouble()!! - val result = LiteralValue(function(float).toInt()) - result.position = args[0].position - return result + return numericLiteral(function(float).toInt(), args[0].position) } private fun oneIntArgOutputInt(args: List, position: Position?, namespace:INameScope, function: (arg: Int)->Number): LiteralValue { @@ -49,9 +45,7 @@ private fun oneIntArgOutputInt(args: List, position: Position?, nam throw SyntaxError("built-in function requires one integer argument", position) val integer = constval.asNumericValue?.toInt()!! - val result = LiteralValue(function(integer).toInt()) - result.position = args[0].position - return result + return numericLiteral(function(integer).toInt(), args[0].position) } private fun collectionArgOutputNumber(args: List, position: Position?, namespace:INameScope, @@ -65,14 +59,7 @@ private fun collectionArgOutputNumber(args: List, position: Positio if(constants.contains(null)) throw NotConstArgumentException() val result = function(constants.map { it!!.toDouble() }).toDouble() - val value = - if(result-floor(result) == 0.0) { - LiteralValue(result.toInt()) - } else { - LiteralValue(floatvalue = result) - } - value.position = args[0].position - return value + return numericLiteral(result, args[0].position) } private fun collectionArgOutputBoolean(args: List, position: Position?, namespace:INameScope, @@ -86,7 +73,7 @@ private fun collectionArgOutputBoolean(args: List, position: Positi if(constants.contains(null)) throw NotConstArgumentException() val result = function(constants.map { it?.toDouble()!! }) - return LiteralValue(if(result) 1 else 0) + return LiteralValue(bytevalue = if(result) 1 else 0) } fun builtinRound(args: List, position: Position?, namespace:INameScope): LiteralValue @@ -132,26 +119,21 @@ fun builtinDeg(args: List, position: Position?, namespace:INameScop = oneDoubleArg(args, position, namespace, Math::toDegrees) fun builtinAbs(args: List, position: Position?, namespace:INameScope): LiteralValue { - // 1 arg, type = float bitor int, result type= same as argument type + // 1 arg, type = float or int, result type= same as argument type if(args.size!=1) throw SyntaxError("abs requires one numeric argument", position) val constval = args[0].constValue(namespace) ?: throw NotConstArgumentException() - var number = constval.asNumericValue - val result = - if(number is Int || number is Byte || number is Short) { - number = number.toInt() - LiteralValue(intvalue = abs(number)) - } else if(number is Double) { - LiteralValue(floatvalue = abs(number.toDouble())) - } else { - throw SyntaxError("abs requires one numeric argument", position) - } - result.position = args[0].position - return result + val number = constval.asNumericValue + return when (number) { + is Int, is Byte, is Short -> numericLiteral(abs(number.toInt()), args[0].position) + is Double -> numericLiteral(abs(number.toDouble()), args[0].position) + else -> throw SyntaxError("abs requires one numeric argument", position) + } } +// todo different functions for byte/word params/results? fun builtinLsb(args: List, position: Position?, namespace:INameScope): LiteralValue = oneIntArgOutputInt(args, position, namespace) { x: Int -> x and 255 } @@ -183,9 +165,7 @@ fun builtinAvg(args: List, position: Position?, namespace:INameScop if(constants.contains(null)) throw NotConstArgumentException() val result = (constants.map { it!!.toDouble() }).average() - val value = LiteralValue(floatvalue = result) - value.position = args[0].position - return value + return numericLiteral(result, args[0].position) } fun builtinLen(args: List, position: Position?, namespace:INameScope): LiteralValue { @@ -198,9 +178,7 @@ fun builtinLen(args: List, position: Position?, namespace:INameScop if(constants.contains(null)) throw NotConstArgumentException() val result = (constants.map { it!!.toDouble() }).size - val value = LiteralValue(intvalue = result) - value.position = args[0].position - return value + return numericLiteral(result, args[0].position) } fun builtinAny(args: List, position: Position?, namespace:INameScope): LiteralValue @@ -211,10 +189,17 @@ fun builtinAll(args: List, position: Position?, namespace:INameScop private fun numericLiteral(value: Number, position: Position?): LiteralValue { - val result = when(value) { - is Int -> LiteralValue(intvalue = value.toInt()) - is Short -> LiteralValue(intvalue = value.toInt()) - is Byte -> LiteralValue(intvalue = value.toInt()) + val floatNum=value.toDouble() + val tweakedValue: Number = + if(floatNum==floor(floatNum) && floatNum in -32768..65535) + floatNum.toInt() // we have an integer disguised as a float. + else + floatNum + + val result = when(tweakedValue) { + is Int -> LiteralValue.optimalNumeric(value.toInt()) + is Short -> LiteralValue.optimalNumeric(value.toInt()) + is Byte -> LiteralValue(bytevalue = value.toShort()) is Double -> LiteralValue(floatvalue = value.toDouble()) is Float -> LiteralValue(floatvalue = value.toDouble()) else -> throw FatalAstException("invalid number type ${value::class}") diff --git a/il65/src/il65/optimizing/ExpressionOptimizer.kt b/il65/src/il65/optimizing/ExpressionOptimizer.kt index f3a730c72..7818c44b5 100644 --- a/il65/src/il65/optimizing/ExpressionOptimizer.kt +++ b/il65/src/il65/optimizing/ExpressionOptimizer.kt @@ -47,7 +47,7 @@ fun Module.optimizeExpressions(globalNamespace: INameScope) { X ^ 0 -> X todo expression optimization: reduce expression nesting / flattening of parenthesis - todo expression optimization: simplify logical expression when a term makes it always true bitor false (1 bitor 0) + todo expression optimization: simplify logical expression when a term makes it always true or false (1 or 0) todo expression optimization: optimize some simple multiplications into shifts (A*8 -> A<<3, A/4 -> A>>2) todo expression optimization: common (sub) expression elimination (turn common expressions into single subroutine call) @@ -83,7 +83,7 @@ class ExpressionOptimizer(private val globalNamespace: INameScope) : IAstProcess // vardecl: for float vars, promote constant integer initialization values to floats val literal = decl.value as? LiteralValue if (literal != null && literal.isInteger) { - val newValue = LiteralValue(floatvalue = literal.intvalue!!.toDouble()) + val newValue = LiteralValue(floatvalue = literal.asNumericValue!!.toDouble()) newValue.position = literal.position decl.value = newValue } @@ -93,7 +93,7 @@ class ExpressionOptimizer(private val globalNamespace: INameScope) : IAstProcess val literal = decl.value as? LiteralValue if (literal != null && literal.isString && literal.strvalue?.length == 1) { val petscii = Petscii.encodePetscii(literal.strvalue)[0] - val newValue = LiteralValue(petscii.toInt()) + val newValue = LiteralValue(bytevalue = petscii) newValue.position = literal.position decl.value = newValue } @@ -140,31 +140,31 @@ class ExpressionOptimizer(private val globalNamespace: INameScope) : IAstProcess val result = when { expr.operator == "+" -> subexpr expr.operator == "-" -> when { - subexpr.intvalue != null -> { + subexpr.asIntegerValue!= null -> { optimizationsDone++ - LiteralValue(intvalue = -subexpr.intvalue) + LiteralValue.optimalNumeric(-subexpr.asIntegerValue) } subexpr.floatvalue != null -> { optimizationsDone++ LiteralValue(floatvalue = -subexpr.floatvalue) } - else -> throw ExpressionError("can only take negative of int bitor float", subexpr.position) + else -> throw ExpressionError("can only take negative of int or float", subexpr.position) } expr.operator == "~" -> when { - subexpr.intvalue != null -> { + subexpr.asIntegerValue != null -> { optimizationsDone++ - LiteralValue(intvalue = subexpr.intvalue.inv()) + LiteralValue.optimalNumeric(subexpr.asIntegerValue.inv()) } else -> throw ExpressionError("can only take bitwise inversion of int", subexpr.position) } expr.operator == "not" -> when { - subexpr.intvalue != null -> { + subexpr.asIntegerValue != null -> { optimizationsDone++ - LiteralValue(intvalue = if (subexpr.intvalue == 0) 1 else 0) + LiteralValue(bytevalue = if (subexpr.asIntegerValue == 0) 1 else 0) } subexpr.floatvalue != null -> { optimizationsDone++ - LiteralValue(intvalue = if (subexpr.floatvalue == 0.0) 1 else 0) + LiteralValue(bytevalue = if (subexpr.floatvalue == 0.0) 1 else 0) } else -> throw ExpressionError("can not take logical not of $subexpr", subexpr.position) } @@ -212,14 +212,27 @@ class ExpressionOptimizer(private val globalNamespace: INameScope) : IAstProcess val to = range.to.constValue(globalNamespace) if (from != null && to != null) { when { - from.intvalue != null && to.intvalue != null -> { - // int range - val rangevalue = from.intvalue.rangeTo(to.intvalue) - if (rangevalue.last - rangevalue.first > 65535) { + from.isWord || to.isWord -> { + // range on word value boundaries + val rangeValue = from.asIntegerValue!!.rangeTo(to.asIntegerValue!!) + if (rangeValue.last - rangeValue.first > 65535) { throw ExpressionError("amount of values in range exceeds 65535", range.position) } - return LiteralValue(arrayvalue = rangevalue.map { - val v = LiteralValue(intvalue = it) + return LiteralValue(arrayvalue = rangeValue.map { + val v = LiteralValue(wordvalue = it) + v.position = range.position + v.parent = range.parent + v + }.toMutableList()) + } + from.isByte && to.isByte -> { + // range on byte value boundaries + val rangeValue = from.bytevalue!!.rangeTo(to.bytevalue!!) + if (rangeValue.last - rangeValue.first > 65535) { + throw ExpressionError("amount of values in range exceeds 65535", range.position) + } + return LiteralValue(arrayvalue = rangeValue.map { + val v = LiteralValue(bytevalue = it.toShort()) v.position = range.position v.parent = range.parent v @@ -236,6 +249,7 @@ class ExpressionOptimizer(private val globalNamespace: INameScope) : IAstProcess newval.parent = range.parent return newval } + else -> AstException("range on weird datatype") } } return range @@ -268,9 +282,9 @@ class ConstExprEvaluator { "&" -> bitwiseand(left, right) "|" -> bitwiseor(left, right) "^" -> bitwisexor(left, right) - "bitand" -> logicaland(left, right) - "bitor" -> logicalor(left, right) - "bitxor" -> logicalxor(left, right) + "and" -> logicaland(left, right) + "or" -> logicalor(left, right) + "xor" -> logicalxor(left, right) "<" -> compareless(left, right) ">" -> comparegreater(left, right) "<=" -> comparelessequal(left, right) @@ -283,27 +297,29 @@ class ConstExprEvaluator { private fun comparenotequal(left: LiteralValue, right: LiteralValue): LiteralValue { val leq = compareequal(left, right) - val litval = LiteralValue(intvalue = if (leq.intvalue == 1) 0 else 1) + val litval = LiteralValue(bytevalue = if (leq.bytevalue == 1.toShort()) 0 else 1) litval.position = left.position return litval } private fun compareequal(left: LiteralValue, right: LiteralValue): LiteralValue { val leftvalue: Any = when { - left.intvalue!=null -> left.intvalue + left.bytevalue!=null -> left.bytevalue + left.wordvalue!=null -> left.wordvalue left.floatvalue!=null -> left.floatvalue left.strvalue!=null -> left.strvalue left.arrayvalue!=null -> left.arrayvalue else -> throw FatalAstException("missing literal value") } val rightvalue: Any = when { - right.intvalue!=null -> right.intvalue + right.bytevalue!=null -> right.bytevalue + right.wordvalue!=null -> right.wordvalue right.floatvalue!=null -> right.floatvalue right.strvalue!=null -> right.strvalue right.arrayvalue!=null -> right.arrayvalue else -> throw FatalAstException("missing literal value") } - val litval = LiteralValue(intvalue = if (leftvalue == rightvalue) 1 else 0) + val litval = LiteralValue(bytevalue = if (leftvalue == rightvalue) 1 else 0) litval.position = left.position return litval } @@ -311,18 +327,18 @@ class ConstExprEvaluator { private fun comparegreaterequal(left: LiteralValue, right: LiteralValue): LiteralValue { val error = "cannot compute $left >= $right" val litval = when { - left.intvalue!=null -> when { - right.intvalue!=null -> LiteralValue( - intvalue = if (left.intvalue >= right.intvalue) 1 else 0) + left.asIntegerValue!=null -> when { + right.asIntegerValue!=null -> LiteralValue( + bytevalue = if (left.asIntegerValue >= right.asIntegerValue) 1 else 0) right.floatvalue!=null -> LiteralValue( - intvalue = if (left.intvalue >= right.floatvalue) 1 else 0) + bytevalue = if (left.asIntegerValue >= right.floatvalue) 1 else 0) else -> throw ExpressionError(error, left.position) } left.floatvalue!=null -> when { - right.intvalue!=null -> LiteralValue( - intvalue = if (left.floatvalue >= right.intvalue) 1 else 0) + right.asIntegerValue!=null -> LiteralValue( + bytevalue = if (left.floatvalue >= right.asIntegerValue) 1 else 0) right.floatvalue!=null -> LiteralValue( - intvalue = if (left.floatvalue >= right.floatvalue) 1 else 0) + bytevalue = if (left.floatvalue >= right.floatvalue) 1 else 0) else -> throw ExpressionError(error, left.position) } else -> throw ExpressionError(error, left.position) @@ -334,18 +350,18 @@ class ConstExprEvaluator { private fun comparelessequal(left: LiteralValue, right: LiteralValue): LiteralValue { val error = "cannot compute $left >= $right" val litval = when { - left.intvalue!=null -> when { - right.intvalue!=null -> LiteralValue( - intvalue = if (left.intvalue <= right.intvalue) 1 else 0) + left.asIntegerValue!=null -> when { + right.asIntegerValue!=null -> LiteralValue( + bytevalue = if (left.asIntegerValue <= right.asIntegerValue) 1 else 0) right.floatvalue!=null -> LiteralValue( - intvalue = if (left.intvalue <= right.floatvalue) 1 else 0) + bytevalue = if (left.asIntegerValue <= right.floatvalue) 1 else 0) else -> throw ExpressionError(error, left.position) } left.floatvalue!=null -> when { - right.intvalue!=null -> LiteralValue( - intvalue = if (left.floatvalue <= right.intvalue) 1 else 0) + right.asIntegerValue!=null -> LiteralValue( + bytevalue = if (left.floatvalue <= right.asIntegerValue) 1 else 0) right.floatvalue!=null -> LiteralValue( - intvalue = if (left.floatvalue <= right.floatvalue) 1 else 0) + bytevalue = if (left.floatvalue <= right.floatvalue) 1 else 0) else -> throw ExpressionError(error, left.position) } else -> throw ExpressionError(error, left.position) @@ -356,14 +372,14 @@ class ConstExprEvaluator { private fun comparegreater(left: LiteralValue, right: LiteralValue): LiteralValue { val leq = comparelessequal(left, right) - val litval = LiteralValue(intvalue = if (leq.intvalue == 1) 0 else 1) + val litval = LiteralValue(bytevalue = if (leq.bytevalue == 1.toShort()) 0 else 1) litval.position = left.position return litval } private fun compareless(left: LiteralValue, right: LiteralValue): LiteralValue { val leq = comparegreaterequal(left, right) - val litval = LiteralValue(intvalue = if (leq.intvalue == 1) 0 else 1) + val litval = LiteralValue(bytevalue = if (leq.bytevalue == 1.toShort()) 0 else 1) litval.position = left.position return litval } @@ -371,18 +387,18 @@ class ConstExprEvaluator { private fun logicalxor(left: LiteralValue, right: LiteralValue): LiteralValue { val error = "cannot compute $left locical-bitxor $right" val litval = when { - left.intvalue!=null -> when { - right.intvalue!=null -> LiteralValue( - intvalue = if ((left.intvalue != 0).xor(right.intvalue != 0)) 1 else 0) + left.asIntegerValue!=null -> when { + right.asIntegerValue!=null -> LiteralValue( + bytevalue = if ((left.asIntegerValue != 0).xor(right.asIntegerValue != 0)) 1 else 0) right.floatvalue!=null -> LiteralValue( - intvalue = if ((left.intvalue != 0).xor(right.floatvalue != 0.0)) 1 else 0) + bytevalue = if ((left.asIntegerValue != 0).xor(right.floatvalue != 0.0)) 1 else 0) else -> throw ExpressionError(error, left.position) } left.floatvalue!=null -> when { - right.intvalue!=null -> LiteralValue( - intvalue = if ((left.floatvalue != 0.0).xor(right.intvalue != 0)) 1 else 0) + right.asIntegerValue!=null -> LiteralValue( + bytevalue = if ((left.floatvalue != 0.0).xor(right.asIntegerValue != 0)) 1 else 0) right.floatvalue!=null -> LiteralValue( - intvalue = if ((left.floatvalue != 0.0).xor(right.floatvalue != 0.0)) 1 else 0) + bytevalue = if ((left.floatvalue != 0.0).xor(right.floatvalue != 0.0)) 1 else 0) else -> throw ExpressionError(error, left.position) } else -> throw ExpressionError(error, left.position) @@ -392,20 +408,20 @@ class ConstExprEvaluator { } private fun logicalor(left: LiteralValue, right: LiteralValue): LiteralValue { - val error = "cannot compute $left locical-bitor $right" + val error = "cannot compute $left locical-or $right" val litval = when { - left.intvalue!=null -> when { - right.intvalue!=null -> LiteralValue( - intvalue = if (left.intvalue != 0 || right.intvalue != 0) 1 else 0) + left.asIntegerValue!=null -> when { + right.asIntegerValue!=null -> LiteralValue( + bytevalue = if (left.asIntegerValue != 0 || right.asIntegerValue != 0) 1 else 0) right.floatvalue!=null -> LiteralValue( - intvalue = if (left.intvalue != 0 || right.floatvalue != 0.0) 1 else 0) + bytevalue = if (left.asIntegerValue != 0 || right.floatvalue != 0.0) 1 else 0) else -> throw ExpressionError(error, left.position) } left.floatvalue!=null -> when { - right.intvalue!=null -> LiteralValue( - intvalue = if (left.floatvalue != 0.0 || right.intvalue != 0) 1 else 0) + right.asIntegerValue!=null -> LiteralValue( + bytevalue = if (left.floatvalue != 0.0 || right.asIntegerValue != 0) 1 else 0) right.floatvalue!=null -> LiteralValue( - intvalue = if (left.floatvalue != 0.0 || right.floatvalue != 0.0) 1 else 0) + bytevalue = if (left.floatvalue != 0.0 || right.floatvalue != 0.0) 1 else 0) else -> throw ExpressionError(error, left.position) } else -> throw ExpressionError(error, left.position) @@ -415,20 +431,20 @@ class ConstExprEvaluator { } private fun logicaland(left: LiteralValue, right: LiteralValue): LiteralValue { - val error = "cannot compute $left locical-bitand $right" + val error = "cannot compute $left locical-and $right" val litval = when { - left.intvalue!=null -> when { - right.intvalue!=null -> LiteralValue( - intvalue = if (left.intvalue != 0 && right.intvalue != 0) 1 else 0) + left.asIntegerValue!=null -> when { + right.asIntegerValue!=null -> LiteralValue( + bytevalue = if (left.asIntegerValue != 0 && right.asIntegerValue != 0) 1 else 0) right.floatvalue!=null -> LiteralValue( - intvalue = if (left.intvalue != 0 && right.floatvalue != 0.0) 1 else 0) + bytevalue = if (left.asIntegerValue != 0 && right.floatvalue != 0.0) 1 else 0) else -> throw ExpressionError(error, left.position) } left.floatvalue!=null -> when { - right.intvalue!=null -> LiteralValue( - intvalue = if (left.floatvalue != 0.0 && right.intvalue != 0) 1 else 0) + right.asIntegerValue!=null -> LiteralValue( + bytevalue = if (left.floatvalue != 0.0 && right.asIntegerValue != 0) 1 else 0) right.floatvalue!=null -> LiteralValue( - intvalue = if (left.floatvalue != 0.0 && right.floatvalue != 0.0) 1 else 0) + bytevalue = if (left.floatvalue != 0.0 && right.floatvalue != 0.0) 1 else 0) else -> throw ExpressionError(error, left.position) } else -> throw ExpressionError(error, left.position) @@ -438,28 +454,52 @@ class ConstExprEvaluator { } private fun bitwisexor(left: LiteralValue, right: LiteralValue): LiteralValue { - if(left.intvalue!=null && right.intvalue !=null) { - val litval = LiteralValue(intvalue = left.intvalue.xor(right.intvalue)) - litval.position = left.position - return litval + if(left.isByte) { + if(right.asIntegerValue!=null) { + val litval = LiteralValue(bytevalue = (left.bytevalue!!.toInt() xor (right.asIntegerValue and 255)).toShort()) + litval.position = left.position + return litval + } + } else if(left.isWord) { + if(right.asIntegerValue!=null) { + val litval = LiteralValue(wordvalue = left.wordvalue!! xor right.asIntegerValue) + litval.position = left.position + return litval + } } throw ExpressionError("cannot calculate $left ^ $right", left.position) } private fun bitwiseor(left: LiteralValue, right: LiteralValue): LiteralValue { - if(left.intvalue!=null && right.intvalue !=null) { - val litval = LiteralValue(intvalue = left.intvalue.or(right.intvalue)) - litval.position = left.position - return litval + if(left.isByte) { + if(right.asIntegerValue!=null) { + val litval = LiteralValue(bytevalue = (left.bytevalue!!.toInt() or (right.asIntegerValue and 255)).toShort()) + litval.position = left.position + return litval + } + } else if(left.isWord) { + if(right.asIntegerValue!=null) { + val litval = LiteralValue(wordvalue = left.wordvalue!! or right.asIntegerValue) + litval.position = left.position + return litval + } } throw ExpressionError("cannot calculate $left | $right", left.position) } private fun bitwiseand(left: LiteralValue, right: LiteralValue): LiteralValue { - if(left.intvalue!=null && right.intvalue !=null) { - val litval = LiteralValue(intvalue = left.intvalue.and(right.intvalue)) - litval.position = left.position - return litval + if(left.isByte) { + if(right.asIntegerValue!=null) { + val litval = LiteralValue(bytevalue = (left.bytevalue!!.toInt() or (right.asIntegerValue and 255)).toShort()) + litval.position = left.position + return litval + } + } else if(left.isWord) { + if(right.asIntegerValue!=null) { + val litval = LiteralValue(wordvalue = left.wordvalue!! or right.asIntegerValue) + litval.position = left.position + return litval + } } throw ExpressionError("cannot calculate $left & $right", left.position) } @@ -467,13 +507,13 @@ class ConstExprEvaluator { private fun power(left: LiteralValue, right: LiteralValue): LiteralValue { val error = "cannot calculate $left ** $right" val litval = when { - left.intvalue!=null -> when { - right.intvalue!=null -> LiteralValue(intvalue = left.intvalue.toDouble().pow(right.intvalue).toInt()) - right.floatvalue!=null -> LiteralValue(floatvalue = left.intvalue.toDouble().pow(right.floatvalue)) + left.asIntegerValue!=null -> when { + right.asIntegerValue!=null -> LiteralValue(wordvalue = left.asIntegerValue.toDouble().pow(right.asIntegerValue).toInt()) + right.floatvalue!=null -> LiteralValue(floatvalue = left.asIntegerValue.toDouble().pow(right.floatvalue)) else -> throw ExpressionError(error, left.position) } left.floatvalue!=null -> when { - right.intvalue!=null -> LiteralValue(floatvalue = left.floatvalue.pow(right.intvalue)) + right.asIntegerValue!=null -> LiteralValue(floatvalue = left.floatvalue.pow(right.asIntegerValue)) right.floatvalue!=null -> LiteralValue(floatvalue = left.floatvalue.pow(right.floatvalue)) else -> throw ExpressionError(error, left.position) } @@ -484,15 +524,15 @@ class ConstExprEvaluator { } private fun plus(left: LiteralValue, right: LiteralValue): LiteralValue { - val error = "cannot add $left bitand $right" + val error = "cannot add $left and $right" val litval = when { - left.intvalue!=null -> when { - right.intvalue!=null -> LiteralValue(intvalue = left.intvalue + right.intvalue) - right.floatvalue!=null -> LiteralValue(floatvalue = left.intvalue + right.floatvalue) + left.asIntegerValue!=null -> when { + right.asIntegerValue!=null -> LiteralValue.optimalNumeric(left.asIntegerValue + right.asIntegerValue) + right.floatvalue!=null -> LiteralValue(floatvalue = left.asIntegerValue + right.floatvalue) else -> throw ExpressionError(error, left.position) } left.floatvalue!=null -> when { - right.intvalue!=null -> LiteralValue(floatvalue = left.floatvalue + right.intvalue) + right.asIntegerValue!=null -> LiteralValue(floatvalue = left.floatvalue + right.asIntegerValue) right.floatvalue!=null -> LiteralValue(floatvalue = left.floatvalue + right.floatvalue) else -> throw ExpressionError(error, left.position) } @@ -503,15 +543,15 @@ class ConstExprEvaluator { } private fun minus(left: LiteralValue, right: LiteralValue): LiteralValue { - val error = "cannot subtract $left bitand $right" + val error = "cannot subtract $left and $right" val litval = when { - left.intvalue!=null -> when { - right.intvalue!=null -> LiteralValue(intvalue = left.intvalue - right.intvalue) - right.floatvalue!=null -> LiteralValue(floatvalue = left.intvalue - right.floatvalue) + left.asIntegerValue!=null -> when { + right.asIntegerValue!=null -> LiteralValue.optimalNumeric(left.asIntegerValue - right.asIntegerValue) + right.floatvalue!=null -> LiteralValue(floatvalue = left.asIntegerValue - right.floatvalue) else -> throw ExpressionError(error, left.position) } left.floatvalue!=null -> when { - right.intvalue!=null -> LiteralValue(floatvalue = left.floatvalue - right.intvalue) + right.asIntegerValue!=null -> LiteralValue(floatvalue = left.floatvalue - right.asIntegerValue) right.floatvalue!=null -> LiteralValue(floatvalue = left.floatvalue - right.floatvalue) else -> throw ExpressionError(error, left.position) } @@ -522,26 +562,26 @@ class ConstExprEvaluator { } private fun multiply(left: LiteralValue, right: LiteralValue): LiteralValue { - val error = "cannot multiply $left bitand $right" + val error = "cannot multiply $left and $right" val litval = when { - left.intvalue!=null -> when { - right.intvalue!=null -> LiteralValue(intvalue = left.intvalue * right.intvalue) - right.floatvalue!=null -> LiteralValue(floatvalue = left.intvalue * right.floatvalue) + left.asIntegerValue!=null -> when { + right.asIntegerValue!=null -> LiteralValue.optimalNumeric(left.asIntegerValue * right.asIntegerValue) + right.floatvalue!=null -> LiteralValue(floatvalue = left.asIntegerValue * right.floatvalue) right.strvalue!=null -> { - if(right.strvalue.length * left.intvalue > 65535) throw ExpressionError("string too large", left.position) - LiteralValue(strvalue = right.strvalue.repeat(left.intvalue)) + if(right.strvalue.length * left.asIntegerValue > 65535) throw ExpressionError("string too large", left.position) + LiteralValue(strvalue = right.strvalue.repeat(left.asIntegerValue)) } else -> throw ExpressionError(error, left.position) } left.floatvalue!=null -> when { - right.intvalue!=null -> LiteralValue(floatvalue = left.floatvalue * right.intvalue) + right.asIntegerValue!=null -> LiteralValue(floatvalue = left.floatvalue * right.asIntegerValue) right.floatvalue!=null -> LiteralValue(floatvalue = left.floatvalue * right.floatvalue) else -> throw ExpressionError(error, left.position) } left.strvalue!=null -> when { - right.intvalue!=null -> { - if(left.strvalue.length * right.intvalue > 65535) throw ExpressionError("string too large", left.position) - LiteralValue(strvalue = left.strvalue.repeat(right.intvalue)) + right.asIntegerValue!=null -> { + if(left.strvalue.length * right.asIntegerValue > 65535) throw ExpressionError("string too large", left.position) + LiteralValue(strvalue = left.strvalue.repeat(right.asIntegerValue)) } else -> throw ExpressionError(error, left.position) } @@ -554,21 +594,21 @@ class ConstExprEvaluator { private fun divide(left: LiteralValue, right: LiteralValue): LiteralValue { val error = "cannot divide $left by $right" val litval = when { - left.intvalue!=null -> when { - right.intvalue!=null -> { - if(right.intvalue==0) throw ExpressionError("attempt to divide by zero", left.position) - LiteralValue(intvalue = left.intvalue / right.intvalue) + left.asIntegerValue!=null -> when { + right.asIntegerValue!=null -> { + if(right.asIntegerValue==0) throw ExpressionError("attempt to divide by zero", left.position) + LiteralValue.optimalNumeric(left.asIntegerValue / right.asIntegerValue) } right.floatvalue!=null -> { if(right.floatvalue==0.0) throw ExpressionError("attempt to divide by zero", left.position) - LiteralValue(floatvalue = left.intvalue / right.floatvalue) + LiteralValue(floatvalue = left.asIntegerValue / right.floatvalue) } else -> throw ExpressionError(error, left.position) } left.floatvalue!=null -> when { - right.intvalue!=null -> { - if(right.intvalue==0) throw ExpressionError("attempt to divide by zero", left.position) - LiteralValue(floatvalue = left.floatvalue / right.intvalue) + right.asIntegerValue!=null -> { + if(right.asIntegerValue==0) throw ExpressionError("attempt to divide by zero", left.position) + LiteralValue(floatvalue = left.floatvalue / right.asIntegerValue) } right.floatvalue!=null -> { if(right.floatvalue==0.0) throw ExpressionError("attempt to divide by zero", left.position) diff --git a/il65/src/il65/optimizing/StatementsOptimizer.kt b/il65/src/il65/optimizing/StatementsOptimizer.kt index 7d5440c08..40cd24076 100644 --- a/il65/src/il65/optimizing/StatementsOptimizer.kt +++ b/il65/src/il65/optimizing/StatementsOptimizer.kt @@ -24,8 +24,8 @@ fun Module.optimizeStatements(globalNamespace: INameScope, allScopedSymbolDefini todo remove statements that have no effect X=X , X+=0, X-=0, X*=1, X/=1, X//=1, A |= 0, A ^= 0, A<<=0, etc etc todo optimize addition with self into shift 1 (A+=A -> A<<=1) todo assignment optimization: optimize some simple multiplications into shifts (A*=8 -> A<<=3) - todo analyse for unreachable code bitand remove that (f.i. code after goto bitor return that has no label so can never be jumped to) - todo merge sequence of assignments into one (as long as the value is a constant bitand the target not a MEMORY type!) + todo analyse for unreachable code and remove that (f.i. code after goto or return that has no label so can never be jumped to) + todo merge sequence of assignments into one (as long as the value is a constant and the target not a MEMORY type!) todo report more always true/always false conditions */ diff --git a/il65/src/il65/parser/CommentHandlingTokenStream.kt b/il65/src/il65/parser/CommentHandlingTokenStream.kt index 75af7c3d0..f763dfb69 100644 --- a/il65/src/il65/parser/CommentHandlingTokenStream.kt +++ b/il65/src/il65/parser/CommentHandlingTokenStream.kt @@ -12,11 +12,13 @@ class CommentHandlingTokenStream(lexer: Lexer) : CommonTokenStream(lexer) { // extract the comments val commentTokenChannel = il65Lexer.channelNames.indexOf("HIDDEN") val theLexer = tokenSource as Lexer - return get(0, size()) + return get(0, size()) + .asSequence() .filter { it.channel == commentTokenChannel } .map { Comment(theLexer.vocabulary.getSymbolicName(it.type), it.line, it.text.substringAfter(';').trim()) } + .toList() } } diff --git a/il65/src/il65/parser/ModuleParsing.kt b/il65/src/il65/parser/ModuleParsing.kt index 01ad704ed..0457861f1 100644 --- a/il65/src/il65/parser/ModuleParsing.kt +++ b/il65/src/il65/parser/ModuleParsing.kt @@ -38,9 +38,11 @@ fun importModule(filePath: Path) : Module { // process imports val lines = moduleAst.statements.toMutableList() val imports = lines + .asSequence() .mapIndexed { i, it -> Pair(i, it) } .filter { (it.second as? Directive)?.directive == "%import" } .map { Pair(it.first, executeImportDirective(it.second as Directive, filePath)) } + .toList() imports.reversed().forEach { if(it.second==null) { diff --git a/il65/src/il65/parser/il65.tokens b/il65/src/il65/parser/il65.tokens index 2ff964a9d..04dda9314 100644 --- a/il65/src/il65/parser/il65.tokens +++ b/il65/src/il65/parser/il65.tokens @@ -84,17 +84,18 @@ T__82=83 T__83=84 T__84=85 T__85=86 -LINECOMMENT=87 -COMMENT=88 -WS=89 -EOL=90 -NAME=91 -DEC_INTEGER=92 -HEX_INTEGER=93 -BIN_INTEGER=94 -FLOAT_NUMBER=95 -STRING=96 -INLINEASMBLOCK=97 +T__86=87 +LINECOMMENT=88 +COMMENT=89 +WS=90 +EOL=91 +NAME=92 +DEC_INTEGER=93 +HEX_INTEGER=94 +BIN_INTEGER=95 +FLOAT_NUMBER=96 +STRING=97 +INLINEASMBLOCK=98 '~'=1 ':'=2 'goto'=3 @@ -163,21 +164,22 @@ INLINEASMBLOCK=97 'Pz'=66 'Pn'=67 'Pv'=68 -'true'=69 -'false'=70 -'%asm'=71 -'sub'=72 -'->'=73 -'{'=74 -'}'=75 -'?'=76 -'if'=77 -'else'=78 -'if_cs'=79 -'if_cc'=80 -'if_eq'=81 -'if_ne'=82 -'if_pl'=83 -'if_mi'=84 -'if_vs'=85 -'if_vc'=86 +'.w'=69 +'true'=70 +'false'=71 +'%asm'=72 +'sub'=73 +'->'=74 +'{'=75 +'}'=76 +'?'=77 +'if'=78 +'else'=79 +'if_cs'=80 +'if_cc'=81 +'if_eq'=82 +'if_ne'=83 +'if_pl'=84 +'if_mi'=85 +'if_vs'=86 +'if_vc'=87 diff --git a/il65/src/il65/parser/il65Lexer.java b/il65/src/il65/parser/il65Lexer.java index f78b329c0..7c7b97fba 100644 --- a/il65/src/il65/parser/il65Lexer.java +++ b/il65/src/il65/parser/il65Lexer.java @@ -28,9 +28,9 @@ public class il65Lexer extends Lexer { 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, LINECOMMENT=87, - COMMENT=88, WS=89, EOL=90, NAME=91, DEC_INTEGER=92, HEX_INTEGER=93, BIN_INTEGER=94, - FLOAT_NUMBER=95, STRING=96, INLINEASMBLOCK=97; + T__80=81, T__81=82, T__82=83, T__83=84, T__84=85, T__85=86, T__86=87, + LINECOMMENT=88, COMMENT=89, WS=90, EOL=91, NAME=92, DEC_INTEGER=93, HEX_INTEGER=94, + BIN_INTEGER=95, FLOAT_NUMBER=96, STRING=97, INLINEASMBLOCK=98; public static String[] channelNames = { "DEFAULT_TOKEN_CHANNEL", "HIDDEN" }; @@ -50,7 +50,7 @@ public class il65Lexer extends Lexer { "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", "LINECOMMENT", "COMMENT", + "T__81", "T__82", "T__83", "T__84", "T__85", "T__86", "LINECOMMENT", "COMMENT", "WS", "EOL", "NAME", "DEC_INTEGER", "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", "FNUMBER", "STRING_ESCAPE_SEQ", "STRING", "INLINEASMBLOCK" }; @@ -64,7 +64,7 @@ public class il65Lexer extends Lexer { "'('", "')'", "'+'", "'-'", "'**'", "'*'", "'/'", "'<'", "'>'", "'<='", "'>='", "'=='", "'!='", "'&'", "'^'", "'|'", "'to'", "'and'", "'or'", "'xor'", "'not'", "'return'", "'.'", "'A'", "'X'", "'Y'", "'AX'", "'AY'", - "'XY'", "'Pc'", "'Pz'", "'Pn'", "'Pv'", "'true'", "'false'", "'%asm'", + "'XY'", "'Pc'", "'Pz'", "'Pn'", "'Pv'", "'.w'", "'true'", "'false'", "'%asm'", "'sub'", "'->'", "'{'", "'}'", "'?'", "'if'", "'else'", "'if_cs'", "'if_cc'", "'if_eq'", "'if_ne'", "'if_pl'", "'if_mi'", "'if_vs'", "'if_vc'" }; @@ -76,8 +76,9 @@ public class il65Lexer extends Lexer { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 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", "FLOAT_NUMBER", "STRING", "INLINEASMBLOCK" + null, null, null, null, "LINECOMMENT", "COMMENT", "WS", "EOL", "NAME", + "DEC_INTEGER", "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", "STRING", + "INLINEASMBLOCK" }; public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); @@ -139,10 +140,10 @@ public class il65Lexer extends Lexer { @Override public void action(RuleContext _localctx, int ruleIndex, int actionIndex) { switch (ruleIndex) { - case 97: + case 98: STRING_action((RuleContext)_localctx, actionIndex); break; - case 98: + case 99: INLINEASMBLOCK_action((RuleContext)_localctx, actionIndex); break; } @@ -171,7 +172,7 @@ public class il65Lexer extends Lexer { } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2c\u02a1\b\1\4\2\t"+ + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2d\u02a6\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"+ @@ -182,218 +183,220 @@ public class il65Lexer extends Lexer { "\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\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\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\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\r\3\r\3\r\3\r\3\r\3"+ - "\r\3\r\3\r\3\16\3\16\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\20\3\21\3\21"+ - "\3\21\3\21\3\21\3\21\3\21\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\26\3\26\3\26"+ - "\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\30"+ - "\3\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\60\3\60\3\60\3\61\3\61\3\61\3\62\3\62\3\63"+ - "\3\63\3\64\3\64\3\65\3\65\3\65\3\66\3\66\3\66\3\66\3\67\3\67\3\67\38\3"+ - "8\38\38\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@\3A\3A\3A\3B\3B\3B\3C\3C\3C\3D\3D\3D\3E\3E\3E\3F\3F\3F\3"+ - "F\3F\3G\3G\3G\3G\3G\3G\3H\3H\3H\3H\3H\3I\3I\3I\3I\3J\3J\3J\3K\3K\3L\3"+ - "L\3M\3M\3N\3N\3N\3O\3O\3O\3O\3O\3P\3P\3P\3P\3P\3P\3Q\3Q\3Q\3Q\3Q\3Q\3"+ - "R\3R\3R\3R\3R\3R\3S\3S\3S\3S\3S\3S\3T\3T\3T\3T\3T\3T\3U\3U\3U\3U\3U\3"+ - "U\3V\3V\3V\3V\3V\3V\3W\3W\3W\3W\3W\3W\3X\3X\7X\u0238\nX\fX\16X\u023b\13"+ - "X\3X\3X\3X\3X\3Y\3Y\7Y\u0243\nY\fY\16Y\u0246\13Y\3Y\3Y\3Z\3Z\3Z\3Z\3["+ - "\6[\u024f\n[\r[\16[\u0250\3\\\3\\\7\\\u0255\n\\\f\\\16\\\u0258\13\\\3"+ - "]\3]\3]\6]\u025d\n]\r]\16]\u025e\5]\u0261\n]\3^\3^\6^\u0265\n^\r^\16^"+ - "\u0266\3_\3_\6_\u026b\n_\r_\16_\u026c\3`\3`\3`\5`\u0272\n`\3`\5`\u0275"+ - "\n`\3a\6a\u0278\na\ra\16a\u0279\3a\3a\6a\u027e\na\ra\16a\u027f\5a\u0282"+ - "\na\3b\3b\3b\3b\5b\u0288\nb\3c\3c\3c\7c\u028d\nc\fc\16c\u0290\13c\3c\3"+ - "c\3c\3d\3d\3d\3d\6d\u0299\nd\rd\16d\u029a\3d\3d\3d\3d\3d\3\u029a\2e\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\67m8o9"+ - "q:s;u{?}@\177A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG\u008dH\u008f"+ - "I\u0091J\u0093K\u0095L\u0097M\u0099N\u009bO\u009dP\u009fQ\u00a1R\u00a3"+ - "S\u00a5T\u00a7U\u00a9V\u00abW\u00adX\u00afY\u00b1Z\u00b3[\u00b5\\\u00b7"+ - "]\u00b9^\u00bb_\u00bd`\u00bfa\u00c1\2\u00c3\2\u00c5b\u00c7c\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\2GGg"+ - "g\4\2--//\6\2\f\f\16\17$$^^\2\u02af\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\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2["+ - "\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2"+ - "\2\2\2i\3\2\2\2\2k\3\2\2\2\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\u00c5\3\2\2\2\2\u00c7\3\2\2\2\3\u00c9\3\2\2\2\5\u00cb\3\2\2"+ - "\2\7\u00cd\3\2\2\2\t\u00d2\3\2\2\2\13\u00da\3\2\2\2\r\u00e4\3\2\2\2\17"+ - "\u00ee\3\2\2\2\21\u00f7\3\2\2\2\23\u00ff\3\2\2\2\25\u010b\3\2\2\2\27\u0117"+ - "\3\2\2\2\31\u0122\3\2\2\2\33\u012a\3\2\2\2\35\u012c\3\2\2\2\37\u012e\3"+ - "\2\2\2!\u0134\3\2\2\2#\u013b\3\2\2\2%\u0140\3\2\2\2\'\u0145\3\2\2\2)\u014b"+ - "\3\2\2\2+\u014f\3\2\2\2-\u0155\3\2\2\2/\u015b\3\2\2\2\61\u0162\3\2\2\2"+ - "\63\u0164\3\2\2\2\65\u0166\3\2\2\2\67\u0169\3\2\2\29\u016c\3\2\2\2;\u016f"+ - "\3\2\2\2=\u0172\3\2\2\2?\u0176\3\2\2\2A\u0179\3\2\2\2C\u017c\3\2\2\2E"+ - "\u017f\3\2\2\2G\u0182\3\2\2\2I\u0185\3\2\2\2K\u0187\3\2\2\2M\u0189\3\2"+ - "\2\2O\u018b\3\2\2\2Q\u018d\3\2\2\2S\u0190\3\2\2\2U\u0192\3\2\2\2W\u0194"+ - "\3\2\2\2Y\u0196\3\2\2\2[\u0198\3\2\2\2]\u019b\3\2\2\2_\u019e\3\2\2\2a"+ - "\u01a1\3\2\2\2c\u01a4\3\2\2\2e\u01a6\3\2\2\2g\u01a8\3\2\2\2i\u01aa\3\2"+ - "\2\2k\u01ad\3\2\2\2m\u01b1\3\2\2\2o\u01b4\3\2\2\2q\u01b8\3\2\2\2s\u01bc"+ - "\3\2\2\2u\u01c3\3\2\2\2w\u01c5\3\2\2\2y\u01c7\3\2\2\2{\u01c9\3\2\2\2}"+ - "\u01cb\3\2\2\2\177\u01ce\3\2\2\2\u0081\u01d1\3\2\2\2\u0083\u01d4\3\2\2"+ - "\2\u0085\u01d7\3\2\2\2\u0087\u01da\3\2\2\2\u0089\u01dd\3\2\2\2\u008b\u01e0"+ - "\3\2\2\2\u008d\u01e5\3\2\2\2\u008f\u01eb\3\2\2\2\u0091\u01f0\3\2\2\2\u0093"+ - "\u01f4\3\2\2\2\u0095\u01f7\3\2\2\2\u0097\u01f9\3\2\2\2\u0099\u01fb\3\2"+ - "\2\2\u009b\u01fd\3\2\2\2\u009d\u0200\3\2\2\2\u009f\u0205\3\2\2\2\u00a1"+ - "\u020b\3\2\2\2\u00a3\u0211\3\2\2\2\u00a5\u0217\3\2\2\2\u00a7\u021d\3\2"+ - "\2\2\u00a9\u0223\3\2\2\2\u00ab\u0229\3\2\2\2\u00ad\u022f\3\2\2\2\u00af"+ - "\u0235\3\2\2\2\u00b1\u0240\3\2\2\2\u00b3\u0249\3\2\2\2\u00b5\u024e\3\2"+ - "\2\2\u00b7\u0252\3\2\2\2\u00b9\u0260\3\2\2\2\u00bb\u0262\3\2\2\2\u00bd"+ - "\u0268\3\2\2\2\u00bf\u026e\3\2\2\2\u00c1\u0277\3\2\2\2\u00c3\u0287\3\2"+ - "\2\2\u00c5\u0289\3\2\2\2\u00c7\u0294\3\2\2\2\u00c9\u00ca\7\u0080\2\2\u00ca"+ - "\4\3\2\2\2\u00cb\u00cc\7<\2\2\u00cc\6\3\2\2\2\u00cd\u00ce\7i\2\2\u00ce"+ - "\u00cf\7q\2\2\u00cf\u00d0\7v\2\2\u00d0\u00d1\7q\2\2\u00d1\b\3\2\2\2\u00d2"+ - "\u00d3\7\'\2\2\u00d3\u00d4\7q\2\2\u00d4\u00d5\7w\2\2\u00d5\u00d6\7v\2"+ - "\2\u00d6\u00d7\7r\2\2\u00d7\u00d8\7w\2\2\u00d8\u00d9\7v\2\2\u00d9\n\3"+ - "\2\2\2\u00da\u00db\7\'\2\2\u00db\u00dc\7n\2\2\u00dc\u00dd\7c\2\2\u00dd"+ - "\u00de\7w\2\2\u00de\u00df\7p\2\2\u00df\u00e0\7e\2\2\u00e0\u00e1\7j\2\2"+ - "\u00e1\u00e2\7g\2\2\u00e2\u00e3\7t\2\2\u00e3\f\3\2\2\2\u00e4\u00e5\7\'"+ - "\2\2\u00e5\u00e6\7|\2\2\u00e6\u00e7\7g\2\2\u00e7\u00e8\7t\2\2\u00e8\u00e9"+ - "\7q\2\2\u00e9\u00ea\7r\2\2\u00ea\u00eb\7c\2\2\u00eb\u00ec\7i\2\2\u00ec"+ - "\u00ed\7g\2\2\u00ed\16\3\2\2\2\u00ee\u00ef\7\'\2\2\u00ef\u00f0\7c\2\2"+ - "\u00f0\u00f1\7f\2\2\u00f1\u00f2\7f\2\2\u00f2\u00f3\7t\2\2\u00f3\u00f4"+ - "\7g\2\2\u00f4\u00f5\7u\2\2\u00f5\u00f6\7u\2\2\u00f6\20\3\2\2\2\u00f7\u00f8"+ - "\7\'\2\2\u00f8\u00f9\7k\2\2\u00f9\u00fa\7o\2\2\u00fa\u00fb\7r\2\2\u00fb"+ - "\u00fc\7q\2\2\u00fc\u00fd\7t\2\2\u00fd\u00fe\7v\2\2\u00fe\22\3\2\2\2\u00ff"+ - "\u0100\7\'\2\2\u0100\u0101\7d\2\2\u0101\u0102\7t\2\2\u0102\u0103\7g\2"+ - "\2\u0103\u0104\7c\2\2\u0104\u0105\7m\2\2\u0105\u0106\7r\2\2\u0106\u0107"+ - "\7q\2\2\u0107\u0108\7k\2\2\u0108\u0109\7p\2\2\u0109\u010a\7v\2\2\u010a"+ - "\24\3\2\2\2\u010b\u010c\7\'\2\2\u010c\u010d\7c\2\2\u010d\u010e\7u\2\2"+ - "\u010e\u010f\7o\2\2\u010f\u0110\7k\2\2\u0110\u0111\7p\2\2\u0111\u0112"+ - "\7e\2\2\u0112\u0113\7n\2\2\u0113\u0114\7w\2\2\u0114\u0115\7f\2\2\u0115"+ - "\u0116\7g\2\2\u0116\26\3\2\2\2\u0117\u0118\7\'\2\2\u0118\u0119\7c\2\2"+ - "\u0119\u011a\7u\2\2\u011a\u011b\7o\2\2\u011b\u011c\7d\2\2\u011c\u011d"+ - "\7k\2\2\u011d\u011e\7p\2\2\u011e\u011f\7c\2\2\u011f\u0120\7t\2\2\u0120"+ - "\u0121\7{\2\2\u0121\30\3\2\2\2\u0122\u0123\7\'\2\2\u0123\u0124\7q\2\2"+ - "\u0124\u0125\7r\2\2\u0125\u0126\7v\2\2\u0126\u0127\7k\2\2\u0127\u0128"+ - "\7q\2\2\u0128\u0129\7p\2\2\u0129\32\3\2\2\2\u012a\u012b\7.\2\2\u012b\34"+ - "\3\2\2\2\u012c\u012d\7?\2\2\u012d\36\3\2\2\2\u012e\u012f\7e\2\2\u012f"+ - "\u0130\7q\2\2\u0130\u0131\7p\2\2\u0131\u0132\7u\2\2\u0132\u0133\7v\2\2"+ - "\u0133 \3\2\2\2\u0134\u0135\7o\2\2\u0135\u0136\7g\2\2\u0136\u0137\7o\2"+ - "\2\u0137\u0138\7q\2\2\u0138\u0139\7t\2\2\u0139\u013a\7{\2\2\u013a\"\3"+ - "\2\2\2\u013b\u013c\7d\2\2\u013c\u013d\7{\2\2\u013d\u013e\7v\2\2\u013e"+ - "\u013f\7g\2\2\u013f$\3\2\2\2\u0140\u0141\7y\2\2\u0141\u0142\7q\2\2\u0142"+ - "\u0143\7t\2\2\u0143\u0144\7f\2\2\u0144&\3\2\2\2\u0145\u0146\7h\2\2\u0146"+ - "\u0147\7n\2\2\u0147\u0148\7q\2\2\u0148\u0149\7c\2\2\u0149\u014a\7v\2\2"+ - "\u014a(\3\2\2\2\u014b\u014c\7u\2\2\u014c\u014d\7v\2\2\u014d\u014e\7t\2"+ - "\2\u014e*\3\2\2\2\u014f\u0150\7u\2\2\u0150\u0151\7v\2\2\u0151\u0152\7"+ - "t\2\2\u0152\u0153\7a\2\2\u0153\u0154\7r\2\2\u0154,\3\2\2\2\u0155\u0156"+ - "\7u\2\2\u0156\u0157\7v\2\2\u0157\u0158\7t\2\2\u0158\u0159\7a\2\2\u0159"+ - "\u015a\7u\2\2\u015a.\3\2\2\2\u015b\u015c\7u\2\2\u015c\u015d\7v\2\2\u015d"+ - "\u015e\7t\2\2\u015e\u015f\7a\2\2\u015f\u0160\7r\2\2\u0160\u0161\7u\2\2"+ - "\u0161\60\3\2\2\2\u0162\u0163\7]\2\2\u0163\62\3\2\2\2\u0164\u0165\7_\2"+ - "\2\u0165\64\3\2\2\2\u0166\u0167\7-\2\2\u0167\u0168\7?\2\2\u0168\66\3\2"+ - "\2\2\u0169\u016a\7/\2\2\u016a\u016b\7?\2\2\u016b8\3\2\2\2\u016c\u016d"+ - "\7\61\2\2\u016d\u016e\7?\2\2\u016e:\3\2\2\2\u016f\u0170\7,\2\2\u0170\u0171"+ - "\7?\2\2\u0171<\3\2\2\2\u0172\u0173\7,\2\2\u0173\u0174\7,\2\2\u0174\u0175"+ - "\7?\2\2\u0175>\3\2\2\2\u0176\u0177\7(\2\2\u0177\u0178\7?\2\2\u0178@\3"+ - "\2\2\2\u0179\u017a\7~\2\2\u017a\u017b\7?\2\2\u017bB\3\2\2\2\u017c\u017d"+ - "\7`\2\2\u017d\u017e\7?\2\2\u017eD\3\2\2\2\u017f\u0180\7-\2\2\u0180\u0181"+ - "\7-\2\2\u0181F\3\2\2\2\u0182\u0183\7/\2\2\u0183\u0184\7/\2\2\u0184H\3"+ - "\2\2\2\u0185\u0186\7*\2\2\u0186J\3\2\2\2\u0187\u0188\7+\2\2\u0188L\3\2"+ - "\2\2\u0189\u018a\7-\2\2\u018aN\3\2\2\2\u018b\u018c\7/\2\2\u018cP\3\2\2"+ - "\2\u018d\u018e\7,\2\2\u018e\u018f\7,\2\2\u018fR\3\2\2\2\u0190\u0191\7"+ - ",\2\2\u0191T\3\2\2\2\u0192\u0193\7\61\2\2\u0193V\3\2\2\2\u0194\u0195\7"+ - ">\2\2\u0195X\3\2\2\2\u0196\u0197\7@\2\2\u0197Z\3\2\2\2\u0198\u0199\7>"+ - "\2\2\u0199\u019a\7?\2\2\u019a\\\3\2\2\2\u019b\u019c\7@\2\2\u019c\u019d"+ - "\7?\2\2\u019d^\3\2\2\2\u019e\u019f\7?\2\2\u019f\u01a0\7?\2\2\u01a0`\3"+ - "\2\2\2\u01a1\u01a2\7#\2\2\u01a2\u01a3\7?\2\2\u01a3b\3\2\2\2\u01a4\u01a5"+ - "\7(\2\2\u01a5d\3\2\2\2\u01a6\u01a7\7`\2\2\u01a7f\3\2\2\2\u01a8\u01a9\7"+ - "~\2\2\u01a9h\3\2\2\2\u01aa\u01ab\7v\2\2\u01ab\u01ac\7q\2\2\u01acj\3\2"+ - "\2\2\u01ad\u01ae\7c\2\2\u01ae\u01af\7p\2\2\u01af\u01b0\7f\2\2\u01b0l\3"+ - "\2\2\2\u01b1\u01b2\7q\2\2\u01b2\u01b3\7t\2\2\u01b3n\3\2\2\2\u01b4\u01b5"+ - "\7z\2\2\u01b5\u01b6\7q\2\2\u01b6\u01b7\7t\2\2\u01b7p\3\2\2\2\u01b8\u01b9"+ - "\7p\2\2\u01b9\u01ba\7q\2\2\u01ba\u01bb\7v\2\2\u01bbr\3\2\2\2\u01bc\u01bd"+ - "\7t\2\2\u01bd\u01be\7g\2\2\u01be\u01bf\7v\2\2\u01bf\u01c0\7w\2\2\u01c0"+ - "\u01c1\7t\2\2\u01c1\u01c2\7p\2\2\u01c2t\3\2\2\2\u01c3\u01c4\7\60\2\2\u01c4"+ - "v\3\2\2\2\u01c5\u01c6\7C\2\2\u01c6x\3\2\2\2\u01c7\u01c8\7Z\2\2\u01c8z"+ - "\3\2\2\2\u01c9\u01ca\7[\2\2\u01ca|\3\2\2\2\u01cb\u01cc\7C\2\2\u01cc\u01cd"+ - "\7Z\2\2\u01cd~\3\2\2\2\u01ce\u01cf\7C\2\2\u01cf\u01d0\7[\2\2\u01d0\u0080"+ - "\3\2\2\2\u01d1\u01d2\7Z\2\2\u01d2\u01d3\7[\2\2\u01d3\u0082\3\2\2\2\u01d4"+ - "\u01d5\7R\2\2\u01d5\u01d6\7e\2\2\u01d6\u0084\3\2\2\2\u01d7\u01d8\7R\2"+ - "\2\u01d8\u01d9\7|\2\2\u01d9\u0086\3\2\2\2\u01da\u01db\7R\2\2\u01db\u01dc"+ - "\7p\2\2\u01dc\u0088\3\2\2\2\u01dd\u01de\7R\2\2\u01de\u01df\7x\2\2\u01df"+ - "\u008a\3\2\2\2\u01e0\u01e1\7v\2\2\u01e1\u01e2\7t\2\2\u01e2\u01e3\7w\2"+ - "\2\u01e3\u01e4\7g\2\2\u01e4\u008c\3\2\2\2\u01e5\u01e6\7h\2\2\u01e6\u01e7"+ - "\7c\2\2\u01e7\u01e8\7n\2\2\u01e8\u01e9\7u\2\2\u01e9\u01ea\7g\2\2\u01ea"+ - "\u008e\3\2\2\2\u01eb\u01ec\7\'\2\2\u01ec\u01ed\7c\2\2\u01ed\u01ee\7u\2"+ - "\2\u01ee\u01ef\7o\2\2\u01ef\u0090\3\2\2\2\u01f0\u01f1\7u\2\2\u01f1\u01f2"+ - "\7w\2\2\u01f2\u01f3\7d\2\2\u01f3\u0092\3\2\2\2\u01f4\u01f5\7/\2\2\u01f5"+ - "\u01f6\7@\2\2\u01f6\u0094\3\2\2\2\u01f7\u01f8\7}\2\2\u01f8\u0096\3\2\2"+ - "\2\u01f9\u01fa\7\177\2\2\u01fa\u0098\3\2\2\2\u01fb\u01fc\7A\2\2\u01fc"+ - "\u009a\3\2\2\2\u01fd\u01fe\7k\2\2\u01fe\u01ff\7h\2\2\u01ff\u009c\3\2\2"+ - "\2\u0200\u0201\7g\2\2\u0201\u0202\7n\2\2\u0202\u0203\7u\2\2\u0203\u0204"+ - "\7g\2\2\u0204\u009e\3\2\2\2\u0205\u0206\7k\2\2\u0206\u0207\7h\2\2\u0207"+ - "\u0208\7a\2\2\u0208\u0209\7e\2\2\u0209\u020a\7u\2\2\u020a\u00a0\3\2\2"+ - "\2\u020b\u020c\7k\2\2\u020c\u020d\7h\2\2\u020d\u020e\7a\2\2\u020e\u020f"+ - "\7e\2\2\u020f\u0210\7e\2\2\u0210\u00a2\3\2\2\2\u0211\u0212\7k\2\2\u0212"+ - "\u0213\7h\2\2\u0213\u0214\7a\2\2\u0214\u0215\7g\2\2\u0215\u0216\7s\2\2"+ - "\u0216\u00a4\3\2\2\2\u0217\u0218\7k\2\2\u0218\u0219\7h\2\2\u0219\u021a"+ - "\7a\2\2\u021a\u021b\7p\2\2\u021b\u021c\7g\2\2\u021c\u00a6\3\2\2\2\u021d"+ - "\u021e\7k\2\2\u021e\u021f\7h\2\2\u021f\u0220\7a\2\2\u0220\u0221\7r\2\2"+ - "\u0221\u0222\7n\2\2\u0222\u00a8\3\2\2\2\u0223\u0224\7k\2\2\u0224\u0225"+ - "\7h\2\2\u0225\u0226\7a\2\2\u0226\u0227\7o\2\2\u0227\u0228\7k\2\2\u0228"+ - "\u00aa\3\2\2\2\u0229\u022a\7k\2\2\u022a\u022b\7h\2\2\u022b\u022c\7a\2"+ - "\2\u022c\u022d\7x\2\2\u022d\u022e\7u\2\2\u022e\u00ac\3\2\2\2\u022f\u0230"+ - "\7k\2\2\u0230\u0231\7h\2\2\u0231\u0232\7a\2\2\u0232\u0233\7x\2\2\u0233"+ - "\u0234\7e\2\2\u0234\u00ae\3\2\2\2\u0235\u0239\t\2\2\2\u0236\u0238\t\3"+ - "\2\2\u0237\u0236\3\2\2\2\u0238\u023b\3\2\2\2\u0239\u0237\3\2\2\2\u0239"+ - "\u023a\3\2\2\2\u023a\u023c\3\2\2\2\u023b\u0239\3\2\2\2\u023c\u023d\5\u00b1"+ - "Y\2\u023d\u023e\3\2\2\2\u023e\u023f\bX\2\2\u023f\u00b0\3\2\2\2\u0240\u0244"+ - "\7=\2\2\u0241\u0243\n\2\2\2\u0242\u0241\3\2\2\2\u0243\u0246\3\2\2\2\u0244"+ - "\u0242\3\2\2\2\u0244\u0245\3\2\2\2\u0245\u0247\3\2\2\2\u0246\u0244\3\2"+ - "\2\2\u0247\u0248\bY\2\2\u0248\u00b2\3\2\2\2\u0249\u024a\t\3\2\2\u024a"+ - "\u024b\3\2\2\2\u024b\u024c\bZ\3\2\u024c\u00b4\3\2\2\2\u024d\u024f\t\2"+ - "\2\2\u024e\u024d\3\2\2\2\u024f\u0250\3\2\2\2\u0250\u024e\3\2\2\2\u0250"+ - "\u0251\3\2\2\2\u0251\u00b6\3\2\2\2\u0252\u0256\t\4\2\2\u0253\u0255\t\5"+ - "\2\2\u0254\u0253\3\2\2\2\u0255\u0258\3\2\2\2\u0256\u0254\3\2\2\2\u0256"+ - "\u0257\3\2\2\2\u0257\u00b8\3\2\2\2\u0258\u0256\3\2\2\2\u0259\u0261\4\62"+ - ";\2\u025a\u025c\4\63;\2\u025b\u025d\4\62;\2\u025c\u025b\3\2\2\2\u025d"+ - "\u025e\3\2\2\2\u025e\u025c\3\2\2\2\u025e\u025f\3\2\2\2\u025f\u0261\3\2"+ - "\2\2\u0260\u0259\3\2\2\2\u0260\u025a\3\2\2\2\u0261\u00ba\3\2\2\2\u0262"+ - "\u0264\7&\2\2\u0263\u0265\t\6\2\2\u0264\u0263\3\2\2\2\u0265\u0266\3\2"+ - "\2\2\u0266\u0264\3\2\2\2\u0266\u0267\3\2\2\2\u0267\u00bc\3\2\2\2\u0268"+ - "\u026a\7\'\2\2\u0269\u026b\4\62\63\2\u026a\u0269\3\2\2\2\u026b\u026c\3"+ - "\2\2\2\u026c\u026a\3\2\2\2\u026c\u026d\3\2\2\2\u026d\u00be\3\2\2\2\u026e"+ - "\u0274\5\u00c1a\2\u026f\u0271\t\7\2\2\u0270\u0272\t\b\2\2\u0271\u0270"+ - "\3\2\2\2\u0271\u0272\3\2\2\2\u0272\u0273\3\2\2\2\u0273\u0275\5\u00c1a"+ - "\2\u0274\u026f\3\2\2\2\u0274\u0275\3\2\2\2\u0275\u00c0\3\2\2\2\u0276\u0278"+ - "\4\62;\2\u0277\u0276\3\2\2\2\u0278\u0279\3\2\2\2\u0279\u0277\3\2\2\2\u0279"+ - "\u027a\3\2\2\2\u027a\u0281\3\2\2\2\u027b\u027d\7\60\2\2\u027c\u027e\4"+ - "\62;\2\u027d\u027c\3\2\2\2\u027e\u027f\3\2\2\2\u027f\u027d\3\2\2\2\u027f"+ - "\u0280\3\2\2\2\u0280\u0282\3\2\2\2\u0281\u027b\3\2\2\2\u0281\u0282\3\2"+ - "\2\2\u0282\u00c2\3\2\2\2\u0283\u0284\7^\2\2\u0284\u0288\13\2\2\2\u0285"+ - "\u0286\7^\2\2\u0286\u0288\5\u00b5[\2\u0287\u0283\3\2\2\2\u0287\u0285\3"+ - "\2\2\2\u0288\u00c4\3\2\2\2\u0289\u028e\7$\2\2\u028a\u028d\5\u00c3b\2\u028b"+ - "\u028d\n\t\2\2\u028c\u028a\3\2\2\2\u028c\u028b\3\2\2\2\u028d\u0290\3\2"+ - "\2\2\u028e\u028c\3\2\2\2\u028e\u028f\3\2\2\2\u028f\u0291\3\2\2\2\u0290"+ - "\u028e\3\2\2\2\u0291\u0292\7$\2\2\u0292\u0293\bc\4\2\u0293\u00c6\3\2\2"+ - "\2\u0294\u0295\7}\2\2\u0295\u0296\7}\2\2\u0296\u0298\3\2\2\2\u0297\u0299"+ - "\13\2\2\2\u0298\u0297\3\2\2\2\u0299\u029a\3\2\2\2\u029a\u029b\3\2\2\2"+ - "\u029a\u0298\3\2\2\2\u029b\u029c\3\2\2\2\u029c\u029d\7\177\2\2\u029d\u029e"+ - "\7\177\2\2\u029e\u029f\3\2\2\2\u029f\u02a0\bd\5\2\u02a0\u00c8\3\2\2\2"+ - "\25\2\u0239\u0244\u0250\u0256\u025e\u0260\u0264\u0266\u026c\u0271\u0274"+ - "\u0279\u027f\u0281\u0287\u028c\u028e\u029a\6\2\3\2\b\2\2\3c\2\3d\3"; + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\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\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\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\r\3\r\3\r\3\r\3"+ + "\r\3\r\3\r\3\r\3\16\3\16\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\20\3\21"+ + "\3\21\3\21\3\21\3\21\3\21\3\21\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\26\3\26"+ + "\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\30"+ + "\3\30\3\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\60\3\60\3\60\3\61\3\61\3\61\3\62\3\62"+ + "\3\63\3\63\3\64\3\64\3\65\3\65\3\65\3\66\3\66\3\66\3\66\3\67\3\67\3\67"+ + "\38\38\38\38\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@\3A\3A\3A\3B\3B\3B\3C\3C\3C\3D\3D\3D\3E\3E\3E\3F\3F"+ + "\3F\3G\3G\3G\3G\3G\3H\3H\3H\3H\3H\3H\3I\3I\3I\3I\3I\3J\3J\3J\3J\3K\3K"+ + "\3K\3L\3L\3M\3M\3N\3N\3O\3O\3O\3P\3P\3P\3P\3P\3Q\3Q\3Q\3Q\3Q\3Q\3R\3R"+ + "\3R\3R\3R\3R\3S\3S\3S\3S\3S\3S\3T\3T\3T\3T\3T\3T\3U\3U\3U\3U\3U\3U\3V"+ + "\3V\3V\3V\3V\3V\3W\3W\3W\3W\3W\3W\3X\3X\3X\3X\3X\3X\3Y\3Y\7Y\u023d\nY"+ + "\fY\16Y\u0240\13Y\3Y\3Y\3Y\3Y\3Z\3Z\7Z\u0248\nZ\fZ\16Z\u024b\13Z\3Z\3"+ + "Z\3[\3[\3[\3[\3\\\6\\\u0254\n\\\r\\\16\\\u0255\3]\3]\7]\u025a\n]\f]\16"+ + "]\u025d\13]\3^\3^\3^\6^\u0262\n^\r^\16^\u0263\5^\u0266\n^\3_\3_\6_\u026a"+ + "\n_\r_\16_\u026b\3`\3`\6`\u0270\n`\r`\16`\u0271\3a\3a\3a\5a\u0277\na\3"+ + "a\5a\u027a\na\3b\6b\u027d\nb\rb\16b\u027e\3b\3b\6b\u0283\nb\rb\16b\u0284"+ + "\5b\u0287\nb\3c\3c\3c\3c\5c\u028d\nc\3d\3d\3d\7d\u0292\nd\fd\16d\u0295"+ + "\13d\3d\3d\3d\3e\3e\3e\3e\6e\u029e\ne\re\16e\u029f\3e\3e\3e\3e\3e\3\u029f"+ + "\2f\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\67"+ + "m8o9q:s;u{?}@\177A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG\u008d"+ + "H\u008fI\u0091J\u0093K\u0095L\u0097M\u0099N\u009bO\u009dP\u009fQ\u00a1"+ + "R\u00a3S\u00a5T\u00a7U\u00a9V\u00abW\u00adX\u00afY\u00b1Z\u00b3[\u00b5"+ + "\\\u00b7]\u00b9^\u00bb_\u00bd`\u00bfa\u00c1b\u00c3\2\u00c5\2\u00c7c\u00c9"+ + "d\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\u02b4\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\2U\3\2\2\2\2W\3\2\2\2\2Y"+ + "\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2"+ + "\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\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\u00c7\3\2\2\2\2\u00c9\3\2\2\2\3\u00cb"+ + "\3\2\2\2\5\u00cd\3\2\2\2\7\u00cf\3\2\2\2\t\u00d4\3\2\2\2\13\u00dc\3\2"+ + "\2\2\r\u00e6\3\2\2\2\17\u00f0\3\2\2\2\21\u00f9\3\2\2\2\23\u0101\3\2\2"+ + "\2\25\u010d\3\2\2\2\27\u0119\3\2\2\2\31\u0124\3\2\2\2\33\u012c\3\2\2\2"+ + "\35\u012e\3\2\2\2\37\u0130\3\2\2\2!\u0136\3\2\2\2#\u013d\3\2\2\2%\u0142"+ + "\3\2\2\2\'\u0147\3\2\2\2)\u014d\3\2\2\2+\u0151\3\2\2\2-\u0157\3\2\2\2"+ + "/\u015d\3\2\2\2\61\u0164\3\2\2\2\63\u0166\3\2\2\2\65\u0168\3\2\2\2\67"+ + "\u016b\3\2\2\29\u016e\3\2\2\2;\u0171\3\2\2\2=\u0174\3\2\2\2?\u0178\3\2"+ + "\2\2A\u017b\3\2\2\2C\u017e\3\2\2\2E\u0181\3\2\2\2G\u0184\3\2\2\2I\u0187"+ + "\3\2\2\2K\u0189\3\2\2\2M\u018b\3\2\2\2O\u018d\3\2\2\2Q\u018f\3\2\2\2S"+ + "\u0192\3\2\2\2U\u0194\3\2\2\2W\u0196\3\2\2\2Y\u0198\3\2\2\2[\u019a\3\2"+ + "\2\2]\u019d\3\2\2\2_\u01a0\3\2\2\2a\u01a3\3\2\2\2c\u01a6\3\2\2\2e\u01a8"+ + "\3\2\2\2g\u01aa\3\2\2\2i\u01ac\3\2\2\2k\u01af\3\2\2\2m\u01b3\3\2\2\2o"+ + "\u01b6\3\2\2\2q\u01ba\3\2\2\2s\u01be\3\2\2\2u\u01c5\3\2\2\2w\u01c7\3\2"+ + "\2\2y\u01c9\3\2\2\2{\u01cb\3\2\2\2}\u01cd\3\2\2\2\177\u01d0\3\2\2\2\u0081"+ + "\u01d3\3\2\2\2\u0083\u01d6\3\2\2\2\u0085\u01d9\3\2\2\2\u0087\u01dc\3\2"+ + "\2\2\u0089\u01df\3\2\2\2\u008b\u01e2\3\2\2\2\u008d\u01e5\3\2\2\2\u008f"+ + "\u01ea\3\2\2\2\u0091\u01f0\3\2\2\2\u0093\u01f5\3\2\2\2\u0095\u01f9\3\2"+ + "\2\2\u0097\u01fc\3\2\2\2\u0099\u01fe\3\2\2\2\u009b\u0200\3\2\2\2\u009d"+ + "\u0202\3\2\2\2\u009f\u0205\3\2\2\2\u00a1\u020a\3\2\2\2\u00a3\u0210\3\2"+ + "\2\2\u00a5\u0216\3\2\2\2\u00a7\u021c\3\2\2\2\u00a9\u0222\3\2\2\2\u00ab"+ + "\u0228\3\2\2\2\u00ad\u022e\3\2\2\2\u00af\u0234\3\2\2\2\u00b1\u023a\3\2"+ + "\2\2\u00b3\u0245\3\2\2\2\u00b5\u024e\3\2\2\2\u00b7\u0253\3\2\2\2\u00b9"+ + "\u0257\3\2\2\2\u00bb\u0265\3\2\2\2\u00bd\u0267\3\2\2\2\u00bf\u026d\3\2"+ + "\2\2\u00c1\u0273\3\2\2\2\u00c3\u027c\3\2\2\2\u00c5\u028c\3\2\2\2\u00c7"+ + "\u028e\3\2\2\2\u00c9\u0299\3\2\2\2\u00cb\u00cc\7\u0080\2\2\u00cc\4\3\2"+ + "\2\2\u00cd\u00ce\7<\2\2\u00ce\6\3\2\2\2\u00cf\u00d0\7i\2\2\u00d0\u00d1"+ + "\7q\2\2\u00d1\u00d2\7v\2\2\u00d2\u00d3\7q\2\2\u00d3\b\3\2\2\2\u00d4\u00d5"+ + "\7\'\2\2\u00d5\u00d6\7q\2\2\u00d6\u00d7\7w\2\2\u00d7\u00d8\7v\2\2\u00d8"+ + "\u00d9\7r\2\2\u00d9\u00da\7w\2\2\u00da\u00db\7v\2\2\u00db\n\3\2\2\2\u00dc"+ + "\u00dd\7\'\2\2\u00dd\u00de\7n\2\2\u00de\u00df\7c\2\2\u00df\u00e0\7w\2"+ + "\2\u00e0\u00e1\7p\2\2\u00e1\u00e2\7e\2\2\u00e2\u00e3\7j\2\2\u00e3\u00e4"+ + "\7g\2\2\u00e4\u00e5\7t\2\2\u00e5\f\3\2\2\2\u00e6\u00e7\7\'\2\2\u00e7\u00e8"+ + "\7|\2\2\u00e8\u00e9\7g\2\2\u00e9\u00ea\7t\2\2\u00ea\u00eb\7q\2\2\u00eb"+ + "\u00ec\7r\2\2\u00ec\u00ed\7c\2\2\u00ed\u00ee\7i\2\2\u00ee\u00ef\7g\2\2"+ + "\u00ef\16\3\2\2\2\u00f0\u00f1\7\'\2\2\u00f1\u00f2\7c\2\2\u00f2\u00f3\7"+ + "f\2\2\u00f3\u00f4\7f\2\2\u00f4\u00f5\7t\2\2\u00f5\u00f6\7g\2\2\u00f6\u00f7"+ + "\7u\2\2\u00f7\u00f8\7u\2\2\u00f8\20\3\2\2\2\u00f9\u00fa\7\'\2\2\u00fa"+ + "\u00fb\7k\2\2\u00fb\u00fc\7o\2\2\u00fc\u00fd\7r\2\2\u00fd\u00fe\7q\2\2"+ + "\u00fe\u00ff\7t\2\2\u00ff\u0100\7v\2\2\u0100\22\3\2\2\2\u0101\u0102\7"+ + "\'\2\2\u0102\u0103\7d\2\2\u0103\u0104\7t\2\2\u0104\u0105\7g\2\2\u0105"+ + "\u0106\7c\2\2\u0106\u0107\7m\2\2\u0107\u0108\7r\2\2\u0108\u0109\7q\2\2"+ + "\u0109\u010a\7k\2\2\u010a\u010b\7p\2\2\u010b\u010c\7v\2\2\u010c\24\3\2"+ + "\2\2\u010d\u010e\7\'\2\2\u010e\u010f\7c\2\2\u010f\u0110\7u\2\2\u0110\u0111"+ + "\7o\2\2\u0111\u0112\7k\2\2\u0112\u0113\7p\2\2\u0113\u0114\7e\2\2\u0114"+ + "\u0115\7n\2\2\u0115\u0116\7w\2\2\u0116\u0117\7f\2\2\u0117\u0118\7g\2\2"+ + "\u0118\26\3\2\2\2\u0119\u011a\7\'\2\2\u011a\u011b\7c\2\2\u011b\u011c\7"+ + "u\2\2\u011c\u011d\7o\2\2\u011d\u011e\7d\2\2\u011e\u011f\7k\2\2\u011f\u0120"+ + "\7p\2\2\u0120\u0121\7c\2\2\u0121\u0122\7t\2\2\u0122\u0123\7{\2\2\u0123"+ + "\30\3\2\2\2\u0124\u0125\7\'\2\2\u0125\u0126\7q\2\2\u0126\u0127\7r\2\2"+ + "\u0127\u0128\7v\2\2\u0128\u0129\7k\2\2\u0129\u012a\7q\2\2\u012a\u012b"+ + "\7p\2\2\u012b\32\3\2\2\2\u012c\u012d\7.\2\2\u012d\34\3\2\2\2\u012e\u012f"+ + "\7?\2\2\u012f\36\3\2\2\2\u0130\u0131\7e\2\2\u0131\u0132\7q\2\2\u0132\u0133"+ + "\7p\2\2\u0133\u0134\7u\2\2\u0134\u0135\7v\2\2\u0135 \3\2\2\2\u0136\u0137"+ + "\7o\2\2\u0137\u0138\7g\2\2\u0138\u0139\7o\2\2\u0139\u013a\7q\2\2\u013a"+ + "\u013b\7t\2\2\u013b\u013c\7{\2\2\u013c\"\3\2\2\2\u013d\u013e\7d\2\2\u013e"+ + "\u013f\7{\2\2\u013f\u0140\7v\2\2\u0140\u0141\7g\2\2\u0141$\3\2\2\2\u0142"+ + "\u0143\7y\2\2\u0143\u0144\7q\2\2\u0144\u0145\7t\2\2\u0145\u0146\7f\2\2"+ + "\u0146&\3\2\2\2\u0147\u0148\7h\2\2\u0148\u0149\7n\2\2\u0149\u014a\7q\2"+ + "\2\u014a\u014b\7c\2\2\u014b\u014c\7v\2\2\u014c(\3\2\2\2\u014d\u014e\7"+ + "u\2\2\u014e\u014f\7v\2\2\u014f\u0150\7t\2\2\u0150*\3\2\2\2\u0151\u0152"+ + "\7u\2\2\u0152\u0153\7v\2\2\u0153\u0154\7t\2\2\u0154\u0155\7a\2\2\u0155"+ + "\u0156\7r\2\2\u0156,\3\2\2\2\u0157\u0158\7u\2\2\u0158\u0159\7v\2\2\u0159"+ + "\u015a\7t\2\2\u015a\u015b\7a\2\2\u015b\u015c\7u\2\2\u015c.\3\2\2\2\u015d"+ + "\u015e\7u\2\2\u015e\u015f\7v\2\2\u015f\u0160\7t\2\2\u0160\u0161\7a\2\2"+ + "\u0161\u0162\7r\2\2\u0162\u0163\7u\2\2\u0163\60\3\2\2\2\u0164\u0165\7"+ + "]\2\2\u0165\62\3\2\2\2\u0166\u0167\7_\2\2\u0167\64\3\2\2\2\u0168\u0169"+ + "\7-\2\2\u0169\u016a\7?\2\2\u016a\66\3\2\2\2\u016b\u016c\7/\2\2\u016c\u016d"+ + "\7?\2\2\u016d8\3\2\2\2\u016e\u016f\7\61\2\2\u016f\u0170\7?\2\2\u0170:"+ + "\3\2\2\2\u0171\u0172\7,\2\2\u0172\u0173\7?\2\2\u0173<\3\2\2\2\u0174\u0175"+ + "\7,\2\2\u0175\u0176\7,\2\2\u0176\u0177\7?\2\2\u0177>\3\2\2\2\u0178\u0179"+ + "\7(\2\2\u0179\u017a\7?\2\2\u017a@\3\2\2\2\u017b\u017c\7~\2\2\u017c\u017d"+ + "\7?\2\2\u017dB\3\2\2\2\u017e\u017f\7`\2\2\u017f\u0180\7?\2\2\u0180D\3"+ + "\2\2\2\u0181\u0182\7-\2\2\u0182\u0183\7-\2\2\u0183F\3\2\2\2\u0184\u0185"+ + "\7/\2\2\u0185\u0186\7/\2\2\u0186H\3\2\2\2\u0187\u0188\7*\2\2\u0188J\3"+ + "\2\2\2\u0189\u018a\7+\2\2\u018aL\3\2\2\2\u018b\u018c\7-\2\2\u018cN\3\2"+ + "\2\2\u018d\u018e\7/\2\2\u018eP\3\2\2\2\u018f\u0190\7,\2\2\u0190\u0191"+ + "\7,\2\2\u0191R\3\2\2\2\u0192\u0193\7,\2\2\u0193T\3\2\2\2\u0194\u0195\7"+ + "\61\2\2\u0195V\3\2\2\2\u0196\u0197\7>\2\2\u0197X\3\2\2\2\u0198\u0199\7"+ + "@\2\2\u0199Z\3\2\2\2\u019a\u019b\7>\2\2\u019b\u019c\7?\2\2\u019c\\\3\2"+ + "\2\2\u019d\u019e\7@\2\2\u019e\u019f\7?\2\2\u019f^\3\2\2\2\u01a0\u01a1"+ + "\7?\2\2\u01a1\u01a2\7?\2\2\u01a2`\3\2\2\2\u01a3\u01a4\7#\2\2\u01a4\u01a5"+ + "\7?\2\2\u01a5b\3\2\2\2\u01a6\u01a7\7(\2\2\u01a7d\3\2\2\2\u01a8\u01a9\7"+ + "`\2\2\u01a9f\3\2\2\2\u01aa\u01ab\7~\2\2\u01abh\3\2\2\2\u01ac\u01ad\7v"+ + "\2\2\u01ad\u01ae\7q\2\2\u01aej\3\2\2\2\u01af\u01b0\7c\2\2\u01b0\u01b1"+ + "\7p\2\2\u01b1\u01b2\7f\2\2\u01b2l\3\2\2\2\u01b3\u01b4\7q\2\2\u01b4\u01b5"+ + "\7t\2\2\u01b5n\3\2\2\2\u01b6\u01b7\7z\2\2\u01b7\u01b8\7q\2\2\u01b8\u01b9"+ + "\7t\2\2\u01b9p\3\2\2\2\u01ba\u01bb\7p\2\2\u01bb\u01bc\7q\2\2\u01bc\u01bd"+ + "\7v\2\2\u01bdr\3\2\2\2\u01be\u01bf\7t\2\2\u01bf\u01c0\7g\2\2\u01c0\u01c1"+ + "\7v\2\2\u01c1\u01c2\7w\2\2\u01c2\u01c3\7t\2\2\u01c3\u01c4\7p\2\2\u01c4"+ + "t\3\2\2\2\u01c5\u01c6\7\60\2\2\u01c6v\3\2\2\2\u01c7\u01c8\7C\2\2\u01c8"+ + "x\3\2\2\2\u01c9\u01ca\7Z\2\2\u01caz\3\2\2\2\u01cb\u01cc\7[\2\2\u01cc|"+ + "\3\2\2\2\u01cd\u01ce\7C\2\2\u01ce\u01cf\7Z\2\2\u01cf~\3\2\2\2\u01d0\u01d1"+ + "\7C\2\2\u01d1\u01d2\7[\2\2\u01d2\u0080\3\2\2\2\u01d3\u01d4\7Z\2\2\u01d4"+ + "\u01d5\7[\2\2\u01d5\u0082\3\2\2\2\u01d6\u01d7\7R\2\2\u01d7\u01d8\7e\2"+ + "\2\u01d8\u0084\3\2\2\2\u01d9\u01da\7R\2\2\u01da\u01db\7|\2\2\u01db\u0086"+ + "\3\2\2\2\u01dc\u01dd\7R\2\2\u01dd\u01de\7p\2\2\u01de\u0088\3\2\2\2\u01df"+ + "\u01e0\7R\2\2\u01e0\u01e1\7x\2\2\u01e1\u008a\3\2\2\2\u01e2\u01e3\7\60"+ + "\2\2\u01e3\u01e4\7y\2\2\u01e4\u008c\3\2\2\2\u01e5\u01e6\7v\2\2\u01e6\u01e7"+ + "\7t\2\2\u01e7\u01e8\7w\2\2\u01e8\u01e9\7g\2\2\u01e9\u008e\3\2\2\2\u01ea"+ + "\u01eb\7h\2\2\u01eb\u01ec\7c\2\2\u01ec\u01ed\7n\2\2\u01ed\u01ee\7u\2\2"+ + "\u01ee\u01ef\7g\2\2\u01ef\u0090\3\2\2\2\u01f0\u01f1\7\'\2\2\u01f1\u01f2"+ + "\7c\2\2\u01f2\u01f3\7u\2\2\u01f3\u01f4\7o\2\2\u01f4\u0092\3\2\2\2\u01f5"+ + "\u01f6\7u\2\2\u01f6\u01f7\7w\2\2\u01f7\u01f8\7d\2\2\u01f8\u0094\3\2\2"+ + "\2\u01f9\u01fa\7/\2\2\u01fa\u01fb\7@\2\2\u01fb\u0096\3\2\2\2\u01fc\u01fd"+ + "\7}\2\2\u01fd\u0098\3\2\2\2\u01fe\u01ff\7\177\2\2\u01ff\u009a\3\2\2\2"+ + "\u0200\u0201\7A\2\2\u0201\u009c\3\2\2\2\u0202\u0203\7k\2\2\u0203\u0204"+ + "\7h\2\2\u0204\u009e\3\2\2\2\u0205\u0206\7g\2\2\u0206\u0207\7n\2\2\u0207"+ + "\u0208\7u\2\2\u0208\u0209\7g\2\2\u0209\u00a0\3\2\2\2\u020a\u020b\7k\2"+ + "\2\u020b\u020c\7h\2\2\u020c\u020d\7a\2\2\u020d\u020e\7e\2\2\u020e\u020f"+ + "\7u\2\2\u020f\u00a2\3\2\2\2\u0210\u0211\7k\2\2\u0211\u0212\7h\2\2\u0212"+ + "\u0213\7a\2\2\u0213\u0214\7e\2\2\u0214\u0215\7e\2\2\u0215\u00a4\3\2\2"+ + "\2\u0216\u0217\7k\2\2\u0217\u0218\7h\2\2\u0218\u0219\7a\2\2\u0219\u021a"+ + "\7g\2\2\u021a\u021b\7s\2\2\u021b\u00a6\3\2\2\2\u021c\u021d\7k\2\2\u021d"+ + "\u021e\7h\2\2\u021e\u021f\7a\2\2\u021f\u0220\7p\2\2\u0220\u0221\7g\2\2"+ + "\u0221\u00a8\3\2\2\2\u0222\u0223\7k\2\2\u0223\u0224\7h\2\2\u0224\u0225"+ + "\7a\2\2\u0225\u0226\7r\2\2\u0226\u0227\7n\2\2\u0227\u00aa\3\2\2\2\u0228"+ + "\u0229\7k\2\2\u0229\u022a\7h\2\2\u022a\u022b\7a\2\2\u022b\u022c\7o\2\2"+ + "\u022c\u022d\7k\2\2\u022d\u00ac\3\2\2\2\u022e\u022f\7k\2\2\u022f\u0230"+ + "\7h\2\2\u0230\u0231\7a\2\2\u0231\u0232\7x\2\2\u0232\u0233\7u\2\2\u0233"+ + "\u00ae\3\2\2\2\u0234\u0235\7k\2\2\u0235\u0236\7h\2\2\u0236\u0237\7a\2"+ + "\2\u0237\u0238\7x\2\2\u0238\u0239\7e\2\2\u0239\u00b0\3\2\2\2\u023a\u023e"+ + "\t\2\2\2\u023b\u023d\t\3\2\2\u023c\u023b\3\2\2\2\u023d\u0240\3\2\2\2\u023e"+ + "\u023c\3\2\2\2\u023e\u023f\3\2\2\2\u023f\u0241\3\2\2\2\u0240\u023e\3\2"+ + "\2\2\u0241\u0242\5\u00b3Z\2\u0242\u0243\3\2\2\2\u0243\u0244\bY\2\2\u0244"+ + "\u00b2\3\2\2\2\u0245\u0249\7=\2\2\u0246\u0248\n\2\2\2\u0247\u0246\3\2"+ + "\2\2\u0248\u024b\3\2\2\2\u0249\u0247\3\2\2\2\u0249\u024a\3\2\2\2\u024a"+ + "\u024c\3\2\2\2\u024b\u0249\3\2\2\2\u024c\u024d\bZ\2\2\u024d\u00b4\3\2"+ + "\2\2\u024e\u024f\t\3\2\2\u024f\u0250\3\2\2\2\u0250\u0251\b[\3\2\u0251"+ + "\u00b6\3\2\2\2\u0252\u0254\t\2\2\2\u0253\u0252\3\2\2\2\u0254\u0255\3\2"+ + "\2\2\u0255\u0253\3\2\2\2\u0255\u0256\3\2\2\2\u0256\u00b8\3\2\2\2\u0257"+ + "\u025b\t\4\2\2\u0258\u025a\t\5\2\2\u0259\u0258\3\2\2\2\u025a\u025d\3\2"+ + "\2\2\u025b\u0259\3\2\2\2\u025b\u025c\3\2\2\2\u025c\u00ba\3\2\2\2\u025d"+ + "\u025b\3\2\2\2\u025e\u0266\4\62;\2\u025f\u0261\4\63;\2\u0260\u0262\4\62"+ + ";\2\u0261\u0260\3\2\2\2\u0262\u0263\3\2\2\2\u0263\u0261\3\2\2\2\u0263"+ + "\u0264\3\2\2\2\u0264\u0266\3\2\2\2\u0265\u025e\3\2\2\2\u0265\u025f\3\2"+ + "\2\2\u0266\u00bc\3\2\2\2\u0267\u0269\7&\2\2\u0268\u026a\t\6\2\2\u0269"+ + "\u0268\3\2\2\2\u026a\u026b\3\2\2\2\u026b\u0269\3\2\2\2\u026b\u026c\3\2"+ + "\2\2\u026c\u00be\3\2\2\2\u026d\u026f\7\'\2\2\u026e\u0270\4\62\63\2\u026f"+ + "\u026e\3\2\2\2\u0270\u0271\3\2\2\2\u0271\u026f\3\2\2\2\u0271\u0272\3\2"+ + "\2\2\u0272\u00c0\3\2\2\2\u0273\u0279\5\u00c3b\2\u0274\u0276\t\7\2\2\u0275"+ + "\u0277\t\b\2\2\u0276\u0275\3\2\2\2\u0276\u0277\3\2\2\2\u0277\u0278\3\2"+ + "\2\2\u0278\u027a\5\u00c3b\2\u0279\u0274\3\2\2\2\u0279\u027a\3\2\2\2\u027a"+ + "\u00c2\3\2\2\2\u027b\u027d\4\62;\2\u027c\u027b\3\2\2\2\u027d\u027e\3\2"+ + "\2\2\u027e\u027c\3\2\2\2\u027e\u027f\3\2\2\2\u027f\u0286\3\2\2\2\u0280"+ + "\u0282\7\60\2\2\u0281\u0283\4\62;\2\u0282\u0281\3\2\2\2\u0283\u0284\3"+ + "\2\2\2\u0284\u0282\3\2\2\2\u0284\u0285\3\2\2\2\u0285\u0287\3\2\2\2\u0286"+ + "\u0280\3\2\2\2\u0286\u0287\3\2\2\2\u0287\u00c4\3\2\2\2\u0288\u0289\7^"+ + "\2\2\u0289\u028d\13\2\2\2\u028a\u028b\7^\2\2\u028b\u028d\5\u00b7\\\2\u028c"+ + "\u0288\3\2\2\2\u028c\u028a\3\2\2\2\u028d\u00c6\3\2\2\2\u028e\u0293\7$"+ + "\2\2\u028f\u0292\5\u00c5c\2\u0290\u0292\n\t\2\2\u0291\u028f\3\2\2\2\u0291"+ + "\u0290\3\2\2\2\u0292\u0295\3\2\2\2\u0293\u0291\3\2\2\2\u0293\u0294\3\2"+ + "\2\2\u0294\u0296\3\2\2\2\u0295\u0293\3\2\2\2\u0296\u0297\7$\2\2\u0297"+ + "\u0298\bd\4\2\u0298\u00c8\3\2\2\2\u0299\u029a\7}\2\2\u029a\u029b\7}\2"+ + "\2\u029b\u029d\3\2\2\2\u029c\u029e\13\2\2\2\u029d\u029c\3\2\2\2\u029e"+ + "\u029f\3\2\2\2\u029f\u02a0\3\2\2\2\u029f\u029d\3\2\2\2\u02a0\u02a1\3\2"+ + "\2\2\u02a1\u02a2\7\177\2\2\u02a2\u02a3\7\177\2\2\u02a3\u02a4\3\2\2\2\u02a4"+ + "\u02a5\be\5\2\u02a5\u00ca\3\2\2\2\25\2\u023e\u0249\u0255\u025b\u0263\u0265"+ + "\u0269\u026b\u0271\u0276\u0279\u027e\u0284\u0286\u028c\u0291\u0293\u029f"+ + "\6\2\3\2\b\2\2\3d\2\3e\3"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/il65/src/il65/parser/il65Lexer.tokens b/il65/src/il65/parser/il65Lexer.tokens index 2ff964a9d..04dda9314 100644 --- a/il65/src/il65/parser/il65Lexer.tokens +++ b/il65/src/il65/parser/il65Lexer.tokens @@ -84,17 +84,18 @@ T__82=83 T__83=84 T__84=85 T__85=86 -LINECOMMENT=87 -COMMENT=88 -WS=89 -EOL=90 -NAME=91 -DEC_INTEGER=92 -HEX_INTEGER=93 -BIN_INTEGER=94 -FLOAT_NUMBER=95 -STRING=96 -INLINEASMBLOCK=97 +T__86=87 +LINECOMMENT=88 +COMMENT=89 +WS=90 +EOL=91 +NAME=92 +DEC_INTEGER=93 +HEX_INTEGER=94 +BIN_INTEGER=95 +FLOAT_NUMBER=96 +STRING=97 +INLINEASMBLOCK=98 '~'=1 ':'=2 'goto'=3 @@ -163,21 +164,22 @@ INLINEASMBLOCK=97 'Pz'=66 'Pn'=67 'Pv'=68 -'true'=69 -'false'=70 -'%asm'=71 -'sub'=72 -'->'=73 -'{'=74 -'}'=75 -'?'=76 -'if'=77 -'else'=78 -'if_cs'=79 -'if_cc'=80 -'if_eq'=81 -'if_ne'=82 -'if_pl'=83 -'if_mi'=84 -'if_vs'=85 -'if_vc'=86 +'.w'=69 +'true'=70 +'false'=71 +'%asm'=72 +'sub'=73 +'->'=74 +'{'=75 +'}'=76 +'?'=77 +'if'=78 +'else'=79 +'if_cs'=80 +'if_cc'=81 +'if_eq'=82 +'if_ne'=83 +'if_pl'=84 +'if_mi'=85 +'if_vs'=86 +'if_vc'=87 diff --git a/il65/src/il65/parser/il65Parser.java b/il65/src/il65/parser/il65Parser.java index 34c615cd8..a07ab0a8f 100644 --- a/il65/src/il65/parser/il65Parser.java +++ b/il65/src/il65/parser/il65Parser.java @@ -28,9 +28,9 @@ public class il65Parser extends Parser { 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, LINECOMMENT=87, - COMMENT=88, WS=89, EOL=90, NAME=91, DEC_INTEGER=92, HEX_INTEGER=93, BIN_INTEGER=94, - FLOAT_NUMBER=95, STRING=96, INLINEASMBLOCK=97; + T__80=81, T__81=82, T__82=83, T__83=84, T__84=85, T__85=86, T__86=87, + LINECOMMENT=88, COMMENT=89, WS=90, EOL=91, NAME=92, DEC_INTEGER=93, HEX_INTEGER=94, + BIN_INTEGER=95, FLOAT_NUMBER=96, STRING=97, INLINEASMBLOCK=98; 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, @@ -39,22 +39,22 @@ public class il65Parser extends Parser { RULE_assign_target = 16, RULE_postincrdecr = 17, RULE_expression = 18, RULE_functioncall = 19, RULE_functioncall_stmt = 20, RULE_expression_list = 21, RULE_returnstmt = 22, RULE_identifier = 23, RULE_scoped_identifier = 24, - RULE_register = 25, RULE_statusflag = 26, RULE_integerliteral = 27, RULE_booleanliteral = 28, - RULE_arrayliteral = 29, RULE_stringliteral = 30, RULE_floatliteral = 31, - RULE_literalvalue = 32, RULE_inlineasm = 33, RULE_subroutine = 34, RULE_statement_block = 35, - RULE_sub_address = 36, RULE_sub_params = 37, RULE_sub_param = 38, RULE_sub_returns = 39, - RULE_sub_return = 40, RULE_if_stmt = 41, RULE_else_part = 42, RULE_branch_stmt = 43, - RULE_branchcondition = 44; + RULE_register = 25, RULE_statusflag = 26, RULE_integerliteral = 27, RULE_wordsuffix = 28, + RULE_booleanliteral = 29, RULE_arrayliteral = 30, RULE_stringliteral = 31, + RULE_floatliteral = 32, RULE_literalvalue = 33, RULE_inlineasm = 34, RULE_subroutine = 35, + RULE_statement_block = 36, RULE_sub_address = 37, RULE_sub_params = 38, + RULE_sub_param = 39, RULE_sub_returns = 40, RULE_sub_return = 41, RULE_if_stmt = 42, + RULE_else_part = 43, RULE_branch_stmt = 44, RULE_branchcondition = 45; public static final String[] ruleNames = { "module", "modulestatement", "block", "statement", "labeldef", "unconditionaljump", "directive", "directivearg", "vardecl", "varinitializer", "constdecl", "memoryvardecl", "datatype", "arrayspec", "assignment", "augassignment", "assign_target", "postincrdecr", "expression", "functioncall", "functioncall_stmt", "expression_list", "returnstmt", "identifier", "scoped_identifier", "register", - "statusflag", "integerliteral", "booleanliteral", "arrayliteral", "stringliteral", - "floatliteral", "literalvalue", "inlineasm", "subroutine", "statement_block", - "sub_address", "sub_params", "sub_param", "sub_returns", "sub_return", - "if_stmt", "else_part", "branch_stmt", "branchcondition" + "statusflag", "integerliteral", "wordsuffix", "booleanliteral", "arrayliteral", + "stringliteral", "floatliteral", "literalvalue", "inlineasm", "subroutine", + "statement_block", "sub_address", "sub_params", "sub_param", "sub_returns", + "sub_return", "if_stmt", "else_part", "branch_stmt", "branchcondition" }; private static final String[] _LITERAL_NAMES = { @@ -66,7 +66,7 @@ public class il65Parser extends Parser { "'('", "')'", "'+'", "'-'", "'**'", "'*'", "'/'", "'<'", "'>'", "'<='", "'>='", "'=='", "'!='", "'&'", "'^'", "'|'", "'to'", "'and'", "'or'", "'xor'", "'not'", "'return'", "'.'", "'A'", "'X'", "'Y'", "'AX'", "'AY'", - "'XY'", "'Pc'", "'Pz'", "'Pn'", "'Pv'", "'true'", "'false'", "'%asm'", + "'XY'", "'Pc'", "'Pz'", "'Pn'", "'Pv'", "'.w'", "'true'", "'false'", "'%asm'", "'sub'", "'->'", "'{'", "'}'", "'?'", "'if'", "'else'", "'if_cs'", "'if_cc'", "'if_eq'", "'if_ne'", "'if_pl'", "'if_mi'", "'if_vs'", "'if_vc'" }; @@ -78,8 +78,9 @@ public class il65Parser extends Parser { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 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", "FLOAT_NUMBER", "STRING", "INLINEASMBLOCK" + null, null, null, null, "LINECOMMENT", "COMMENT", "WS", "EOL", "NAME", + "DEC_INTEGER", "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", "STRING", + "INLINEASMBLOCK" }; public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); @@ -155,12 +156,12 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(94); + setState(96); _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))) != 0) || _la==EOL) { { - setState(92); + setState(94); _errHandler.sync(this); switch (_input.LA(1)) { case T__0: @@ -174,13 +175,13 @@ public class il65Parser extends Parser { case T__10: case T__11: { - setState(90); + setState(92); modulestatement(); } break; case EOL: { - setState(91); + setState(93); match(EOL); } break; @@ -188,11 +189,11 @@ public class il65Parser extends Parser { throw new NoViableAltException(this); } } - setState(96); + setState(98); _errHandler.sync(this); _la = _input.LA(1); } - setState(97); + setState(99); match(EOF); } } @@ -224,7 +225,7 @@ public class il65Parser extends Parser { ModulestatementContext _localctx = new ModulestatementContext(_ctx, getState()); enterRule(_localctx, 2, RULE_modulestatement); try { - setState(101); + setState(103); _errHandler.sync(this); switch (_input.LA(1)) { case T__3: @@ -238,14 +239,14 @@ public class il65Parser extends Parser { case T__11: enterOuterAlt(_localctx, 1); { - setState(99); + setState(101); directive(); } break; case T__0: enterOuterAlt(_localctx, 2); { - setState(100); + setState(102); block(); } break; @@ -288,23 +289,23 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(103); + setState(105); match(T__0); - setState(104); - identifier(); setState(106); + identifier(); + setState(108); _errHandler.sync(this); _la = _input.LA(1); - if (((((_la - 92)) & ~0x3f) == 0 && ((1L << (_la - 92)) & ((1L << (DEC_INTEGER - 92)) | (1L << (HEX_INTEGER - 92)) | (1L << (BIN_INTEGER - 92)))) != 0)) { + if (((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & ((1L << (DEC_INTEGER - 93)) | (1L << (HEX_INTEGER - 93)) | (1L << (BIN_INTEGER - 93)))) != 0)) { { - setState(105); + setState(107); integerliteral(); } } - setState(108); + setState(110); statement_block(); - setState(109); + setState(111); match(EOL); } } @@ -378,118 +379,118 @@ public class il65Parser extends Parser { StatementContext _localctx = new StatementContext(_ctx, getState()); enterRule(_localctx, 6, RULE_statement); try { - setState(127); + setState(129); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(111); + setState(113); directive(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(112); + setState(114); varinitializer(); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(113); + setState(115); vardecl(); } break; case 4: enterOuterAlt(_localctx, 4); { - setState(114); + setState(116); constdecl(); } break; case 5: enterOuterAlt(_localctx, 5); { - setState(115); + setState(117); memoryvardecl(); } break; case 6: enterOuterAlt(_localctx, 6); { - setState(116); + setState(118); assignment(); } break; case 7: enterOuterAlt(_localctx, 7); { - setState(117); + setState(119); augassignment(); } break; case 8: enterOuterAlt(_localctx, 8); { - setState(118); + setState(120); unconditionaljump(); } break; case 9: enterOuterAlt(_localctx, 9); { - setState(119); + setState(121); postincrdecr(); } break; case 10: enterOuterAlt(_localctx, 10); { - setState(120); + setState(122); functioncall_stmt(); } break; case 11: enterOuterAlt(_localctx, 11); { - setState(121); + setState(123); if_stmt(); } break; case 12: enterOuterAlt(_localctx, 12); { - setState(122); + setState(124); branch_stmt(); } break; case 13: enterOuterAlt(_localctx, 13); { - setState(123); + setState(125); subroutine(); } break; case 14: enterOuterAlt(_localctx, 14); { - setState(124); + setState(126); inlineasm(); } break; case 15: enterOuterAlt(_localctx, 15); { - setState(125); + setState(127); labeldef(); } break; case 16: enterOuterAlt(_localctx, 16); { - setState(126); + setState(128); returnstmt(); } break; @@ -522,9 +523,9 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(129); + setState(131); identifier(); - setState(130); + setState(132); match(T__1); } } @@ -561,26 +562,26 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(132); + setState(134); match(T__2); - setState(136); + setState(138); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) { case 1: { - setState(133); + setState(135); integerliteral(); } break; case 2: { - setState(134); + setState(136); identifier(); } break; case 3: { - setState(135); + setState(137); scoped_identifier(); } break; @@ -619,7 +620,7 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(138); + setState(140); ((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))) != 0)) ) { @@ -630,17 +631,17 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(150); + setState(152); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { case 1: { - setState(140); + setState(142); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) { case 1: { - setState(139); + setState(141); directivearg(); } break; @@ -649,21 +650,21 @@ public class il65Parser extends Parser { break; case 2: { - setState(142); + setState(144); directivearg(); - setState(147); + setState(149); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__12) { { { - setState(143); + setState(145); match(T__12); - setState(144); + setState(146); directivearg(); } } - setState(149); + setState(151); _errHandler.sync(this); _la = _input.LA(1); } @@ -703,20 +704,20 @@ public class il65Parser extends Parser { DirectiveargContext _localctx = new DirectiveargContext(_ctx, getState()); enterRule(_localctx, 14, RULE_directivearg); try { - setState(155); + setState(157); _errHandler.sync(this); switch (_input.LA(1)) { case STRING: enterOuterAlt(_localctx, 1); { - setState(152); + setState(154); stringliteral(); } break; case NAME: enterOuterAlt(_localctx, 2); { - setState(153); + setState(155); identifier(); } break; @@ -725,7 +726,7 @@ public class il65Parser extends Parser { case BIN_INTEGER: enterOuterAlt(_localctx, 3); { - setState(154); + setState(156); integerliteral(); } break; @@ -767,19 +768,19 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(157); - datatype(); setState(159); + datatype(); + setState(161); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__23) { { - setState(158); + setState(160); arrayspec(); } } - setState(161); + setState(163); identifier(); } } @@ -820,23 +821,23 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(163); - datatype(); setState(165); + datatype(); + setState(167); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__23) { { - setState(164); + setState(166); arrayspec(); } } - setState(167); - identifier(); - setState(168); - match(T__13); setState(169); + identifier(); + setState(170); + match(T__13); + setState(171); expression(0); } } @@ -867,9 +868,9 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(171); + setState(173); match(T__14); - setState(172); + setState(174); varinitializer(); } } @@ -900,9 +901,9 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(174); + setState(176); match(T__15); - setState(175); + setState(177); varinitializer(); } } @@ -931,7 +932,7 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(177); + setState(179); _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); @@ -974,23 +975,23 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(179); + setState(181); match(T__23); - setState(180); + setState(182); expression(0); - setState(183); + setState(185); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__12) { { - setState(181); + setState(183); match(T__12); - setState(182); + setState(184); expression(0); } } - setState(185); + setState(187); match(T__24); } } @@ -1024,11 +1025,11 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(187); - assign_target(); - setState(188); - match(T__13); setState(189); + assign_target(); + setState(190); + match(T__13); + setState(191); expression(0); } } @@ -1064,9 +1065,9 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(191); + setState(193); assign_target(); - setState(192); + setState(194); ((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))) != 0)) ) { @@ -1077,7 +1078,7 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(193); + setState(195); expression(0); } } @@ -1112,27 +1113,27 @@ public class il65Parser extends Parser { Assign_targetContext _localctx = new Assign_targetContext(_ctx, getState()); enterRule(_localctx, 32, RULE_assign_target); try { - setState(198); + setState(200); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(195); + setState(197); register(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(196); + setState(198); identifier(); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(197); + setState(199); scoped_identifier(); } break; @@ -1167,9 +1168,9 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(200); + setState(202); assign_target(); - setState(201); + setState(203); ((PostincrdecrContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !(_la==T__33 || _la==T__34) ) { @@ -1246,28 +1247,28 @@ public class il65Parser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(217); + setState(219); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) { case 1: { - setState(204); - match(T__35); - setState(205); - expression(0); setState(206); + match(T__35); + setState(207); + expression(0); + setState(208); match(T__36); } break; case 2: { - setState(208); + setState(210); functioncall(); } break; case 3: { - setState(209); + setState(211); ((ExpressionContext)_localctx).prefix = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__37) | (1L << T__38))) != 0)) ) { @@ -1278,45 +1279,45 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(210); + setState(212); expression(18); } break; case 4: { - setState(211); + setState(213); ((ExpressionContext)_localctx).prefix = match(T__55); - setState(212); + setState(214); expression(5); } break; case 5: { - setState(213); + setState(215); literalvalue(); } break; case 6: { - setState(214); + setState(216); register(); } break; case 7: { - setState(215); + setState(217); identifier(); } break; case 8: { - setState(216); + setState(218); scoped_identifier(); } break; } _ctx.stop = _input.LT(-1); - setState(259); + setState(261); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,16,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { @@ -1324,7 +1325,7 @@ public class il65Parser extends Parser { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(257); + setState(259); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) { case 1: @@ -1333,11 +1334,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(219); - if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)"); - setState(220); - ((ExpressionContext)_localctx).bop = match(T__39); setState(221); + if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)"); + setState(222); + ((ExpressionContext)_localctx).bop = match(T__39); + setState(223); ((ExpressionContext)_localctx).right = expression(18); } break; @@ -1347,9 +1348,9 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(222); + setState(224); if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); - setState(223); + setState(225); ((ExpressionContext)_localctx).bop = _input.LT(1); _la = _input.LA(1); if ( !(_la==T__40 || _la==T__41) ) { @@ -1360,7 +1361,7 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(224); + setState(226); ((ExpressionContext)_localctx).right = expression(17); } break; @@ -1370,9 +1371,9 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(225); + setState(227); if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)"); - setState(226); + setState(228); ((ExpressionContext)_localctx).bop = _input.LT(1); _la = _input.LA(1); if ( !(_la==T__37 || _la==T__38) ) { @@ -1383,7 +1384,7 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(227); + setState(229); ((ExpressionContext)_localctx).right = expression(16); } break; @@ -1393,9 +1394,9 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(228); + setState(230); if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); - setState(229); + setState(231); ((ExpressionContext)_localctx).bop = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__42) | (1L << T__43) | (1L << T__44) | (1L << T__45))) != 0)) ) { @@ -1406,7 +1407,7 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(230); + setState(232); ((ExpressionContext)_localctx).right = expression(15); } break; @@ -1416,9 +1417,9 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(231); + setState(233); if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); - setState(232); + setState(234); ((ExpressionContext)_localctx).bop = _input.LT(1); _la = _input.LA(1); if ( !(_la==T__46 || _la==T__47) ) { @@ -1429,7 +1430,7 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(233); + setState(235); ((ExpressionContext)_localctx).right = expression(14); } break; @@ -1439,11 +1440,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(234); - if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); - setState(235); - ((ExpressionContext)_localctx).bop = match(T__48); setState(236); + if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); + setState(237); + ((ExpressionContext)_localctx).bop = match(T__48); + setState(238); ((ExpressionContext)_localctx).right = expression(13); } break; @@ -1453,11 +1454,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(237); - if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); - setState(238); - ((ExpressionContext)_localctx).bop = match(T__49); setState(239); + if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); + setState(240); + ((ExpressionContext)_localctx).bop = match(T__49); + setState(241); ((ExpressionContext)_localctx).right = expression(12); } break; @@ -1467,11 +1468,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(240); - if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); - setState(241); - ((ExpressionContext)_localctx).bop = match(T__50); setState(242); + if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); + setState(243); + ((ExpressionContext)_localctx).bop = match(T__50); + setState(244); ((ExpressionContext)_localctx).right = expression(11); } break; @@ -1481,11 +1482,11 @@ public class il65Parser extends Parser { _localctx.rangefrom = _prevctx; _localctx.rangefrom = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(243); - if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); - setState(244); - match(T__51); setState(245); + if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); + setState(246); + match(T__51); + setState(247); ((ExpressionContext)_localctx).rangeto = expression(10); } break; @@ -1495,11 +1496,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(246); - if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); - setState(247); - ((ExpressionContext)_localctx).bop = match(T__52); setState(248); + if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); + setState(249); + ((ExpressionContext)_localctx).bop = match(T__52); + setState(250); ((ExpressionContext)_localctx).right = expression(9); } break; @@ -1509,11 +1510,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(249); - if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(250); - ((ExpressionContext)_localctx).bop = match(T__53); setState(251); + if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); + setState(252); + ((ExpressionContext)_localctx).bop = match(T__53); + setState(253); ((ExpressionContext)_localctx).right = expression(8); } break; @@ -1523,11 +1524,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(252); - if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); - setState(253); - ((ExpressionContext)_localctx).bop = match(T__54); setState(254); + if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(255); + ((ExpressionContext)_localctx).bop = match(T__54); + setState(256); ((ExpressionContext)_localctx).right = expression(7); } break; @@ -1535,16 +1536,16 @@ public class il65Parser extends Parser { { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(255); + setState(257); if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)"); - setState(256); + setState(258); arrayspec(); } break; } } } - setState(261); + setState(263); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,16,_ctx); } @@ -1584,35 +1585,35 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(264); + setState(266); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,17,_ctx) ) { case 1: { - setState(262); + setState(264); identifier(); } break; case 2: { - setState(263); + setState(265); scoped_identifier(); } break; } - setState(266); - match(T__35); setState(268); + match(T__35); + setState(270); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__23) | (1L << T__35) | (1L << T__37) | (1L << T__38) | (1L << T__55) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__68 - 64)) | (1L << (T__69 - 64)) | (1L << (NAME - 64)) | (1L << (DEC_INTEGER - 64)) | (1L << (HEX_INTEGER - 64)) | (1L << (BIN_INTEGER - 64)) | (1L << (FLOAT_NUMBER - 64)) | (1L << (STRING - 64)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__23) | (1L << T__35) | (1L << T__37) | (1L << T__38) | (1L << T__55) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__69 - 64)) | (1L << (T__70 - 64)) | (1L << (NAME - 64)) | (1L << (DEC_INTEGER - 64)) | (1L << (HEX_INTEGER - 64)) | (1L << (BIN_INTEGER - 64)) | (1L << (FLOAT_NUMBER - 64)) | (1L << (STRING - 64)))) != 0)) { { - setState(267); + setState(269); expression_list(); } } - setState(270); + setState(272); match(T__36); } } @@ -1650,35 +1651,35 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(274); + setState(276); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) { case 1: { - setState(272); + setState(274); identifier(); } break; case 2: { - setState(273); + setState(275); scoped_identifier(); } break; } - setState(276); - match(T__35); setState(278); + match(T__35); + setState(280); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__23) | (1L << T__35) | (1L << T__37) | (1L << T__38) | (1L << T__55) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__68 - 64)) | (1L << (T__69 - 64)) | (1L << (NAME - 64)) | (1L << (DEC_INTEGER - 64)) | (1L << (HEX_INTEGER - 64)) | (1L << (BIN_INTEGER - 64)) | (1L << (FLOAT_NUMBER - 64)) | (1L << (STRING - 64)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__23) | (1L << T__35) | (1L << T__37) | (1L << T__38) | (1L << T__55) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__69 - 64)) | (1L << (T__70 - 64)) | (1L << (NAME - 64)) | (1L << (DEC_INTEGER - 64)) | (1L << (HEX_INTEGER - 64)) | (1L << (BIN_INTEGER - 64)) | (1L << (FLOAT_NUMBER - 64)) | (1L << (STRING - 64)))) != 0)) { { - setState(277); + setState(279); expression_list(); } } - setState(280); + setState(282); match(T__36); } } @@ -1713,21 +1714,21 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(282); + setState(284); expression(0); - setState(287); + setState(289); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__12) { { { - setState(283); + setState(285); match(T__12); - setState(284); + setState(286); expression(0); } } - setState(289); + setState(291); _errHandler.sync(this); _la = _input.LA(1); } @@ -1760,14 +1761,14 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(290); - match(T__56); setState(292); + match(T__56); + setState(294); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,22,_ctx) ) { case 1: { - setState(291); + setState(293); expression_list(); } break; @@ -1799,7 +1800,7 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(294); + setState(296); match(NAME); } } @@ -1832,9 +1833,9 @@ public class il65Parser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(296); + setState(298); match(NAME); - setState(299); + setState(301); _errHandler.sync(this); _alt = 1; do { @@ -1842,9 +1843,9 @@ public class il65Parser extends Parser { case 1: { { - setState(297); + setState(299); match(T__57); - setState(298); + setState(300); match(NAME); } } @@ -1852,7 +1853,7 @@ public class il65Parser extends Parser { default: throw new NoViableAltException(this); } - setState(301); + setState(303); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,23,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); @@ -1883,7 +1884,7 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(303); + setState(305); _la = _input.LA(1); if ( !(((((_la - 59)) & ~0x3f) == 0 && ((1L << (_la - 59)) & ((1L << (T__58 - 59)) | (1L << (T__59 - 59)) | (1L << (T__60 - 59)) | (1L << (T__61 - 59)) | (1L << (T__62 - 59)) | (1L << (T__63 - 59)))) != 0)) ) { _errHandler.recoverInline(this); @@ -1920,7 +1921,7 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(305); + setState(307); _la = _input.LA(1); if ( !(((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (T__64 - 65)) | (1L << (T__65 - 65)) | (1L << (T__66 - 65)) | (1L << (T__67 - 65)))) != 0)) ) { _errHandler.recoverInline(this); @@ -1944,9 +1945,13 @@ public class il65Parser extends Parser { } public static class IntegerliteralContext extends ParserRuleContext { + public Token intpart; public TerminalNode DEC_INTEGER() { return getToken(il65Parser.DEC_INTEGER, 0); } public TerminalNode HEX_INTEGER() { return getToken(il65Parser.HEX_INTEGER, 0); } public TerminalNode BIN_INTEGER() { return getToken(il65Parser.BIN_INTEGER, 0); } + public WordsuffixContext wordsuffix() { + return getRuleContext(WordsuffixContext.class,0); + } public IntegerliteralContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1960,16 +1965,55 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(307); + setState(309); + ((IntegerliteralContext)_localctx).intpart = _input.LT(1); _la = _input.LA(1); - if ( !(((((_la - 92)) & ~0x3f) == 0 && ((1L << (_la - 92)) & ((1L << (DEC_INTEGER - 92)) | (1L << (HEX_INTEGER - 92)) | (1L << (BIN_INTEGER - 92)))) != 0)) ) { - _errHandler.recoverInline(this); + if ( !(((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & ((1L << (DEC_INTEGER - 93)) | (1L << (HEX_INTEGER - 93)) | (1L << (BIN_INTEGER - 93)))) != 0)) ) { + ((IntegerliteralContext)_localctx).intpart = (Token)_errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } + setState(311); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) { + case 1: + { + setState(310); + 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, 56, RULE_wordsuffix); + try { + enterOuterAlt(_localctx, 1); + { + setState(313); + match(T__68); } } catch (RecognitionException re) { @@ -1992,14 +2036,14 @@ public class il65Parser extends Parser { public final BooleanliteralContext booleanliteral() throws RecognitionException { BooleanliteralContext _localctx = new BooleanliteralContext(_ctx, getState()); - enterRule(_localctx, 56, RULE_booleanliteral); + enterRule(_localctx, 58, RULE_booleanliteral); int _la; try { enterOuterAlt(_localctx, 1); { - setState(309); + setState(315); _la = _input.LA(1); - if ( !(_la==T__68 || _la==T__69) ) { + if ( !(_la==T__69 || _la==T__70) ) { _errHandler.recoverInline(this); } else { @@ -2035,32 +2079,32 @@ public class il65Parser extends Parser { public final ArrayliteralContext arrayliteral() throws RecognitionException { ArrayliteralContext _localctx = new ArrayliteralContext(_ctx, getState()); - enterRule(_localctx, 58, RULE_arrayliteral); + enterRule(_localctx, 60, RULE_arrayliteral); int _la; try { enterOuterAlt(_localctx, 1); { - setState(311); - match(T__23); - setState(312); - expression(0); setState(317); + match(T__23); + setState(318); + expression(0); + setState(323); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__12) { { { - setState(313); + setState(319); match(T__12); - setState(314); + setState(320); expression(0); } } - setState(319); + setState(325); _errHandler.sync(this); _la = _input.LA(1); } - setState(320); + setState(326); match(T__24); } } @@ -2085,11 +2129,11 @@ public class il65Parser extends Parser { public final StringliteralContext stringliteral() throws RecognitionException { StringliteralContext _localctx = new StringliteralContext(_ctx, getState()); - enterRule(_localctx, 60, RULE_stringliteral); + enterRule(_localctx, 62, RULE_stringliteral); try { enterOuterAlt(_localctx, 1); { - setState(322); + setState(328); match(STRING); } } @@ -2114,11 +2158,11 @@ public class il65Parser extends Parser { public final FloatliteralContext floatliteral() throws RecognitionException { FloatliteralContext _localctx = new FloatliteralContext(_ctx, getState()); - enterRule(_localctx, 62, RULE_floatliteral); + enterRule(_localctx, 64, RULE_floatliteral); try { enterOuterAlt(_localctx, 1); { - setState(324); + setState(330); match(FLOAT_NUMBER); } } @@ -2157,9 +2201,9 @@ public class il65Parser extends Parser { public final LiteralvalueContext literalvalue() throws RecognitionException { LiteralvalueContext _localctx = new LiteralvalueContext(_ctx, getState()); - enterRule(_localctx, 64, RULE_literalvalue); + enterRule(_localctx, 66, RULE_literalvalue); try { - setState(331); + setState(337); _errHandler.sync(this); switch (_input.LA(1)) { case DEC_INTEGER: @@ -2167,36 +2211,36 @@ public class il65Parser extends Parser { case BIN_INTEGER: enterOuterAlt(_localctx, 1); { - setState(326); + setState(332); integerliteral(); } break; - case T__68: case T__69: + case T__70: enterOuterAlt(_localctx, 2); { - setState(327); + setState(333); booleanliteral(); } break; case T__23: enterOuterAlt(_localctx, 3); { - setState(328); + setState(334); arrayliteral(); } break; case STRING: enterOuterAlt(_localctx, 4); { - setState(329); + setState(335); stringliteral(); } break; case FLOAT_NUMBER: enterOuterAlt(_localctx, 5); { - setState(330); + setState(336); floatliteral(); } break; @@ -2225,13 +2269,13 @@ public class il65Parser extends Parser { public final InlineasmContext inlineasm() throws RecognitionException { InlineasmContext _localctx = new InlineasmContext(_ctx, getState()); - enterRule(_localctx, 66, RULE_inlineasm); + enterRule(_localctx, 68, RULE_inlineasm); try { enterOuterAlt(_localctx, 1); { - setState(333); - match(T__70); - setState(334); + setState(339); + match(T__71); + setState(340); match(INLINEASMBLOCK); } } @@ -2271,60 +2315,60 @@ public class il65Parser extends Parser { public final SubroutineContext subroutine() throws RecognitionException { SubroutineContext _localctx = new SubroutineContext(_ctx, getState()); - enterRule(_localctx, 68, RULE_subroutine); + enterRule(_localctx, 70, RULE_subroutine); int _la; try { enterOuterAlt(_localctx, 1); { - setState(336); - match(T__71); - setState(337); - identifier(); - setState(338); - match(T__35); - setState(340); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==NAME) { - { - setState(339); - sub_params(); - } - } - setState(342); - match(T__36); - setState(343); match(T__72); + setState(343); + identifier(); setState(344); match(T__35); setState(346); _errHandler.sync(this); _la = _input.LA(1); - if (((((_la - 59)) & ~0x3f) == 0 && ((1L << (_la - 59)) & ((1L << (T__58 - 59)) | (1L << (T__59 - 59)) | (1L << (T__60 - 59)) | (1L << (T__61 - 59)) | (1L << (T__62 - 59)) | (1L << (T__63 - 59)) | (1L << (T__64 - 59)) | (1L << (T__65 - 59)) | (1L << (T__66 - 59)) | (1L << (T__67 - 59)) | (1L << (T__75 - 59)))) != 0)) { + if (_la==NAME) { { setState(345); - sub_returns(); + sub_params(); } } setState(348); match(T__36); - setState(353); + setState(349); + match(T__73); + setState(350); + match(T__35); + setState(352); + _errHandler.sync(this); + _la = _input.LA(1); + if (((((_la - 59)) & ~0x3f) == 0 && ((1L << (_la - 59)) & ((1L << (T__58 - 59)) | (1L << (T__59 - 59)) | (1L << (T__60 - 59)) | (1L << (T__61 - 59)) | (1L << (T__62 - 59)) | (1L << (T__63 - 59)) | (1L << (T__64 - 59)) | (1L << (T__65 - 59)) | (1L << (T__66 - 59)) | (1L << (T__67 - 59)) | (1L << (T__76 - 59)))) != 0)) { + { + setState(351); + sub_returns(); + } + } + + setState(354); + match(T__36); + setState(359); _errHandler.sync(this); switch (_input.LA(1)) { case T__13: { - setState(349); + setState(355); sub_address(); } break; - case T__73: + case T__74: { { - setState(350); + setState(356); statement_block(); - setState(351); + setState(357); match(EOL); } } @@ -2364,21 +2408,21 @@ public class il65Parser extends Parser { public final Statement_blockContext statement_block() throws RecognitionException { Statement_blockContext _localctx = new Statement_blockContext(_ctx, getState()); - enterRule(_localctx, 70, RULE_statement_block); + enterRule(_localctx, 72, RULE_statement_block); int _la; try { enterOuterAlt(_localctx, 1); { - setState(355); - match(T__73); - setState(356); - match(EOL); setState(361); + match(T__74); + setState(362); + match(EOL); + setState(367); _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__14) | (1L << T__15) | (1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__56) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__70 - 64)) | (1L << (T__71 - 64)) | (1L << (T__76 - 64)) | (1L << (T__78 - 64)) | (1L << (T__79 - 64)) | (1L << (T__80 - 64)) | (1L << (T__81 - 64)) | (1L << (T__82 - 64)) | (1L << (T__83 - 64)) | (1L << (T__84 - 64)) | (1L << (T__85 - 64)) | (1L << (EOL - 64)) | (1L << (NAME - 64)))) != 0)) { + 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__14) | (1L << T__15) | (1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__56) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__71 - 64)) | (1L << (T__72 - 64)) | (1L << (T__77 - 64)) | (1L << (T__79 - 64)) | (1L << (T__80 - 64)) | (1L << (T__81 - 64)) | (1L << (T__82 - 64)) | (1L << (T__83 - 64)) | (1L << (T__84 - 64)) | (1L << (T__85 - 64)) | (1L << (T__86 - 64)) | (1L << (EOL - 64)) | (1L << (NAME - 64)))) != 0)) { { - setState(359); + setState(365); _errHandler.sync(this); switch (_input.LA(1)) { case T__2: @@ -2407,10 +2451,9 @@ public class il65Parser extends Parser { case T__61: case T__62: case T__63: - case T__70: case T__71: - case T__76: - case T__78: + case T__72: + case T__77: case T__79: case T__80: case T__81: @@ -2418,15 +2461,16 @@ public class il65Parser extends Parser { case T__83: case T__84: case T__85: + case T__86: case NAME: { - setState(357); + setState(363); statement(); } break; case EOL: { - setState(358); + setState(364); match(EOL); } break; @@ -2434,12 +2478,12 @@ public class il65Parser extends Parser { throw new NoViableAltException(this); } } - setState(363); + setState(369); _errHandler.sync(this); _la = _input.LA(1); } - setState(364); - match(T__74); + setState(370); + match(T__75); } } catch (RecognitionException re) { @@ -2465,13 +2509,13 @@ public class il65Parser extends Parser { public final Sub_addressContext sub_address() throws RecognitionException { Sub_addressContext _localctx = new Sub_addressContext(_ctx, getState()); - enterRule(_localctx, 72, RULE_sub_address); + enterRule(_localctx, 74, RULE_sub_address); try { enterOuterAlt(_localctx, 1); { - setState(366); + setState(372); match(T__13); - setState(367); + setState(373); integerliteral(); } } @@ -2501,26 +2545,26 @@ public class il65Parser extends Parser { public final Sub_paramsContext sub_params() throws RecognitionException { Sub_paramsContext _localctx = new Sub_paramsContext(_ctx, getState()); - enterRule(_localctx, 74, RULE_sub_params); + enterRule(_localctx, 76, RULE_sub_params); int _la; try { enterOuterAlt(_localctx, 1); { - setState(369); + setState(375); sub_param(); - setState(374); + setState(380); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__12) { { { - setState(370); + setState(376); match(T__12); - setState(371); + setState(377); sub_param(); } } - setState(376); + setState(382); _errHandler.sync(this); _la = _input.LA(1); } @@ -2555,15 +2599,15 @@ public class il65Parser extends Parser { public final Sub_paramContext sub_param() throws RecognitionException { Sub_paramContext _localctx = new Sub_paramContext(_ctx, getState()); - enterRule(_localctx, 76, RULE_sub_param); + enterRule(_localctx, 78, RULE_sub_param); try { enterOuterAlt(_localctx, 1); { - setState(377); + setState(383); identifier(); - setState(378); + setState(384); match(T__1); - setState(381); + setState(387); _errHandler.sync(this); switch (_input.LA(1)) { case T__58: @@ -2573,7 +2617,7 @@ public class il65Parser extends Parser { case T__62: case T__63: { - setState(379); + setState(385); register(); } break; @@ -2582,7 +2626,7 @@ public class il65Parser extends Parser { case T__66: case T__67: { - setState(380); + setState(386); statusflag(); } break; @@ -2617,17 +2661,17 @@ public class il65Parser extends Parser { public final Sub_returnsContext sub_returns() throws RecognitionException { Sub_returnsContext _localctx = new Sub_returnsContext(_ctx, getState()); - enterRule(_localctx, 78, RULE_sub_returns); + enterRule(_localctx, 80, RULE_sub_returns); int _la; try { - setState(392); + setState(398); _errHandler.sync(this); switch (_input.LA(1)) { - case T__75: + case T__76: enterOuterAlt(_localctx, 1); { - setState(383); - match(T__75); + setState(389); + match(T__76); } break; case T__58: @@ -2643,21 +2687,21 @@ public class il65Parser extends Parser { enterOuterAlt(_localctx, 2); { { - setState(384); + setState(390); sub_return(); - setState(389); + setState(395); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__12) { { { - setState(385); + setState(391); match(T__12); - setState(386); + setState(392); sub_return(); } } - setState(391); + setState(397); _errHandler.sync(this); _la = _input.LA(1); } @@ -2694,12 +2738,12 @@ public class il65Parser extends Parser { public final Sub_returnContext sub_return() throws RecognitionException { Sub_returnContext _localctx = new Sub_returnContext(_ctx, getState()); - enterRule(_localctx, 80, RULE_sub_return); + enterRule(_localctx, 82, RULE_sub_return); int _la; try { enterOuterAlt(_localctx, 1); { - setState(396); + setState(402); _errHandler.sync(this); switch (_input.LA(1)) { case T__58: @@ -2709,7 +2753,7 @@ public class il65Parser extends Parser { case T__62: case T__63: { - setState(394); + setState(400); register(); } break; @@ -2718,20 +2762,20 @@ public class il65Parser extends Parser { case T__66: case T__67: { - setState(395); + setState(401); statusflag(); } break; default: throw new NoViableAltException(this); } - setState(399); + setState(405); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__75) { + if (_la==T__76) { { - setState(398); - match(T__75); + setState(404); + match(T__76); } } @@ -2773,30 +2817,30 @@ public class il65Parser extends Parser { public final If_stmtContext if_stmt() throws RecognitionException { If_stmtContext _localctx = new If_stmtContext(_ctx, getState()); - enterRule(_localctx, 82, RULE_if_stmt); + enterRule(_localctx, 84, RULE_if_stmt); int _la; try { enterOuterAlt(_localctx, 1); { - setState(401); - match(T__76); - setState(402); + setState(407); + match(T__77); + setState(408); match(T__35); - setState(403); + setState(409); expression(0); - setState(404); + setState(410); match(T__36); - setState(406); + setState(412); _errHandler.sync(this); _la = _input.LA(1); if (_la==EOL) { { - setState(405); + setState(411); match(EOL); } } - setState(410); + setState(416); _errHandler.sync(this); switch (_input.LA(1)) { case T__2: @@ -2825,10 +2869,9 @@ public class il65Parser extends Parser { case T__61: case T__62: case T__63: - case T__70: case T__71: - case T__76: - case T__78: + case T__72: + case T__77: case T__79: case T__80: case T__81: @@ -2836,42 +2879,43 @@ public class il65Parser extends Parser { case T__83: case T__84: case T__85: + case T__86: case NAME: { - setState(408); + setState(414); statement(); } break; - case T__73: + case T__74: { - setState(409); + setState(415); statement_block(); } break; default: throw new NoViableAltException(this); } - setState(413); + setState(419); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) { case 1: { - setState(412); + setState(418); match(EOL); } break; } - setState(416); + setState(422); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__77) { + if (_la==T__78) { { - setState(415); + setState(421); else_part(); } } - setState(418); + setState(424); match(EOL); } } @@ -2902,24 +2946,24 @@ public class il65Parser extends Parser { public final Else_partContext else_part() throws RecognitionException { Else_partContext _localctx = new Else_partContext(_ctx, getState()); - enterRule(_localctx, 84, RULE_else_part); + enterRule(_localctx, 86, RULE_else_part); int _la; try { enterOuterAlt(_localctx, 1); { - setState(420); - match(T__77); - setState(422); + setState(426); + match(T__78); + setState(428); _errHandler.sync(this); _la = _input.LA(1); if (_la==EOL) { { - setState(421); + setState(427); match(EOL); } } - setState(426); + setState(432); _errHandler.sync(this); switch (_input.LA(1)) { case T__2: @@ -2948,10 +2992,9 @@ public class il65Parser extends Parser { case T__61: case T__62: case T__63: - case T__70: case T__71: - case T__76: - case T__78: + case T__72: + case T__77: case T__79: case T__80: case T__81: @@ -2959,15 +3002,16 @@ public class il65Parser extends Parser { case T__83: case T__84: case T__85: + case T__86: case NAME: { - setState(424); + setState(430); statement(); } break; - case T__73: + case T__74: { - setState(425); + setState(431); statement_block(); } break; @@ -3012,24 +3056,24 @@ public class il65Parser extends Parser { public final Branch_stmtContext branch_stmt() throws RecognitionException { Branch_stmtContext _localctx = new Branch_stmtContext(_ctx, getState()); - enterRule(_localctx, 86, RULE_branch_stmt); + enterRule(_localctx, 88, RULE_branch_stmt); int _la; try { enterOuterAlt(_localctx, 1); { - setState(428); + setState(434); branchcondition(); - setState(430); + setState(436); _errHandler.sync(this); _la = _input.LA(1); if (_la==EOL) { { - setState(429); + setState(435); match(EOL); } } - setState(434); + setState(440); _errHandler.sync(this); switch (_input.LA(1)) { case T__2: @@ -3058,10 +3102,9 @@ public class il65Parser extends Parser { case T__61: case T__62: case T__63: - case T__70: case T__71: - case T__76: - case T__78: + case T__72: + case T__77: case T__79: case T__80: case T__81: @@ -3069,42 +3112,43 @@ public class il65Parser extends Parser { case T__83: case T__84: case T__85: + case T__86: case NAME: { - setState(432); + setState(438); statement(); } break; - case T__73: + case T__74: { - setState(433); + setState(439); statement_block(); } break; default: throw new NoViableAltException(this); } - setState(437); + setState(443); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,46,_ctx) ) { case 1: { - setState(436); + setState(442); match(EOL); } break; } - setState(440); + setState(446); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__77) { + if (_la==T__78) { { - setState(439); + setState(445); else_part(); } } - setState(442); + setState(448); match(EOL); } } @@ -3128,14 +3172,14 @@ public class il65Parser extends Parser { public final BranchconditionContext branchcondition() throws RecognitionException { BranchconditionContext _localctx = new BranchconditionContext(_ctx, getState()); - enterRule(_localctx, 88, RULE_branchcondition); + enterRule(_localctx, 90, RULE_branchcondition); int _la; try { enterOuterAlt(_localctx, 1); { - setState(444); + setState(450); _la = _input.LA(1); - if ( !(((((_la - 79)) & ~0x3f) == 0 && ((1L << (_la - 79)) & ((1L << (T__78 - 79)) | (1L << (T__79 - 79)) | (1L << (T__80 - 79)) | (1L << (T__81 - 79)) | (1L << (T__82 - 79)) | (1L << (T__83 - 79)) | (1L << (T__84 - 79)) | (1L << (T__85 - 79)))) != 0)) ) { + if ( !(((((_la - 80)) & ~0x3f) == 0 && ((1L << (_la - 80)) & ((1L << (T__79 - 80)) | (1L << (T__80 - 80)) | (1L << (T__81 - 80)) | (1L << (T__82 - 80)) | (1L << (T__83 - 80)) | (1L << (T__84 - 80)) | (1L << (T__85 - 80)) | (1L << (T__86 - 80)))) != 0)) ) { _errHandler.recoverInline(this); } else { @@ -3196,172 +3240,174 @@ public class il65Parser extends Parser { } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3c\u01c1\4\2\t\2\4"+ + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3d\u01c7\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.\3\2\3\2\7\2_\n\2\f\2\16\2b\13\2\3\2\3\2\3\3\3\3\5\3h"+ - "\n\3\3\4\3\4\3\4\5\4m\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\5\5\u0082\n\5\3\6\3\6\3\6\3\7\3\7\3\7"+ - "\3\7\5\7\u008b\n\7\3\b\3\b\5\b\u008f\n\b\3\b\3\b\3\b\7\b\u0094\n\b\f\b"+ - "\16\b\u0097\13\b\5\b\u0099\n\b\3\t\3\t\3\t\5\t\u009e\n\t\3\n\3\n\5\n\u00a2"+ - "\n\n\3\n\3\n\3\13\3\13\5\13\u00a8\n\13\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\5\17\u00ba\n\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\5\22\u00c9\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\5\24\u00dc\n\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24"+ + ",\t,\4-\t-\4.\t.\4/\t/\3\2\3\2\7\2a\n\2\f\2\16\2d\13\2\3\2\3\2\3\3\3\3"+ + "\5\3j\n\3\3\4\3\4\3\4\5\4o\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\5\5\u0084\n\5\3\6\3\6\3\6\3\7\3\7"+ + "\3\7\3\7\5\7\u008d\n\7\3\b\3\b\5\b\u0091\n\b\3\b\3\b\3\b\7\b\u0096\n\b"+ + "\f\b\16\b\u0099\13\b\5\b\u009b\n\b\3\t\3\t\3\t\5\t\u00a0\n\t\3\n\3\n\5"+ + "\n\u00a4\n\n\3\n\3\n\3\13\3\13\5\13\u00aa\n\13\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\5\17\u00bc\n\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\5\22\u00cb"+ + "\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\5\24\u00de\n\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\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\3\24\3\24\3\24\3\24"+ - "\3\24\3\24\7\24\u0104\n\24\f\24\16\24\u0107\13\24\3\25\3\25\5\25\u010b"+ - "\n\25\3\25\3\25\5\25\u010f\n\25\3\25\3\25\3\26\3\26\5\26\u0115\n\26\3"+ - "\26\3\26\5\26\u0119\n\26\3\26\3\26\3\27\3\27\3\27\7\27\u0120\n\27\f\27"+ - "\16\27\u0123\13\27\3\30\3\30\5\30\u0127\n\30\3\31\3\31\3\32\3\32\3\32"+ - "\6\32\u012e\n\32\r\32\16\32\u012f\3\33\3\33\3\34\3\34\3\35\3\35\3\36\3"+ - "\36\3\37\3\37\3\37\3\37\7\37\u013e\n\37\f\37\16\37\u0141\13\37\3\37\3"+ - "\37\3 \3 \3!\3!\3\"\3\"\3\"\3\"\3\"\5\"\u014e\n\"\3#\3#\3#\3$\3$\3$\3"+ - "$\5$\u0157\n$\3$\3$\3$\3$\5$\u015d\n$\3$\3$\3$\3$\3$\5$\u0164\n$\3%\3"+ - "%\3%\3%\7%\u016a\n%\f%\16%\u016d\13%\3%\3%\3&\3&\3&\3\'\3\'\3\'\7\'\u0177"+ - "\n\'\f\'\16\'\u017a\13\'\3(\3(\3(\3(\5(\u0180\n(\3)\3)\3)\3)\7)\u0186"+ - "\n)\f)\16)\u0189\13)\5)\u018b\n)\3*\3*\5*\u018f\n*\3*\5*\u0192\n*\3+\3"+ - "+\3+\3+\3+\5+\u0199\n+\3+\3+\5+\u019d\n+\3+\5+\u01a0\n+\3+\5+\u01a3\n"+ - "+\3+\3+\3,\3,\5,\u01a9\n,\3,\3,\5,\u01ad\n,\3-\3-\5-\u01b1\n-\3-\3-\5"+ - "-\u01b5\n-\3-\5-\u01b8\n-\3-\5-\u01bb\n-\3-\3-\3.\3.\3.\2\3&/\2\4\6\b"+ - "\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVX"+ - "Z\2\20\3\2\6\16\3\2\23\31\3\2\34#\3\2$%\4\2\3\3()\3\2+,\3\2()\3\2-\60"+ - "\3\2\61\62\3\2=B\3\2CF\3\2^`\3\2GH\3\2QX\2\u01e7\2`\3\2\2\2\4g\3\2\2\2"+ - "\6i\3\2\2\2\b\u0081\3\2\2\2\n\u0083\3\2\2\2\f\u0086\3\2\2\2\16\u008c\3"+ - "\2\2\2\20\u009d\3\2\2\2\22\u009f\3\2\2\2\24\u00a5\3\2\2\2\26\u00ad\3\2"+ - "\2\2\30\u00b0\3\2\2\2\32\u00b3\3\2\2\2\34\u00b5\3\2\2\2\36\u00bd\3\2\2"+ - "\2 \u00c1\3\2\2\2\"\u00c8\3\2\2\2$\u00ca\3\2\2\2&\u00db\3\2\2\2(\u010a"+ - "\3\2\2\2*\u0114\3\2\2\2,\u011c\3\2\2\2.\u0124\3\2\2\2\60\u0128\3\2\2\2"+ - "\62\u012a\3\2\2\2\64\u0131\3\2\2\2\66\u0133\3\2\2\28\u0135\3\2\2\2:\u0137"+ - "\3\2\2\2<\u0139\3\2\2\2>\u0144\3\2\2\2@\u0146\3\2\2\2B\u014d\3\2\2\2D"+ - "\u014f\3\2\2\2F\u0152\3\2\2\2H\u0165\3\2\2\2J\u0170\3\2\2\2L\u0173\3\2"+ - "\2\2N\u017b\3\2\2\2P\u018a\3\2\2\2R\u018e\3\2\2\2T\u0193\3\2\2\2V\u01a6"+ - "\3\2\2\2X\u01ae\3\2\2\2Z\u01be\3\2\2\2\\_\5\4\3\2]_\7\\\2\2^\\\3\2\2\2"+ - "^]\3\2\2\2_b\3\2\2\2`^\3\2\2\2`a\3\2\2\2ac\3\2\2\2b`\3\2\2\2cd\7\2\2\3"+ - "d\3\3\2\2\2eh\5\16\b\2fh\5\6\4\2ge\3\2\2\2gf\3\2\2\2h\5\3\2\2\2ij\7\3"+ - "\2\2jl\5\60\31\2km\58\35\2lk\3\2\2\2lm\3\2\2\2mn\3\2\2\2no\5H%\2op\7\\"+ - "\2\2p\7\3\2\2\2q\u0082\5\16\b\2r\u0082\5\24\13\2s\u0082\5\22\n\2t\u0082"+ - "\5\26\f\2u\u0082\5\30\r\2v\u0082\5\36\20\2w\u0082\5 \21\2x\u0082\5\f\7"+ - "\2y\u0082\5$\23\2z\u0082\5*\26\2{\u0082\5T+\2|\u0082\5X-\2}\u0082\5F$"+ - "\2~\u0082\5D#\2\177\u0082\5\n\6\2\u0080\u0082\5.\30\2\u0081q\3\2\2\2\u0081"+ - "r\3\2\2\2\u0081s\3\2\2\2\u0081t\3\2\2\2\u0081u\3\2\2\2\u0081v\3\2\2\2"+ - "\u0081w\3\2\2\2\u0081x\3\2\2\2\u0081y\3\2\2\2\u0081z\3\2\2\2\u0081{\3"+ - "\2\2\2\u0081|\3\2\2\2\u0081}\3\2\2\2\u0081~\3\2\2\2\u0081\177\3\2\2\2"+ - "\u0081\u0080\3\2\2\2\u0082\t\3\2\2\2\u0083\u0084\5\60\31\2\u0084\u0085"+ - "\7\4\2\2\u0085\13\3\2\2\2\u0086\u008a\7\5\2\2\u0087\u008b\58\35\2\u0088"+ - "\u008b\5\60\31\2\u0089\u008b\5\62\32\2\u008a\u0087\3\2\2\2\u008a\u0088"+ - "\3\2\2\2\u008a\u0089\3\2\2\2\u008b\r\3\2\2\2\u008c\u0098\t\2\2\2\u008d"+ - "\u008f\5\20\t\2\u008e\u008d\3\2\2\2\u008e\u008f\3\2\2\2\u008f\u0099\3"+ - "\2\2\2\u0090\u0095\5\20\t\2\u0091\u0092\7\17\2\2\u0092\u0094\5\20\t\2"+ - "\u0093\u0091\3\2\2\2\u0094\u0097\3\2\2\2\u0095\u0093\3\2\2\2\u0095\u0096"+ - "\3\2\2\2\u0096\u0099\3\2\2\2\u0097\u0095\3\2\2\2\u0098\u008e\3\2\2\2\u0098"+ - "\u0090\3\2\2\2\u0099\17\3\2\2\2\u009a\u009e\5> \2\u009b\u009e\5\60\31"+ - "\2\u009c\u009e\58\35\2\u009d\u009a\3\2\2\2\u009d\u009b\3\2\2\2\u009d\u009c"+ - "\3\2\2\2\u009e\21\3\2\2\2\u009f\u00a1\5\32\16\2\u00a0\u00a2\5\34\17\2"+ - "\u00a1\u00a0\3\2\2\2\u00a1\u00a2\3\2\2\2\u00a2\u00a3\3\2\2\2\u00a3\u00a4"+ - "\5\60\31\2\u00a4\23\3\2\2\2\u00a5\u00a7\5\32\16\2\u00a6\u00a8\5\34\17"+ - "\2\u00a7\u00a6\3\2\2\2\u00a7\u00a8\3\2\2\2\u00a8\u00a9\3\2\2\2\u00a9\u00aa"+ - "\5\60\31\2\u00aa\u00ab\7\20\2\2\u00ab\u00ac\5&\24\2\u00ac\25\3\2\2\2\u00ad"+ - "\u00ae\7\21\2\2\u00ae\u00af\5\24\13\2\u00af\27\3\2\2\2\u00b0\u00b1\7\22"+ - "\2\2\u00b1\u00b2\5\24\13\2\u00b2\31\3\2\2\2\u00b3\u00b4\t\3\2\2\u00b4"+ - "\33\3\2\2\2\u00b5\u00b6\7\32\2\2\u00b6\u00b9\5&\24\2\u00b7\u00b8\7\17"+ - "\2\2\u00b8\u00ba\5&\24\2\u00b9\u00b7\3\2\2\2\u00b9\u00ba\3\2\2\2\u00ba"+ - "\u00bb\3\2\2\2\u00bb\u00bc\7\33\2\2\u00bc\35\3\2\2\2\u00bd\u00be\5\"\22"+ - "\2\u00be\u00bf\7\20\2\2\u00bf\u00c0\5&\24\2\u00c0\37\3\2\2\2\u00c1\u00c2"+ - "\5\"\22\2\u00c2\u00c3\t\4\2\2\u00c3\u00c4\5&\24\2\u00c4!\3\2\2\2\u00c5"+ - "\u00c9\5\64\33\2\u00c6\u00c9\5\60\31\2\u00c7\u00c9\5\62\32\2\u00c8\u00c5"+ - "\3\2\2\2\u00c8\u00c6\3\2\2\2\u00c8\u00c7\3\2\2\2\u00c9#\3\2\2\2\u00ca"+ - "\u00cb\5\"\22\2\u00cb\u00cc\t\5\2\2\u00cc%\3\2\2\2\u00cd\u00ce\b\24\1"+ - "\2\u00ce\u00cf\7&\2\2\u00cf\u00d0\5&\24\2\u00d0\u00d1\7\'\2\2\u00d1\u00dc"+ - "\3\2\2\2\u00d2\u00dc\5(\25\2\u00d3\u00d4\t\6\2\2\u00d4\u00dc\5&\24\24"+ - "\u00d5\u00d6\7:\2\2\u00d6\u00dc\5&\24\7\u00d7\u00dc\5B\"\2\u00d8\u00dc"+ - "\5\64\33\2\u00d9\u00dc\5\60\31\2\u00da\u00dc\5\62\32\2\u00db\u00cd\3\2"+ - "\2\2\u00db\u00d2\3\2\2\2\u00db\u00d3\3\2\2\2\u00db\u00d5\3\2\2\2\u00db"+ - "\u00d7\3\2\2\2\u00db\u00d8\3\2\2\2\u00db\u00d9\3\2\2\2\u00db\u00da\3\2"+ - "\2\2\u00dc\u0105\3\2\2\2\u00dd\u00de\f\23\2\2\u00de\u00df\7*\2\2\u00df"+ - "\u0104\5&\24\24\u00e0\u00e1\f\22\2\2\u00e1\u00e2\t\7\2\2\u00e2\u0104\5"+ - "&\24\23\u00e3\u00e4\f\21\2\2\u00e4\u00e5\t\b\2\2\u00e5\u0104\5&\24\22"+ - "\u00e6\u00e7\f\20\2\2\u00e7\u00e8\t\t\2\2\u00e8\u0104\5&\24\21\u00e9\u00ea"+ - "\f\17\2\2\u00ea\u00eb\t\n\2\2\u00eb\u0104\5&\24\20\u00ec\u00ed\f\16\2"+ - "\2\u00ed\u00ee\7\63\2\2\u00ee\u0104\5&\24\17\u00ef\u00f0\f\r\2\2\u00f0"+ - "\u00f1\7\64\2\2\u00f1\u0104\5&\24\16\u00f2\u00f3\f\f\2\2\u00f3\u00f4\7"+ - "\65\2\2\u00f4\u0104\5&\24\r\u00f5\u00f6\f\13\2\2\u00f6\u00f7\7\66\2\2"+ - "\u00f7\u0104\5&\24\f\u00f8\u00f9\f\n\2\2\u00f9\u00fa\7\67\2\2\u00fa\u0104"+ - "\5&\24\13\u00fb\u00fc\f\t\2\2\u00fc\u00fd\78\2\2\u00fd\u0104\5&\24\n\u00fe"+ - "\u00ff\f\b\2\2\u00ff\u0100\79\2\2\u0100\u0104\5&\24\t\u0101\u0102\f\26"+ - "\2\2\u0102\u0104\5\34\17\2\u0103\u00dd\3\2\2\2\u0103\u00e0\3\2\2\2\u0103"+ - "\u00e3\3\2\2\2\u0103\u00e6\3\2\2\2\u0103\u00e9\3\2\2\2\u0103\u00ec\3\2"+ - "\2\2\u0103\u00ef\3\2\2\2\u0103\u00f2\3\2\2\2\u0103\u00f5\3\2\2\2\u0103"+ - "\u00f8\3\2\2\2\u0103\u00fb\3\2\2\2\u0103\u00fe\3\2\2\2\u0103\u0101\3\2"+ - "\2\2\u0104\u0107\3\2\2\2\u0105\u0103\3\2\2\2\u0105\u0106\3\2\2\2\u0106"+ - "\'\3\2\2\2\u0107\u0105\3\2\2\2\u0108\u010b\5\60\31\2\u0109\u010b\5\62"+ - "\32\2\u010a\u0108\3\2\2\2\u010a\u0109\3\2\2\2\u010b\u010c\3\2\2\2\u010c"+ - "\u010e\7&\2\2\u010d\u010f\5,\27\2\u010e\u010d\3\2\2\2\u010e\u010f\3\2"+ - "\2\2\u010f\u0110\3\2\2\2\u0110\u0111\7\'\2\2\u0111)\3\2\2\2\u0112\u0115"+ - "\5\60\31\2\u0113\u0115\5\62\32\2\u0114\u0112\3\2\2\2\u0114\u0113\3\2\2"+ - "\2\u0115\u0116\3\2\2\2\u0116\u0118\7&\2\2\u0117\u0119\5,\27\2\u0118\u0117"+ - "\3\2\2\2\u0118\u0119\3\2\2\2\u0119\u011a\3\2\2\2\u011a\u011b\7\'\2\2\u011b"+ - "+\3\2\2\2\u011c\u0121\5&\24\2\u011d\u011e\7\17\2\2\u011e\u0120\5&\24\2"+ - "\u011f\u011d\3\2\2\2\u0120\u0123\3\2\2\2\u0121\u011f\3\2\2\2\u0121\u0122"+ - "\3\2\2\2\u0122-\3\2\2\2\u0123\u0121\3\2\2\2\u0124\u0126\7;\2\2\u0125\u0127"+ - "\5,\27\2\u0126\u0125\3\2\2\2\u0126\u0127\3\2\2\2\u0127/\3\2\2\2\u0128"+ - "\u0129\7]\2\2\u0129\61\3\2\2\2\u012a\u012d\7]\2\2\u012b\u012c\7<\2\2\u012c"+ - "\u012e\7]\2\2\u012d\u012b\3\2\2\2\u012e\u012f\3\2\2\2\u012f\u012d\3\2"+ - "\2\2\u012f\u0130\3\2\2\2\u0130\63\3\2\2\2\u0131\u0132\t\13\2\2\u0132\65"+ - "\3\2\2\2\u0133\u0134\t\f\2\2\u0134\67\3\2\2\2\u0135\u0136\t\r\2\2\u0136"+ - "9\3\2\2\2\u0137\u0138\t\16\2\2\u0138;\3\2\2\2\u0139\u013a\7\32\2\2\u013a"+ - "\u013f\5&\24\2\u013b\u013c\7\17\2\2\u013c\u013e\5&\24\2\u013d\u013b\3"+ - "\2\2\2\u013e\u0141\3\2\2\2\u013f\u013d\3\2\2\2\u013f\u0140\3\2\2\2\u0140"+ - "\u0142\3\2\2\2\u0141\u013f\3\2\2\2\u0142\u0143\7\33\2\2\u0143=\3\2\2\2"+ - "\u0144\u0145\7b\2\2\u0145?\3\2\2\2\u0146\u0147\7a\2\2\u0147A\3\2\2\2\u0148"+ - "\u014e\58\35\2\u0149\u014e\5:\36\2\u014a\u014e\5<\37\2\u014b\u014e\5>"+ - " \2\u014c\u014e\5@!\2\u014d\u0148\3\2\2\2\u014d\u0149\3\2\2\2\u014d\u014a"+ - "\3\2\2\2\u014d\u014b\3\2\2\2\u014d\u014c\3\2\2\2\u014eC\3\2\2\2\u014f"+ - "\u0150\7I\2\2\u0150\u0151\7c\2\2\u0151E\3\2\2\2\u0152\u0153\7J\2\2\u0153"+ - "\u0154\5\60\31\2\u0154\u0156\7&\2\2\u0155\u0157\5L\'\2\u0156\u0155\3\2"+ - "\2\2\u0156\u0157\3\2\2\2\u0157\u0158\3\2\2\2\u0158\u0159\7\'\2\2\u0159"+ - "\u015a\7K\2\2\u015a\u015c\7&\2\2\u015b\u015d\5P)\2\u015c\u015b\3\2\2\2"+ - "\u015c\u015d\3\2\2\2\u015d\u015e\3\2\2\2\u015e\u0163\7\'\2\2\u015f\u0164"+ - "\5J&\2\u0160\u0161\5H%\2\u0161\u0162\7\\\2\2\u0162\u0164\3\2\2\2\u0163"+ - "\u015f\3\2\2\2\u0163\u0160\3\2\2\2\u0164G\3\2\2\2\u0165\u0166\7L\2\2\u0166"+ - "\u016b\7\\\2\2\u0167\u016a\5\b\5\2\u0168\u016a\7\\\2\2\u0169\u0167\3\2"+ - "\2\2\u0169\u0168\3\2\2\2\u016a\u016d\3\2\2\2\u016b\u0169\3\2\2\2\u016b"+ - "\u016c\3\2\2\2\u016c\u016e\3\2\2\2\u016d\u016b\3\2\2\2\u016e\u016f\7M"+ - "\2\2\u016fI\3\2\2\2\u0170\u0171\7\20\2\2\u0171\u0172\58\35\2\u0172K\3"+ - "\2\2\2\u0173\u0178\5N(\2\u0174\u0175\7\17\2\2\u0175\u0177\5N(\2\u0176"+ - "\u0174\3\2\2\2\u0177\u017a\3\2\2\2\u0178\u0176\3\2\2\2\u0178\u0179\3\2"+ - "\2\2\u0179M\3\2\2\2\u017a\u0178\3\2\2\2\u017b\u017c\5\60\31\2\u017c\u017f"+ - "\7\4\2\2\u017d\u0180\5\64\33\2\u017e\u0180\5\66\34\2\u017f\u017d\3\2\2"+ - "\2\u017f\u017e\3\2\2\2\u0180O\3\2\2\2\u0181\u018b\7N\2\2\u0182\u0187\5"+ - "R*\2\u0183\u0184\7\17\2\2\u0184\u0186\5R*\2\u0185\u0183\3\2\2\2\u0186"+ - "\u0189\3\2\2\2\u0187\u0185\3\2\2\2\u0187\u0188\3\2\2\2\u0188\u018b\3\2"+ - "\2\2\u0189\u0187\3\2\2\2\u018a\u0181\3\2\2\2\u018a\u0182\3\2\2\2\u018b"+ - "Q\3\2\2\2\u018c\u018f\5\64\33\2\u018d\u018f\5\66\34\2\u018e\u018c\3\2"+ - "\2\2\u018e\u018d\3\2\2\2\u018f\u0191\3\2\2\2\u0190\u0192\7N\2\2\u0191"+ - "\u0190\3\2\2\2\u0191\u0192\3\2\2\2\u0192S\3\2\2\2\u0193\u0194\7O\2\2\u0194"+ - "\u0195\7&\2\2\u0195\u0196\5&\24\2\u0196\u0198\7\'\2\2\u0197\u0199\7\\"+ - "\2\2\u0198\u0197\3\2\2\2\u0198\u0199\3\2\2\2\u0199\u019c\3\2\2\2\u019a"+ - "\u019d\5\b\5\2\u019b\u019d\5H%\2\u019c\u019a\3\2\2\2\u019c\u019b\3\2\2"+ - "\2\u019d\u019f\3\2\2\2\u019e\u01a0\7\\\2\2\u019f\u019e\3\2\2\2\u019f\u01a0"+ - "\3\2\2\2\u01a0\u01a2\3\2\2\2\u01a1\u01a3\5V,\2\u01a2\u01a1\3\2\2\2\u01a2"+ - "\u01a3\3\2\2\2\u01a3\u01a4\3\2\2\2\u01a4\u01a5\7\\\2\2\u01a5U\3\2\2\2"+ - "\u01a6\u01a8\7P\2\2\u01a7\u01a9\7\\\2\2\u01a8\u01a7\3\2\2\2\u01a8\u01a9"+ - "\3\2\2\2\u01a9\u01ac\3\2\2\2\u01aa\u01ad\5\b\5\2\u01ab\u01ad\5H%\2\u01ac"+ - "\u01aa\3\2\2\2\u01ac\u01ab\3\2\2\2\u01adW\3\2\2\2\u01ae\u01b0\5Z.\2\u01af"+ - "\u01b1\7\\\2\2\u01b0\u01af\3\2\2\2\u01b0\u01b1\3\2\2\2\u01b1\u01b4\3\2"+ - "\2\2\u01b2\u01b5\5\b\5\2\u01b3\u01b5\5H%\2\u01b4\u01b2\3\2\2\2\u01b4\u01b3"+ - "\3\2\2\2\u01b5\u01b7\3\2\2\2\u01b6\u01b8\7\\\2\2\u01b7\u01b6\3\2\2\2\u01b7"+ - "\u01b8\3\2\2\2\u01b8\u01ba\3\2\2\2\u01b9\u01bb\5V,\2\u01ba\u01b9\3\2\2"+ - "\2\u01ba\u01bb\3\2\2\2\u01bb\u01bc\3\2\2\2\u01bc\u01bd\7\\\2\2\u01bdY"+ - "\3\2\2\2\u01be\u01bf\t\17\2\2\u01bf[\3\2\2\2\61^`gl\u0081\u008a\u008e"+ - "\u0095\u0098\u009d\u00a1\u00a7\u00b9\u00c8\u00db\u0103\u0105\u010a\u010e"+ - "\u0114\u0118\u0121\u0126\u012f\u013f\u014d\u0156\u015c\u0163\u0169\u016b"+ - "\u0178\u017f\u0187\u018a\u018e\u0191\u0198\u019c\u019f\u01a2\u01a8\u01ac"+ - "\u01b0\u01b4\u01b7\u01ba"; + "\3\24\3\24\3\24\7\24\u0106\n\24\f\24\16\24\u0109\13\24\3\25\3\25\5\25"+ + "\u010d\n\25\3\25\3\25\5\25\u0111\n\25\3\25\3\25\3\26\3\26\5\26\u0117\n"+ + "\26\3\26\3\26\5\26\u011b\n\26\3\26\3\26\3\27\3\27\3\27\7\27\u0122\n\27"+ + "\f\27\16\27\u0125\13\27\3\30\3\30\5\30\u0129\n\30\3\31\3\31\3\32\3\32"+ + "\3\32\6\32\u0130\n\32\r\32\16\32\u0131\3\33\3\33\3\34\3\34\3\35\3\35\5"+ + "\35\u013a\n\35\3\36\3\36\3\37\3\37\3 \3 \3 \3 \7 \u0144\n \f \16 \u0147"+ + "\13 \3 \3 \3!\3!\3\"\3\"\3#\3#\3#\3#\3#\5#\u0154\n#\3$\3$\3$\3%\3%\3%"+ + "\3%\5%\u015d\n%\3%\3%\3%\3%\5%\u0163\n%\3%\3%\3%\3%\3%\5%\u016a\n%\3&"+ + "\3&\3&\3&\7&\u0170\n&\f&\16&\u0173\13&\3&\3&\3\'\3\'\3\'\3(\3(\3(\7(\u017d"+ + "\n(\f(\16(\u0180\13(\3)\3)\3)\3)\5)\u0186\n)\3*\3*\3*\3*\7*\u018c\n*\f"+ + "*\16*\u018f\13*\5*\u0191\n*\3+\3+\5+\u0195\n+\3+\5+\u0198\n+\3,\3,\3,"+ + "\3,\3,\5,\u019f\n,\3,\3,\5,\u01a3\n,\3,\5,\u01a6\n,\3,\5,\u01a9\n,\3,"+ + "\3,\3-\3-\5-\u01af\n-\3-\3-\5-\u01b3\n-\3.\3.\5.\u01b7\n.\3.\3.\5.\u01bb"+ + "\n.\3.\5.\u01be\n.\3.\5.\u01c1\n.\3.\3.\3/\3/\3/\2\3&\60\2\4\6\b\n\f\16"+ + "\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\\2\20"+ + "\3\2\6\16\3\2\23\31\3\2\34#\3\2$%\4\2\3\3()\3\2+,\3\2()\3\2-\60\3\2\61"+ + "\62\3\2=B\3\2CF\3\2_a\3\2HI\3\2RY\2\u01ed\2b\3\2\2\2\4i\3\2\2\2\6k\3\2"+ + "\2\2\b\u0083\3\2\2\2\n\u0085\3\2\2\2\f\u0088\3\2\2\2\16\u008e\3\2\2\2"+ + "\20\u009f\3\2\2\2\22\u00a1\3\2\2\2\24\u00a7\3\2\2\2\26\u00af\3\2\2\2\30"+ + "\u00b2\3\2\2\2\32\u00b5\3\2\2\2\34\u00b7\3\2\2\2\36\u00bf\3\2\2\2 \u00c3"+ + "\3\2\2\2\"\u00ca\3\2\2\2$\u00cc\3\2\2\2&\u00dd\3\2\2\2(\u010c\3\2\2\2"+ + "*\u0116\3\2\2\2,\u011e\3\2\2\2.\u0126\3\2\2\2\60\u012a\3\2\2\2\62\u012c"+ + "\3\2\2\2\64\u0133\3\2\2\2\66\u0135\3\2\2\28\u0137\3\2\2\2:\u013b\3\2\2"+ + "\2<\u013d\3\2\2\2>\u013f\3\2\2\2@\u014a\3\2\2\2B\u014c\3\2\2\2D\u0153"+ + "\3\2\2\2F\u0155\3\2\2\2H\u0158\3\2\2\2J\u016b\3\2\2\2L\u0176\3\2\2\2N"+ + "\u0179\3\2\2\2P\u0181\3\2\2\2R\u0190\3\2\2\2T\u0194\3\2\2\2V\u0199\3\2"+ + "\2\2X\u01ac\3\2\2\2Z\u01b4\3\2\2\2\\\u01c4\3\2\2\2^a\5\4\3\2_a\7]\2\2"+ + "`^\3\2\2\2`_\3\2\2\2ad\3\2\2\2b`\3\2\2\2bc\3\2\2\2ce\3\2\2\2db\3\2\2\2"+ + "ef\7\2\2\3f\3\3\2\2\2gj\5\16\b\2hj\5\6\4\2ig\3\2\2\2ih\3\2\2\2j\5\3\2"+ + "\2\2kl\7\3\2\2ln\5\60\31\2mo\58\35\2nm\3\2\2\2no\3\2\2\2op\3\2\2\2pq\5"+ + "J&\2qr\7]\2\2r\7\3\2\2\2s\u0084\5\16\b\2t\u0084\5\24\13\2u\u0084\5\22"+ + "\n\2v\u0084\5\26\f\2w\u0084\5\30\r\2x\u0084\5\36\20\2y\u0084\5 \21\2z"+ + "\u0084\5\f\7\2{\u0084\5$\23\2|\u0084\5*\26\2}\u0084\5V,\2~\u0084\5Z.\2"+ + "\177\u0084\5H%\2\u0080\u0084\5F$\2\u0081\u0084\5\n\6\2\u0082\u0084\5."+ + "\30\2\u0083s\3\2\2\2\u0083t\3\2\2\2\u0083u\3\2\2\2\u0083v\3\2\2\2\u0083"+ + "w\3\2\2\2\u0083x\3\2\2\2\u0083y\3\2\2\2\u0083z\3\2\2\2\u0083{\3\2\2\2"+ + "\u0083|\3\2\2\2\u0083}\3\2\2\2\u0083~\3\2\2\2\u0083\177\3\2\2\2\u0083"+ + "\u0080\3\2\2\2\u0083\u0081\3\2\2\2\u0083\u0082\3\2\2\2\u0084\t\3\2\2\2"+ + "\u0085\u0086\5\60\31\2\u0086\u0087\7\4\2\2\u0087\13\3\2\2\2\u0088\u008c"+ + "\7\5\2\2\u0089\u008d\58\35\2\u008a\u008d\5\60\31\2\u008b\u008d\5\62\32"+ + "\2\u008c\u0089\3\2\2\2\u008c\u008a\3\2\2\2\u008c\u008b\3\2\2\2\u008d\r"+ + "\3\2\2\2\u008e\u009a\t\2\2\2\u008f\u0091\5\20\t\2\u0090\u008f\3\2\2\2"+ + "\u0090\u0091\3\2\2\2\u0091\u009b\3\2\2\2\u0092\u0097\5\20\t\2\u0093\u0094"+ + "\7\17\2\2\u0094\u0096\5\20\t\2\u0095\u0093\3\2\2\2\u0096\u0099\3\2\2\2"+ + "\u0097\u0095\3\2\2\2\u0097\u0098\3\2\2\2\u0098\u009b\3\2\2\2\u0099\u0097"+ + "\3\2\2\2\u009a\u0090\3\2\2\2\u009a\u0092\3\2\2\2\u009b\17\3\2\2\2\u009c"+ + "\u00a0\5@!\2\u009d\u00a0\5\60\31\2\u009e\u00a0\58\35\2\u009f\u009c\3\2"+ + "\2\2\u009f\u009d\3\2\2\2\u009f\u009e\3\2\2\2\u00a0\21\3\2\2\2\u00a1\u00a3"+ + "\5\32\16\2\u00a2\u00a4\5\34\17\2\u00a3\u00a2\3\2\2\2\u00a3\u00a4\3\2\2"+ + "\2\u00a4\u00a5\3\2\2\2\u00a5\u00a6\5\60\31\2\u00a6\23\3\2\2\2\u00a7\u00a9"+ + "\5\32\16\2\u00a8\u00aa\5\34\17\2\u00a9\u00a8\3\2\2\2\u00a9\u00aa\3\2\2"+ + "\2\u00aa\u00ab\3\2\2\2\u00ab\u00ac\5\60\31\2\u00ac\u00ad\7\20\2\2\u00ad"+ + "\u00ae\5&\24\2\u00ae\25\3\2\2\2\u00af\u00b0\7\21\2\2\u00b0\u00b1\5\24"+ + "\13\2\u00b1\27\3\2\2\2\u00b2\u00b3\7\22\2\2\u00b3\u00b4\5\24\13\2\u00b4"+ + "\31\3\2\2\2\u00b5\u00b6\t\3\2\2\u00b6\33\3\2\2\2\u00b7\u00b8\7\32\2\2"+ + "\u00b8\u00bb\5&\24\2\u00b9\u00ba\7\17\2\2\u00ba\u00bc\5&\24\2\u00bb\u00b9"+ + "\3\2\2\2\u00bb\u00bc\3\2\2\2\u00bc\u00bd\3\2\2\2\u00bd\u00be\7\33\2\2"+ + "\u00be\35\3\2\2\2\u00bf\u00c0\5\"\22\2\u00c0\u00c1\7\20\2\2\u00c1\u00c2"+ + "\5&\24\2\u00c2\37\3\2\2\2\u00c3\u00c4\5\"\22\2\u00c4\u00c5\t\4\2\2\u00c5"+ + "\u00c6\5&\24\2\u00c6!\3\2\2\2\u00c7\u00cb\5\64\33\2\u00c8\u00cb\5\60\31"+ + "\2\u00c9\u00cb\5\62\32\2\u00ca\u00c7\3\2\2\2\u00ca\u00c8\3\2\2\2\u00ca"+ + "\u00c9\3\2\2\2\u00cb#\3\2\2\2\u00cc\u00cd\5\"\22\2\u00cd\u00ce\t\5\2\2"+ + "\u00ce%\3\2\2\2\u00cf\u00d0\b\24\1\2\u00d0\u00d1\7&\2\2\u00d1\u00d2\5"+ + "&\24\2\u00d2\u00d3\7\'\2\2\u00d3\u00de\3\2\2\2\u00d4\u00de\5(\25\2\u00d5"+ + "\u00d6\t\6\2\2\u00d6\u00de\5&\24\24\u00d7\u00d8\7:\2\2\u00d8\u00de\5&"+ + "\24\7\u00d9\u00de\5D#\2\u00da\u00de\5\64\33\2\u00db\u00de\5\60\31\2\u00dc"+ + "\u00de\5\62\32\2\u00dd\u00cf\3\2\2\2\u00dd\u00d4\3\2\2\2\u00dd\u00d5\3"+ + "\2\2\2\u00dd\u00d7\3\2\2\2\u00dd\u00d9\3\2\2\2\u00dd\u00da\3\2\2\2\u00dd"+ + "\u00db\3\2\2\2\u00dd\u00dc\3\2\2\2\u00de\u0107\3\2\2\2\u00df\u00e0\f\23"+ + "\2\2\u00e0\u00e1\7*\2\2\u00e1\u0106\5&\24\24\u00e2\u00e3\f\22\2\2\u00e3"+ + "\u00e4\t\7\2\2\u00e4\u0106\5&\24\23\u00e5\u00e6\f\21\2\2\u00e6\u00e7\t"+ + "\b\2\2\u00e7\u0106\5&\24\22\u00e8\u00e9\f\20\2\2\u00e9\u00ea\t\t\2\2\u00ea"+ + "\u0106\5&\24\21\u00eb\u00ec\f\17\2\2\u00ec\u00ed\t\n\2\2\u00ed\u0106\5"+ + "&\24\20\u00ee\u00ef\f\16\2\2\u00ef\u00f0\7\63\2\2\u00f0\u0106\5&\24\17"+ + "\u00f1\u00f2\f\r\2\2\u00f2\u00f3\7\64\2\2\u00f3\u0106\5&\24\16\u00f4\u00f5"+ + "\f\f\2\2\u00f5\u00f6\7\65\2\2\u00f6\u0106\5&\24\r\u00f7\u00f8\f\13\2\2"+ + "\u00f8\u00f9\7\66\2\2\u00f9\u0106\5&\24\f\u00fa\u00fb\f\n\2\2\u00fb\u00fc"+ + "\7\67\2\2\u00fc\u0106\5&\24\13\u00fd\u00fe\f\t\2\2\u00fe\u00ff\78\2\2"+ + "\u00ff\u0106\5&\24\n\u0100\u0101\f\b\2\2\u0101\u0102\79\2\2\u0102\u0106"+ + "\5&\24\t\u0103\u0104\f\26\2\2\u0104\u0106\5\34\17\2\u0105\u00df\3\2\2"+ + "\2\u0105\u00e2\3\2\2\2\u0105\u00e5\3\2\2\2\u0105\u00e8\3\2\2\2\u0105\u00eb"+ + "\3\2\2\2\u0105\u00ee\3\2\2\2\u0105\u00f1\3\2\2\2\u0105\u00f4\3\2\2\2\u0105"+ + "\u00f7\3\2\2\2\u0105\u00fa\3\2\2\2\u0105\u00fd\3\2\2\2\u0105\u0100\3\2"+ + "\2\2\u0105\u0103\3\2\2\2\u0106\u0109\3\2\2\2\u0107\u0105\3\2\2\2\u0107"+ + "\u0108\3\2\2\2\u0108\'\3\2\2\2\u0109\u0107\3\2\2\2\u010a\u010d\5\60\31"+ + "\2\u010b\u010d\5\62\32\2\u010c\u010a\3\2\2\2\u010c\u010b\3\2\2\2\u010d"+ + "\u010e\3\2\2\2\u010e\u0110\7&\2\2\u010f\u0111\5,\27\2\u0110\u010f\3\2"+ + "\2\2\u0110\u0111\3\2\2\2\u0111\u0112\3\2\2\2\u0112\u0113\7\'\2\2\u0113"+ + ")\3\2\2\2\u0114\u0117\5\60\31\2\u0115\u0117\5\62\32\2\u0116\u0114\3\2"+ + "\2\2\u0116\u0115\3\2\2\2\u0117\u0118\3\2\2\2\u0118\u011a\7&\2\2\u0119"+ + "\u011b\5,\27\2\u011a\u0119\3\2\2\2\u011a\u011b\3\2\2\2\u011b\u011c\3\2"+ + "\2\2\u011c\u011d\7\'\2\2\u011d+\3\2\2\2\u011e\u0123\5&\24\2\u011f\u0120"+ + "\7\17\2\2\u0120\u0122\5&\24\2\u0121\u011f\3\2\2\2\u0122\u0125\3\2\2\2"+ + "\u0123\u0121\3\2\2\2\u0123\u0124\3\2\2\2\u0124-\3\2\2\2\u0125\u0123\3"+ + "\2\2\2\u0126\u0128\7;\2\2\u0127\u0129\5,\27\2\u0128\u0127\3\2\2\2\u0128"+ + "\u0129\3\2\2\2\u0129/\3\2\2\2\u012a\u012b\7^\2\2\u012b\61\3\2\2\2\u012c"+ + "\u012f\7^\2\2\u012d\u012e\7<\2\2\u012e\u0130\7^\2\2\u012f\u012d\3\2\2"+ + "\2\u0130\u0131\3\2\2\2\u0131\u012f\3\2\2\2\u0131\u0132\3\2\2\2\u0132\63"+ + "\3\2\2\2\u0133\u0134\t\13\2\2\u0134\65\3\2\2\2\u0135\u0136\t\f\2\2\u0136"+ + "\67\3\2\2\2\u0137\u0139\t\r\2\2\u0138\u013a\5:\36\2\u0139\u0138\3\2\2"+ + "\2\u0139\u013a\3\2\2\2\u013a9\3\2\2\2\u013b\u013c\7G\2\2\u013c;\3\2\2"+ + "\2\u013d\u013e\t\16\2\2\u013e=\3\2\2\2\u013f\u0140\7\32\2\2\u0140\u0145"+ + "\5&\24\2\u0141\u0142\7\17\2\2\u0142\u0144\5&\24\2\u0143\u0141\3\2\2\2"+ + "\u0144\u0147\3\2\2\2\u0145\u0143\3\2\2\2\u0145\u0146\3\2\2\2\u0146\u0148"+ + "\3\2\2\2\u0147\u0145\3\2\2\2\u0148\u0149\7\33\2\2\u0149?\3\2\2\2\u014a"+ + "\u014b\7c\2\2\u014bA\3\2\2\2\u014c\u014d\7b\2\2\u014dC\3\2\2\2\u014e\u0154"+ + "\58\35\2\u014f\u0154\5<\37\2\u0150\u0154\5> \2\u0151\u0154\5@!\2\u0152"+ + "\u0154\5B\"\2\u0153\u014e\3\2\2\2\u0153\u014f\3\2\2\2\u0153\u0150\3\2"+ + "\2\2\u0153\u0151\3\2\2\2\u0153\u0152\3\2\2\2\u0154E\3\2\2\2\u0155\u0156"+ + "\7J\2\2\u0156\u0157\7d\2\2\u0157G\3\2\2\2\u0158\u0159\7K\2\2\u0159\u015a"+ + "\5\60\31\2\u015a\u015c\7&\2\2\u015b\u015d\5N(\2\u015c\u015b\3\2\2\2\u015c"+ + "\u015d\3\2\2\2\u015d\u015e\3\2\2\2\u015e\u015f\7\'\2\2\u015f\u0160\7L"+ + "\2\2\u0160\u0162\7&\2\2\u0161\u0163\5R*\2\u0162\u0161\3\2\2\2\u0162\u0163"+ + "\3\2\2\2\u0163\u0164\3\2\2\2\u0164\u0169\7\'\2\2\u0165\u016a\5L\'\2\u0166"+ + "\u0167\5J&\2\u0167\u0168\7]\2\2\u0168\u016a\3\2\2\2\u0169\u0165\3\2\2"+ + "\2\u0169\u0166\3\2\2\2\u016aI\3\2\2\2\u016b\u016c\7M\2\2\u016c\u0171\7"+ + "]\2\2\u016d\u0170\5\b\5\2\u016e\u0170\7]\2\2\u016f\u016d\3\2\2\2\u016f"+ + "\u016e\3\2\2\2\u0170\u0173\3\2\2\2\u0171\u016f\3\2\2\2\u0171\u0172\3\2"+ + "\2\2\u0172\u0174\3\2\2\2\u0173\u0171\3\2\2\2\u0174\u0175\7N\2\2\u0175"+ + "K\3\2\2\2\u0176\u0177\7\20\2\2\u0177\u0178\58\35\2\u0178M\3\2\2\2\u0179"+ + "\u017e\5P)\2\u017a\u017b\7\17\2\2\u017b\u017d\5P)\2\u017c\u017a\3\2\2"+ + "\2\u017d\u0180\3\2\2\2\u017e\u017c\3\2\2\2\u017e\u017f\3\2\2\2\u017fO"+ + "\3\2\2\2\u0180\u017e\3\2\2\2\u0181\u0182\5\60\31\2\u0182\u0185\7\4\2\2"+ + "\u0183\u0186\5\64\33\2\u0184\u0186\5\66\34\2\u0185\u0183\3\2\2\2\u0185"+ + "\u0184\3\2\2\2\u0186Q\3\2\2\2\u0187\u0191\7O\2\2\u0188\u018d\5T+\2\u0189"+ + "\u018a\7\17\2\2\u018a\u018c\5T+\2\u018b\u0189\3\2\2\2\u018c\u018f\3\2"+ + "\2\2\u018d\u018b\3\2\2\2\u018d\u018e\3\2\2\2\u018e\u0191\3\2\2\2\u018f"+ + "\u018d\3\2\2\2\u0190\u0187\3\2\2\2\u0190\u0188\3\2\2\2\u0191S\3\2\2\2"+ + "\u0192\u0195\5\64\33\2\u0193\u0195\5\66\34\2\u0194\u0192\3\2\2\2\u0194"+ + "\u0193\3\2\2\2\u0195\u0197\3\2\2\2\u0196\u0198\7O\2\2\u0197\u0196\3\2"+ + "\2\2\u0197\u0198\3\2\2\2\u0198U\3\2\2\2\u0199\u019a\7P\2\2\u019a\u019b"+ + "\7&\2\2\u019b\u019c\5&\24\2\u019c\u019e\7\'\2\2\u019d\u019f\7]\2\2\u019e"+ + "\u019d\3\2\2\2\u019e\u019f\3\2\2\2\u019f\u01a2\3\2\2\2\u01a0\u01a3\5\b"+ + "\5\2\u01a1\u01a3\5J&\2\u01a2\u01a0\3\2\2\2\u01a2\u01a1\3\2\2\2\u01a3\u01a5"+ + "\3\2\2\2\u01a4\u01a6\7]\2\2\u01a5\u01a4\3\2\2\2\u01a5\u01a6\3\2\2\2\u01a6"+ + "\u01a8\3\2\2\2\u01a7\u01a9\5X-\2\u01a8\u01a7\3\2\2\2\u01a8\u01a9\3\2\2"+ + "\2\u01a9\u01aa\3\2\2\2\u01aa\u01ab\7]\2\2\u01abW\3\2\2\2\u01ac\u01ae\7"+ + "Q\2\2\u01ad\u01af\7]\2\2\u01ae\u01ad\3\2\2\2\u01ae\u01af\3\2\2\2\u01af"+ + "\u01b2\3\2\2\2\u01b0\u01b3\5\b\5\2\u01b1\u01b3\5J&\2\u01b2\u01b0\3\2\2"+ + "\2\u01b2\u01b1\3\2\2\2\u01b3Y\3\2\2\2\u01b4\u01b6\5\\/\2\u01b5\u01b7\7"+ + "]\2\2\u01b6\u01b5\3\2\2\2\u01b6\u01b7\3\2\2\2\u01b7\u01ba\3\2\2\2\u01b8"+ + "\u01bb\5\b\5\2\u01b9\u01bb\5J&\2\u01ba\u01b8\3\2\2\2\u01ba\u01b9\3\2\2"+ + "\2\u01bb\u01bd\3\2\2\2\u01bc\u01be\7]\2\2\u01bd\u01bc\3\2\2\2\u01bd\u01be"+ + "\3\2\2\2\u01be\u01c0\3\2\2\2\u01bf\u01c1\5X-\2\u01c0\u01bf\3\2\2\2\u01c0"+ + "\u01c1\3\2\2\2\u01c1\u01c2\3\2\2\2\u01c2\u01c3\7]\2\2\u01c3[\3\2\2\2\u01c4"+ + "\u01c5\t\17\2\2\u01c5]\3\2\2\2\62`bin\u0083\u008c\u0090\u0097\u009a\u009f"+ + "\u00a3\u00a9\u00bb\u00ca\u00dd\u0105\u0107\u010c\u0110\u0116\u011a\u0123"+ + "\u0128\u0131\u0139\u0145\u0153\u015c\u0162\u0169\u016f\u0171\u017e\u0185"+ + "\u018d\u0190\u0194\u0197\u019e\u01a2\u01a5\u01a8\u01ae\u01b2\u01b6\u01ba"+ + "\u01bd\u01c0"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/il65/src/il65/stackvm/StackVm.kt b/il65/src/il65/stackvm/StackVm.kt index 380a473ed..6084548db 100644 --- a/il65/src/il65/stackvm/StackVm.kt +++ b/il65/src/il65/stackvm/StackVm.kt @@ -28,7 +28,7 @@ enum class Opcode { POP_MEM, // pop value into destination memory address POP_VAR, // pop value into variable - // numeric bitand bitwise arithmetic + // numeric and bitwise arithmetic ADD, SUB, MUL, @@ -117,9 +117,9 @@ enum class Opcode { enum class Syscall(val callNr: Short) { WRITE_MEMCHR(10), // print a single char from the memory WRITE_MEMSTR(11), // print a 0-terminated petscii string from the memory - WRITE_NUM(12), // pop from the evaluation stack bitand print it as a number - WRITE_CHAR(13), // pop from the evaluation stack bitand print it as a single petscii character - WRITE_VAR(14), // print the number bitor string from the given variable + WRITE_NUM(12), // pop from the evaluation stack and print it as a number + WRITE_CHAR(13), // pop from the evaluation stack and print it as a single petscii character + WRITE_VAR(14), // print the number or string from the given variable INPUT_VAR(15), // user input a string into a variable GFX_PIXEL(16), // plot a pixel at (x,y,color) pushed on stack in that order GFX_CLEARSCR(17), // clear the screen with color pushed on stack @@ -164,7 +164,7 @@ enum class Syscall(val callNr: Short) { } class Memory { - private val mem = ShortArray(65536) // shorts because byte is signed bitand we store values 0..255 + private val mem = ShortArray(65536) // shorts because byte is signed and we store values 0..255 fun getByte(address: Int): Short { return mem[address] @@ -319,7 +319,7 @@ class Value(val type: DataType, private val numericvalue: Number?, val stringval } fun rol(carry: Boolean): Pair { - // 9 bitor 17 bit rotate left (with carry)) + // 9 or 17 bit rotate left (with carry)) return when(type) { DataType.BYTE -> { val v = byteval!!.toInt() @@ -338,7 +338,7 @@ class Value(val type: DataType, private val numericvalue: Number?, val stringval } fun ror(carry: Boolean): Pair { - // 9 bitor 17 bit rotate right (with carry) + // 9 or 17 bit rotate right (with carry) return when(type) { DataType.BYTE -> { val v = byteval!!.toInt() @@ -357,7 +357,7 @@ class Value(val type: DataType, private val numericvalue: Number?, val stringval } fun rol2(): Value { - // 8 bitor 16 bit rotate left + // 8 or 16 bit rotate left return when(type) { DataType.BYTE -> { val v = byteval!!.toInt() @@ -376,7 +376,7 @@ class Value(val type: DataType, private val numericvalue: Number?, val stringval } fun ror2(): Value { - // 8 bitor 16 bit rotate right + // 8 or 16 bit rotate right return when(type) { DataType.BYTE -> { val v = byteval!!.toInt()