From 0cdae48ce7d272a3e2791d81c3815447e40774c4 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Mon, 1 Oct 2018 22:23:16 +0200 Subject: [PATCH] implemented array indexing --- compiler/antlr/prog8.g4 | 7 +- compiler/examples/test.p8 | 20 +- compiler/src/prog8/ast/AST.kt | 49 + compiler/src/prog8/ast/AstChecker.kt | 30 +- compiler/src/prog8/compiler/Compiler.kt | 80 +- .../src/prog8/optimizing/ConstantFolding.kt | 17 + compiler/src/prog8/parser/prog8Parser.java | 1620 +++++++++-------- compiler/src/prog8/stackvm/Program.kt | 3 +- compiler/src/prog8/stackvm/StackVm.kt | 20 + docs/source/programming.rst | 14 +- docs/source/syntaxreference.rst | 31 +- 11 files changed, 1052 insertions(+), 839 deletions(-) diff --git a/compiler/antlr/prog8.g4 b/compiler/antlr/prog8.g4 index 488e5e364..0e39a1b85 100644 --- a/compiler/antlr/prog8.g4 +++ b/compiler/antlr/prog8.g4 @@ -123,7 +123,6 @@ postincrdecr : assign_target operator = ('++' | '--') ; expression : '(' expression ')' - | expression arrayspec | functioncall | prefix = ('+'|'-'|'~') expression | left = expression bop = '**' right = expression @@ -143,9 +142,15 @@ expression : | register | identifier | scoped_identifier + | arrayindexed ; +arrayindexed : + (identifier | scoped_identifier | register) arrayspec + ; + + functioncall : (identifier | scoped_identifier) '(' expression_list? ')' ; diff --git a/compiler/examples/test.p8 b/compiler/examples/test.p8 index 9da640980..bd0a16c2b 100644 --- a/compiler/examples/test.p8 +++ b/compiler/examples/test.p8 @@ -1,15 +1,21 @@ ~ main { -; sub VECTOR (dir: Pc, userptr: XY) -> (X, A?, Y?) = $FF8D ; read/set I/O vector table - - -asmsub VECTOR (dir: byte @ A, userptr: word @ XY) -> clobbers(A,X,Y) -> (byte @ X) = $ff8d -; asmsub VECTOR (dir: byte @ Pc, userptr: word @ XY) -> byte @ X, clobbers @ A, clobbers @ Y = $ff8d - - sub start() { + + byte[100] array + byte[4,5] mvar + + A=AX[2] + A=AY[2] + A=XY[2] + + A=array[98] + A=array[99] + A=mvar[13] + A=mvar[2,3] + A=mvar[Y,X] return } diff --git a/compiler/src/prog8/ast/AST.kt b/compiler/src/prog8/ast/AST.kt index efd75a77e..d2da2cdc3 100644 --- a/compiler/src/prog8/ast/AST.kt +++ b/compiler/src/prog8/ast/AST.kt @@ -216,6 +216,12 @@ interface IAstProcessor { fun process(asmSubroutine: AsmSubroutine): IStatement { return asmSubroutine } + + fun process(arrayIndexedExpression: ArrayIndexedExpression): IExpression { + arrayIndexedExpression.identifier?.process(this) + arrayIndexedExpression.array.process(this) + return arrayIndexedExpression + } } @@ -805,6 +811,39 @@ class BinaryExpression(var left: IExpression, var operator: String, var right: I } } +class ArrayIndexedExpression(val identifier: IdentifierReference?, + val register: Register?, + var array: ArraySpec, + override val position: Position) : IExpression { + override lateinit var parent: Node + override fun linkParents(parent: Node) { + this.parent = parent + identifier?.linkParents(this) + array.linkParents(this) + } + + override fun isIterable(namespace: INameScope, heap: HeapValues) = false + override fun constValue(namespace: INameScope, heap: HeapValues): LiteralValue? = null + override fun process(processor: IAstProcessor): IExpression = processor.process(this) + override fun referencesIdentifier(name: String) = identifier?.referencesIdentifier(name) ?: false + + override fun resultingDatatype(namespace: INameScope, heap: HeapValues): DataType? { + if (register != null) + return DataType.BYTE + val target = identifier?.targetStatement(namespace) + if (target is VarDecl) { + return when (target.datatype) { + DataType.STR, DataType.STR_P, DataType.STR_S, DataType.STR_PS -> DataType.BYTE + DataType.ARRAY, DataType.MATRIX -> DataType.BYTE + DataType.ARRAY_W -> DataType.WORD + else -> null + } + } + throw FatalAstException("cannot get indexed element on $target") + } +} + + private data class NumericLiteral(val number: Number, val datatype: DataType) @@ -1755,9 +1794,19 @@ private fun prog8Parser.ExpressionContext.toAst() : IExpression { if(childCount==3 && children[0].text=="(" && children[2].text==")") return expression(0).toAst() // expression within ( ) + if(arrayindexed()!=null) + return arrayindexed().toAst() + throw FatalAstException(text) } +private fun prog8Parser.ArrayindexedContext.toAst(): IExpression { + return ArrayIndexedExpression(identifier()?.toAst() ?: scoped_identifier()?.toAst(), + register()?.toAst(), + arrayspec().toAst(), + toPosition()) +} + private fun prog8Parser.Expression_listContext.toAst() = expression().map{ it.toAst() } diff --git a/compiler/src/prog8/ast/AstChecker.kt b/compiler/src/prog8/ast/AstChecker.kt index 0c26dedf5..a08edcab3 100644 --- a/compiler/src/prog8/ast/AstChecker.kt +++ b/compiler/src/prog8/ast/AstChecker.kt @@ -290,7 +290,7 @@ class AstChecker(private val namespace: INameScope, if(assignment.value is FunctionCall) checkResult.add(ExpressionError("function call doesn't return a value to use in assignment", assignment.value.position)) else - checkResult.add(ExpressionError("assignment source ${assignment.value} is no value or has no proper datatype", assignment.value.position)) + checkResult.add(ExpressionError("assignment value is invalid or has no proper datatype", assignment.value.position)) } else { checkAssignmentCompatible(targetDatatype, sourceDatatype, assignment.value, assignment.position) @@ -561,6 +561,34 @@ class AstChecker(private val namespace: INameScope, return super.process(postIncrDecr) } + override fun process(arrayIndexedExpression: ArrayIndexedExpression): IExpression { + val reg=arrayIndexedExpression.register + if(reg==null) { + val target = arrayIndexedExpression.identifier!!.targetStatement(namespace) + if(target is VarDecl) { + if(target.datatype==DataType.BYTE || target.datatype==DataType.WORD || target.datatype==DataType.FLOAT) + checkResult.add(SyntaxError("array indexing requires an iterable variable", arrayIndexedExpression.position)) + val arraysize = target.arrayspec?.size() + if(arraysize!=null) { + // check out of bounds + if((arrayIndexedExpression.array.y as? LiteralValue)?.asIntegerValue != null) { + throw FatalAstException("constant y dimension of index should have been const-folded with x into one value") + } + val index = (arrayIndexedExpression.array.x as? LiteralValue)?.asIntegerValue + if(index!=null && (index<0 || index>=arraysize)) + checkResult.add(ExpressionError("array index out of bounds", arrayIndexedExpression.array.position)) + } + } else + checkResult.add(SyntaxError("array indexing requires a variable to act upon", arrayIndexedExpression.position)) + } else if(reg==Register.A || reg==Register.X || reg==Register.Y) { + checkResult.add(SyntaxError("array indexing on registers requires register pair variable", arrayIndexedExpression.position)) + } else if(arrayIndexedExpression.array.y!=null) { + checkResult.add(SyntaxError("array indexing on registers can only use one index dimension", arrayIndexedExpression.position)) + } + + return super.process(arrayIndexedExpression) + } + private fun checkFunctionOrLabelExists(target: IdentifierReference, statement: IStatement): IStatement? { val targetStatement = target.targetStatement(namespace) if(targetStatement is Label || targetStatement is Subroutine || targetStatement is BuiltinFunctionStatementPlaceholder) diff --git a/compiler/src/prog8/compiler/Compiler.kt b/compiler/src/prog8/compiler/Compiler.kt index 02c359263..76168a579 100644 --- a/compiler/src/prog8/compiler/Compiler.kt +++ b/compiler/src/prog8/compiler/Compiler.kt @@ -417,9 +417,7 @@ private class StatementTranslator(private val stackvmProg: StackVmProgram, private fun translate(expr: IExpression) { when(expr) { - is RegisterExpr -> { - stackvmProg.instr(Opcode.PUSH_VAR, callLabel = expr.register.toString()) - } + is RegisterExpr -> stackvmProg.instr(Opcode.PUSH_VAR, callLabel = expr.register.toString()) is PrefixExpression -> { translate(expr.expression) translatePrefixOperator(expr.operator) @@ -444,29 +442,8 @@ private class StatementTranslator(private val stackvmProg: StackVmProgram, } } } - is IdentifierReference -> { - val target = expr.targetStatement(namespace) - when(target) { - is VarDecl -> { - when(target.type) { - VarDeclType.VAR -> - stackvmProg.instr(Opcode.PUSH_VAR, callLabel = target.scopedname) - VarDeclType.CONST -> - throw CompilerException("const ref should have been const-folded away") - VarDeclType.MEMORY -> { - when(target.datatype){ - DataType.BYTE -> stackvmProg.instr(Opcode.PUSH_MEM, Value(DataType.WORD, (target.value as LiteralValue).asNumericValue!!)) - DataType.WORD -> stackvmProg.instr(Opcode.PUSH_MEM_W, Value(DataType.WORD, (target.value as LiteralValue).asNumericValue!!)) - DataType.FLOAT -> stackvmProg.instr(Opcode.PUSH_MEM_F, Value(DataType.WORD, (target.value as LiteralValue).asNumericValue!!)) - else -> TODO("invalid datatype for memory variable expression: $target") - } - } - } - - } - else -> throw CompilerException("expression identifierref should be a vardef, not $target") - } - } + is IdentifierReference -> translate(expr) + is ArrayIndexedExpression -> translate(expr) is RangeExpr -> { TODO("TRANSLATE range $expr") } @@ -491,6 +468,30 @@ private class StatementTranslator(private val stackvmProg: StackVmProgram, } } + private fun translate(identifierRef: IdentifierReference) { + val target = identifierRef.targetStatement(namespace) + when (target) { + is VarDecl -> { + when (target.type) { + VarDeclType.VAR -> + stackvmProg.instr(Opcode.PUSH_VAR, callLabel = target.scopedname) + VarDeclType.CONST -> + throw CompilerException("const ref should have been const-folded away") + VarDeclType.MEMORY -> { + when (target.datatype) { + DataType.BYTE -> stackvmProg.instr(Opcode.PUSH_MEM, Value(DataType.WORD, (target.value as LiteralValue).asNumericValue!!)) + DataType.WORD -> stackvmProg.instr(Opcode.PUSH_MEM_W, Value(DataType.WORD, (target.value as LiteralValue).asNumericValue!!)) + DataType.FLOAT -> stackvmProg.instr(Opcode.PUSH_MEM_F, Value(DataType.WORD, (target.value as LiteralValue).asNumericValue!!)) + else -> TODO("invalid datatype for memory variable expression: $target") + } + } + } + + } + else -> throw CompilerException("expression identifierref should be a vardef, not $target") + } + } + private fun translate(stmt: FunctionCallStatement) { stackvmProg.line(stmt.position) val targetStmt = stmt.target.targetStatement(namespace)!! @@ -590,6 +591,33 @@ private class StatementTranslator(private val stackvmProg: StackVmProgram, stackvmProg.instr(opcode) } + private fun translate(arrayindexed: ArrayIndexedExpression) { + val variable = arrayindexed.identifier?.targetStatement(namespace) as? VarDecl + val variableName = + if(arrayindexed.register!=null) { + val reg=arrayindexed.register + if(reg==Register.A || reg==Register.X || reg==Register.Y) + throw CompilerException("requires register pair") + if(arrayindexed.array.y!=null) + throw CompilerException("when using an address, can only use one index dimension") + reg.toString() + } else { + variable!!.scopedname + } + translate(arrayindexed.array.x) + val y = arrayindexed.array.y + if(y!=null) { + // calc matrix index i=y*columns+x + // (the const-folding will have removed this for us when both x and y are constants) + translate(y) + stackvmProg.instr(Opcode.PUSH, Value(DataType.BYTE, (variable!!.arrayspec!!.x as LiteralValue).asIntegerValue!!)) + stackvmProg.instr(Opcode.MUL) + stackvmProg.instr(Opcode.ADD) + } + stackvmProg.instr(Opcode.PUSH_INDEXED_VAR, callLabel = variableName) + } + + private fun createSyscall(funcname: String) { val function = ( if (funcname.startsWith("_vm_")) diff --git a/compiler/src/prog8/optimizing/ConstantFolding.kt b/compiler/src/prog8/optimizing/ConstantFolding.kt index 7b85fd089..5848930e5 100644 --- a/compiler/src/prog8/optimizing/ConstantFolding.kt +++ b/compiler/src/prog8/optimizing/ConstantFolding.kt @@ -340,6 +340,23 @@ class ConstantFolding(private val namespace: INameScope, private val heap: HeapV } return super.process(literalValue) } + + override fun process(arrayIndexedExpression: ArrayIndexedExpression): IExpression { + if(arrayIndexedExpression.array.y!=null) { + if(arrayIndexedExpression.array.size()!=null) { + // both x and y are known + // calculate the 2-dimension index i = y*columns + x + if(arrayIndexedExpression.identifier!=null) { + val x = (arrayIndexedExpression.array.x as LiteralValue).asIntegerValue!! + val y = (arrayIndexedExpression.array.y as LiteralValue).asIntegerValue!! + val variable = arrayIndexedExpression.identifier.targetStatement(namespace) as VarDecl + val index = x + y*(variable.arrayspec!!.x as LiteralValue).asIntegerValue!! + arrayIndexedExpression.array = ArraySpec(LiteralValue.optimalInteger(index, arrayIndexedExpression.array.position), null, arrayIndexedExpression.array.position) + } + } + } + return super.process(arrayIndexedExpression) + } } diff --git a/compiler/src/prog8/parser/prog8Parser.java b/compiler/src/prog8/parser/prog8Parser.java index 22074f94a..6c9581791 100644 --- a/compiler/src/prog8/parser/prog8Parser.java +++ b/compiler/src/prog8/parser/prog8Parser.java @@ -40,30 +40,31 @@ public class prog8Parser extends Parser { RULE_vardecl = 8, RULE_varinitializer = 9, RULE_constdecl = 10, RULE_memoryvardecl = 11, RULE_datatype = 12, RULE_arrayspec = 13, RULE_assignment = 14, RULE_augassignment = 15, 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_breakstmt = 23, RULE_continuestmt = 24, RULE_identifier = 25, - RULE_scoped_identifier = 26, RULE_register = 27, RULE_statusregister = 28, - RULE_integerliteral = 29, RULE_wordsuffix = 30, RULE_booleanliteral = 31, - RULE_arrayliteral = 32, RULE_stringliteral = 33, RULE_charliteral = 34, - RULE_floatliteral = 35, RULE_literalvalue = 36, RULE_inlineasm = 37, RULE_subroutine = 38, - RULE_sub_return_part = 39, RULE_statement_block = 40, RULE_sub_params = 41, - RULE_sub_param = 42, RULE_sub_returns = 43, RULE_asmsubroutine = 44, RULE_asmsub_address = 45, - RULE_asmsub_params = 46, RULE_asmsub_param = 47, RULE_clobber = 48, RULE_asmsub_returns = 49, - RULE_asmsub_return = 50, RULE_if_stmt = 51, RULE_else_part = 52, RULE_branch_stmt = 53, - RULE_branchcondition = 54, RULE_forloop = 55, RULE_whileloop = 56, RULE_repeatloop = 57; + RULE_arrayindexed = 19, RULE_functioncall = 20, RULE_functioncall_stmt = 21, + RULE_expression_list = 22, RULE_returnstmt = 23, RULE_breakstmt = 24, + RULE_continuestmt = 25, RULE_identifier = 26, RULE_scoped_identifier = 27, + RULE_register = 28, RULE_statusregister = 29, RULE_integerliteral = 30, + RULE_wordsuffix = 31, RULE_booleanliteral = 32, RULE_arrayliteral = 33, + RULE_stringliteral = 34, RULE_charliteral = 35, RULE_floatliteral = 36, + RULE_literalvalue = 37, RULE_inlineasm = 38, RULE_subroutine = 39, RULE_sub_return_part = 40, + RULE_statement_block = 41, RULE_sub_params = 42, RULE_sub_param = 43, + RULE_sub_returns = 44, RULE_asmsubroutine = 45, RULE_asmsub_address = 46, + RULE_asmsub_params = 47, RULE_asmsub_param = 48, RULE_clobber = 49, RULE_asmsub_returns = 50, + RULE_asmsub_return = 51, RULE_if_stmt = 52, RULE_else_part = 53, RULE_branch_stmt = 54, + RULE_branchcondition = 55, RULE_forloop = 56, RULE_whileloop = 57, RULE_repeatloop = 58; 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", "breakstmt", "continuestmt", "identifier", - "scoped_identifier", "register", "statusregister", "integerliteral", "wordsuffix", - "booleanliteral", "arrayliteral", "stringliteral", "charliteral", "floatliteral", - "literalvalue", "inlineasm", "subroutine", "sub_return_part", "statement_block", - "sub_params", "sub_param", "sub_returns", "asmsubroutine", "asmsub_address", - "asmsub_params", "asmsub_param", "clobber", "asmsub_returns", "asmsub_return", - "if_stmt", "else_part", "branch_stmt", "branchcondition", "forloop", "whileloop", - "repeatloop" + "assign_target", "postincrdecr", "expression", "arrayindexed", "functioncall", + "functioncall_stmt", "expression_list", "returnstmt", "breakstmt", "continuestmt", + "identifier", "scoped_identifier", "register", "statusregister", "integerliteral", + "wordsuffix", "booleanliteral", "arrayliteral", "stringliteral", "charliteral", + "floatliteral", "literalvalue", "inlineasm", "subroutine", "sub_return_part", + "statement_block", "sub_params", "sub_param", "sub_returns", "asmsubroutine", + "asmsub_address", "asmsub_params", "asmsub_param", "clobber", "asmsub_returns", + "asmsub_return", "if_stmt", "else_part", "branch_stmt", "branchcondition", + "forloop", "whileloop", "repeatloop" }; private static final String[] _LITERAL_NAMES = { @@ -169,12 +170,12 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(120); + setState(122); _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(118); + setState(120); _errHandler.sync(this); switch (_input.LA(1)) { case T__0: @@ -188,13 +189,13 @@ public class prog8Parser extends Parser { case T__10: case T__11: { - setState(116); + setState(118); modulestatement(); } break; case EOL: { - setState(117); + setState(119); match(EOL); } break; @@ -202,11 +203,11 @@ public class prog8Parser extends Parser { throw new NoViableAltException(this); } } - setState(122); + setState(124); _errHandler.sync(this); _la = _input.LA(1); } - setState(123); + setState(125); match(EOF); } } @@ -238,7 +239,7 @@ public class prog8Parser extends Parser { ModulestatementContext _localctx = new ModulestatementContext(_ctx, getState()); enterRule(_localctx, 2, RULE_modulestatement); try { - setState(127); + setState(129); _errHandler.sync(this); switch (_input.LA(1)) { case T__3: @@ -252,14 +253,14 @@ public class prog8Parser extends Parser { case T__11: enterOuterAlt(_localctx, 1); { - setState(125); + setState(127); directive(); } break; case T__0: enterOuterAlt(_localctx, 2); { - setState(126); + setState(128); block(); } break; @@ -302,23 +303,23 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(129); + setState(131); match(T__0); - setState(130); - identifier(); setState(132); + identifier(); + setState(134); _errHandler.sync(this); _la = _input.LA(1); if (((((_la - 110)) & ~0x3f) == 0 && ((1L << (_la - 110)) & ((1L << (DEC_INTEGER - 110)) | (1L << (HEX_INTEGER - 110)) | (1L << (BIN_INTEGER - 110)))) != 0)) { { - setState(131); + setState(133); integerliteral(); } } - setState(134); + setState(136); statement_block(); - setState(135); + setState(137); match(EOL); } } @@ -410,160 +411,160 @@ public class prog8Parser extends Parser { StatementContext _localctx = new StatementContext(_ctx, getState()); enterRule(_localctx, 6, RULE_statement); try { - setState(159); + setState(161); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(137); + setState(139); directive(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(138); + setState(140); varinitializer(); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(139); + setState(141); vardecl(); } break; case 4: enterOuterAlt(_localctx, 4); { - setState(140); + setState(142); constdecl(); } break; case 5: enterOuterAlt(_localctx, 5); { - setState(141); + setState(143); memoryvardecl(); } break; case 6: enterOuterAlt(_localctx, 6); { - setState(142); + setState(144); assignment(); } break; case 7: enterOuterAlt(_localctx, 7); { - setState(143); + setState(145); augassignment(); } break; case 8: enterOuterAlt(_localctx, 8); { - setState(144); + setState(146); unconditionaljump(); } break; case 9: enterOuterAlt(_localctx, 9); { - setState(145); + setState(147); postincrdecr(); } break; case 10: enterOuterAlt(_localctx, 10); { - setState(146); + setState(148); functioncall_stmt(); } break; case 11: enterOuterAlt(_localctx, 11); { - setState(147); + setState(149); if_stmt(); } break; case 12: enterOuterAlt(_localctx, 12); { - setState(148); + setState(150); branch_stmt(); } break; case 13: enterOuterAlt(_localctx, 13); { - setState(149); + setState(151); subroutine(); } break; case 14: enterOuterAlt(_localctx, 14); { - setState(150); + setState(152); asmsubroutine(); } break; case 15: enterOuterAlt(_localctx, 15); { - setState(151); + setState(153); inlineasm(); } break; case 16: enterOuterAlt(_localctx, 16); { - setState(152); + setState(154); returnstmt(); } break; case 17: enterOuterAlt(_localctx, 17); { - setState(153); + setState(155); forloop(); } break; case 18: enterOuterAlt(_localctx, 18); { - setState(154); + setState(156); whileloop(); } break; case 19: enterOuterAlt(_localctx, 19); { - setState(155); + setState(157); repeatloop(); } break; case 20: enterOuterAlt(_localctx, 20); { - setState(156); + setState(158); breakstmt(); } break; case 21: enterOuterAlt(_localctx, 21); { - setState(157); + setState(159); continuestmt(); } break; case 22: enterOuterAlt(_localctx, 22); { - setState(158); + setState(160); labeldef(); } break; @@ -596,9 +597,9 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(161); + setState(163); identifier(); - setState(162); + setState(164); match(T__1); } } @@ -635,26 +636,26 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(164); + setState(166); match(T__2); - setState(168); + setState(170); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) { case 1: { - setState(165); + setState(167); integerliteral(); } break; case 2: { - setState(166); + setState(168); identifier(); } break; case 3: { - setState(167); + setState(169); scoped_identifier(); } break; @@ -693,7 +694,7 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(170); + setState(172); ((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)) ) { @@ -704,17 +705,17 @@ public class prog8Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(182); + setState(184); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { case 1: { - setState(172); + setState(174); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) { case 1: { - setState(171); + setState(173); directivearg(); } break; @@ -723,21 +724,21 @@ public class prog8Parser extends Parser { break; case 2: { - setState(174); + setState(176); directivearg(); - setState(179); + setState(181); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__12) { { { - setState(175); + setState(177); match(T__12); - setState(176); + setState(178); directivearg(); } } - setState(181); + setState(183); _errHandler.sync(this); _la = _input.LA(1); } @@ -777,20 +778,20 @@ public class prog8Parser extends Parser { DirectiveargContext _localctx = new DirectiveargContext(_ctx, getState()); enterRule(_localctx, 14, RULE_directivearg); try { - setState(187); + setState(189); _errHandler.sync(this); switch (_input.LA(1)) { case STRING: enterOuterAlt(_localctx, 1); { - setState(184); + setState(186); stringliteral(); } break; case NAME: enterOuterAlt(_localctx, 2); { - setState(185); + setState(187); identifier(); } break; @@ -799,7 +800,7 @@ public class prog8Parser extends Parser { case BIN_INTEGER: enterOuterAlt(_localctx, 3); { - setState(186); + setState(188); integerliteral(); } break; @@ -841,19 +842,19 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(189); - datatype(); setState(191); + datatype(); + setState(193); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__23) { { - setState(190); + setState(192); arrayspec(); } } - setState(193); + setState(195); identifier(); } } @@ -894,23 +895,23 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(195); - datatype(); setState(197); + datatype(); + setState(199); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__23) { { - setState(196); + setState(198); arrayspec(); } } - setState(199); - identifier(); - setState(200); - match(T__13); setState(201); + identifier(); + setState(202); + match(T__13); + setState(203); expression(0); } } @@ -941,9 +942,9 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(203); + setState(205); match(T__14); - setState(204); + setState(206); varinitializer(); } } @@ -974,9 +975,9 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(206); + setState(208); match(T__15); - setState(207); + setState(209); varinitializer(); } } @@ -1005,7 +1006,7 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(209); + setState(211); _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); @@ -1048,23 +1049,23 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(211); + setState(213); match(T__23); - setState(212); + setState(214); expression(0); - setState(215); + setState(217); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__12) { { - setState(213); + setState(215); match(T__12); - setState(214); + setState(216); expression(0); } } - setState(217); + setState(219); match(T__24); } } @@ -1098,11 +1099,11 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(219); - assign_target(); - setState(220); - match(T__13); setState(221); + assign_target(); + setState(222); + match(T__13); + setState(223); expression(0); } } @@ -1138,9 +1139,9 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(223); + setState(225); assign_target(); - setState(224); + setState(226); ((AugassignmentContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__25) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32) | (1L << T__33))) != 0)) ) { @@ -1151,7 +1152,7 @@ public class prog8Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(225); + setState(227); expression(0); } } @@ -1186,27 +1187,27 @@ public class prog8Parser extends Parser { Assign_targetContext _localctx = new Assign_targetContext(_ctx, getState()); enterRule(_localctx, 32, RULE_assign_target); try { - setState(230); + setState(232); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(227); + setState(229); register(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(228); + setState(230); identifier(); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(229); + setState(231); scoped_identifier(); } break; @@ -1241,9 +1242,9 @@ public class prog8Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(232); + setState(234); assign_target(); - setState(233); + setState(235); ((PostincrdecrContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !(_la==T__34 || _la==T__35) ) { @@ -1296,8 +1297,8 @@ public class prog8Parser extends Parser { public Scoped_identifierContext scoped_identifier() { return getRuleContext(Scoped_identifierContext.class,0); } - public ArrayspecContext arrayspec() { - return getRuleContext(ArrayspecContext.class,0); + public ArrayindexedContext arrayindexed() { + return getRuleContext(ArrayindexedContext.class,0); } public ExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); @@ -1321,28 +1322,28 @@ public class prog8Parser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(249); + setState(252); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) { case 1: { - setState(236); - match(T__36); - setState(237); - expression(0); setState(238); + match(T__36); + setState(239); + expression(0); + setState(240); match(T__37); } break; case 2: { - setState(240); + setState(242); functioncall(); } break; case 3: { - setState(241); + setState(243); ((ExpressionContext)_localctx).prefix = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__38) | (1L << T__39))) != 0)) ) { @@ -1353,45 +1354,51 @@ public class prog8Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(242); - expression(18); + setState(244); + expression(19); } break; case 4: { - setState(243); + setState(245); ((ExpressionContext)_localctx).prefix = match(T__59); - setState(244); - expression(5); + setState(246); + expression(6); } break; case 5: { - setState(245); + setState(247); literalvalue(); } break; case 6: { - setState(246); + setState(248); register(); } break; case 7: { - setState(247); + setState(249); identifier(); } break; case 8: { - setState(248); + setState(250); scoped_identifier(); } break; + case 9: + { + setState(251); + arrayindexed(); + } + break; } _ctx.stop = _input.LT(-1); - setState(295); + setState(296); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,17,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { @@ -1399,7 +1406,7 @@ public class prog8Parser extends Parser { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(293); + setState(294); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) { case 1: @@ -1408,12 +1415,12 @@ public class prog8Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(251); - if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)"); - setState(252); + setState(254); + if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); + setState(255); ((ExpressionContext)_localctx).bop = match(T__40); - setState(253); - ((ExpressionContext)_localctx).right = expression(18); + setState(256); + ((ExpressionContext)_localctx).right = expression(19); } break; case 2: @@ -1422,9 +1429,9 @@ public class prog8Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(254); - if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); - setState(255); + setState(257); + if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)"); + setState(258); ((ExpressionContext)_localctx).bop = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__41) | (1L << T__42) | (1L << T__43) | (1L << T__44))) != 0)) ) { @@ -1435,8 +1442,8 @@ public class prog8Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(256); - ((ExpressionContext)_localctx).right = expression(17); + setState(259); + ((ExpressionContext)_localctx).right = expression(18); } break; case 3: @@ -1445,9 +1452,9 @@ public class prog8Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(257); - if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)"); - setState(258); + setState(260); + if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); + setState(261); ((ExpressionContext)_localctx).bop = _input.LT(1); _la = _input.LA(1); if ( !(_la==T__38 || _la==T__39) ) { @@ -1458,8 +1465,8 @@ public class prog8Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(259); - ((ExpressionContext)_localctx).right = expression(16); + setState(262); + ((ExpressionContext)_localctx).right = expression(17); } break; case 4: @@ -1468,9 +1475,9 @@ public class prog8Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(260); - if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); - setState(261); + setState(263); + if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)"); + setState(264); ((ExpressionContext)_localctx).bop = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__45) | (1L << T__46) | (1L << T__47) | (1L << T__48))) != 0)) ) { @@ -1481,8 +1488,8 @@ public class prog8Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(262); - ((ExpressionContext)_localctx).right = expression(15); + setState(265); + ((ExpressionContext)_localctx).right = expression(16); } break; case 5: @@ -1491,9 +1498,9 @@ public class prog8Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(263); - if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); - setState(264); + setState(266); + if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); + setState(267); ((ExpressionContext)_localctx).bop = _input.LT(1); _la = _input.LA(1); if ( !(_la==T__49 || _la==T__50) ) { @@ -1504,8 +1511,8 @@ public class prog8Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(265); - ((ExpressionContext)_localctx).right = expression(14); + setState(268); + ((ExpressionContext)_localctx).right = expression(15); } break; case 6: @@ -1514,12 +1521,12 @@ public class prog8Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(266); - if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); - setState(267); + setState(269); + if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); + setState(270); ((ExpressionContext)_localctx).bop = match(T__51); - setState(268); - ((ExpressionContext)_localctx).right = expression(13); + setState(271); + ((ExpressionContext)_localctx).right = expression(14); } break; case 7: @@ -1528,12 +1535,12 @@ public class prog8Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(269); - if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); - setState(270); + setState(272); + if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); + setState(273); ((ExpressionContext)_localctx).bop = match(T__52); - setState(271); - ((ExpressionContext)_localctx).right = expression(12); + setState(274); + ((ExpressionContext)_localctx).right = expression(13); } break; case 8: @@ -1542,12 +1549,12 @@ public class prog8Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(272); - if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); - setState(273); + setState(275); + if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); + setState(276); ((ExpressionContext)_localctx).bop = match(T__53); - setState(274); - ((ExpressionContext)_localctx).right = expression(11); + setState(277); + ((ExpressionContext)_localctx).right = expression(12); } break; case 9: @@ -1556,12 +1563,12 @@ public class prog8Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(275); - if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); - setState(276); + setState(278); + if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); + setState(279); ((ExpressionContext)_localctx).bop = match(T__56); - setState(277); - ((ExpressionContext)_localctx).right = expression(9); + setState(280); + ((ExpressionContext)_localctx).right = expression(10); } break; case 10: @@ -1570,12 +1577,12 @@ public class prog8Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(278); - if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(279); + setState(281); + if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); + setState(282); ((ExpressionContext)_localctx).bop = match(T__57); - setState(280); - ((ExpressionContext)_localctx).right = expression(8); + setState(283); + ((ExpressionContext)_localctx).right = expression(9); } break; case 11: @@ -1584,44 +1591,34 @@ public class prog8Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(281); - if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); - setState(282); + setState(284); + if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); + setState(285); ((ExpressionContext)_localctx).bop = match(T__58); - setState(283); - ((ExpressionContext)_localctx).right = expression(7); + setState(286); + ((ExpressionContext)_localctx).right = expression(8); } break; case 12: - { - _localctx = new ExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(284); - if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)"); - setState(285); - arrayspec(); - } - break; - case 13: { _localctx = new ExpressionContext(_parentctx, _parentState); _localctx.rangefrom = _prevctx; _localctx.rangefrom = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(286); - if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); setState(287); - match(T__54); + if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); setState(288); + match(T__54); + setState(289); ((ExpressionContext)_localctx).rangeto = expression(0); - setState(291); + setState(292); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) { case 1: { - setState(289); - match(T__55); setState(290); + match(T__55); + setState(291); ((ExpressionContext)_localctx).rangestep = expression(0); } break; @@ -1631,7 +1628,7 @@ public class prog8Parser extends Parser { } } } - setState(297); + setState(298); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,17,_ctx); } @@ -1648,6 +1645,68 @@ public class prog8Parser extends Parser { return _localctx; } + public static class ArrayindexedContext extends ParserRuleContext { + public ArrayspecContext arrayspec() { + return getRuleContext(ArrayspecContext.class,0); + } + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public Scoped_identifierContext scoped_identifier() { + return getRuleContext(Scoped_identifierContext.class,0); + } + public RegisterContext register() { + return getRuleContext(RegisterContext.class,0); + } + public ArrayindexedContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayindexed; } + } + + public final ArrayindexedContext arrayindexed() throws RecognitionException { + ArrayindexedContext _localctx = new ArrayindexedContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_arrayindexed); + try { + enterOuterAlt(_localctx, 1); + { + setState(302); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) { + case 1: + { + setState(299); + identifier(); + } + break; + case 2: + { + setState(300); + scoped_identifier(); + } + break; + case 3: + { + setState(301); + register(); + } + break; + } + setState(304); + arrayspec(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + public static class FunctioncallContext extends ParserRuleContext { public IdentifierContext identifier() { return getRuleContext(IdentifierContext.class,0); @@ -1666,40 +1725,40 @@ public class prog8Parser extends Parser { public final FunctioncallContext functioncall() throws RecognitionException { FunctioncallContext _localctx = new FunctioncallContext(_ctx, getState()); - enterRule(_localctx, 38, RULE_functioncall); + enterRule(_localctx, 40, RULE_functioncall); int _la; try { enterOuterAlt(_localctx, 1); { - setState(300); + setState(308); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) { case 1: { - setState(298); + setState(306); identifier(); } break; case 2: { - setState(299); + setState(307); scoped_identifier(); } break; } - setState(302); + setState(310); match(T__36); - setState(304); + setState(312); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__23) | (1L << T__36) | (1L << T__38) | (1L << T__39) | (1L << T__59))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (T__64 - 65)) | (1L << (T__65 - 65)) | (1L << (T__66 - 65)) | (1L << (T__67 - 65)) | (1L << (T__68 - 65)) | (1L << (T__69 - 65)) | (1L << (T__75 - 65)) | (1L << (T__76 - 65)) | (1L << (NAME - 65)) | (1L << (DEC_INTEGER - 65)) | (1L << (HEX_INTEGER - 65)) | (1L << (BIN_INTEGER - 65)) | (1L << (FLOAT_NUMBER - 65)) | (1L << (STRING - 65)) | (1L << (SINGLECHAR - 65)))) != 0)) { { - setState(303); + setState(311); expression_list(); } } - setState(306); + setState(314); match(T__37); } } @@ -1732,40 +1791,40 @@ public class prog8Parser extends Parser { public final Functioncall_stmtContext functioncall_stmt() throws RecognitionException { Functioncall_stmtContext _localctx = new Functioncall_stmtContext(_ctx, getState()); - enterRule(_localctx, 40, RULE_functioncall_stmt); + enterRule(_localctx, 42, RULE_functioncall_stmt); int _la; try { enterOuterAlt(_localctx, 1); { - setState(310); + setState(318); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,20,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,21,_ctx) ) { case 1: { - setState(308); + setState(316); identifier(); } break; case 2: { - setState(309); + setState(317); scoped_identifier(); } break; } - setState(312); + setState(320); match(T__36); - setState(314); + setState(322); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__23) | (1L << T__36) | (1L << T__38) | (1L << T__39) | (1L << T__59))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (T__64 - 65)) | (1L << (T__65 - 65)) | (1L << (T__66 - 65)) | (1L << (T__67 - 65)) | (1L << (T__68 - 65)) | (1L << (T__69 - 65)) | (1L << (T__75 - 65)) | (1L << (T__76 - 65)) | (1L << (NAME - 65)) | (1L << (DEC_INTEGER - 65)) | (1L << (HEX_INTEGER - 65)) | (1L << (BIN_INTEGER - 65)) | (1L << (FLOAT_NUMBER - 65)) | (1L << (STRING - 65)) | (1L << (SINGLECHAR - 65)))) != 0)) { { - setState(313); + setState(321); expression_list(); } } - setState(316); + setState(324); match(T__37); } } @@ -1795,26 +1854,26 @@ public class prog8Parser extends Parser { public final Expression_listContext expression_list() throws RecognitionException { Expression_listContext _localctx = new Expression_listContext(_ctx, getState()); - enterRule(_localctx, 42, RULE_expression_list); + enterRule(_localctx, 44, RULE_expression_list); int _la; try { enterOuterAlt(_localctx, 1); { - setState(318); + setState(326); expression(0); - setState(323); + setState(331); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__12) { { { - setState(319); + setState(327); match(T__12); - setState(320); + setState(328); expression(0); } } - setState(325); + setState(333); _errHandler.sync(this); _la = _input.LA(1); } @@ -1843,18 +1902,18 @@ public class prog8Parser extends Parser { public final ReturnstmtContext returnstmt() throws RecognitionException { ReturnstmtContext _localctx = new ReturnstmtContext(_ctx, getState()); - enterRule(_localctx, 44, RULE_returnstmt); + enterRule(_localctx, 46, RULE_returnstmt); try { enterOuterAlt(_localctx, 1); { - setState(326); + setState(334); match(T__60); - setState(328); + setState(336); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,23,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) { case 1: { - setState(327); + setState(335); expression_list(); } break; @@ -1881,11 +1940,11 @@ public class prog8Parser extends Parser { public final BreakstmtContext breakstmt() throws RecognitionException { BreakstmtContext _localctx = new BreakstmtContext(_ctx, getState()); - enterRule(_localctx, 46, RULE_breakstmt); + enterRule(_localctx, 48, RULE_breakstmt); try { enterOuterAlt(_localctx, 1); { - setState(330); + setState(338); match(T__61); } } @@ -1909,11 +1968,11 @@ public class prog8Parser extends Parser { public final ContinuestmtContext continuestmt() throws RecognitionException { ContinuestmtContext _localctx = new ContinuestmtContext(_ctx, getState()); - enterRule(_localctx, 48, RULE_continuestmt); + enterRule(_localctx, 50, RULE_continuestmt); try { enterOuterAlt(_localctx, 1); { - setState(332); + setState(340); match(T__62); } } @@ -1938,11 +1997,11 @@ public class prog8Parser extends Parser { public final IdentifierContext identifier() throws RecognitionException { IdentifierContext _localctx = new IdentifierContext(_ctx, getState()); - enterRule(_localctx, 50, RULE_identifier); + enterRule(_localctx, 52, RULE_identifier); try { enterOuterAlt(_localctx, 1); { - setState(334); + setState(342); match(NAME); } } @@ -1970,14 +2029,14 @@ public class prog8Parser extends Parser { public final Scoped_identifierContext scoped_identifier() throws RecognitionException { Scoped_identifierContext _localctx = new Scoped_identifierContext(_ctx, getState()); - enterRule(_localctx, 52, RULE_scoped_identifier); + enterRule(_localctx, 54, RULE_scoped_identifier); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(336); + setState(344); match(NAME); - setState(339); + setState(347); _errHandler.sync(this); _alt = 1; do { @@ -1985,9 +2044,9 @@ public class prog8Parser extends Parser { case 1: { { - setState(337); + setState(345); match(T__63); - setState(338); + setState(346); match(NAME); } } @@ -1995,9 +2054,9 @@ public class prog8Parser extends Parser { default: throw new NoViableAltException(this); } - setState(341); + setState(349); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,24,_ctx); + _alt = getInterpreter().adaptivePredict(_input,25,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } } @@ -2021,12 +2080,12 @@ public class prog8Parser extends Parser { public final RegisterContext register() throws RecognitionException { RegisterContext _localctx = new RegisterContext(_ctx, getState()); - enterRule(_localctx, 54, RULE_register); + enterRule(_localctx, 56, RULE_register); int _la; try { enterOuterAlt(_localctx, 1); { - setState(343); + setState(351); _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)) | (1L << (T__68 - 65)) | (1L << (T__69 - 65)))) != 0)) ) { _errHandler.recoverInline(this); @@ -2058,12 +2117,12 @@ public class prog8Parser extends Parser { public final StatusregisterContext statusregister() throws RecognitionException { StatusregisterContext _localctx = new StatusregisterContext(_ctx, getState()); - enterRule(_localctx, 56, RULE_statusregister); + enterRule(_localctx, 58, RULE_statusregister); int _la; try { enterOuterAlt(_localctx, 1); { - setState(345); + setState(353); _la = _input.LA(1); if ( !(((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (T__70 - 71)) | (1L << (T__71 - 71)) | (1L << (T__72 - 71)) | (1L << (T__73 - 71)))) != 0)) ) { _errHandler.recoverInline(this); @@ -2102,12 +2161,12 @@ public class prog8Parser extends Parser { public final IntegerliteralContext integerliteral() throws RecognitionException { IntegerliteralContext _localctx = new IntegerliteralContext(_ctx, getState()); - enterRule(_localctx, 58, RULE_integerliteral); + enterRule(_localctx, 60, RULE_integerliteral); int _la; try { enterOuterAlt(_localctx, 1); { - setState(347); + setState(355); ((IntegerliteralContext)_localctx).intpart = _input.LT(1); _la = _input.LA(1); if ( !(((((_la - 110)) & ~0x3f) == 0 && ((1L << (_la - 110)) & ((1L << (DEC_INTEGER - 110)) | (1L << (HEX_INTEGER - 110)) | (1L << (BIN_INTEGER - 110)))) != 0)) ) { @@ -2118,12 +2177,12 @@ public class prog8Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(349); + setState(357); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) { case 1: { - setState(348); + setState(356); wordsuffix(); } break; @@ -2150,11 +2209,11 @@ public class prog8Parser extends Parser { public final WordsuffixContext wordsuffix() throws RecognitionException { WordsuffixContext _localctx = new WordsuffixContext(_ctx, getState()); - enterRule(_localctx, 60, RULE_wordsuffix); + enterRule(_localctx, 62, RULE_wordsuffix); try { enterOuterAlt(_localctx, 1); { - setState(351); + setState(359); match(T__74); } } @@ -2178,12 +2237,12 @@ public class prog8Parser extends Parser { public final BooleanliteralContext booleanliteral() throws RecognitionException { BooleanliteralContext _localctx = new BooleanliteralContext(_ctx, getState()); - enterRule(_localctx, 62, RULE_booleanliteral); + enterRule(_localctx, 64, RULE_booleanliteral); int _la; try { enterOuterAlt(_localctx, 1); { - setState(353); + setState(361); _la = _input.LA(1); if ( !(_la==T__75 || _la==T__76) ) { _errHandler.recoverInline(this); @@ -2221,32 +2280,32 @@ public class prog8Parser extends Parser { public final ArrayliteralContext arrayliteral() throws RecognitionException { ArrayliteralContext _localctx = new ArrayliteralContext(_ctx, getState()); - enterRule(_localctx, 64, RULE_arrayliteral); + enterRule(_localctx, 66, RULE_arrayliteral); int _la; try { enterOuterAlt(_localctx, 1); { - setState(355); + setState(363); match(T__23); - setState(356); + setState(364); expression(0); - setState(361); + setState(369); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__12) { { { - setState(357); + setState(365); match(T__12); - setState(358); + setState(366); expression(0); } } - setState(363); + setState(371); _errHandler.sync(this); _la = _input.LA(1); } - setState(364); + setState(372); match(T__24); } } @@ -2271,11 +2330,11 @@ public class prog8Parser extends Parser { public final StringliteralContext stringliteral() throws RecognitionException { StringliteralContext _localctx = new StringliteralContext(_ctx, getState()); - enterRule(_localctx, 66, RULE_stringliteral); + enterRule(_localctx, 68, RULE_stringliteral); try { enterOuterAlt(_localctx, 1); { - setState(366); + setState(374); match(STRING); } } @@ -2300,11 +2359,11 @@ public class prog8Parser extends Parser { public final CharliteralContext charliteral() throws RecognitionException { CharliteralContext _localctx = new CharliteralContext(_ctx, getState()); - enterRule(_localctx, 68, RULE_charliteral); + enterRule(_localctx, 70, RULE_charliteral); try { enterOuterAlt(_localctx, 1); { - setState(368); + setState(376); match(SINGLECHAR); } } @@ -2329,11 +2388,11 @@ public class prog8Parser extends Parser { public final FloatliteralContext floatliteral() throws RecognitionException { FloatliteralContext _localctx = new FloatliteralContext(_ctx, getState()); - enterRule(_localctx, 70, RULE_floatliteral); + enterRule(_localctx, 72, RULE_floatliteral); try { enterOuterAlt(_localctx, 1); { - setState(370); + setState(378); match(FLOAT_NUMBER); } } @@ -2375,9 +2434,9 @@ public class prog8Parser extends Parser { public final LiteralvalueContext literalvalue() throws RecognitionException { LiteralvalueContext _localctx = new LiteralvalueContext(_ctx, getState()); - enterRule(_localctx, 72, RULE_literalvalue); + enterRule(_localctx, 74, RULE_literalvalue); try { - setState(378); + setState(386); _errHandler.sync(this); switch (_input.LA(1)) { case DEC_INTEGER: @@ -2385,7 +2444,7 @@ public class prog8Parser extends Parser { case BIN_INTEGER: enterOuterAlt(_localctx, 1); { - setState(372); + setState(380); integerliteral(); } break; @@ -2393,35 +2452,35 @@ public class prog8Parser extends Parser { case T__76: enterOuterAlt(_localctx, 2); { - setState(373); + setState(381); booleanliteral(); } break; case T__23: enterOuterAlt(_localctx, 3); { - setState(374); + setState(382); arrayliteral(); } break; case STRING: enterOuterAlt(_localctx, 4); { - setState(375); + setState(383); stringliteral(); } break; case SINGLECHAR: enterOuterAlt(_localctx, 5); { - setState(376); + setState(384); charliteral(); } break; case FLOAT_NUMBER: enterOuterAlt(_localctx, 6); { - setState(377); + setState(385); floatliteral(); } break; @@ -2450,13 +2509,13 @@ public class prog8Parser extends Parser { public final InlineasmContext inlineasm() throws RecognitionException { InlineasmContext _localctx = new InlineasmContext(_ctx, getState()); - enterRule(_localctx, 74, RULE_inlineasm); + enterRule(_localctx, 76, RULE_inlineasm); try { enterOuterAlt(_localctx, 1); { - setState(380); + setState(388); match(T__77); - setState(381); + setState(389); match(INLINEASMBLOCK); } } @@ -2493,43 +2552,43 @@ public class prog8Parser extends Parser { public final SubroutineContext subroutine() throws RecognitionException { SubroutineContext _localctx = new SubroutineContext(_ctx, getState()); - enterRule(_localctx, 76, RULE_subroutine); + enterRule(_localctx, 78, RULE_subroutine); int _la; try { enterOuterAlt(_localctx, 1); { - setState(383); + setState(391); match(T__78); - setState(384); + setState(392); identifier(); - setState(385); + setState(393); match(T__36); - setState(387); + setState(395); _errHandler.sync(this); _la = _input.LA(1); if (_la==NAME) { { - setState(386); + setState(394); sub_params(); } } - setState(389); + setState(397); match(T__37); - setState(391); + setState(399); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__79) { { - setState(390); + setState(398); sub_return_part(); } } { - setState(393); + setState(401); statement_block(); - setState(394); + setState(402); match(EOL); } } @@ -2557,13 +2616,13 @@ public class prog8Parser extends Parser { public final Sub_return_partContext sub_return_part() throws RecognitionException { Sub_return_partContext _localctx = new Sub_return_partContext(_ctx, getState()); - enterRule(_localctx, 78, RULE_sub_return_part); + enterRule(_localctx, 80, RULE_sub_return_part); try { enterOuterAlt(_localctx, 1); { - setState(396); + setState(404); match(T__79); - setState(397); + setState(405); sub_returns(); } } @@ -2597,21 +2656,21 @@ public class prog8Parser extends Parser { public final Statement_blockContext statement_block() throws RecognitionException { Statement_blockContext _localctx = new Statement_blockContext(_ctx, getState()); - enterRule(_localctx, 80, RULE_statement_block); + enterRule(_localctx, 82, RULE_statement_block); int _la; try { enterOuterAlt(_localctx, 1); { - setState(399); + setState(407); match(T__80); - setState(400); + setState(408); match(EOL); - setState(405); + setState(413); _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__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (T__64 - 65)) | (1L << (T__65 - 65)) | (1L << (T__66 - 65)) | (1L << (T__67 - 65)) | (1L << (T__68 - 65)) | (1L << (T__69 - 65)) | (1L << (T__77 - 65)) | (1L << (T__78 - 65)) | (1L << (T__82 - 65)) | (1L << (T__85 - 65)) | (1L << (T__87 - 65)) | (1L << (T__88 - 65)) | (1L << (T__89 - 65)) | (1L << (T__90 - 65)) | (1L << (T__91 - 65)) | (1L << (T__92 - 65)) | (1L << (T__93 - 65)) | (1L << (T__94 - 65)) | (1L << (T__95 - 65)) | (1L << (T__96 - 65)) | (1L << (T__97 - 65)) | (1L << (T__98 - 65)) | (1L << (T__99 - 65)) | (1L << (T__101 - 65)) | (1L << (T__102 - 65)) | (1L << (EOL - 65)) | (1L << (NAME - 65)))) != 0)) { { - setState(403); + setState(411); _errHandler.sync(this); switch (_input.LA(1)) { case T__2: @@ -2663,13 +2722,13 @@ public class prog8Parser extends Parser { case T__102: case NAME: { - setState(401); + setState(409); statement(); } break; case EOL: { - setState(402); + setState(410); match(EOL); } break; @@ -2677,11 +2736,11 @@ public class prog8Parser extends Parser { throw new NoViableAltException(this); } } - setState(407); + setState(415); _errHandler.sync(this); _la = _input.LA(1); } - setState(408); + setState(416); match(T__81); } } @@ -2711,26 +2770,26 @@ public class prog8Parser extends Parser { public final Sub_paramsContext sub_params() throws RecognitionException { Sub_paramsContext _localctx = new Sub_paramsContext(_ctx, getState()); - enterRule(_localctx, 82, RULE_sub_params); + enterRule(_localctx, 84, RULE_sub_params); int _la; try { enterOuterAlt(_localctx, 1); { - setState(410); + setState(418); sub_param(); - setState(415); + setState(423); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__12) { { { - setState(411); + setState(419); match(T__12); - setState(412); + setState(420); sub_param(); } } - setState(417); + setState(425); _errHandler.sync(this); _la = _input.LA(1); } @@ -2762,15 +2821,15 @@ public class prog8Parser extends Parser { public final Sub_paramContext sub_param() throws RecognitionException { Sub_paramContext _localctx = new Sub_paramContext(_ctx, getState()); - enterRule(_localctx, 84, RULE_sub_param); + enterRule(_localctx, 86, RULE_sub_param); try { enterOuterAlt(_localctx, 1); { - setState(418); + setState(426); identifier(); - setState(419); + setState(427); match(T__1); - setState(420); + setState(428); datatype(); } } @@ -2800,26 +2859,26 @@ public class prog8Parser extends Parser { public final Sub_returnsContext sub_returns() throws RecognitionException { Sub_returnsContext _localctx = new Sub_returnsContext(_ctx, getState()); - enterRule(_localctx, 86, RULE_sub_returns); + enterRule(_localctx, 88, RULE_sub_returns); int _la; try { enterOuterAlt(_localctx, 1); { - setState(422); + setState(430); datatype(); - setState(427); + setState(435); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__12) { { { - setState(423); + setState(431); match(T__12); - setState(424); + setState(432); datatype(); } } - setState(429); + setState(437); _errHandler.sync(this); _la = _input.LA(1); } @@ -2863,75 +2922,75 @@ public class prog8Parser extends Parser { public final AsmsubroutineContext asmsubroutine() throws RecognitionException { AsmsubroutineContext _localctx = new AsmsubroutineContext(_ctx, getState()); - enterRule(_localctx, 88, RULE_asmsubroutine); + enterRule(_localctx, 90, RULE_asmsubroutine); int _la; try { enterOuterAlt(_localctx, 1); { - setState(430); + setState(438); match(T__82); - setState(431); + setState(439); identifier(); - setState(432); + setState(440); match(T__36); - setState(434); + setState(442); _errHandler.sync(this); _la = _input.LA(1); if (_la==NAME) { { - setState(433); + setState(441); asmsub_params(); } } - setState(436); + setState(444); match(T__37); - setState(437); + setState(445); match(T__79); - setState(438); + setState(446); match(T__83); - setState(439); + setState(447); match(T__36); - setState(441); + setState(449); _errHandler.sync(this); _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)) | (1L << (T__68 - 65)) | (1L << (T__69 - 65)))) != 0)) { { - setState(440); + setState(448); clobber(); } } - setState(443); + setState(451); match(T__37); - setState(444); + setState(452); match(T__79); - setState(445); + setState(453); match(T__36); - setState(447); + setState(455); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22))) != 0)) { { - setState(446); + setState(454); asmsub_returns(); } } - setState(449); + setState(457); match(T__37); - setState(452); + setState(460); _errHandler.sync(this); switch (_input.LA(1)) { case T__13: { - setState(450); + setState(458); asmsub_address(); } break; case T__80: { - setState(451); + setState(459); statement_block(); } break; @@ -2964,13 +3023,13 @@ public class prog8Parser extends Parser { public final Asmsub_addressContext asmsub_address() throws RecognitionException { Asmsub_addressContext _localctx = new Asmsub_addressContext(_ctx, getState()); - enterRule(_localctx, 90, RULE_asmsub_address); + enterRule(_localctx, 92, RULE_asmsub_address); try { enterOuterAlt(_localctx, 1); { - setState(454); + setState(462); match(T__13); - setState(455); + setState(463); ((Asmsub_addressContext)_localctx).address = integerliteral(); } } @@ -3000,26 +3059,26 @@ public class prog8Parser extends Parser { public final Asmsub_paramsContext asmsub_params() throws RecognitionException { Asmsub_paramsContext _localctx = new Asmsub_paramsContext(_ctx, getState()); - enterRule(_localctx, 92, RULE_asmsub_params); + enterRule(_localctx, 94, RULE_asmsub_params); int _la; try { enterOuterAlt(_localctx, 1); { - setState(457); + setState(465); asmsub_param(); - setState(462); + setState(470); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__12) { { { - setState(458); + setState(466); match(T__12); - setState(459); + setState(467); asmsub_param(); } } - setState(464); + setState(472); _errHandler.sync(this); _la = _input.LA(1); } @@ -3057,19 +3116,19 @@ public class prog8Parser extends Parser { public final Asmsub_paramContext asmsub_param() throws RecognitionException { Asmsub_paramContext _localctx = new Asmsub_paramContext(_ctx, getState()); - enterRule(_localctx, 94, RULE_asmsub_param); + enterRule(_localctx, 96, RULE_asmsub_param); try { enterOuterAlt(_localctx, 1); { - setState(465); + setState(473); identifier(); - setState(466); + setState(474); match(T__1); - setState(467); + setState(475); datatype(); - setState(468); + setState(476); match(T__84); - setState(471); + setState(479); _errHandler.sync(this); switch (_input.LA(1)) { case T__64: @@ -3079,7 +3138,7 @@ public class prog8Parser extends Parser { case T__68: case T__69: { - setState(469); + setState(477); register(); } break; @@ -3088,7 +3147,7 @@ public class prog8Parser extends Parser { case T__72: case T__73: { - setState(470); + setState(478); statusregister(); } break; @@ -3123,26 +3182,26 @@ public class prog8Parser extends Parser { public final ClobberContext clobber() throws RecognitionException { ClobberContext _localctx = new ClobberContext(_ctx, getState()); - enterRule(_localctx, 96, RULE_clobber); + enterRule(_localctx, 98, RULE_clobber); int _la; try { enterOuterAlt(_localctx, 1); { - setState(473); + setState(481); register(); - setState(478); + setState(486); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__12) { { { - setState(474); + setState(482); match(T__12); - setState(475); + setState(483); register(); } } - setState(480); + setState(488); _errHandler.sync(this); _la = _input.LA(1); } @@ -3174,26 +3233,26 @@ public class prog8Parser extends Parser { public final Asmsub_returnsContext asmsub_returns() throws RecognitionException { Asmsub_returnsContext _localctx = new Asmsub_returnsContext(_ctx, getState()); - enterRule(_localctx, 98, RULE_asmsub_returns); + enterRule(_localctx, 100, RULE_asmsub_returns); int _la; try { enterOuterAlt(_localctx, 1); { - setState(481); + setState(489); asmsub_return(); - setState(486); + setState(494); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__12) { { { - setState(482); + setState(490); match(T__12); - setState(483); + setState(491); asmsub_return(); } } - setState(488); + setState(496); _errHandler.sync(this); _la = _input.LA(1); } @@ -3228,15 +3287,15 @@ public class prog8Parser extends Parser { public final Asmsub_returnContext asmsub_return() throws RecognitionException { Asmsub_returnContext _localctx = new Asmsub_returnContext(_ctx, getState()); - enterRule(_localctx, 100, RULE_asmsub_return); + enterRule(_localctx, 102, RULE_asmsub_return); try { enterOuterAlt(_localctx, 1); { - setState(489); + setState(497); datatype(); - setState(490); + setState(498); match(T__84); - setState(493); + setState(501); _errHandler.sync(this); switch (_input.LA(1)) { case T__64: @@ -3246,7 +3305,7 @@ public class prog8Parser extends Parser { case T__68: case T__69: { - setState(491); + setState(499); register(); } break; @@ -3255,7 +3314,7 @@ public class prog8Parser extends Parser { case T__72: case T__73: { - setState(492); + setState(500); statusregister(); } break; @@ -3300,26 +3359,26 @@ public class prog8Parser extends Parser { public final If_stmtContext if_stmt() throws RecognitionException { If_stmtContext _localctx = new If_stmtContext(_ctx, getState()); - enterRule(_localctx, 102, RULE_if_stmt); + enterRule(_localctx, 104, RULE_if_stmt); int _la; try { enterOuterAlt(_localctx, 1); { - setState(495); + setState(503); match(T__85); - setState(496); + setState(504); expression(0); - setState(498); + setState(506); _errHandler.sync(this); _la = _input.LA(1); if (_la==EOL) { { - setState(497); + setState(505); match(EOL); } } - setState(502); + setState(510); _errHandler.sync(this); switch (_input.LA(1)) { case T__2: @@ -3371,40 +3430,40 @@ public class prog8Parser extends Parser { case T__102: case NAME: { - setState(500); + setState(508); statement(); } break; case T__80: { - setState(501); + setState(509); statement_block(); } break; default: throw new NoViableAltException(this); } - setState(505); + setState(513); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,46,_ctx) ) { case 1: { - setState(504); + setState(512); match(EOL); } break; } - setState(508); + setState(516); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__86) { { - setState(507); + setState(515); else_part(); } } - setState(510); + setState(518); match(EOL); } } @@ -3435,133 +3494,13 @@ public class prog8Parser extends Parser { public final Else_partContext else_part() throws RecognitionException { Else_partContext _localctx = new Else_partContext(_ctx, getState()); - enterRule(_localctx, 104, RULE_else_part); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(512); - match(T__86); - setState(514); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==EOL) { - { - setState(513); - match(EOL); - } - } - - setState(518); - _errHandler.sync(this); - switch (_input.LA(1)) { - case T__2: - case T__3: - case T__4: - case T__5: - case T__6: - case T__7: - case T__8: - case T__9: - case T__10: - case T__11: - case T__14: - case T__15: - case T__16: - case T__17: - case T__18: - case T__19: - case T__20: - case T__21: - case T__22: - case T__60: - case T__61: - case T__62: - case T__64: - case T__65: - case T__66: - case T__67: - case T__68: - case T__69: - case T__77: - case T__78: - case T__82: - case T__85: - case T__87: - case T__88: - case T__89: - case T__90: - case T__91: - case T__92: - case T__93: - case T__94: - case T__95: - case T__96: - case T__97: - case T__98: - case T__99: - case T__101: - case T__102: - case NAME: - { - setState(516); - statement(); - } - break; - case T__80: - { - setState(517); - statement_block(); - } - break; - default: - throw new NoViableAltException(this); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class Branch_stmtContext extends ParserRuleContext { - public BranchconditionContext branchcondition() { - return getRuleContext(BranchconditionContext.class,0); - } - public List EOL() { return getTokens(prog8Parser.EOL); } - public TerminalNode EOL(int i) { - return getToken(prog8Parser.EOL, i); - } - public StatementContext statement() { - return getRuleContext(StatementContext.class,0); - } - public Statement_blockContext statement_block() { - return getRuleContext(Statement_blockContext.class,0); - } - public Else_partContext else_part() { - return getRuleContext(Else_partContext.class,0); - } - public Branch_stmtContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_branch_stmt; } - } - - public final Branch_stmtContext branch_stmt() throws RecognitionException { - Branch_stmtContext _localctx = new Branch_stmtContext(_ctx, getState()); - enterRule(_localctx, 106, RULE_branch_stmt); + enterRule(_localctx, 106, RULE_else_part); int _la; try { enterOuterAlt(_localctx, 1); { setState(520); - branchcondition(); + match(T__86); setState(522); _errHandler.sync(this); _la = _input.LA(1); @@ -3637,27 +3576,147 @@ public class prog8Parser extends Parser { default: throw new NoViableAltException(this); } - setState(529); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,51,_ctx) ) { - case 1: - { - setState(528); - match(EOL); - } - break; } - setState(532); + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Branch_stmtContext extends ParserRuleContext { + public BranchconditionContext branchcondition() { + return getRuleContext(BranchconditionContext.class,0); + } + public List EOL() { return getTokens(prog8Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(prog8Parser.EOL, i); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public Statement_blockContext statement_block() { + return getRuleContext(Statement_blockContext.class,0); + } + public Else_partContext else_part() { + return getRuleContext(Else_partContext.class,0); + } + public Branch_stmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_branch_stmt; } + } + + public final Branch_stmtContext branch_stmt() throws RecognitionException { + Branch_stmtContext _localctx = new Branch_stmtContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_branch_stmt); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(528); + branchcondition(); + setState(530); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__86) { + if (_la==EOL) { { - setState(531); - else_part(); + setState(529); + match(EOL); } } setState(534); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__2: + case T__3: + case T__4: + case T__5: + case T__6: + case T__7: + case T__8: + case T__9: + case T__10: + case T__11: + case T__14: + case T__15: + case T__16: + case T__17: + case T__18: + case T__19: + case T__20: + case T__21: + case T__22: + case T__60: + case T__61: + case T__62: + case T__64: + case T__65: + case T__66: + case T__67: + case T__68: + case T__69: + case T__77: + case T__78: + case T__82: + case T__85: + case T__87: + case T__88: + case T__89: + case T__90: + case T__91: + case T__92: + case T__93: + case T__94: + case T__95: + case T__96: + case T__97: + case T__98: + case T__99: + case T__101: + case T__102: + case NAME: + { + setState(532); + statement(); + } + break; + case T__80: + { + setState(533); + statement_block(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(537); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,52,_ctx) ) { + case 1: + { + setState(536); + match(EOL); + } + break; + } + setState(540); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==T__86) { + { + setState(539); + else_part(); + } + } + + setState(542); match(EOL); } } @@ -3681,12 +3740,12 @@ public class prog8Parser extends Parser { public final BranchconditionContext branchcondition() throws RecognitionException { BranchconditionContext _localctx = new BranchconditionContext(_ctx, getState()); - enterRule(_localctx, 108, RULE_branchcondition); + enterRule(_localctx, 110, RULE_branchcondition); int _la; try { enterOuterAlt(_localctx, 1); { - setState(536); + setState(544); _la = _input.LA(1); if ( !(((((_la - 88)) & ~0x3f) == 0 && ((1L << (_la - 88)) & ((1L << (T__87 - 88)) | (1L << (T__88 - 88)) | (1L << (T__89 - 88)) | (1L << (T__90 - 88)) | (1L << (T__91 - 88)) | (1L << (T__92 - 88)) | (1L << (T__93 - 88)) | (1L << (T__94 - 88)) | (1L << (T__95 - 88)) | (1L << (T__96 - 88)) | (1L << (T__97 - 88)) | (1L << (T__98 - 88)))) != 0)) ) { _errHandler.recoverInline(this); @@ -3731,14 +3790,14 @@ public class prog8Parser extends Parser { public final ForloopContext forloop() throws RecognitionException { ForloopContext _localctx = new ForloopContext(_ctx, getState()); - enterRule(_localctx, 110, RULE_forloop); + enterRule(_localctx, 112, RULE_forloop); int _la; try { enterOuterAlt(_localctx, 1); { - setState(538); + setState(546); match(T__99); - setState(541); + setState(549); _errHandler.sync(this); switch (_input.LA(1)) { case T__64: @@ -3748,34 +3807,34 @@ public class prog8Parser extends Parser { case T__68: case T__69: { - setState(539); + setState(547); register(); } break; case NAME: { - setState(540); + setState(548); identifier(); } break; default: throw new NoViableAltException(this); } - setState(543); + setState(551); match(T__100); - setState(544); + setState(552); expression(0); - setState(546); + setState(554); _errHandler.sync(this); _la = _input.LA(1); if (_la==EOL) { { - setState(545); + setState(553); match(EOL); } } - setState(548); + setState(556); statement_block(); } } @@ -3809,26 +3868,26 @@ public class prog8Parser extends Parser { public final WhileloopContext whileloop() throws RecognitionException { WhileloopContext _localctx = new WhileloopContext(_ctx, getState()); - enterRule(_localctx, 112, RULE_whileloop); + enterRule(_localctx, 114, RULE_whileloop); int _la; try { enterOuterAlt(_localctx, 1); { - setState(550); + setState(558); match(T__101); - setState(551); + setState(559); expression(0); - setState(553); + setState(561); _errHandler.sync(this); _la = _input.LA(1); if (_la==EOL) { { - setState(552); + setState(560); match(EOL); } } - setState(557); + setState(565); _errHandler.sync(this); switch (_input.LA(1)) { case T__2: @@ -3880,13 +3939,13 @@ public class prog8Parser extends Parser { case T__102: case NAME: { - setState(555); + setState(563); statement(); } break; case T__80: { - setState(556); + setState(564); statement_block(); } break; @@ -3925,14 +3984,14 @@ public class prog8Parser extends Parser { public final RepeatloopContext repeatloop() throws RecognitionException { RepeatloopContext _localctx = new RepeatloopContext(_ctx, getState()); - enterRule(_localctx, 114, RULE_repeatloop); + enterRule(_localctx, 116, RULE_repeatloop); int _la; try { enterOuterAlt(_localctx, 1); { - setState(559); + setState(567); match(T__102); - setState(562); + setState(570); _errHandler.sync(this); switch (_input.LA(1)) { case T__2: @@ -3984,32 +4043,32 @@ public class prog8Parser extends Parser { case T__102: case NAME: { - setState(560); + setState(568); statement(); } break; case T__80: { - setState(561); + setState(569); statement_block(); } break; default: throw new NoViableAltException(this); } - setState(565); + setState(573); _errHandler.sync(this); _la = _input.LA(1); if (_la==EOL) { { - setState(564); + setState(572); match(EOL); } } - setState(567); + setState(575); match(T__103); - setState(568); + setState(576); expression(0); } } @@ -4034,250 +4093,251 @@ public class prog8Parser extends Parser { private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { switch (predIndex) { case 0: - return precpred(_ctx, 17); + return precpred(_ctx, 18); case 1: - return precpred(_ctx, 16); + return precpred(_ctx, 17); case 2: - return precpred(_ctx, 15); + return precpred(_ctx, 16); case 3: - return precpred(_ctx, 14); + return precpred(_ctx, 15); case 4: - return precpred(_ctx, 13); + return precpred(_ctx, 14); case 5: - return precpred(_ctx, 12); + return precpred(_ctx, 13); case 6: - return precpred(_ctx, 11); + return precpred(_ctx, 12); case 7: - return precpred(_ctx, 10); + return precpred(_ctx, 11); case 8: - return precpred(_ctx, 8); - case 9: - return precpred(_ctx, 7); - case 10: - return precpred(_ctx, 6); - case 11: - return precpred(_ctx, 20); - case 12: return precpred(_ctx, 9); + case 9: + return precpred(_ctx, 8); + case 10: + return precpred(_ctx, 7); + case 11: + return precpred(_ctx, 10); } return true; } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3v\u023d\4\2\t\2\4"+ + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3v\u0245\4\2\t\2\4"+ "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ - "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\3\2\3\2\7\2"+ - "y\n\2\f\2\16\2|\13\2\3\2\3\2\3\3\3\3\5\3\u0082\n\3\3\4\3\4\3\4\5\4\u0087"+ - "\n\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3"+ - "\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5\u00a2\n\5\3\6\3\6\3\6\3\7\3\7\3"+ - "\7\3\7\5\7\u00ab\n\7\3\b\3\b\5\b\u00af\n\b\3\b\3\b\3\b\7\b\u00b4\n\b\f"+ - "\b\16\b\u00b7\13\b\5\b\u00b9\n\b\3\t\3\t\3\t\5\t\u00be\n\t\3\n\3\n\5\n"+ - "\u00c2\n\n\3\n\3\n\3\13\3\13\5\13\u00c8\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\u00da\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\u00e9"+ - "\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\u00fc\n\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\3\2\3"+ + "\2\7\2{\n\2\f\2\16\2~\13\2\3\2\3\2\3\3\3\3\5\3\u0084\n\3\3\4\3\4\3\4\5"+ + "\4\u0089\n\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3"+ + "\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5\u00a4\n\5\3\6\3\6\3\6\3"+ + "\7\3\7\3\7\3\7\5\7\u00ad\n\7\3\b\3\b\5\b\u00b1\n\b\3\b\3\b\3\b\7\b\u00b6"+ + "\n\b\f\b\16\b\u00b9\13\b\5\b\u00bb\n\b\3\t\3\t\3\t\5\t\u00c0\n\t\3\n\3"+ + "\n\5\n\u00c4\n\n\3\n\3\n\3\13\3\13\5\13\u00ca\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\u00dc\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"+ + "\u00eb\n\22\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24"+ + "\3\24\3\24\3\24\3\24\3\24\3\24\5\24\u00ff\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\3\24\5\24\u0126\n\24\7\24\u0128\n\24\f\24\16\24\u012b"+ - "\13\24\3\25\3\25\5\25\u012f\n\25\3\25\3\25\5\25\u0133\n\25\3\25\3\25\3"+ - "\26\3\26\5\26\u0139\n\26\3\26\3\26\5\26\u013d\n\26\3\26\3\26\3\27\3\27"+ - "\3\27\7\27\u0144\n\27\f\27\16\27\u0147\13\27\3\30\3\30\5\30\u014b\n\30"+ - "\3\31\3\31\3\32\3\32\3\33\3\33\3\34\3\34\3\34\6\34\u0156\n\34\r\34\16"+ - "\34\u0157\3\35\3\35\3\36\3\36\3\37\3\37\5\37\u0160\n\37\3 \3 \3!\3!\3"+ - "\"\3\"\3\"\3\"\7\"\u016a\n\"\f\"\16\"\u016d\13\"\3\"\3\"\3#\3#\3$\3$\3"+ - "%\3%\3&\3&\3&\3&\3&\3&\5&\u017d\n&\3\'\3\'\3\'\3(\3(\3(\3(\5(\u0186\n"+ - "(\3(\3(\5(\u018a\n(\3(\3(\3(\3)\3)\3)\3*\3*\3*\3*\7*\u0196\n*\f*\16*\u0199"+ - "\13*\3*\3*\3+\3+\3+\7+\u01a0\n+\f+\16+\u01a3\13+\3,\3,\3,\3,\3-\3-\3-"+ - "\7-\u01ac\n-\f-\16-\u01af\13-\3.\3.\3.\3.\5.\u01b5\n.\3.\3.\3.\3.\3.\5"+ - ".\u01bc\n.\3.\3.\3.\3.\5.\u01c2\n.\3.\3.\3.\5.\u01c7\n.\3/\3/\3/\3\60"+ - "\3\60\3\60\7\60\u01cf\n\60\f\60\16\60\u01d2\13\60\3\61\3\61\3\61\3\61"+ - "\3\61\3\61\5\61\u01da\n\61\3\62\3\62\3\62\7\62\u01df\n\62\f\62\16\62\u01e2"+ - "\13\62\3\63\3\63\3\63\7\63\u01e7\n\63\f\63\16\63\u01ea\13\63\3\64\3\64"+ - "\3\64\3\64\5\64\u01f0\n\64\3\65\3\65\3\65\5\65\u01f5\n\65\3\65\3\65\5"+ - "\65\u01f9\n\65\3\65\5\65\u01fc\n\65\3\65\5\65\u01ff\n\65\3\65\3\65\3\66"+ - "\3\66\5\66\u0205\n\66\3\66\3\66\5\66\u0209\n\66\3\67\3\67\5\67\u020d\n"+ - "\67\3\67\3\67\5\67\u0211\n\67\3\67\5\67\u0214\n\67\3\67\5\67\u0217\n\67"+ - "\3\67\3\67\38\38\39\39\39\59\u0220\n9\39\39\39\59\u0225\n9\39\39\3:\3"+ - ":\3:\5:\u022c\n:\3:\3:\5:\u0230\n:\3;\3;\3;\5;\u0235\n;\3;\5;\u0238\n"+ - ";\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:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprt\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\63\3\2\64\65\3\2CH\3\2IL\3\2p"+ - "r\3\2NO\3\2Ze\2\u0269\2z\3\2\2\2\4\u0081\3\2\2\2\6\u0083\3\2\2\2\b\u00a1"+ - "\3\2\2\2\n\u00a3\3\2\2\2\f\u00a6\3\2\2\2\16\u00ac\3\2\2\2\20\u00bd\3\2"+ - "\2\2\22\u00bf\3\2\2\2\24\u00c5\3\2\2\2\26\u00cd\3\2\2\2\30\u00d0\3\2\2"+ - "\2\32\u00d3\3\2\2\2\34\u00d5\3\2\2\2\36\u00dd\3\2\2\2 \u00e1\3\2\2\2\""+ - "\u00e8\3\2\2\2$\u00ea\3\2\2\2&\u00fb\3\2\2\2(\u012e\3\2\2\2*\u0138\3\2"+ - "\2\2,\u0140\3\2\2\2.\u0148\3\2\2\2\60\u014c\3\2\2\2\62\u014e\3\2\2\2\64"+ - "\u0150\3\2\2\2\66\u0152\3\2\2\28\u0159\3\2\2\2:\u015b\3\2\2\2<\u015d\3"+ - "\2\2\2>\u0161\3\2\2\2@\u0163\3\2\2\2B\u0165\3\2\2\2D\u0170\3\2\2\2F\u0172"+ - "\3\2\2\2H\u0174\3\2\2\2J\u017c\3\2\2\2L\u017e\3\2\2\2N\u0181\3\2\2\2P"+ - "\u018e\3\2\2\2R\u0191\3\2\2\2T\u019c\3\2\2\2V\u01a4\3\2\2\2X\u01a8\3\2"+ - "\2\2Z\u01b0\3\2\2\2\\\u01c8\3\2\2\2^\u01cb\3\2\2\2`\u01d3\3\2\2\2b\u01db"+ - "\3\2\2\2d\u01e3\3\2\2\2f\u01eb\3\2\2\2h\u01f1\3\2\2\2j\u0202\3\2\2\2l"+ - "\u020a\3\2\2\2n\u021a\3\2\2\2p\u021c\3\2\2\2r\u0228\3\2\2\2t\u0231\3\2"+ - "\2\2vy\5\4\3\2wy\7n\2\2xv\3\2\2\2xw\3\2\2\2y|\3\2\2\2zx\3\2\2\2z{\3\2"+ - "\2\2{}\3\2\2\2|z\3\2\2\2}~\7\2\2\3~\3\3\2\2\2\177\u0082\5\16\b\2\u0080"+ - "\u0082\5\6\4\2\u0081\177\3\2\2\2\u0081\u0080\3\2\2\2\u0082\5\3\2\2\2\u0083"+ - "\u0084\7\3\2\2\u0084\u0086\5\64\33\2\u0085\u0087\5<\37\2\u0086\u0085\3"+ - "\2\2\2\u0086\u0087\3\2\2\2\u0087\u0088\3\2\2\2\u0088\u0089\5R*\2\u0089"+ - "\u008a\7n\2\2\u008a\7\3\2\2\2\u008b\u00a2\5\16\b\2\u008c\u00a2\5\24\13"+ - "\2\u008d\u00a2\5\22\n\2\u008e\u00a2\5\26\f\2\u008f\u00a2\5\30\r\2\u0090"+ - "\u00a2\5\36\20\2\u0091\u00a2\5 \21\2\u0092\u00a2\5\f\7\2\u0093\u00a2\5"+ - "$\23\2\u0094\u00a2\5*\26\2\u0095\u00a2\5h\65\2\u0096\u00a2\5l\67\2\u0097"+ - "\u00a2\5N(\2\u0098\u00a2\5Z.\2\u0099\u00a2\5L\'\2\u009a\u00a2\5.\30\2"+ - "\u009b\u00a2\5p9\2\u009c\u00a2\5r:\2\u009d\u00a2\5t;\2\u009e\u00a2\5\60"+ - "\31\2\u009f\u00a2\5\62\32\2\u00a0\u00a2\5\n\6\2\u00a1\u008b\3\2\2\2\u00a1"+ - "\u008c\3\2\2\2\u00a1\u008d\3\2\2\2\u00a1\u008e\3\2\2\2\u00a1\u008f\3\2"+ - "\2\2\u00a1\u0090\3\2\2\2\u00a1\u0091\3\2\2\2\u00a1\u0092\3\2\2\2\u00a1"+ - "\u0093\3\2\2\2\u00a1\u0094\3\2\2\2\u00a1\u0095\3\2\2\2\u00a1\u0096\3\2"+ - "\2\2\u00a1\u0097\3\2\2\2\u00a1\u0098\3\2\2\2\u00a1\u0099\3\2\2\2\u00a1"+ - "\u009a\3\2\2\2\u00a1\u009b\3\2\2\2\u00a1\u009c\3\2\2\2\u00a1\u009d\3\2"+ - "\2\2\u00a1\u009e\3\2\2\2\u00a1\u009f\3\2\2\2\u00a1\u00a0\3\2\2\2\u00a2"+ - "\t\3\2\2\2\u00a3\u00a4\5\64\33\2\u00a4\u00a5\7\4\2\2\u00a5\13\3\2\2\2"+ - "\u00a6\u00aa\7\5\2\2\u00a7\u00ab\5<\37\2\u00a8\u00ab\5\64\33\2\u00a9\u00ab"+ - "\5\66\34\2\u00aa\u00a7\3\2\2\2\u00aa\u00a8\3\2\2\2\u00aa\u00a9\3\2\2\2"+ - "\u00ab\r\3\2\2\2\u00ac\u00b8\t\2\2\2\u00ad\u00af\5\20\t\2\u00ae\u00ad"+ - "\3\2\2\2\u00ae\u00af\3\2\2\2\u00af\u00b9\3\2\2\2\u00b0\u00b5\5\20\t\2"+ - "\u00b1\u00b2\7\17\2\2\u00b2\u00b4\5\20\t\2\u00b3\u00b1\3\2\2\2\u00b4\u00b7"+ - "\3\2\2\2\u00b5\u00b3\3\2\2\2\u00b5\u00b6\3\2\2\2\u00b6\u00b9\3\2\2\2\u00b7"+ - "\u00b5\3\2\2\2\u00b8\u00ae\3\2\2\2\u00b8\u00b0\3\2\2\2\u00b9\17\3\2\2"+ - "\2\u00ba\u00be\5D#\2\u00bb\u00be\5\64\33\2\u00bc\u00be\5<\37\2\u00bd\u00ba"+ - "\3\2\2\2\u00bd\u00bb\3\2\2\2\u00bd\u00bc\3\2\2\2\u00be\21\3\2\2\2\u00bf"+ - "\u00c1\5\32\16\2\u00c0\u00c2\5\34\17\2\u00c1\u00c0\3\2\2\2\u00c1\u00c2"+ - "\3\2\2\2\u00c2\u00c3\3\2\2\2\u00c3\u00c4\5\64\33\2\u00c4\23\3\2\2\2\u00c5"+ - "\u00c7\5\32\16\2\u00c6\u00c8\5\34\17\2\u00c7\u00c6\3\2\2\2\u00c7\u00c8"+ - "\3\2\2\2\u00c8\u00c9\3\2\2\2\u00c9\u00ca\5\64\33\2\u00ca\u00cb\7\20\2"+ - "\2\u00cb\u00cc\5&\24\2\u00cc\25\3\2\2\2\u00cd\u00ce\7\21\2\2\u00ce\u00cf"+ - "\5\24\13\2\u00cf\27\3\2\2\2\u00d0\u00d1\7\22\2\2\u00d1\u00d2\5\24\13\2"+ - "\u00d2\31\3\2\2\2\u00d3\u00d4\t\3\2\2\u00d4\33\3\2\2\2\u00d5\u00d6\7\32"+ - "\2\2\u00d6\u00d9\5&\24\2\u00d7\u00d8\7\17\2\2\u00d8\u00da\5&\24\2\u00d9"+ - "\u00d7\3\2\2\2\u00d9\u00da\3\2\2\2\u00da\u00db\3\2\2\2\u00db\u00dc\7\33"+ - "\2\2\u00dc\35\3\2\2\2\u00dd\u00de\5\"\22\2\u00de\u00df\7\20\2\2\u00df"+ - "\u00e0\5&\24\2\u00e0\37\3\2\2\2\u00e1\u00e2\5\"\22\2\u00e2\u00e3\t\4\2"+ - "\2\u00e3\u00e4\5&\24\2\u00e4!\3\2\2\2\u00e5\u00e9\58\35\2\u00e6\u00e9"+ - "\5\64\33\2\u00e7\u00e9\5\66\34\2\u00e8\u00e5\3\2\2\2\u00e8\u00e6\3\2\2"+ - "\2\u00e8\u00e7\3\2\2\2\u00e9#\3\2\2\2\u00ea\u00eb\5\"\22\2\u00eb\u00ec"+ - "\t\5\2\2\u00ec%\3\2\2\2\u00ed\u00ee\b\24\1\2\u00ee\u00ef\7\'\2\2\u00ef"+ - "\u00f0\5&\24\2\u00f0\u00f1\7(\2\2\u00f1\u00fc\3\2\2\2\u00f2\u00fc\5(\25"+ - "\2\u00f3\u00f4\t\6\2\2\u00f4\u00fc\5&\24\24\u00f5\u00f6\7>\2\2\u00f6\u00fc"+ - "\5&\24\7\u00f7\u00fc\5J&\2\u00f8\u00fc\58\35\2\u00f9\u00fc\5\64\33\2\u00fa"+ - "\u00fc\5\66\34\2\u00fb\u00ed\3\2\2\2\u00fb\u00f2\3\2\2\2\u00fb\u00f3\3"+ - "\2\2\2\u00fb\u00f5\3\2\2\2\u00fb\u00f7\3\2\2\2\u00fb\u00f8\3\2\2\2\u00fb"+ - "\u00f9\3\2\2\2\u00fb\u00fa\3\2\2\2\u00fc\u0129\3\2\2\2\u00fd\u00fe\f\23"+ - "\2\2\u00fe\u00ff\7+\2\2\u00ff\u0128\5&\24\24\u0100\u0101\f\22\2\2\u0101"+ - "\u0102\t\7\2\2\u0102\u0128\5&\24\23\u0103\u0104\f\21\2\2\u0104\u0105\t"+ - "\b\2\2\u0105\u0128\5&\24\22\u0106\u0107\f\20\2\2\u0107\u0108\t\t\2\2\u0108"+ - "\u0128\5&\24\21\u0109\u010a\f\17\2\2\u010a\u010b\t\n\2\2\u010b\u0128\5"+ - "&\24\20\u010c\u010d\f\16\2\2\u010d\u010e\7\66\2\2\u010e\u0128\5&\24\17"+ - "\u010f\u0110\f\r\2\2\u0110\u0111\7\67\2\2\u0111\u0128\5&\24\16\u0112\u0113"+ - "\f\f\2\2\u0113\u0114\78\2\2\u0114\u0128\5&\24\r\u0115\u0116\f\n\2\2\u0116"+ - "\u0117\7;\2\2\u0117\u0128\5&\24\13\u0118\u0119\f\t\2\2\u0119\u011a\7<"+ - "\2\2\u011a\u0128\5&\24\n\u011b\u011c\f\b\2\2\u011c\u011d\7=\2\2\u011d"+ - "\u0128\5&\24\t\u011e\u011f\f\26\2\2\u011f\u0128\5\34\17\2\u0120\u0121"+ - "\f\13\2\2\u0121\u0122\79\2\2\u0122\u0125\5&\24\2\u0123\u0124\7:\2\2\u0124"+ - "\u0126\5&\24\2\u0125\u0123\3\2\2\2\u0125\u0126\3\2\2\2\u0126\u0128\3\2"+ - "\2\2\u0127\u00fd\3\2\2\2\u0127\u0100\3\2\2\2\u0127\u0103\3\2\2\2\u0127"+ - "\u0106\3\2\2\2\u0127\u0109\3\2\2\2\u0127\u010c\3\2\2\2\u0127\u010f\3\2"+ - "\2\2\u0127\u0112\3\2\2\2\u0127\u0115\3\2\2\2\u0127\u0118\3\2\2\2\u0127"+ - "\u011b\3\2\2\2\u0127\u011e\3\2\2\2\u0127\u0120\3\2\2\2\u0128\u012b\3\2"+ - "\2\2\u0129\u0127\3\2\2\2\u0129\u012a\3\2\2\2\u012a\'\3\2\2\2\u012b\u0129"+ - "\3\2\2\2\u012c\u012f\5\64\33\2\u012d\u012f\5\66\34\2\u012e\u012c\3\2\2"+ - "\2\u012e\u012d\3\2\2\2\u012f\u0130\3\2\2\2\u0130\u0132\7\'\2\2\u0131\u0133"+ - "\5,\27\2\u0132\u0131\3\2\2\2\u0132\u0133\3\2\2\2\u0133\u0134\3\2\2\2\u0134"+ - "\u0135\7(\2\2\u0135)\3\2\2\2\u0136\u0139\5\64\33\2\u0137\u0139\5\66\34"+ - "\2\u0138\u0136\3\2\2\2\u0138\u0137\3\2\2\2\u0139\u013a\3\2\2\2\u013a\u013c"+ - "\7\'\2\2\u013b\u013d\5,\27\2\u013c\u013b\3\2\2\2\u013c\u013d\3\2\2\2\u013d"+ - "\u013e\3\2\2\2\u013e\u013f\7(\2\2\u013f+\3\2\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-\3\2\2\2\u0147\u0145"+ - "\3\2\2\2\u0148\u014a\7?\2\2\u0149\u014b\5,\27\2\u014a\u0149\3\2\2\2\u014a"+ - "\u014b\3\2\2\2\u014b/\3\2\2\2\u014c\u014d\7@\2\2\u014d\61\3\2\2\2\u014e"+ - "\u014f\7A\2\2\u014f\63\3\2\2\2\u0150\u0151\7o\2\2\u0151\65\3\2\2\2\u0152"+ - "\u0155\7o\2\2\u0153\u0154\7B\2\2\u0154\u0156\7o\2\2\u0155\u0153\3\2\2"+ - "\2\u0156\u0157\3\2\2\2\u0157\u0155\3\2\2\2\u0157\u0158\3\2\2\2\u0158\67"+ - "\3\2\2\2\u0159\u015a\t\13\2\2\u015a9\3\2\2\2\u015b\u015c\t\f\2\2\u015c"+ - ";\3\2\2\2\u015d\u015f\t\r\2\2\u015e\u0160\5> \2\u015f\u015e\3\2\2\2\u015f"+ - "\u0160\3\2\2\2\u0160=\3\2\2\2\u0161\u0162\7M\2\2\u0162?\3\2\2\2\u0163"+ - "\u0164\t\16\2\2\u0164A\3\2\2\2\u0165\u0166\7\32\2\2\u0166\u016b\5&\24"+ - "\2\u0167\u0168\7\17\2\2\u0168\u016a\5&\24\2\u0169\u0167\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\7\33\2\2\u016fC\3\2\2\2\u0170\u0171"+ - "\7t\2\2\u0171E\3\2\2\2\u0172\u0173\7v\2\2\u0173G\3\2\2\2\u0174\u0175\7"+ - "s\2\2\u0175I\3\2\2\2\u0176\u017d\5<\37\2\u0177\u017d\5@!\2\u0178\u017d"+ - "\5B\"\2\u0179\u017d\5D#\2\u017a\u017d\5F$\2\u017b\u017d\5H%\2\u017c\u0176"+ - "\3\2\2\2\u017c\u0177\3\2\2\2\u017c\u0178\3\2\2\2\u017c\u0179\3\2\2\2\u017c"+ - "\u017a\3\2\2\2\u017c\u017b\3\2\2\2\u017dK\3\2\2\2\u017e\u017f\7P\2\2\u017f"+ - "\u0180\7u\2\2\u0180M\3\2\2\2\u0181\u0182\7Q\2\2\u0182\u0183\5\64\33\2"+ - "\u0183\u0185\7\'\2\2\u0184\u0186\5T+\2\u0185\u0184\3\2\2\2\u0185\u0186"+ - "\3\2\2\2\u0186\u0187\3\2\2\2\u0187\u0189\7(\2\2\u0188\u018a\5P)\2\u0189"+ - "\u0188\3\2\2\2\u0189\u018a\3\2\2\2\u018a\u018b\3\2\2\2\u018b\u018c\5R"+ - "*\2\u018c\u018d\7n\2\2\u018dO\3\2\2\2\u018e\u018f\7R\2\2\u018f\u0190\5"+ - "X-\2\u0190Q\3\2\2\2\u0191\u0192\7S\2\2\u0192\u0197\7n\2\2\u0193\u0196"+ - "\5\b\5\2\u0194\u0196\7n\2\2\u0195\u0193\3\2\2\2\u0195\u0194\3\2\2\2\u0196"+ - "\u0199\3\2\2\2\u0197\u0195\3\2\2\2\u0197\u0198\3\2\2\2\u0198\u019a\3\2"+ - "\2\2\u0199\u0197\3\2\2\2\u019a\u019b\7T\2\2\u019bS\3\2\2\2\u019c\u01a1"+ - "\5V,\2\u019d\u019e\7\17\2\2\u019e\u01a0\5V,\2\u019f\u019d\3\2\2\2\u01a0"+ - "\u01a3\3\2\2\2\u01a1\u019f\3\2\2\2\u01a1\u01a2\3\2\2\2\u01a2U\3\2\2\2"+ - "\u01a3\u01a1\3\2\2\2\u01a4\u01a5\5\64\33\2\u01a5\u01a6\7\4\2\2\u01a6\u01a7"+ - "\5\32\16\2\u01a7W\3\2\2\2\u01a8\u01ad\5\32\16\2\u01a9\u01aa\7\17\2\2\u01aa"+ - "\u01ac\5\32\16\2\u01ab\u01a9\3\2\2\2\u01ac\u01af\3\2\2\2\u01ad\u01ab\3"+ - "\2\2\2\u01ad\u01ae\3\2\2\2\u01aeY\3\2\2\2\u01af\u01ad\3\2\2\2\u01b0\u01b1"+ - "\7U\2\2\u01b1\u01b2\5\64\33\2\u01b2\u01b4\7\'\2\2\u01b3\u01b5\5^\60\2"+ - "\u01b4\u01b3\3\2\2\2\u01b4\u01b5\3\2\2\2\u01b5\u01b6\3\2\2\2\u01b6\u01b7"+ - "\7(\2\2\u01b7\u01b8\7R\2\2\u01b8\u01b9\7V\2\2\u01b9\u01bb\7\'\2\2\u01ba"+ - "\u01bc\5b\62\2\u01bb\u01ba\3\2\2\2\u01bb\u01bc\3\2\2\2\u01bc\u01bd\3\2"+ - "\2\2\u01bd\u01be\7(\2\2\u01be\u01bf\7R\2\2\u01bf\u01c1\7\'\2\2\u01c0\u01c2"+ - "\5d\63\2\u01c1\u01c0\3\2\2\2\u01c1\u01c2\3\2\2\2\u01c2\u01c3\3\2\2\2\u01c3"+ - "\u01c6\7(\2\2\u01c4\u01c7\5\\/\2\u01c5\u01c7\5R*\2\u01c6\u01c4\3\2\2\2"+ - "\u01c6\u01c5\3\2\2\2\u01c7[\3\2\2\2\u01c8\u01c9\7\20\2\2\u01c9\u01ca\5"+ - "<\37\2\u01ca]\3\2\2\2\u01cb\u01d0\5`\61\2\u01cc\u01cd\7\17\2\2\u01cd\u01cf"+ - "\5`\61\2\u01ce\u01cc\3\2\2\2\u01cf\u01d2\3\2\2\2\u01d0\u01ce\3\2\2\2\u01d0"+ - "\u01d1\3\2\2\2\u01d1_\3\2\2\2\u01d2\u01d0\3\2\2\2\u01d3\u01d4\5\64\33"+ - "\2\u01d4\u01d5\7\4\2\2\u01d5\u01d6\5\32\16\2\u01d6\u01d9\7W\2\2\u01d7"+ - "\u01da\58\35\2\u01d8\u01da\5:\36\2\u01d9\u01d7\3\2\2\2\u01d9\u01d8\3\2"+ - "\2\2\u01daa\3\2\2\2\u01db\u01e0\58\35\2\u01dc\u01dd\7\17\2\2\u01dd\u01df"+ - "\58\35\2\u01de\u01dc\3\2\2\2\u01df\u01e2\3\2\2\2\u01e0\u01de\3\2\2\2\u01e0"+ - "\u01e1\3\2\2\2\u01e1c\3\2\2\2\u01e2\u01e0\3\2\2\2\u01e3\u01e8\5f\64\2"+ - "\u01e4\u01e5\7\17\2\2\u01e5\u01e7\5f\64\2\u01e6\u01e4\3\2\2\2\u01e7\u01ea"+ - "\3\2\2\2\u01e8\u01e6\3\2\2\2\u01e8\u01e9\3\2\2\2\u01e9e\3\2\2\2\u01ea"+ - "\u01e8\3\2\2\2\u01eb\u01ec\5\32\16\2\u01ec\u01ef\7W\2\2\u01ed\u01f0\5"+ - "8\35\2\u01ee\u01f0\5:\36\2\u01ef\u01ed\3\2\2\2\u01ef\u01ee\3\2\2\2\u01f0"+ - "g\3\2\2\2\u01f1\u01f2\7X\2\2\u01f2\u01f4\5&\24\2\u01f3\u01f5\7n\2\2\u01f4"+ - "\u01f3\3\2\2\2\u01f4\u01f5\3\2\2\2\u01f5\u01f8\3\2\2\2\u01f6\u01f9\5\b"+ - "\5\2\u01f7\u01f9\5R*\2\u01f8\u01f6\3\2\2\2\u01f8\u01f7\3\2\2\2\u01f9\u01fb"+ - "\3\2\2\2\u01fa\u01fc\7n\2\2\u01fb\u01fa\3\2\2\2\u01fb\u01fc\3\2\2\2\u01fc"+ - "\u01fe\3\2\2\2\u01fd\u01ff\5j\66\2\u01fe\u01fd\3\2\2\2\u01fe\u01ff\3\2"+ - "\2\2\u01ff\u0200\3\2\2\2\u0200\u0201\7n\2\2\u0201i\3\2\2\2\u0202\u0204"+ - "\7Y\2\2\u0203\u0205\7n\2\2\u0204\u0203\3\2\2\2\u0204\u0205\3\2\2\2\u0205"+ - "\u0208\3\2\2\2\u0206\u0209\5\b\5\2\u0207\u0209\5R*\2\u0208\u0206\3\2\2"+ - "\2\u0208\u0207\3\2\2\2\u0209k\3\2\2\2\u020a\u020c\5n8\2\u020b\u020d\7"+ - "n\2\2\u020c\u020b\3\2\2\2\u020c\u020d\3\2\2\2\u020d\u0210\3\2\2\2\u020e"+ - "\u0211\5\b\5\2\u020f\u0211\5R*\2\u0210\u020e\3\2\2\2\u0210\u020f\3\2\2"+ - "\2\u0211\u0213\3\2\2\2\u0212\u0214\7n\2\2\u0213\u0212\3\2\2\2\u0213\u0214"+ - "\3\2\2\2\u0214\u0216\3\2\2\2\u0215\u0217\5j\66\2\u0216\u0215\3\2\2\2\u0216"+ - "\u0217\3\2\2\2\u0217\u0218\3\2\2\2\u0218\u0219\7n\2\2\u0219m\3\2\2\2\u021a"+ - "\u021b\t\17\2\2\u021bo\3\2\2\2\u021c\u021f\7f\2\2\u021d\u0220\58\35\2"+ - "\u021e\u0220\5\64\33\2\u021f\u021d\3\2\2\2\u021f\u021e\3\2\2\2\u0220\u0221"+ - "\3\2\2\2\u0221\u0222\7g\2\2\u0222\u0224\5&\24\2\u0223\u0225\7n\2\2\u0224"+ - "\u0223\3\2\2\2\u0224\u0225\3\2\2\2\u0225\u0226\3\2\2\2\u0226\u0227\5R"+ - "*\2\u0227q\3\2\2\2\u0228\u0229\7h\2\2\u0229\u022b\5&\24\2\u022a\u022c"+ - "\7n\2\2\u022b\u022a\3\2\2\2\u022b\u022c\3\2\2\2\u022c\u022f\3\2\2\2\u022d"+ - "\u0230\5\b\5\2\u022e\u0230\5R*\2\u022f\u022d\3\2\2\2\u022f\u022e\3\2\2"+ - "\2\u0230s\3\2\2\2\u0231\u0234\7i\2\2\u0232\u0235\5\b\5\2\u0233\u0235\5"+ - "R*\2\u0234\u0232\3\2\2\2\u0234\u0233\3\2\2\2\u0235\u0237\3\2\2\2\u0236"+ - "\u0238\7n\2\2\u0237\u0236\3\2\2\2\u0237\u0238\3\2\2\2\u0238\u0239\3\2"+ - "\2\2\u0239\u023a\7j\2\2\u023a\u023b\5&\24\2\u023bu\3\2\2\2=xz\u0081\u0086"+ - "\u00a1\u00aa\u00ae\u00b5\u00b8\u00bd\u00c1\u00c7\u00d9\u00e8\u00fb\u0125"+ - "\u0127\u0129\u012e\u0132\u0138\u013c\u0145\u014a\u0157\u015f\u016b\u017c"+ - "\u0185\u0189\u0195\u0197\u01a1\u01ad\u01b4\u01bb\u01c1\u01c6\u01d0\u01d9"+ - "\u01e0\u01e8\u01ef\u01f4\u01f8\u01fb\u01fe\u0204\u0208\u020c\u0210\u0213"+ - "\u0216\u021f\u0224\u022b\u022f\u0234\u0237"; + "\3\24\3\24\3\24\3\24\3\24\5\24\u0127\n\24\7\24\u0129\n\24\f\24\16\24\u012c"+ + "\13\24\3\25\3\25\3\25\5\25\u0131\n\25\3\25\3\25\3\26\3\26\5\26\u0137\n"+ + "\26\3\26\3\26\5\26\u013b\n\26\3\26\3\26\3\27\3\27\5\27\u0141\n\27\3\27"+ + "\3\27\5\27\u0145\n\27\3\27\3\27\3\30\3\30\3\30\7\30\u014c\n\30\f\30\16"+ + "\30\u014f\13\30\3\31\3\31\5\31\u0153\n\31\3\32\3\32\3\33\3\33\3\34\3\34"+ + "\3\35\3\35\3\35\6\35\u015e\n\35\r\35\16\35\u015f\3\36\3\36\3\37\3\37\3"+ + " \3 \5 \u0168\n \3!\3!\3\"\3\"\3#\3#\3#\3#\7#\u0172\n#\f#\16#\u0175\13"+ + "#\3#\3#\3$\3$\3%\3%\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\5\'\u0185\n\'\3(\3("+ + "\3(\3)\3)\3)\3)\5)\u018e\n)\3)\3)\5)\u0192\n)\3)\3)\3)\3*\3*\3*\3+\3+"+ + "\3+\3+\7+\u019e\n+\f+\16+\u01a1\13+\3+\3+\3,\3,\3,\7,\u01a8\n,\f,\16,"+ + "\u01ab\13,\3-\3-\3-\3-\3.\3.\3.\7.\u01b4\n.\f.\16.\u01b7\13.\3/\3/\3/"+ + "\3/\5/\u01bd\n/\3/\3/\3/\3/\3/\5/\u01c4\n/\3/\3/\3/\3/\5/\u01ca\n/\3/"+ + "\3/\3/\5/\u01cf\n/\3\60\3\60\3\60\3\61\3\61\3\61\7\61\u01d7\n\61\f\61"+ + "\16\61\u01da\13\61\3\62\3\62\3\62\3\62\3\62\3\62\5\62\u01e2\n\62\3\63"+ + "\3\63\3\63\7\63\u01e7\n\63\f\63\16\63\u01ea\13\63\3\64\3\64\3\64\7\64"+ + "\u01ef\n\64\f\64\16\64\u01f2\13\64\3\65\3\65\3\65\3\65\5\65\u01f8\n\65"+ + "\3\66\3\66\3\66\5\66\u01fd\n\66\3\66\3\66\5\66\u0201\n\66\3\66\5\66\u0204"+ + "\n\66\3\66\5\66\u0207\n\66\3\66\3\66\3\67\3\67\5\67\u020d\n\67\3\67\3"+ + "\67\5\67\u0211\n\67\38\38\58\u0215\n8\38\38\58\u0219\n8\38\58\u021c\n"+ + "8\38\58\u021f\n8\38\38\39\39\3:\3:\3:\5:\u0228\n:\3:\3:\3:\5:\u022d\n"+ + ":\3:\3:\3;\3;\3;\5;\u0234\n;\3;\3;\5;\u0238\n;\3<\3<\3<\5<\u023d\n<\3"+ + "<\5<\u0240\n<\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:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtv\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\63\3\2\64\65\3\2C"+ + "H\3\2IL\3\2pr\3\2NO\3\2Ze\2\u0272\2|\3\2\2\2\4\u0083\3\2\2\2\6\u0085\3"+ + "\2\2\2\b\u00a3\3\2\2\2\n\u00a5\3\2\2\2\f\u00a8\3\2\2\2\16\u00ae\3\2\2"+ + "\2\20\u00bf\3\2\2\2\22\u00c1\3\2\2\2\24\u00c7\3\2\2\2\26\u00cf\3\2\2\2"+ + "\30\u00d2\3\2\2\2\32\u00d5\3\2\2\2\34\u00d7\3\2\2\2\36\u00df\3\2\2\2 "+ + "\u00e3\3\2\2\2\"\u00ea\3\2\2\2$\u00ec\3\2\2\2&\u00fe\3\2\2\2(\u0130\3"+ + "\2\2\2*\u0136\3\2\2\2,\u0140\3\2\2\2.\u0148\3\2\2\2\60\u0150\3\2\2\2\62"+ + "\u0154\3\2\2\2\64\u0156\3\2\2\2\66\u0158\3\2\2\28\u015a\3\2\2\2:\u0161"+ + "\3\2\2\2<\u0163\3\2\2\2>\u0165\3\2\2\2@\u0169\3\2\2\2B\u016b\3\2\2\2D"+ + "\u016d\3\2\2\2F\u0178\3\2\2\2H\u017a\3\2\2\2J\u017c\3\2\2\2L\u0184\3\2"+ + "\2\2N\u0186\3\2\2\2P\u0189\3\2\2\2R\u0196\3\2\2\2T\u0199\3\2\2\2V\u01a4"+ + "\3\2\2\2X\u01ac\3\2\2\2Z\u01b0\3\2\2\2\\\u01b8\3\2\2\2^\u01d0\3\2\2\2"+ + "`\u01d3\3\2\2\2b\u01db\3\2\2\2d\u01e3\3\2\2\2f\u01eb\3\2\2\2h\u01f3\3"+ + "\2\2\2j\u01f9\3\2\2\2l\u020a\3\2\2\2n\u0212\3\2\2\2p\u0222\3\2\2\2r\u0224"+ + "\3\2\2\2t\u0230\3\2\2\2v\u0239\3\2\2\2x{\5\4\3\2y{\7n\2\2zx\3\2\2\2zy"+ + "\3\2\2\2{~\3\2\2\2|z\3\2\2\2|}\3\2\2\2}\177\3\2\2\2~|\3\2\2\2\177\u0080"+ + "\7\2\2\3\u0080\3\3\2\2\2\u0081\u0084\5\16\b\2\u0082\u0084\5\6\4\2\u0083"+ + "\u0081\3\2\2\2\u0083\u0082\3\2\2\2\u0084\5\3\2\2\2\u0085\u0086\7\3\2\2"+ + "\u0086\u0088\5\66\34\2\u0087\u0089\5> \2\u0088\u0087\3\2\2\2\u0088\u0089"+ + "\3\2\2\2\u0089\u008a\3\2\2\2\u008a\u008b\5T+\2\u008b\u008c\7n\2\2\u008c"+ + "\7\3\2\2\2\u008d\u00a4\5\16\b\2\u008e\u00a4\5\24\13\2\u008f\u00a4\5\22"+ + "\n\2\u0090\u00a4\5\26\f\2\u0091\u00a4\5\30\r\2\u0092\u00a4\5\36\20\2\u0093"+ + "\u00a4\5 \21\2\u0094\u00a4\5\f\7\2\u0095\u00a4\5$\23\2\u0096\u00a4\5,"+ + "\27\2\u0097\u00a4\5j\66\2\u0098\u00a4\5n8\2\u0099\u00a4\5P)\2\u009a\u00a4"+ + "\5\\/\2\u009b\u00a4\5N(\2\u009c\u00a4\5\60\31\2\u009d\u00a4\5r:\2\u009e"+ + "\u00a4\5t;\2\u009f\u00a4\5v<\2\u00a0\u00a4\5\62\32\2\u00a1\u00a4\5\64"+ + "\33\2\u00a2\u00a4\5\n\6\2\u00a3\u008d\3\2\2\2\u00a3\u008e\3\2\2\2\u00a3"+ + "\u008f\3\2\2\2\u00a3\u0090\3\2\2\2\u00a3\u0091\3\2\2\2\u00a3\u0092\3\2"+ + "\2\2\u00a3\u0093\3\2\2\2\u00a3\u0094\3\2\2\2\u00a3\u0095\3\2\2\2\u00a3"+ + "\u0096\3\2\2\2\u00a3\u0097\3\2\2\2\u00a3\u0098\3\2\2\2\u00a3\u0099\3\2"+ + "\2\2\u00a3\u009a\3\2\2\2\u00a3\u009b\3\2\2\2\u00a3\u009c\3\2\2\2\u00a3"+ + "\u009d\3\2\2\2\u00a3\u009e\3\2\2\2\u00a3\u009f\3\2\2\2\u00a3\u00a0\3\2"+ + "\2\2\u00a3\u00a1\3\2\2\2\u00a3\u00a2\3\2\2\2\u00a4\t\3\2\2\2\u00a5\u00a6"+ + "\5\66\34\2\u00a6\u00a7\7\4\2\2\u00a7\13\3\2\2\2\u00a8\u00ac\7\5\2\2\u00a9"+ + "\u00ad\5> \2\u00aa\u00ad\5\66\34\2\u00ab\u00ad\58\35\2\u00ac\u00a9\3\2"+ + "\2\2\u00ac\u00aa\3\2\2\2\u00ac\u00ab\3\2\2\2\u00ad\r\3\2\2\2\u00ae\u00ba"+ + "\t\2\2\2\u00af\u00b1\5\20\t\2\u00b0\u00af\3\2\2\2\u00b0\u00b1\3\2\2\2"+ + "\u00b1\u00bb\3\2\2\2\u00b2\u00b7\5\20\t\2\u00b3\u00b4\7\17\2\2\u00b4\u00b6"+ + "\5\20\t\2\u00b5\u00b3\3\2\2\2\u00b6\u00b9\3\2\2\2\u00b7\u00b5\3\2\2\2"+ + "\u00b7\u00b8\3\2\2\2\u00b8\u00bb\3\2\2\2\u00b9\u00b7\3\2\2\2\u00ba\u00b0"+ + "\3\2\2\2\u00ba\u00b2\3\2\2\2\u00bb\17\3\2\2\2\u00bc\u00c0\5F$\2\u00bd"+ + "\u00c0\5\66\34\2\u00be\u00c0\5> \2\u00bf\u00bc\3\2\2\2\u00bf\u00bd\3\2"+ + "\2\2\u00bf\u00be\3\2\2\2\u00c0\21\3\2\2\2\u00c1\u00c3\5\32\16\2\u00c2"+ + "\u00c4\5\34\17\2\u00c3\u00c2\3\2\2\2\u00c3\u00c4\3\2\2\2\u00c4\u00c5\3"+ + "\2\2\2\u00c5\u00c6\5\66\34\2\u00c6\23\3\2\2\2\u00c7\u00c9\5\32\16\2\u00c8"+ + "\u00ca\5\34\17\2\u00c9\u00c8\3\2\2\2\u00c9\u00ca\3\2\2\2\u00ca\u00cb\3"+ + "\2\2\2\u00cb\u00cc\5\66\34\2\u00cc\u00cd\7\20\2\2\u00cd\u00ce\5&\24\2"+ + "\u00ce\25\3\2\2\2\u00cf\u00d0\7\21\2\2\u00d0\u00d1\5\24\13\2\u00d1\27"+ + "\3\2\2\2\u00d2\u00d3\7\22\2\2\u00d3\u00d4\5\24\13\2\u00d4\31\3\2\2\2\u00d5"+ + "\u00d6\t\3\2\2\u00d6\33\3\2\2\2\u00d7\u00d8\7\32\2\2\u00d8\u00db\5&\24"+ + "\2\u00d9\u00da\7\17\2\2\u00da\u00dc\5&\24\2\u00db\u00d9\3\2\2\2\u00db"+ + "\u00dc\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd\u00de\7\33\2\2\u00de\35\3\2\2"+ + "\2\u00df\u00e0\5\"\22\2\u00e0\u00e1\7\20\2\2\u00e1\u00e2\5&\24\2\u00e2"+ + "\37\3\2\2\2\u00e3\u00e4\5\"\22\2\u00e4\u00e5\t\4\2\2\u00e5\u00e6\5&\24"+ + "\2\u00e6!\3\2\2\2\u00e7\u00eb\5:\36\2\u00e8\u00eb\5\66\34\2\u00e9\u00eb"+ + "\58\35\2\u00ea\u00e7\3\2\2\2\u00ea\u00e8\3\2\2\2\u00ea\u00e9\3\2\2\2\u00eb"+ + "#\3\2\2\2\u00ec\u00ed\5\"\22\2\u00ed\u00ee\t\5\2\2\u00ee%\3\2\2\2\u00ef"+ + "\u00f0\b\24\1\2\u00f0\u00f1\7\'\2\2\u00f1\u00f2\5&\24\2\u00f2\u00f3\7"+ + "(\2\2\u00f3\u00ff\3\2\2\2\u00f4\u00ff\5*\26\2\u00f5\u00f6\t\6\2\2\u00f6"+ + "\u00ff\5&\24\25\u00f7\u00f8\7>\2\2\u00f8\u00ff\5&\24\b\u00f9\u00ff\5L"+ + "\'\2\u00fa\u00ff\5:\36\2\u00fb\u00ff\5\66\34\2\u00fc\u00ff\58\35\2\u00fd"+ + "\u00ff\5(\25\2\u00fe\u00ef\3\2\2\2\u00fe\u00f4\3\2\2\2\u00fe\u00f5\3\2"+ + "\2\2\u00fe\u00f7\3\2\2\2\u00fe\u00f9\3\2\2\2\u00fe\u00fa\3\2\2\2\u00fe"+ + "\u00fb\3\2\2\2\u00fe\u00fc\3\2\2\2\u00fe\u00fd\3\2\2\2\u00ff\u012a\3\2"+ + "\2\2\u0100\u0101\f\24\2\2\u0101\u0102\7+\2\2\u0102\u0129\5&\24\25\u0103"+ + "\u0104\f\23\2\2\u0104\u0105\t\7\2\2\u0105\u0129\5&\24\24\u0106\u0107\f"+ + "\22\2\2\u0107\u0108\t\b\2\2\u0108\u0129\5&\24\23\u0109\u010a\f\21\2\2"+ + "\u010a\u010b\t\t\2\2\u010b\u0129\5&\24\22\u010c\u010d\f\20\2\2\u010d\u010e"+ + "\t\n\2\2\u010e\u0129\5&\24\21\u010f\u0110\f\17\2\2\u0110\u0111\7\66\2"+ + "\2\u0111\u0129\5&\24\20\u0112\u0113\f\16\2\2\u0113\u0114\7\67\2\2\u0114"+ + "\u0129\5&\24\17\u0115\u0116\f\r\2\2\u0116\u0117\78\2\2\u0117\u0129\5&"+ + "\24\16\u0118\u0119\f\13\2\2\u0119\u011a\7;\2\2\u011a\u0129\5&\24\f\u011b"+ + "\u011c\f\n\2\2\u011c\u011d\7<\2\2\u011d\u0129\5&\24\13\u011e\u011f\f\t"+ + "\2\2\u011f\u0120\7=\2\2\u0120\u0129\5&\24\n\u0121\u0122\f\f\2\2\u0122"+ + "\u0123\79\2\2\u0123\u0126\5&\24\2\u0124\u0125\7:\2\2\u0125\u0127\5&\24"+ + "\2\u0126\u0124\3\2\2\2\u0126\u0127\3\2\2\2\u0127\u0129\3\2\2\2\u0128\u0100"+ + "\3\2\2\2\u0128\u0103\3\2\2\2\u0128\u0106\3\2\2\2\u0128\u0109\3\2\2\2\u0128"+ + "\u010c\3\2\2\2\u0128\u010f\3\2\2\2\u0128\u0112\3\2\2\2\u0128\u0115\3\2"+ + "\2\2\u0128\u0118\3\2\2\2\u0128\u011b\3\2\2\2\u0128\u011e\3\2\2\2\u0128"+ + "\u0121\3\2\2\2\u0129\u012c\3\2\2\2\u012a\u0128\3\2\2\2\u012a\u012b\3\2"+ + "\2\2\u012b\'\3\2\2\2\u012c\u012a\3\2\2\2\u012d\u0131\5\66\34\2\u012e\u0131"+ + "\58\35\2\u012f\u0131\5:\36\2\u0130\u012d\3\2\2\2\u0130\u012e\3\2\2\2\u0130"+ + "\u012f\3\2\2\2\u0131\u0132\3\2\2\2\u0132\u0133\5\34\17\2\u0133)\3\2\2"+ + "\2\u0134\u0137\5\66\34\2\u0135\u0137\58\35\2\u0136\u0134\3\2\2\2\u0136"+ + "\u0135\3\2\2\2\u0137\u0138\3\2\2\2\u0138\u013a\7\'\2\2\u0139\u013b\5."+ + "\30\2\u013a\u0139\3\2\2\2\u013a\u013b\3\2\2\2\u013b\u013c\3\2\2\2\u013c"+ + "\u013d\7(\2\2\u013d+\3\2\2\2\u013e\u0141\5\66\34\2\u013f\u0141\58\35\2"+ + "\u0140\u013e\3\2\2\2\u0140\u013f\3\2\2\2\u0141\u0142\3\2\2\2\u0142\u0144"+ + "\7\'\2\2\u0143\u0145\5.\30\2\u0144\u0143\3\2\2\2\u0144\u0145\3\2\2\2\u0145"+ + "\u0146\3\2\2\2\u0146\u0147\7(\2\2\u0147-\3\2\2\2\u0148\u014d\5&\24\2\u0149"+ + "\u014a\7\17\2\2\u014a\u014c\5&\24\2\u014b\u0149\3\2\2\2\u014c\u014f\3"+ + "\2\2\2\u014d\u014b\3\2\2\2\u014d\u014e\3\2\2\2\u014e/\3\2\2\2\u014f\u014d"+ + "\3\2\2\2\u0150\u0152\7?\2\2\u0151\u0153\5.\30\2\u0152\u0151\3\2\2\2\u0152"+ + "\u0153\3\2\2\2\u0153\61\3\2\2\2\u0154\u0155\7@\2\2\u0155\63\3\2\2\2\u0156"+ + "\u0157\7A\2\2\u0157\65\3\2\2\2\u0158\u0159\7o\2\2\u0159\67\3\2\2\2\u015a"+ + "\u015d\7o\2\2\u015b\u015c\7B\2\2\u015c\u015e\7o\2\2\u015d\u015b\3\2\2"+ + "\2\u015e\u015f\3\2\2\2\u015f\u015d\3\2\2\2\u015f\u0160\3\2\2\2\u01609"+ + "\3\2\2\2\u0161\u0162\t\13\2\2\u0162;\3\2\2\2\u0163\u0164\t\f\2\2\u0164"+ + "=\3\2\2\2\u0165\u0167\t\r\2\2\u0166\u0168\5@!\2\u0167\u0166\3\2\2\2\u0167"+ + "\u0168\3\2\2\2\u0168?\3\2\2\2\u0169\u016a\7M\2\2\u016aA\3\2\2\2\u016b"+ + "\u016c\t\16\2\2\u016cC\3\2\2\2\u016d\u016e\7\32\2\2\u016e\u0173\5&\24"+ + "\2\u016f\u0170\7\17\2\2\u0170\u0172\5&\24\2\u0171\u016f\3\2\2\2\u0172"+ + "\u0175\3\2\2\2\u0173\u0171\3\2\2\2\u0173\u0174\3\2\2\2\u0174\u0176\3\2"+ + "\2\2\u0175\u0173\3\2\2\2\u0176\u0177\7\33\2\2\u0177E\3\2\2\2\u0178\u0179"+ + "\7t\2\2\u0179G\3\2\2\2\u017a\u017b\7v\2\2\u017bI\3\2\2\2\u017c\u017d\7"+ + "s\2\2\u017dK\3\2\2\2\u017e\u0185\5> \2\u017f\u0185\5B\"\2\u0180\u0185"+ + "\5D#\2\u0181\u0185\5F$\2\u0182\u0185\5H%\2\u0183\u0185\5J&\2\u0184\u017e"+ + "\3\2\2\2\u0184\u017f\3\2\2\2\u0184\u0180\3\2\2\2\u0184\u0181\3\2\2\2\u0184"+ + "\u0182\3\2\2\2\u0184\u0183\3\2\2\2\u0185M\3\2\2\2\u0186\u0187\7P\2\2\u0187"+ + "\u0188\7u\2\2\u0188O\3\2\2\2\u0189\u018a\7Q\2\2\u018a\u018b\5\66\34\2"+ + "\u018b\u018d\7\'\2\2\u018c\u018e\5V,\2\u018d\u018c\3\2\2\2\u018d\u018e"+ + "\3\2\2\2\u018e\u018f\3\2\2\2\u018f\u0191\7(\2\2\u0190\u0192\5R*\2\u0191"+ + "\u0190\3\2\2\2\u0191\u0192\3\2\2\2\u0192\u0193\3\2\2\2\u0193\u0194\5T"+ + "+\2\u0194\u0195\7n\2\2\u0195Q\3\2\2\2\u0196\u0197\7R\2\2\u0197\u0198\5"+ + "Z.\2\u0198S\3\2\2\2\u0199\u019a\7S\2\2\u019a\u019f\7n\2\2\u019b\u019e"+ + "\5\b\5\2\u019c\u019e\7n\2\2\u019d\u019b\3\2\2\2\u019d\u019c\3\2\2\2\u019e"+ + "\u01a1\3\2\2\2\u019f\u019d\3\2\2\2\u019f\u01a0\3\2\2\2\u01a0\u01a2\3\2"+ + "\2\2\u01a1\u019f\3\2\2\2\u01a2\u01a3\7T\2\2\u01a3U\3\2\2\2\u01a4\u01a9"+ + "\5X-\2\u01a5\u01a6\7\17\2\2\u01a6\u01a8\5X-\2\u01a7\u01a5\3\2\2\2\u01a8"+ + "\u01ab\3\2\2\2\u01a9\u01a7\3\2\2\2\u01a9\u01aa\3\2\2\2\u01aaW\3\2\2\2"+ + "\u01ab\u01a9\3\2\2\2\u01ac\u01ad\5\66\34\2\u01ad\u01ae\7\4\2\2\u01ae\u01af"+ + "\5\32\16\2\u01afY\3\2\2\2\u01b0\u01b5\5\32\16\2\u01b1\u01b2\7\17\2\2\u01b2"+ + "\u01b4\5\32\16\2\u01b3\u01b1\3\2\2\2\u01b4\u01b7\3\2\2\2\u01b5\u01b3\3"+ + "\2\2\2\u01b5\u01b6\3\2\2\2\u01b6[\3\2\2\2\u01b7\u01b5\3\2\2\2\u01b8\u01b9"+ + "\7U\2\2\u01b9\u01ba\5\66\34\2\u01ba\u01bc\7\'\2\2\u01bb\u01bd\5`\61\2"+ + "\u01bc\u01bb\3\2\2\2\u01bc\u01bd\3\2\2\2\u01bd\u01be\3\2\2\2\u01be\u01bf"+ + "\7(\2\2\u01bf\u01c0\7R\2\2\u01c0\u01c1\7V\2\2\u01c1\u01c3\7\'\2\2\u01c2"+ + "\u01c4\5d\63\2\u01c3\u01c2\3\2\2\2\u01c3\u01c4\3\2\2\2\u01c4\u01c5\3\2"+ + "\2\2\u01c5\u01c6\7(\2\2\u01c6\u01c7\7R\2\2\u01c7\u01c9\7\'\2\2\u01c8\u01ca"+ + "\5f\64\2\u01c9\u01c8\3\2\2\2\u01c9\u01ca\3\2\2\2\u01ca\u01cb\3\2\2\2\u01cb"+ + "\u01ce\7(\2\2\u01cc\u01cf\5^\60\2\u01cd\u01cf\5T+\2\u01ce\u01cc\3\2\2"+ + "\2\u01ce\u01cd\3\2\2\2\u01cf]\3\2\2\2\u01d0\u01d1\7\20\2\2\u01d1\u01d2"+ + "\5> \2\u01d2_\3\2\2\2\u01d3\u01d8\5b\62\2\u01d4\u01d5\7\17\2\2\u01d5\u01d7"+ + "\5b\62\2\u01d6\u01d4\3\2\2\2\u01d7\u01da\3\2\2\2\u01d8\u01d6\3\2\2\2\u01d8"+ + "\u01d9\3\2\2\2\u01d9a\3\2\2\2\u01da\u01d8\3\2\2\2\u01db\u01dc\5\66\34"+ + "\2\u01dc\u01dd\7\4\2\2\u01dd\u01de\5\32\16\2\u01de\u01e1\7W\2\2\u01df"+ + "\u01e2\5:\36\2\u01e0\u01e2\5<\37\2\u01e1\u01df\3\2\2\2\u01e1\u01e0\3\2"+ + "\2\2\u01e2c\3\2\2\2\u01e3\u01e8\5:\36\2\u01e4\u01e5\7\17\2\2\u01e5\u01e7"+ + "\5:\36\2\u01e6\u01e4\3\2\2\2\u01e7\u01ea\3\2\2\2\u01e8\u01e6\3\2\2\2\u01e8"+ + "\u01e9\3\2\2\2\u01e9e\3\2\2\2\u01ea\u01e8\3\2\2\2\u01eb\u01f0\5h\65\2"+ + "\u01ec\u01ed\7\17\2\2\u01ed\u01ef\5h\65\2\u01ee\u01ec\3\2\2\2\u01ef\u01f2"+ + "\3\2\2\2\u01f0\u01ee\3\2\2\2\u01f0\u01f1\3\2\2\2\u01f1g\3\2\2\2\u01f2"+ + "\u01f0\3\2\2\2\u01f3\u01f4\5\32\16\2\u01f4\u01f7\7W\2\2\u01f5\u01f8\5"+ + ":\36\2\u01f6\u01f8\5<\37\2\u01f7\u01f5\3\2\2\2\u01f7\u01f6\3\2\2\2\u01f8"+ + "i\3\2\2\2\u01f9\u01fa\7X\2\2\u01fa\u01fc\5&\24\2\u01fb\u01fd\7n\2\2\u01fc"+ + "\u01fb\3\2\2\2\u01fc\u01fd\3\2\2\2\u01fd\u0200\3\2\2\2\u01fe\u0201\5\b"+ + "\5\2\u01ff\u0201\5T+\2\u0200\u01fe\3\2\2\2\u0200\u01ff\3\2\2\2\u0201\u0203"+ + "\3\2\2\2\u0202\u0204\7n\2\2\u0203\u0202\3\2\2\2\u0203\u0204\3\2\2\2\u0204"+ + "\u0206\3\2\2\2\u0205\u0207\5l\67\2\u0206\u0205\3\2\2\2\u0206\u0207\3\2"+ + "\2\2\u0207\u0208\3\2\2\2\u0208\u0209\7n\2\2\u0209k\3\2\2\2\u020a\u020c"+ + "\7Y\2\2\u020b\u020d\7n\2\2\u020c\u020b\3\2\2\2\u020c\u020d\3\2\2\2\u020d"+ + "\u0210\3\2\2\2\u020e\u0211\5\b\5\2\u020f\u0211\5T+\2\u0210\u020e\3\2\2"+ + "\2\u0210\u020f\3\2\2\2\u0211m\3\2\2\2\u0212\u0214\5p9\2\u0213\u0215\7"+ + "n\2\2\u0214\u0213\3\2\2\2\u0214\u0215\3\2\2\2\u0215\u0218\3\2\2\2\u0216"+ + "\u0219\5\b\5\2\u0217\u0219\5T+\2\u0218\u0216\3\2\2\2\u0218\u0217\3\2\2"+ + "\2\u0219\u021b\3\2\2\2\u021a\u021c\7n\2\2\u021b\u021a\3\2\2\2\u021b\u021c"+ + "\3\2\2\2\u021c\u021e\3\2\2\2\u021d\u021f\5l\67\2\u021e\u021d\3\2\2\2\u021e"+ + "\u021f\3\2\2\2\u021f\u0220\3\2\2\2\u0220\u0221\7n\2\2\u0221o\3\2\2\2\u0222"+ + "\u0223\t\17\2\2\u0223q\3\2\2\2\u0224\u0227\7f\2\2\u0225\u0228\5:\36\2"+ + "\u0226\u0228\5\66\34\2\u0227\u0225\3\2\2\2\u0227\u0226\3\2\2\2\u0228\u0229"+ + "\3\2\2\2\u0229\u022a\7g\2\2\u022a\u022c\5&\24\2\u022b\u022d\7n\2\2\u022c"+ + "\u022b\3\2\2\2\u022c\u022d\3\2\2\2\u022d\u022e\3\2\2\2\u022e\u022f\5T"+ + "+\2\u022fs\3\2\2\2\u0230\u0231\7h\2\2\u0231\u0233\5&\24\2\u0232\u0234"+ + "\7n\2\2\u0233\u0232\3\2\2\2\u0233\u0234\3\2\2\2\u0234\u0237\3\2\2\2\u0235"+ + "\u0238\5\b\5\2\u0236\u0238\5T+\2\u0237\u0235\3\2\2\2\u0237\u0236\3\2\2"+ + "\2\u0238u\3\2\2\2\u0239\u023c\7i\2\2\u023a\u023d\5\b\5\2\u023b\u023d\5"+ + "T+\2\u023c\u023a\3\2\2\2\u023c\u023b\3\2\2\2\u023d\u023f\3\2\2\2\u023e"+ + "\u0240\7n\2\2\u023f\u023e\3\2\2\2\u023f\u0240\3\2\2\2\u0240\u0241\3\2"+ + "\2\2\u0241\u0242\7j\2\2\u0242\u0243\5&\24\2\u0243w\3\2\2\2>z|\u0083\u0088"+ + "\u00a3\u00ac\u00b0\u00b7\u00ba\u00bf\u00c3\u00c9\u00db\u00ea\u00fe\u0126"+ + "\u0128\u012a\u0130\u0136\u013a\u0140\u0144\u014d\u0152\u015f\u0167\u0173"+ + "\u0184\u018d\u0191\u019d\u019f\u01a9\u01b5\u01bc\u01c3\u01c9\u01ce\u01d8"+ + "\u01e1\u01e8\u01f0\u01f7\u01fc\u0200\u0203\u0206\u020c\u0210\u0214\u0218"+ + "\u021b\u021e\u0227\u022c\u0233\u0237\u023c\u023f"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/compiler/src/prog8/stackvm/Program.kt b/compiler/src/prog8/stackvm/Program.kt index dabaad6e1..0568638b4 100644 --- a/compiler/src/prog8/stackvm/Program.kt +++ b/compiler/src/prog8/stackvm/Program.kt @@ -101,7 +101,8 @@ class Program (val name: String, } Opcode.INC_VAR, Opcode.DEC_VAR, Opcode.SHR_VAR, Opcode.SHL_VAR, Opcode.ROL_VAR, Opcode.ROR_VAR, - Opcode.ROL2_VAR, Opcode.ROR2_VAR, Opcode.POP_VAR, Opcode.PUSH_VAR -> { + Opcode.ROL2_VAR, Opcode.ROR2_VAR, Opcode.POP_VAR, Opcode.PUSH_VAR, + Opcode.PUSH_INDEXED_VAR -> { val withoutQuotes = if(args!!.startsWith('"') && args.endsWith('"')) args.substring(1, args.length-1) else args diff --git a/compiler/src/prog8/stackvm/StackVm.kt b/compiler/src/prog8/stackvm/StackVm.kt index d1d3a7eb3..932c1aee2 100644 --- a/compiler/src/prog8/stackvm/StackVm.kt +++ b/compiler/src/prog8/stackvm/StackVm.kt @@ -93,6 +93,9 @@ enum class Opcode { EQUAL, NOTEQUAL, + // array access + PUSH_INDEXED_VAR, + // branching JUMP, BCS, @@ -905,6 +908,23 @@ class StackVm(private var traceOutputFile: String?) { Opcode.LINE -> { sourceLine = ins.callLabel!! } + Opcode.PUSH_INDEXED_VAR -> { + val index = evalstack.pop().integerValue() + val variable = variables[ins.callLabel] ?: throw VmExecutionException("unknown variable: ${ins.callLabel}") + if(variable.type==DataType.WORD) { + // assume the variable is a pointer (address) and get the byte value from that memory location + evalstack.push(Value(DataType.BYTE, mem.getByte(variable.integerValue()))) + } else { + // get indexed element from the array + val array = heap.get(variable.heapId) + val result = array.array!![index] + when(array.type) { + DataType.ARRAY, DataType.MATRIX -> evalstack.push(Value(DataType.BYTE, result)) + DataType.ARRAY_W -> evalstack.push(Value(DataType.WORD, result)) + else -> throw VmExecutionException("not a proper array/matrix var") + } + } + } else -> throw VmExecutionException("unimplemented opcode: ${ins.opcode}") } diff --git a/docs/source/programming.rst b/docs/source/programming.rst index 0c7b7944a..a672a19fc 100644 --- a/docs/source/programming.rst +++ b/docs/source/programming.rst @@ -182,11 +182,15 @@ Values will usually be part of an expression or assignment statement:: Array and Matrix (2-dimensional array) types are also supported like this:: - byte[4] array = [1, 2, 3, 4] ; initialize the array - byte[99] array = 255 ; initialize array with all 255's [255, 255, 255, 255, ...] - byte[100] array = 100 to 199 ; initialize array with [100, 101, ..., 198, 199] - byte[2,3] matrix = 1 ; a matrix of 2*3=6 bytes all with value 1 - byte[2,3] matrix = [1,2,3,4,5,6] ; a 2*3 matrix with value |(1,2) (3,4) (5,6)| + byte[4] array = [1, 2, 3, 4] ; initialize the array + byte[99] array = 255 ; initialize array with all 255's [255, 255, 255, 255, ...] + byte[100] array = 100 to 199 ; initialize array with [100, 101, ..., 198, 199] + byte[2,3] matrix = 1 ; a matrix of 2*3=6 bytes all with value 1 + byte[2,3] matrix = [1,2,3,4,5,6] ; a 2*3 matrix with value |(1,2) (3,4) (5,6)| + + value = array[3] ; the fourth value in the array (index is 0-based) + value = matrix[4,2] ; the byte at the 5th column and 3rd row in the matrix + char = string[4] ; the fifth character (=byte) in the string Note that the various keywords for the data type and variable type (``byte``, ``word``, ``const``, etc.) diff --git a/docs/source/syntaxreference.rst b/docs/source/syntaxreference.rst index 0fa518e2c..3fc9aff1e 100644 --- a/docs/source/syntaxreference.rst +++ b/docs/source/syntaxreference.rst @@ -315,8 +315,17 @@ If used in the place of a literal value, it expands into the actual array of val byte[100] array = 100 to 199 ; initialize array with [100, 101, ..., 198, 199] -.. todo:: - this may be used later in the for-loop as well. Add 'step' to range expression? +Array indexing +^^^^^^^^^^^^^^ + +Strings, arrays and matrixes form a sequence of values. You can access the individual values by +indexing into the array. +Syntax is familiar with brackets: ``arrayvar[x]`` or ``matrixvar[x, y]`` :: + + array[2] ; the third byte in the array (index is 0-based) + matrix[4,2] ; the byte at the 5th column and 3rd row in the matrix + string[4] ; the fifth character (=byte) in the string + Operators @@ -374,14 +383,6 @@ range creation: ``to`` } -.. todo:: - array indexing: ``[`` *index* ``]`` - When put after a sequence type (array, string or matrix) it means to point to the given element in that sequence:: - - array[2] ; the third byte in the array (index is 0-based) - matrix[4,2] ; the byte at the 5th column and 3rd row in the matrix - - precedence grouping in expressions, or subroutine parameter list: ``(`` *expression* ``)`` Parentheses are used to group parts of an expression to change the order of evaluation. (the subexpression inside the parentheses will be evaluated first): @@ -427,14 +428,8 @@ The open curly brace must immediately follow the subroutine result specification and can have nothing following it. The close curly brace must be on its own line as well. .. todo:: - Pre-defined subroutines that are available on specific memory addresses - (in system ROM for instance) can be defined by assigning the routine's memory address to the sub, - and not specifying a code block:: - - sub ([proc_parameters]) -> [proc_results] =
- - ; example: - sub CLOSE (logical: A) -> (A?, X?, Y?) = $FFC3 + asmsub with assigning memory address to refer to predefined ROM subroutines + asmsub with a regular body to precisely control what registers are used to call the subroutine .. data:: parameters