diff --git a/il65/antlr/il65.g4 b/il65/antlr/il65.g4 index 8831afff9..d86bd4b95 100644 --- a/il65/antlr/il65.g4 +++ b/il65/antlr/il65.g4 @@ -62,6 +62,7 @@ statement : | augassignment | unconditionaljump | postincrdecr + | subroutine | inlineasm | labeldef | returnstmt @@ -170,3 +171,18 @@ literalvalue : ; inlineasm : '%asm' INLINEASMBLOCK; + + +subroutine : + 'sub' identifier '(' sub_params? ')' '->' '(' sub_returns? ')' '{' EOL + (statement | EOL) * + '}' EOL + ; + +sub_params : sub_param (',' sub_param)* ; + +sub_param: identifier ':' register ; + +sub_returns : '?' | ( sub_return (',' sub_return)* ) ; + +sub_return: register '?'? ; diff --git a/il65/src/il65/ast/AST.kt b/il65/src/il65/ast/AST.kt index 35964ba79..15fb8bd58 100644 --- a/il65/src/il65/ast/AST.kt +++ b/il65/src/il65/ast/AST.kt @@ -54,11 +54,12 @@ interface IAstProcessor { fun process(directive: Directive): IStatement fun process(block: Block): IStatement fun process(decl: VarDecl): IStatement + fun process(subroutine: Subroutine): IStatement } interface Node { - val position: Position? // optional for the sake of easy unit testing + var position: Position? // optional for the sake of easy unit testing var parent: Node? // will be linked correctly later fun linkParents(parent: Node) } @@ -437,9 +438,57 @@ data class InlineAssembly(val assembly: String) : IStatement { } +data class Subroutine(val name: String, + val parameters: List, + val returnvalues: List, + var statements: List) : IStatement { + override var position: Position? = null + override var parent: Node? = null + + override fun linkParents(parent: Node) { + this.parent = parent + parameters.forEach { it.parent=this } + returnvalues.forEach { it.parent=this } + statements.forEach { it.parent=this } + } + + override fun process(processor: IAstProcessor) = processor.process(this) +} + + +data class SubroutineParameter(val name: String, val register: Register) : Node { + override var position: Position? = null + override var parent: Node? = null + + override fun linkParents(parent: Node) { + this.parent = parent + } +} + + +data class SubroutineReturnvalue(val register: Register, val clobbered: Boolean) : Node { + override var position: Position? = null + override var parent: Node? = null + + override fun linkParents(parent: Node) { + this.parent = parent + } +} + + + /***************** Antlr Extension methods to create AST ****************/ -fun ParserRuleContext.toPosition(withPosition: Boolean) : Position? { +fun il65Parser.ModuleContext.toAst(name: String, withPosition: Boolean) : Module { + val module = Module(name, modulestatement().map { it.toAst(withPosition) }) + module.position = toPosition(withPosition) + return module +} + + +/************** Helper extesion methods (private) ************/ + +private fun ParserRuleContext.toPosition(withPosition: Boolean) : Position? { val file = Paths.get(this.start.inputStream.sourceName).fileName.toString() return if (withPosition) // note: be ware of TAB characters in the source text, they count as 1 column... @@ -449,14 +498,7 @@ fun ParserRuleContext.toPosition(withPosition: Boolean) : Position? { } -fun il65Parser.ModuleContext.toAst(name: String, withPosition: Boolean) : Module { - val module = Module(name, modulestatement().map { it.toAst(withPosition) }) - module.position = toPosition(withPosition) - return module -} - - -fun il65Parser.ModulestatementContext.toAst(withPosition: Boolean) : IStatement { +private fun il65Parser.ModulestatementContext.toAst(withPosition: Boolean) : IStatement { val directive = directive()?.toAst(withPosition) if(directive!=null) return directive @@ -467,7 +509,7 @@ fun il65Parser.ModulestatementContext.toAst(withPosition: Boolean) : IStatement } -fun il65Parser.BlockContext.toAst(withPosition: Boolean) : IStatement { +private fun il65Parser.BlockContext.toAst(withPosition: Boolean) : IStatement { val block= Block(identifier().text, integerliteral()?.toAst(), statement().map { it.toAst(withPosition) }) @@ -476,7 +518,7 @@ fun il65Parser.BlockContext.toAst(withPosition: Boolean) : IStatement { } -fun il65Parser.StatementContext.toAst(withPosition: Boolean) : IStatement { +private fun il65Parser.StatementContext.toAst(withPosition: Boolean) : IStatement { val vardecl = vardecl() if(vardecl!=null) { val decl= VarDecl(VarDeclType.VAR, @@ -550,36 +592,68 @@ fun il65Parser.StatementContext.toAst(withPosition: Boolean) : IStatement { val directive = directive()?.toAst(withPosition) if(directive!=null) return directive - val label=labeldef() - if(label!=null) { - val lbl = Label(label.text) - lbl.position = label.toPosition(withPosition) - return lbl - } + val label = labeldef()?.toAst(withPosition) + if(label!=null) return label - val jump = unconditionaljump() - if(jump!=null) { - val ast = Jump(jump.call_location().toAst(withPosition)) - ast.position = jump.toPosition(withPosition) - return ast - } + val jump = unconditionaljump()?.toAst(withPosition) + if(jump!=null) return jump val returnstmt = returnstmt() - if(returnstmt!=null) - return Return(returnstmt.expression_list().toAst(withPosition)) + if(returnstmt!=null) return Return(returnstmt.expression_list().toAst(withPosition)) - val asm = inlineasm() - if(asm!=null) { - val ast = InlineAssembly(asm.INLINEASMBLOCK().text) - ast.position = asm.toPosition(withPosition) - return ast - } + val sub = subroutine()?.toAst(withPosition) + if(sub!=null) return sub + + val asm = inlineasm()?.toAst(withPosition) + if(asm!=null) return asm throw UnsupportedOperationException(text) } -fun il65Parser.Call_locationContext.toAst(withPosition: Boolean) : CallTarget { +private fun il65Parser.InlineasmContext.toAst(withPosition: Boolean): IStatement { + val asm = InlineAssembly(INLINEASMBLOCK().text) + asm.position = toPosition(withPosition) + return asm +} + + +private fun il65Parser.UnconditionaljumpContext.toAst(withPosition: Boolean): IStatement { + val jump = Jump(call_location().toAst(withPosition)) + jump.position = toPosition(withPosition) + return jump +} + + +private fun il65Parser.LabeldefContext.toAst(withPosition: Boolean): IStatement { + val lbl = Label(text) + lbl.position = toPosition(withPosition) + return lbl +} + + +private fun il65Parser.SubroutineContext.toAst(withPosition: Boolean) : Subroutine { + val sub = Subroutine(identifier().text, + if(sub_params()==null) emptyList() else sub_params().toAst(withPosition), + if(sub_returns()==null) emptyList() else sub_returns().toAst(withPosition), + statement().map{ it.toAst(withPosition) }) + sub.position = toPosition(withPosition) + return sub +} + + +private fun il65Parser.Sub_paramsContext.toAst(withPosition: Boolean): List = + sub_param().map { SubroutineParameter(it.identifier().text, it.register().toAst()) } + + +private fun il65Parser.Sub_returnsContext.toAst(withPosition: Boolean): List = + sub_return().map { + val isClobber = it.childCount==2 && it.children[1].text == "?" + SubroutineReturnvalue(it.register().toAst(), isClobber) + } + + +private fun il65Parser.Call_locationContext.toAst(withPosition: Boolean) : CallTarget { val address = integerliteral()?.toAst() val identifier = identifier() val result = @@ -590,7 +664,7 @@ fun il65Parser.Call_locationContext.toAst(withPosition: Boolean) : CallTarget { } -fun il65Parser.Assign_targetContext.toAst(withPosition: Boolean) : AssignTarget { +private fun il65Parser.Assign_targetContext.toAst(withPosition: Boolean) : AssignTarget { val register = register()?.toAst() val identifier = identifier() val result = if(identifier!=null) @@ -602,13 +676,13 @@ fun il65Parser.Assign_targetContext.toAst(withPosition: Boolean) : AssignTarget } -fun il65Parser.RegisterContext.toAst() = Register.valueOf(text.toUpperCase()) +private fun il65Parser.RegisterContext.toAst() = Register.valueOf(text.toUpperCase()) -fun il65Parser.DatatypeContext.toAst() = DataType.valueOf(text.toUpperCase()) +private fun il65Parser.DatatypeContext.toAst() = DataType.valueOf(text.toUpperCase()) -fun il65Parser.ArrayspecContext.toAst(withPosition: Boolean) : ArraySpec { +private fun il65Parser.ArrayspecContext.toAst(withPosition: Boolean) : ArraySpec { val spec = ArraySpec( expression(0).toAst(withPosition), if (expression().size > 1) expression(1).toAst(withPosition) else null) @@ -617,14 +691,14 @@ fun il65Parser.ArrayspecContext.toAst(withPosition: Boolean) : ArraySpec { } -fun il65Parser.DirectiveContext.toAst(withPosition: Boolean) : Directive { +private fun il65Parser.DirectiveContext.toAst(withPosition: Boolean) : Directive { val dir = Directive(directivename.text, directivearg().map { it.toAst(withPosition) }) dir.position = toPosition(withPosition) return dir } -fun il65Parser.DirectiveargContext.toAst(withPosition: Boolean) : DirectiveArg { +private fun il65Parser.DirectiveargContext.toAst(withPosition: Boolean) : DirectiveArg { val darg = DirectiveArg(stringliteral()?.text, identifier()?.text, integerliteral()?.toAst()) @@ -633,7 +707,7 @@ fun il65Parser.DirectiveargContext.toAst(withPosition: Boolean) : DirectiveArg { } -fun il65Parser.IntegerliteralContext.toAst(): Int { +private fun il65Parser.IntegerliteralContext.toAst(): Int { val terminal: TerminalNode = children[0] as TerminalNode return when (terminal.symbol.type) { il65Parser.DEC_INTEGER -> text.toInt() @@ -644,7 +718,7 @@ fun il65Parser.IntegerliteralContext.toAst(): Int { } -fun il65Parser.ExpressionContext.toAst(withPosition: Boolean) : IExpression { +private fun il65Parser.ExpressionContext.toAst(withPosition: Boolean) : IExpression { val litval = literalvalue() if(litval!=null) { @@ -712,17 +786,17 @@ fun il65Parser.ExpressionContext.toAst(withPosition: Boolean) : IExpression { } -fun il65Parser.Expression_listContext.toAst(withPosition: Boolean) = expression().map{ it.toAst(withPosition) } +private fun il65Parser.Expression_listContext.toAst(withPosition: Boolean) = expression().map{ it.toAst(withPosition) } -fun il65Parser.IdentifierContext.toAst(withPosition: Boolean) : Identifier { +private fun il65Parser.IdentifierContext.toAst(withPosition: Boolean) : Identifier { val ident = Identifier(text, emptyList()) ident.position = toPosition(withPosition) return ident } -fun il65Parser.Scoped_identifierContext.toAst(withPosition: Boolean) : Identifier { +private fun il65Parser.Scoped_identifierContext.toAst(withPosition: Boolean) : Identifier { val names = NAME() val name = names.last().text val scope = names.take(names.size-1) @@ -732,16 +806,16 @@ fun il65Parser.Scoped_identifierContext.toAst(withPosition: Boolean) : Identifie } -fun il65Parser.FloatliteralContext.toAst() = text.toDouble() +private fun il65Parser.FloatliteralContext.toAst() = text.toDouble() -fun il65Parser.BooleanliteralContext.toAst() = when(text) { +private fun il65Parser.BooleanliteralContext.toAst() = when(text) { "true" -> true "false" -> false else -> throw UnsupportedOperationException(text) } -fun il65Parser.ArrayliteralContext.toAst(withPosition: Boolean) = +private fun il65Parser.ArrayliteralContext.toAst(withPosition: Boolean) = expression().map { it.toAst(withPosition) } diff --git a/il65/src/il65/ast/AstChecker.kt b/il65/src/il65/ast/AstChecker.kt index 5e0dceecf..8bccf1ad4 100644 --- a/il65/src/il65/ast/AstChecker.kt +++ b/il65/src/il65/ast/AstChecker.kt @@ -16,6 +16,7 @@ fun Module.checkValid() { class AstChecker : IAstProcessor { + private val checkResult: MutableList = mutableListOf() private val blockNames: HashMap = hashMapOf() @@ -49,6 +50,39 @@ class AstChecker : IAstProcessor { return block } + /** + * Check subroutine definition + */ + override fun process(subroutine: Subroutine): IStatement { + fun err(msg: String) { + checkResult.add(SyntaxError(msg, subroutine)) + } + val uniqueNames = subroutine.parameters.map { it.name }.toSet() + if(uniqueNames.size!=subroutine.parameters.size) + err("parameter names should be unique") + val uniqueParamRegs = subroutine.parameters.map {it.register}.toSet() + if(uniqueParamRegs.size!=subroutine.parameters.size) + err("parameter registers should be unique") + val uniqueResults = subroutine.returnvalues.map {it.register}.toSet() + if(uniqueResults.size!=subroutine.returnvalues.size) + err("return registers should be unique") + + subroutine.statements.forEach { it.process(this) } + + // subroutine must contain at least one 'return' or 'goto' + // (or if it has an asm block, that must contain a 'rts' or 'jmp') + if(subroutine.statements.count { it is Return || it is Jump } == 0) { + val amount = subroutine.statements + .map {(it as InlineAssembly)?.assembly} + .count { it.contains(" rts") || it.contains("\trts") || + it.contains(" jmp") || it.contains("\tjmp")} + if(amount==0) + err("subroutine must have at least one 'return' or 'goto' in it (or 'rts' / 'jmp' in case of %asm)") + } + + return subroutine + } + /** * Check the variable declarations (values within range etc) */ @@ -58,40 +92,45 @@ class AstChecker : IAstProcessor { } when(decl.type) { VarDeclType.VAR, VarDeclType.CONST -> { - val value = decl.value as? LiteralValue - if(value==null) - err("need a compile-time constant initializer value, found: ${decl.value!!::class.simpleName}") - else - when(decl.datatype) { - DataType.FLOAT -> { - val number = value.asFloat() - if(number==null) - err("need a const float initializer value") - else if(number > 1.7014118345e+38 || number < -1.7014118345e+38) - err("floating point value out of range for MFLPT format") - } - DataType.BYTE -> { - val number = value.asInt() - if(number==null) - err("need a const integer initializer value") - else if(number < 0 || number > 255) - err("value out of range for unsigned byte") - } - DataType.WORD -> { - val number = value.asInt() - if(number==null) - err("need a const integer initializer value") - else if(number < 0 || number > 65535) - err("value out of range for unsigned word") - } - DataType.STR, DataType.STR_P, DataType.STR_S, DataType.STR_PS -> { - val str = value.strvalue - if(str==null) - err("need a const string initializer value") - else if(str.isEmpty() || str.length>65535) - err("string length must be 1..65535") + when { + decl.value == null -> + err("need a compile-time constant initializer value") + decl.value !is LiteralValue -> + err("need a compile-time constant initializer value, found: ${decl.value!!::class.simpleName}") + else -> { + val value = decl.value as LiteralValue + when (decl.datatype) { + DataType.FLOAT -> { + val number = value.asFloat() + if (number == null) + err("need a const float initializer value") + else if (number > 1.7014118345e+38 || number < -1.7014118345e+38) + err("floating point value out of range for MFLPT format") + } + DataType.BYTE -> { + val number = value.asInt() + if (number == null) + err("need a const integer initializer value") + else if (number < 0 || number > 255) + err("value out of range for unsigned byte") + } + DataType.WORD -> { + val number = value.asInt() + if (number == null) + err("need a const integer initializer value") + else if (number < 0 || number > 65535) + err("value out of range for unsigned word") + } + DataType.STR, DataType.STR_P, DataType.STR_S, DataType.STR_PS -> { + val str = value.strvalue + if (str == null) + err("need a const string initializer value") + else if (str.isEmpty() || str.length > 65535) + err("string length must be 1..65535") + } } } + } } VarDeclType.MEMORY -> { val value = decl.value as LiteralValue diff --git a/il65/src/il65/ast/AstOptimizer.kt b/il65/src/il65/ast/AstOptimizer.kt index 104551817..7861fa2ee 100644 --- a/il65/src/il65/ast/AstOptimizer.kt +++ b/il65/src/il65/ast/AstOptimizer.kt @@ -34,6 +34,12 @@ class AstOptimizer : IAstProcessor { return block } + override fun process(subroutine: Subroutine): IStatement { + subroutine.statements = subroutine.statements.map { it.process(this) } + return subroutine + } + + override fun process(decl: VarDecl): IStatement { decl.value = decl.value?.process(this) decl.arrayspec?.process(this) diff --git a/il65/src/il65/ast/ImportedAstChecker.kt b/il65/src/il65/ast/ImportedAstChecker.kt index 5a0256b25..a6892210d 100644 --- a/il65/src/il65/ast/ImportedAstChecker.kt +++ b/il65/src/il65/ast/ImportedAstChecker.kt @@ -41,6 +41,10 @@ class ImportedAstChecker : IAstProcessor { module.lines = newLines } + override fun process(subroutine: Subroutine): IStatement { + return subroutine + } + override fun process(expr: PrefixExpression): IExpression { return expr } diff --git a/il65/src/il65/parser/il65.tokens b/il65/src/il65/parser/il65.tokens index bb740cab2..cab6eb14f 100644 --- a/il65/src/il65/parser/il65.tokens +++ b/il65/src/il65/parser/il65.tokens @@ -77,17 +77,20 @@ T__75=76 T__76=77 T__77=78 T__78=79 -LINECOMMENT=80 -COMMENT=81 -WS=82 -EOL=83 -NAME=84 -DEC_INTEGER=85 -HEX_INTEGER=86 -BIN_INTEGER=87 -FLOAT_NUMBER=88 -STRING=89 -INLINEASMBLOCK=90 +T__79=80 +T__80=81 +T__81=82 +LINECOMMENT=83 +COMMENT=84 +WS=85 +EOL=86 +NAME=87 +DEC_INTEGER=88 +HEX_INTEGER=89 +BIN_INTEGER=90 +FLOAT_NUMBER=91 +STRING=92 +INLINEASMBLOCK=93 '~'=1 '{'=2 '}'=3 @@ -167,3 +170,6 @@ INLINEASMBLOCK=90 'true'=77 'false'=78 '%asm'=79 +'sub'=80 +'->'=81 +'?'=82 diff --git a/il65/src/il65/parser/il65Lexer.java b/il65/src/il65/parser/il65Lexer.java index 7e776b7fb..a2d90715c 100644 --- a/il65/src/il65/parser/il65Lexer.java +++ b/il65/src/il65/parser/il65Lexer.java @@ -27,9 +27,10 @@ public class il65Lexer extends Lexer { T__52=53, T__53=54, T__54=55, T__55=56, T__56=57, T__57=58, T__58=59, T__59=60, T__60=61, T__61=62, T__62=63, T__63=64, T__64=65, T__65=66, T__66=67, T__67=68, T__68=69, T__69=70, T__70=71, T__71=72, T__72=73, - T__73=74, T__74=75, T__75=76, T__76=77, T__77=78, T__78=79, LINECOMMENT=80, - COMMENT=81, WS=82, EOL=83, NAME=84, DEC_INTEGER=85, HEX_INTEGER=86, BIN_INTEGER=87, - FLOAT_NUMBER=88, STRING=89, INLINEASMBLOCK=90; + T__73=74, T__74=75, T__75=76, T__76=77, T__77=78, T__78=79, T__79=80, + T__80=81, T__81=82, LINECOMMENT=83, COMMENT=84, WS=85, EOL=86, NAME=87, + DEC_INTEGER=88, HEX_INTEGER=89, BIN_INTEGER=90, FLOAT_NUMBER=91, STRING=92, + INLINEASMBLOCK=93; public static String[] channelNames = { "DEFAULT_TOKEN_CHANNEL", "HIDDEN" }; @@ -48,9 +49,10 @@ public class il65Lexer extends Lexer { "T__49", "T__50", "T__51", "T__52", "T__53", "T__54", "T__55", "T__56", "T__57", "T__58", "T__59", "T__60", "T__61", "T__62", "T__63", "T__64", "T__65", "T__66", "T__67", "T__68", "T__69", "T__70", "T__71", "T__72", - "T__73", "T__74", "T__75", "T__76", "T__77", "T__78", "LINECOMMENT", "COMMENT", - "WS", "EOL", "NAME", "DEC_INTEGER", "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", - "FNUMBER", "STRING_ESCAPE_SEQ", "STRING", "INLINEASMBLOCK" + "T__73", "T__74", "T__75", "T__76", "T__77", "T__78", "T__79", "T__80", + "T__81", "LINECOMMENT", "COMMENT", "WS", "EOL", "NAME", "DEC_INTEGER", + "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", "FNUMBER", "STRING_ESCAPE_SEQ", + "STRING", "INLINEASMBLOCK" }; private static final String[] _LITERAL_NAMES = { @@ -63,7 +65,8 @@ public class il65Lexer extends Lexer { "'*'", "'/'", "'<<'", "'>>'", "'<<@'", "'>>@'", "'<'", "'>'", "'<='", "'>='", "'=='", "'!='", "'&'", "'^'", "'|'", "'and'", "'or'", "'xor'", "'not'", "'to'", "'return'", "'.'", "'A'", "'X'", "'Y'", "'AX'", "'AY'", - "'XY'", "'SC'", "'SI'", "'SZ'", "'true'", "'false'", "'%asm'" + "'XY'", "'SC'", "'SI'", "'SZ'", "'true'", "'false'", "'%asm'", "'sub'", + "'->'", "'?'" }; private static final String[] _SYMBOLIC_NAMES = { null, null, null, null, null, null, null, null, null, null, null, null, @@ -72,9 +75,9 @@ public class il65Lexer extends Lexer { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, "LINECOMMENT", "COMMENT", - "WS", "EOL", "NAME", "DEC_INTEGER", "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", - "STRING", "INLINEASMBLOCK" + null, null, null, null, null, null, null, null, null, null, null, "LINECOMMENT", + "COMMENT", "WS", "EOL", "NAME", "DEC_INTEGER", "HEX_INTEGER", "BIN_INTEGER", + "FLOAT_NUMBER", "STRING", "INLINEASMBLOCK" }; public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); @@ -136,10 +139,10 @@ public class il65Lexer extends Lexer { @Override public void action(RuleContext _localctx, int ruleIndex, int actionIndex) { switch (ruleIndex) { - case 90: + case 93: STRING_action((RuleContext)_localctx, actionIndex); break; - case 91: + case 94: INLINEASMBLOCK_action((RuleContext)_localctx, actionIndex); break; } @@ -168,7 +171,7 @@ public class il65Lexer extends Lexer { } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\\\u0261\b\1\4\2\t"+ + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2_\u0270\b\1\4\2\t"+ "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ @@ -178,40 +181,41 @@ public class il65Lexer extends Lexer { "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ - "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\3\2\3\2\3\3\3"+ - "\3\3\4\3\4\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7"+ - "\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3"+ - "\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f"+ - "\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3"+ - "\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3"+ - "\16\3\17\3\17\3\20\3\20\3\21\3\21\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3"+ - "\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3"+ - "\25\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3"+ - "\27\3\27\3\30\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\31\3\31\3"+ - "\31\3\32\3\32\3\33\3\33\3\34\3\34\3\34\3\35\3\35\3\35\3\36\3\36\3\36\3"+ - "\37\3\37\3\37\3 \3 \3 \3 \3!\3!\3!\3!\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3"+ - "$\3$\3$\3$\3$\3%\3%\3%\3&\3&\3&\3\'\3\'\3\'\3(\3(\3(\3)\3)\3)\3*\3*\3"+ - "+\3+\3,\3,\3-\3-\3.\3.\3.\3/\3/\3\60\3\60\3\61\3\61\3\61\3\62\3\62\3\62"+ - "\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\65\3\65\3\66\3\66\3\67\3\67"+ - "\3\67\38\38\38\39\39\39\3:\3:\3:\3;\3;\3<\3<\3=\3=\3>\3>\3>\3>\3?\3?\3"+ - "?\3@\3@\3@\3@\3A\3A\3A\3A\3B\3B\3B\3C\3C\3C\3C\3C\3C\3C\3D\3D\3E\3E\3"+ - "F\3F\3G\3G\3H\3H\3H\3I\3I\3I\3J\3J\3J\3K\3K\3K\3L\3L\3L\3M\3M\3M\3N\3"+ - "N\3N\3N\3N\3O\3O\3O\3O\3O\3O\3P\3P\3P\3P\3P\3Q\3Q\7Q\u01f8\nQ\fQ\16Q\u01fb"+ - "\13Q\3Q\3Q\3Q\3Q\3R\3R\7R\u0203\nR\fR\16R\u0206\13R\3R\3R\3S\3S\3S\3S"+ - "\3T\6T\u020f\nT\rT\16T\u0210\3U\3U\7U\u0215\nU\fU\16U\u0218\13U\3V\3V"+ - "\3V\6V\u021d\nV\rV\16V\u021e\5V\u0221\nV\3W\3W\6W\u0225\nW\rW\16W\u0226"+ - "\3X\3X\6X\u022b\nX\rX\16X\u022c\3Y\3Y\3Y\5Y\u0232\nY\3Y\5Y\u0235\nY\3"+ - "Z\6Z\u0238\nZ\rZ\16Z\u0239\3Z\3Z\6Z\u023e\nZ\rZ\16Z\u023f\5Z\u0242\nZ"+ - "\3[\3[\3[\3[\5[\u0248\n[\3\\\3\\\3\\\7\\\u024d\n\\\f\\\16\\\u0250\13\\"+ - "\3\\\3\\\3\\\3]\3]\3]\3]\6]\u0259\n]\r]\16]\u025a\3]\3]\3]\3]\3]\3\u025a"+ - "\2^\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35"+ - "\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36"+ - ";\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67"+ - "m8o9q:s;u{?}@\177A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG\u008d"+ - "H\u008fI\u0091J\u0093K\u0095L\u0097M\u0099N\u009bO\u009dP\u009fQ\u00a1"+ - "R\u00a3S\u00a5T\u00a7U\u00a9V\u00abW\u00adX\u00afY\u00b1Z\u00b3\2\u00b5"+ - "\2\u00b7[\u00b9\\\3\2\n\4\2\f\f\17\17\4\2\13\13\"\"\5\2C\\aac|\6\2\62"+ - ";C\\aac|\5\2\62;CHch\4\2GGgg\4\2--//\6\2\f\f\16\17$$^^\2\u026f\2\3\3\2"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3"+ + "\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t"+ + "\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13"+ + "\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r"+ + "\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16"+ + "\3\16\3\16\3\16\3\16\3\17\3\17\3\20\3\20\3\21\3\21\3\21\3\21\3\21\3\21"+ + "\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\24\3\24"+ + "\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\27"+ + "\3\27\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\31"+ + "\3\31\3\31\3\31\3\31\3\32\3\32\3\33\3\33\3\34\3\34\3\34\3\35\3\35\3\35"+ + "\3\36\3\36\3\36\3\37\3\37\3\37\3 \3 \3 \3 \3!\3!\3!\3!\3\"\3\"\3\"\3\""+ + "\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3%\3%\3%\3&\3&\3&\3\'\3\'\3\'\3(\3(\3("+ + "\3)\3)\3)\3*\3*\3+\3+\3,\3,\3-\3-\3.\3.\3.\3/\3/\3\60\3\60\3\61\3\61\3"+ + "\61\3\62\3\62\3\62\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\65\3\65\3"+ + "\66\3\66\3\67\3\67\3\67\38\38\38\39\39\39\3:\3:\3:\3;\3;\3<\3<\3=\3=\3"+ + ">\3>\3>\3>\3?\3?\3?\3@\3@\3@\3@\3A\3A\3A\3A\3B\3B\3B\3C\3C\3C\3C\3C\3"+ + "C\3C\3D\3D\3E\3E\3F\3F\3G\3G\3H\3H\3H\3I\3I\3I\3J\3J\3J\3K\3K\3K\3L\3"+ + "L\3L\3M\3M\3M\3N\3N\3N\3N\3N\3O\3O\3O\3O\3O\3O\3P\3P\3P\3P\3P\3Q\3Q\3"+ + "Q\3Q\3R\3R\3R\3S\3S\3T\3T\7T\u0207\nT\fT\16T\u020a\13T\3T\3T\3T\3T\3U"+ + "\3U\7U\u0212\nU\fU\16U\u0215\13U\3U\3U\3V\3V\3V\3V\3W\6W\u021e\nW\rW\16"+ + "W\u021f\3X\3X\7X\u0224\nX\fX\16X\u0227\13X\3Y\3Y\3Y\6Y\u022c\nY\rY\16"+ + "Y\u022d\5Y\u0230\nY\3Z\3Z\6Z\u0234\nZ\rZ\16Z\u0235\3[\3[\6[\u023a\n[\r"+ + "[\16[\u023b\3\\\3\\\3\\\5\\\u0241\n\\\3\\\5\\\u0244\n\\\3]\6]\u0247\n"+ + "]\r]\16]\u0248\3]\3]\6]\u024d\n]\r]\16]\u024e\5]\u0251\n]\3^\3^\3^\3^"+ + "\5^\u0257\n^\3_\3_\3_\7_\u025c\n_\f_\16_\u025f\13_\3_\3_\3_\3`\3`\3`\3"+ + "`\6`\u0268\n`\r`\16`\u0269\3`\3`\3`\3`\3`\3\u0269\2a\3\3\5\4\7\5\t\6\13"+ + "\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'"+ + "\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'"+ + "M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u{?}@\177"+ + "A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG\u008dH\u008fI\u0091J\u0093"+ + "K\u0095L\u0097M\u0099N\u009bO\u009dP\u009fQ\u00a1R\u00a3S\u00a5T\u00a7"+ + "U\u00a9V\u00abW\u00adX\u00afY\u00b1Z\u00b3[\u00b5\\\u00b7]\u00b9\2\u00bb"+ + "\2\u00bd^\u00bf_\3\2\n\4\2\f\f\17\17\4\2\13\13\"\"\5\2C\\aac|\6\2\62;"+ + "C\\aac|\5\2\62;CHch\4\2GGgg\4\2--//\6\2\f\f\16\17$$^^\2\u027e\2\3\3\2"+ "\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17"+ "\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2"+ "\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3"+ @@ -228,148 +232,152 @@ public class il65Lexer extends Lexer { "\3\2\2\2\2\u0099\3\2\2\2\2\u009b\3\2\2\2\2\u009d\3\2\2\2\2\u009f\3\2\2"+ "\2\2\u00a1\3\2\2\2\2\u00a3\3\2\2\2\2\u00a5\3\2\2\2\2\u00a7\3\2\2\2\2\u00a9"+ "\3\2\2\2\2\u00ab\3\2\2\2\2\u00ad\3\2\2\2\2\u00af\3\2\2\2\2\u00b1\3\2\2"+ - "\2\2\u00b7\3\2\2\2\2\u00b9\3\2\2\2\3\u00bb\3\2\2\2\5\u00bd\3\2\2\2\7\u00bf"+ - "\3\2\2\2\t\u00c1\3\2\2\2\13\u00c3\3\2\2\2\r\u00c8\3\2\2\2\17\u00d0\3\2"+ - "\2\2\21\u00da\3\2\2\2\23\u00de\3\2\2\2\25\u00e7\3\2\2\2\27\u00ef\3\2\2"+ - "\2\31\u00fb\3\2\2\2\33\u0107\3\2\2\2\35\u0112\3\2\2\2\37\u0114\3\2\2\2"+ - "!\u0116\3\2\2\2#\u011c\3\2\2\2%\u0123\3\2\2\2\'\u0128\3\2\2\2)\u012d\3"+ - "\2\2\2+\u0133\3\2\2\2-\u0137\3\2\2\2/\u013d\3\2\2\2\61\u0143\3\2\2\2\63"+ - "\u014a\3\2\2\2\65\u014c\3\2\2\2\67\u014e\3\2\2\29\u0151\3\2\2\2;\u0154"+ - "\3\2\2\2=\u0157\3\2\2\2?\u015a\3\2\2\2A\u015e\3\2\2\2C\u0162\3\2\2\2E"+ - "\u0166\3\2\2\2G\u016b\3\2\2\2I\u0170\3\2\2\2K\u0173\3\2\2\2M\u0176\3\2"+ - "\2\2O\u0179\3\2\2\2Q\u017c\3\2\2\2S\u017f\3\2\2\2U\u0181\3\2\2\2W\u0183"+ - "\3\2\2\2Y\u0185\3\2\2\2[\u0187\3\2\2\2]\u018a\3\2\2\2_\u018c\3\2\2\2a"+ - "\u018e\3\2\2\2c\u0191\3\2\2\2e\u0194\3\2\2\2g\u0198\3\2\2\2i\u019c\3\2"+ - "\2\2k\u019e\3\2\2\2m\u01a0\3\2\2\2o\u01a3\3\2\2\2q\u01a6\3\2\2\2s\u01a9"+ - "\3\2\2\2u\u01ac\3\2\2\2w\u01ae\3\2\2\2y\u01b0\3\2\2\2{\u01b2\3\2\2\2}"+ - "\u01b6\3\2\2\2\177\u01b9\3\2\2\2\u0081\u01bd\3\2\2\2\u0083\u01c1\3\2\2"+ - "\2\u0085\u01c4\3\2\2\2\u0087\u01cb\3\2\2\2\u0089\u01cd\3\2\2\2\u008b\u01cf"+ - "\3\2\2\2\u008d\u01d1\3\2\2\2\u008f\u01d3\3\2\2\2\u0091\u01d6\3\2\2\2\u0093"+ - "\u01d9\3\2\2\2\u0095\u01dc\3\2\2\2\u0097\u01df\3\2\2\2\u0099\u01e2\3\2"+ - "\2\2\u009b\u01e5\3\2\2\2\u009d\u01ea\3\2\2\2\u009f\u01f0\3\2\2\2\u00a1"+ - "\u01f5\3\2\2\2\u00a3\u0200\3\2\2\2\u00a5\u0209\3\2\2\2\u00a7\u020e\3\2"+ - "\2\2\u00a9\u0212\3\2\2\2\u00ab\u0220\3\2\2\2\u00ad\u0222\3\2\2\2\u00af"+ - "\u0228\3\2\2\2\u00b1\u022e\3\2\2\2\u00b3\u0237\3\2\2\2\u00b5\u0247\3\2"+ - "\2\2\u00b7\u0249\3\2\2\2\u00b9\u0254\3\2\2\2\u00bb\u00bc\7\u0080\2\2\u00bc"+ - "\4\3\2\2\2\u00bd\u00be\7}\2\2\u00be\6\3\2\2\2\u00bf\u00c0\7\177\2\2\u00c0"+ - "\b\3\2\2\2\u00c1\u00c2\7<\2\2\u00c2\n\3\2\2\2\u00c3\u00c4\7i\2\2\u00c4"+ - "\u00c5\7q\2\2\u00c5\u00c6\7v\2\2\u00c6\u00c7\7q\2\2\u00c7\f\3\2\2\2\u00c8"+ - "\u00c9\7\'\2\2\u00c9\u00ca\7q\2\2\u00ca\u00cb\7w\2\2\u00cb\u00cc\7v\2"+ - "\2\u00cc\u00cd\7r\2\2\u00cd\u00ce\7w\2\2\u00ce\u00cf\7v\2\2\u00cf\16\3"+ - "\2\2\2\u00d0\u00d1\7\'\2\2\u00d1\u00d2\7n\2\2\u00d2\u00d3\7c\2\2\u00d3"+ - "\u00d4\7w\2\2\u00d4\u00d5\7p\2\2\u00d5\u00d6\7e\2\2\u00d6\u00d7\7j\2\2"+ - "\u00d7\u00d8\7g\2\2\u00d8\u00d9\7t\2\2\u00d9\20\3\2\2\2\u00da\u00db\7"+ - "\'\2\2\u00db\u00dc\7|\2\2\u00dc\u00dd\7r\2\2\u00dd\22\3\2\2\2\u00de\u00df"+ - "\7\'\2\2\u00df\u00e0\7c\2\2\u00e0\u00e1\7f\2\2\u00e1\u00e2\7f\2\2\u00e2"+ - "\u00e3\7t\2\2\u00e3\u00e4\7g\2\2\u00e4\u00e5\7u\2\2\u00e5\u00e6\7u\2\2"+ - "\u00e6\24\3\2\2\2\u00e7\u00e8\7\'\2\2\u00e8\u00e9\7k\2\2\u00e9\u00ea\7"+ - "o\2\2\u00ea\u00eb\7r\2\2\u00eb\u00ec\7q\2\2\u00ec\u00ed\7t\2\2\u00ed\u00ee"+ - "\7v\2\2\u00ee\26\3\2\2\2\u00ef\u00f0\7\'\2\2\u00f0\u00f1\7d\2\2\u00f1"+ - "\u00f2\7t\2\2\u00f2\u00f3\7g\2\2\u00f3\u00f4\7c\2\2\u00f4\u00f5\7m\2\2"+ - "\u00f5\u00f6\7r\2\2\u00f6\u00f7\7q\2\2\u00f7\u00f8\7k\2\2\u00f8\u00f9"+ - "\7p\2\2\u00f9\u00fa\7v\2\2\u00fa\30\3\2\2\2\u00fb\u00fc\7\'\2\2\u00fc"+ - "\u00fd\7c\2\2\u00fd\u00fe\7u\2\2\u00fe\u00ff\7o\2\2\u00ff\u0100\7k\2\2"+ - "\u0100\u0101\7p\2\2\u0101\u0102\7e\2\2\u0102\u0103\7n\2\2\u0103\u0104"+ - "\7w\2\2\u0104\u0105\7f\2\2\u0105\u0106\7g\2\2\u0106\32\3\2\2\2\u0107\u0108"+ - "\7\'\2\2\u0108\u0109\7c\2\2\u0109\u010a\7u\2\2\u010a\u010b\7o\2\2\u010b"+ - "\u010c\7d\2\2\u010c\u010d\7k\2\2\u010d\u010e\7p\2\2\u010e\u010f\7c\2\2"+ - "\u010f\u0110\7t\2\2\u0110\u0111\7{\2\2\u0111\34\3\2\2\2\u0112\u0113\7"+ - ".\2\2\u0113\36\3\2\2\2\u0114\u0115\7?\2\2\u0115 \3\2\2\2\u0116\u0117\7"+ - "e\2\2\u0117\u0118\7q\2\2\u0118\u0119\7p\2\2\u0119\u011a\7u\2\2\u011a\u011b"+ - "\7v\2\2\u011b\"\3\2\2\2\u011c\u011d\7o\2\2\u011d\u011e\7g\2\2\u011e\u011f"+ - "\7o\2\2\u011f\u0120\7q\2\2\u0120\u0121\7t\2\2\u0121\u0122\7{\2\2\u0122"+ - "$\3\2\2\2\u0123\u0124\7d\2\2\u0124\u0125\7{\2\2\u0125\u0126\7v\2\2\u0126"+ - "\u0127\7g\2\2\u0127&\3\2\2\2\u0128\u0129\7y\2\2\u0129\u012a\7q\2\2\u012a"+ - "\u012b\7t\2\2\u012b\u012c\7f\2\2\u012c(\3\2\2\2\u012d\u012e\7h\2\2\u012e"+ - "\u012f\7n\2\2\u012f\u0130\7q\2\2\u0130\u0131\7c\2\2\u0131\u0132\7v\2\2"+ - "\u0132*\3\2\2\2\u0133\u0134\7u\2\2\u0134\u0135\7v\2\2\u0135\u0136\7t\2"+ - "\2\u0136,\3\2\2\2\u0137\u0138\7u\2\2\u0138\u0139\7v\2\2\u0139\u013a\7"+ - "t\2\2\u013a\u013b\7a\2\2\u013b\u013c\7r\2\2\u013c.\3\2\2\2\u013d\u013e"+ + "\2\2\u00b3\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7\3\2\2\2\2\u00bd\3\2\2\2\2\u00bf"+ + "\3\2\2\2\3\u00c1\3\2\2\2\5\u00c3\3\2\2\2\7\u00c5\3\2\2\2\t\u00c7\3\2\2"+ + "\2\13\u00c9\3\2\2\2\r\u00ce\3\2\2\2\17\u00d6\3\2\2\2\21\u00e0\3\2\2\2"+ + "\23\u00e4\3\2\2\2\25\u00ed\3\2\2\2\27\u00f5\3\2\2\2\31\u0101\3\2\2\2\33"+ + "\u010d\3\2\2\2\35\u0118\3\2\2\2\37\u011a\3\2\2\2!\u011c\3\2\2\2#\u0122"+ + "\3\2\2\2%\u0129\3\2\2\2\'\u012e\3\2\2\2)\u0133\3\2\2\2+\u0139\3\2\2\2"+ + "-\u013d\3\2\2\2/\u0143\3\2\2\2\61\u0149\3\2\2\2\63\u0150\3\2\2\2\65\u0152"+ + "\3\2\2\2\67\u0154\3\2\2\29\u0157\3\2\2\2;\u015a\3\2\2\2=\u015d\3\2\2\2"+ + "?\u0160\3\2\2\2A\u0164\3\2\2\2C\u0168\3\2\2\2E\u016c\3\2\2\2G\u0171\3"+ + "\2\2\2I\u0176\3\2\2\2K\u0179\3\2\2\2M\u017c\3\2\2\2O\u017f\3\2\2\2Q\u0182"+ + "\3\2\2\2S\u0185\3\2\2\2U\u0187\3\2\2\2W\u0189\3\2\2\2Y\u018b\3\2\2\2["+ + "\u018d\3\2\2\2]\u0190\3\2\2\2_\u0192\3\2\2\2a\u0194\3\2\2\2c\u0197\3\2"+ + "\2\2e\u019a\3\2\2\2g\u019e\3\2\2\2i\u01a2\3\2\2\2k\u01a4\3\2\2\2m\u01a6"+ + "\3\2\2\2o\u01a9\3\2\2\2q\u01ac\3\2\2\2s\u01af\3\2\2\2u\u01b2\3\2\2\2w"+ + "\u01b4\3\2\2\2y\u01b6\3\2\2\2{\u01b8\3\2\2\2}\u01bc\3\2\2\2\177\u01bf"+ + "\3\2\2\2\u0081\u01c3\3\2\2\2\u0083\u01c7\3\2\2\2\u0085\u01ca\3\2\2\2\u0087"+ + "\u01d1\3\2\2\2\u0089\u01d3\3\2\2\2\u008b\u01d5\3\2\2\2\u008d\u01d7\3\2"+ + "\2\2\u008f\u01d9\3\2\2\2\u0091\u01dc\3\2\2\2\u0093\u01df\3\2\2\2\u0095"+ + "\u01e2\3\2\2\2\u0097\u01e5\3\2\2\2\u0099\u01e8\3\2\2\2\u009b\u01eb\3\2"+ + "\2\2\u009d\u01f0\3\2\2\2\u009f\u01f6\3\2\2\2\u00a1\u01fb\3\2\2\2\u00a3"+ + "\u01ff\3\2\2\2\u00a5\u0202\3\2\2\2\u00a7\u0204\3\2\2\2\u00a9\u020f\3\2"+ + "\2\2\u00ab\u0218\3\2\2\2\u00ad\u021d\3\2\2\2\u00af\u0221\3\2\2\2\u00b1"+ + "\u022f\3\2\2\2\u00b3\u0231\3\2\2\2\u00b5\u0237\3\2\2\2\u00b7\u023d\3\2"+ + "\2\2\u00b9\u0246\3\2\2\2\u00bb\u0256\3\2\2\2\u00bd\u0258\3\2\2\2\u00bf"+ + "\u0263\3\2\2\2\u00c1\u00c2\7\u0080\2\2\u00c2\4\3\2\2\2\u00c3\u00c4\7}"+ + "\2\2\u00c4\6\3\2\2\2\u00c5\u00c6\7\177\2\2\u00c6\b\3\2\2\2\u00c7\u00c8"+ + "\7<\2\2\u00c8\n\3\2\2\2\u00c9\u00ca\7i\2\2\u00ca\u00cb\7q\2\2\u00cb\u00cc"+ + "\7v\2\2\u00cc\u00cd\7q\2\2\u00cd\f\3\2\2\2\u00ce\u00cf\7\'\2\2\u00cf\u00d0"+ + "\7q\2\2\u00d0\u00d1\7w\2\2\u00d1\u00d2\7v\2\2\u00d2\u00d3\7r\2\2\u00d3"+ + "\u00d4\7w\2\2\u00d4\u00d5\7v\2\2\u00d5\16\3\2\2\2\u00d6\u00d7\7\'\2\2"+ + "\u00d7\u00d8\7n\2\2\u00d8\u00d9\7c\2\2\u00d9\u00da\7w\2\2\u00da\u00db"+ + "\7p\2\2\u00db\u00dc\7e\2\2\u00dc\u00dd\7j\2\2\u00dd\u00de\7g\2\2\u00de"+ + "\u00df\7t\2\2\u00df\20\3\2\2\2\u00e0\u00e1\7\'\2\2\u00e1\u00e2\7|\2\2"+ + "\u00e2\u00e3\7r\2\2\u00e3\22\3\2\2\2\u00e4\u00e5\7\'\2\2\u00e5\u00e6\7"+ + "c\2\2\u00e6\u00e7\7f\2\2\u00e7\u00e8\7f\2\2\u00e8\u00e9\7t\2\2\u00e9\u00ea"+ + "\7g\2\2\u00ea\u00eb\7u\2\2\u00eb\u00ec\7u\2\2\u00ec\24\3\2\2\2\u00ed\u00ee"+ + "\7\'\2\2\u00ee\u00ef\7k\2\2\u00ef\u00f0\7o\2\2\u00f0\u00f1\7r\2\2\u00f1"+ + "\u00f2\7q\2\2\u00f2\u00f3\7t\2\2\u00f3\u00f4\7v\2\2\u00f4\26\3\2\2\2\u00f5"+ + "\u00f6\7\'\2\2\u00f6\u00f7\7d\2\2\u00f7\u00f8\7t\2\2\u00f8\u00f9\7g\2"+ + "\2\u00f9\u00fa\7c\2\2\u00fa\u00fb\7m\2\2\u00fb\u00fc\7r\2\2\u00fc\u00fd"+ + "\7q\2\2\u00fd\u00fe\7k\2\2\u00fe\u00ff\7p\2\2\u00ff\u0100\7v\2\2\u0100"+ + "\30\3\2\2\2\u0101\u0102\7\'\2\2\u0102\u0103\7c\2\2\u0103\u0104\7u\2\2"+ + "\u0104\u0105\7o\2\2\u0105\u0106\7k\2\2\u0106\u0107\7p\2\2\u0107\u0108"+ + "\7e\2\2\u0108\u0109\7n\2\2\u0109\u010a\7w\2\2\u010a\u010b\7f\2\2\u010b"+ + "\u010c\7g\2\2\u010c\32\3\2\2\2\u010d\u010e\7\'\2\2\u010e\u010f\7c\2\2"+ + "\u010f\u0110\7u\2\2\u0110\u0111\7o\2\2\u0111\u0112\7d\2\2\u0112\u0113"+ + "\7k\2\2\u0113\u0114\7p\2\2\u0114\u0115\7c\2\2\u0115\u0116\7t\2\2\u0116"+ + "\u0117\7{\2\2\u0117\34\3\2\2\2\u0118\u0119\7.\2\2\u0119\36\3\2\2\2\u011a"+ + "\u011b\7?\2\2\u011b \3\2\2\2\u011c\u011d\7e\2\2\u011d\u011e\7q\2\2\u011e"+ + "\u011f\7p\2\2\u011f\u0120\7u\2\2\u0120\u0121\7v\2\2\u0121\"\3\2\2\2\u0122"+ + "\u0123\7o\2\2\u0123\u0124\7g\2\2\u0124\u0125\7o\2\2\u0125\u0126\7q\2\2"+ + "\u0126\u0127\7t\2\2\u0127\u0128\7{\2\2\u0128$\3\2\2\2\u0129\u012a\7d\2"+ + "\2\u012a\u012b\7{\2\2\u012b\u012c\7v\2\2\u012c\u012d\7g\2\2\u012d&\3\2"+ + "\2\2\u012e\u012f\7y\2\2\u012f\u0130\7q\2\2\u0130\u0131\7t\2\2\u0131\u0132"+ + "\7f\2\2\u0132(\3\2\2\2\u0133\u0134\7h\2\2\u0134\u0135\7n\2\2\u0135\u0136"+ + "\7q\2\2\u0136\u0137\7c\2\2\u0137\u0138\7v\2\2\u0138*\3\2\2\2\u0139\u013a"+ + "\7u\2\2\u013a\u013b\7v\2\2\u013b\u013c\7t\2\2\u013c,\3\2\2\2\u013d\u013e"+ "\7u\2\2\u013e\u013f\7v\2\2\u013f\u0140\7t\2\2\u0140\u0141\7a\2\2\u0141"+ - "\u0142\7u\2\2\u0142\60\3\2\2\2\u0143\u0144\7u\2\2\u0144\u0145\7v\2\2\u0145"+ - "\u0146\7t\2\2\u0146\u0147\7a\2\2\u0147\u0148\7r\2\2\u0148\u0149\7u\2\2"+ - "\u0149\62\3\2\2\2\u014a\u014b\7]\2\2\u014b\64\3\2\2\2\u014c\u014d\7_\2"+ - "\2\u014d\66\3\2\2\2\u014e\u014f\7-\2\2\u014f\u0150\7?\2\2\u01508\3\2\2"+ - "\2\u0151\u0152\7/\2\2\u0152\u0153\7?\2\2\u0153:\3\2\2\2\u0154\u0155\7"+ - "\61\2\2\u0155\u0156\7?\2\2\u0156<\3\2\2\2\u0157\u0158\7,\2\2\u0158\u0159"+ - "\7?\2\2\u0159>\3\2\2\2\u015a\u015b\7,\2\2\u015b\u015c\7,\2\2\u015c\u015d"+ - "\7?\2\2\u015d@\3\2\2\2\u015e\u015f\7>\2\2\u015f\u0160\7>\2\2\u0160\u0161"+ - "\7?\2\2\u0161B\3\2\2\2\u0162\u0163\7@\2\2\u0163\u0164\7@\2\2\u0164\u0165"+ - "\7?\2\2\u0165D\3\2\2\2\u0166\u0167\7>\2\2\u0167\u0168\7>\2\2\u0168\u0169"+ - "\7B\2\2\u0169\u016a\7?\2\2\u016aF\3\2\2\2\u016b\u016c\7@\2\2\u016c\u016d"+ - "\7@\2\2\u016d\u016e\7B\2\2\u016e\u016f\7?\2\2\u016fH\3\2\2\2\u0170\u0171"+ - "\7(\2\2\u0171\u0172\7?\2\2\u0172J\3\2\2\2\u0173\u0174\7~\2\2\u0174\u0175"+ - "\7?\2\2\u0175L\3\2\2\2\u0176\u0177\7`\2\2\u0177\u0178\7?\2\2\u0178N\3"+ - "\2\2\2\u0179\u017a\7-\2\2\u017a\u017b\7-\2\2\u017bP\3\2\2\2\u017c\u017d"+ - "\7/\2\2\u017d\u017e\7/\2\2\u017eR\3\2\2\2\u017f\u0180\7*\2\2\u0180T\3"+ - "\2\2\2\u0181\u0182\7+\2\2\u0182V\3\2\2\2\u0183\u0184\7-\2\2\u0184X\3\2"+ - "\2\2\u0185\u0186\7/\2\2\u0186Z\3\2\2\2\u0187\u0188\7,\2\2\u0188\u0189"+ - "\7,\2\2\u0189\\\3\2\2\2\u018a\u018b\7,\2\2\u018b^\3\2\2\2\u018c\u018d"+ - "\7\61\2\2\u018d`\3\2\2\2\u018e\u018f\7>\2\2\u018f\u0190\7>\2\2\u0190b"+ - "\3\2\2\2\u0191\u0192\7@\2\2\u0192\u0193\7@\2\2\u0193d\3\2\2\2\u0194\u0195"+ - "\7>\2\2\u0195\u0196\7>\2\2\u0196\u0197\7B\2\2\u0197f\3\2\2\2\u0198\u0199"+ - "\7@\2\2\u0199\u019a\7@\2\2\u019a\u019b\7B\2\2\u019bh\3\2\2\2\u019c\u019d"+ - "\7>\2\2\u019dj\3\2\2\2\u019e\u019f\7@\2\2\u019fl\3\2\2\2\u01a0\u01a1\7"+ - ">\2\2\u01a1\u01a2\7?\2\2\u01a2n\3\2\2\2\u01a3\u01a4\7@\2\2\u01a4\u01a5"+ - "\7?\2\2\u01a5p\3\2\2\2\u01a6\u01a7\7?\2\2\u01a7\u01a8\7?\2\2\u01a8r\3"+ - "\2\2\2\u01a9\u01aa\7#\2\2\u01aa\u01ab\7?\2\2\u01abt\3\2\2\2\u01ac\u01ad"+ - "\7(\2\2\u01adv\3\2\2\2\u01ae\u01af\7`\2\2\u01afx\3\2\2\2\u01b0\u01b1\7"+ - "~\2\2\u01b1z\3\2\2\2\u01b2\u01b3\7c\2\2\u01b3\u01b4\7p\2\2\u01b4\u01b5"+ - "\7f\2\2\u01b5|\3\2\2\2\u01b6\u01b7\7q\2\2\u01b7\u01b8\7t\2\2\u01b8~\3"+ - "\2\2\2\u01b9\u01ba\7z\2\2\u01ba\u01bb\7q\2\2\u01bb\u01bc\7t\2\2\u01bc"+ - "\u0080\3\2\2\2\u01bd\u01be\7p\2\2\u01be\u01bf\7q\2\2\u01bf\u01c0\7v\2"+ - "\2\u01c0\u0082\3\2\2\2\u01c1\u01c2\7v\2\2\u01c2\u01c3\7q\2\2\u01c3\u0084"+ - "\3\2\2\2\u01c4\u01c5\7t\2\2\u01c5\u01c6\7g\2\2\u01c6\u01c7\7v\2\2\u01c7"+ - "\u01c8\7w\2\2\u01c8\u01c9\7t\2\2\u01c9\u01ca\7p\2\2\u01ca\u0086\3\2\2"+ - "\2\u01cb\u01cc\7\60\2\2\u01cc\u0088\3\2\2\2\u01cd\u01ce\7C\2\2\u01ce\u008a"+ - "\3\2\2\2\u01cf\u01d0\7Z\2\2\u01d0\u008c\3\2\2\2\u01d1\u01d2\7[\2\2\u01d2"+ - "\u008e\3\2\2\2\u01d3\u01d4\7C\2\2\u01d4\u01d5\7Z\2\2\u01d5\u0090\3\2\2"+ - "\2\u01d6\u01d7\7C\2\2\u01d7\u01d8\7[\2\2\u01d8\u0092\3\2\2\2\u01d9\u01da"+ - "\7Z\2\2\u01da\u01db\7[\2\2\u01db\u0094\3\2\2\2\u01dc\u01dd\7U\2\2\u01dd"+ - "\u01de\7E\2\2\u01de\u0096\3\2\2\2\u01df\u01e0\7U\2\2\u01e0\u01e1\7K\2"+ - "\2\u01e1\u0098\3\2\2\2\u01e2\u01e3\7U\2\2\u01e3\u01e4\7\\\2\2\u01e4\u009a"+ - "\3\2\2\2\u01e5\u01e6\7v\2\2\u01e6\u01e7\7t\2\2\u01e7\u01e8\7w\2\2\u01e8"+ - "\u01e9\7g\2\2\u01e9\u009c\3\2\2\2\u01ea\u01eb\7h\2\2\u01eb\u01ec\7c\2"+ - "\2\u01ec\u01ed\7n\2\2\u01ed\u01ee\7u\2\2\u01ee\u01ef\7g\2\2\u01ef\u009e"+ - "\3\2\2\2\u01f0\u01f1\7\'\2\2\u01f1\u01f2\7c\2\2\u01f2\u01f3\7u\2\2\u01f3"+ - "\u01f4\7o\2\2\u01f4\u00a0\3\2\2\2\u01f5\u01f9\t\2\2\2\u01f6\u01f8\t\3"+ - "\2\2\u01f7\u01f6\3\2\2\2\u01f8\u01fb\3\2\2\2\u01f9\u01f7\3\2\2\2\u01f9"+ - "\u01fa\3\2\2\2\u01fa\u01fc\3\2\2\2\u01fb\u01f9\3\2\2\2\u01fc\u01fd\5\u00a3"+ - "R\2\u01fd\u01fe\3\2\2\2\u01fe\u01ff\bQ\2\2\u01ff\u00a2\3\2\2\2\u0200\u0204"+ - "\7=\2\2\u0201\u0203\n\2\2\2\u0202\u0201\3\2\2\2\u0203\u0206\3\2\2\2\u0204"+ - "\u0202\3\2\2\2\u0204\u0205\3\2\2\2\u0205\u0207\3\2\2\2\u0206\u0204\3\2"+ - "\2\2\u0207\u0208\bR\2\2\u0208\u00a4\3\2\2\2\u0209\u020a\t\3\2\2\u020a"+ - "\u020b\3\2\2\2\u020b\u020c\bS\3\2\u020c\u00a6\3\2\2\2\u020d\u020f\t\2"+ - "\2\2\u020e\u020d\3\2\2\2\u020f\u0210\3\2\2\2\u0210\u020e\3\2\2\2\u0210"+ - "\u0211\3\2\2\2\u0211\u00a8\3\2\2\2\u0212\u0216\t\4\2\2\u0213\u0215\t\5"+ - "\2\2\u0214\u0213\3\2\2\2\u0215\u0218\3\2\2\2\u0216\u0214\3\2\2\2\u0216"+ - "\u0217\3\2\2\2\u0217\u00aa\3\2\2\2\u0218\u0216\3\2\2\2\u0219\u0221\4\62"+ - ";\2\u021a\u021c\4\63;\2\u021b\u021d\4\62;\2\u021c\u021b\3\2\2\2\u021d"+ - "\u021e\3\2\2\2\u021e\u021c\3\2\2\2\u021e\u021f\3\2\2\2\u021f\u0221\3\2"+ - "\2\2\u0220\u0219\3\2\2\2\u0220\u021a\3\2\2\2\u0221\u00ac\3\2\2\2\u0222"+ - "\u0224\7&\2\2\u0223\u0225\t\6\2\2\u0224\u0223\3\2\2\2\u0225\u0226\3\2"+ - "\2\2\u0226\u0224\3\2\2\2\u0226\u0227\3\2\2\2\u0227\u00ae\3\2\2\2\u0228"+ - "\u022a\7\'\2\2\u0229\u022b\4\62\63\2\u022a\u0229\3\2\2\2\u022b\u022c\3"+ - "\2\2\2\u022c\u022a\3\2\2\2\u022c\u022d\3\2\2\2\u022d\u00b0\3\2\2\2\u022e"+ - "\u0234\5\u00b3Z\2\u022f\u0231\t\7\2\2\u0230\u0232\t\b\2\2\u0231\u0230"+ - "\3\2\2\2\u0231\u0232\3\2\2\2\u0232\u0233\3\2\2\2\u0233\u0235\5\u00b3Z"+ - "\2\u0234\u022f\3\2\2\2\u0234\u0235\3\2\2\2\u0235\u00b2\3\2\2\2\u0236\u0238"+ - "\4\62;\2\u0237\u0236\3\2\2\2\u0238\u0239\3\2\2\2\u0239\u0237\3\2\2\2\u0239"+ - "\u023a\3\2\2\2\u023a\u0241\3\2\2\2\u023b\u023d\7\60\2\2\u023c\u023e\4"+ - "\62;\2\u023d\u023c\3\2\2\2\u023e\u023f\3\2\2\2\u023f\u023d\3\2\2\2\u023f"+ - "\u0240\3\2\2\2\u0240\u0242\3\2\2\2\u0241\u023b\3\2\2\2\u0241\u0242\3\2"+ - "\2\2\u0242\u00b4\3\2\2\2\u0243\u0244\7^\2\2\u0244\u0248\13\2\2\2\u0245"+ - "\u0246\7^\2\2\u0246\u0248\5\u00a7T\2\u0247\u0243\3\2\2\2\u0247\u0245\3"+ - "\2\2\2\u0248\u00b6\3\2\2\2\u0249\u024e\7$\2\2\u024a\u024d\5\u00b5[\2\u024b"+ - "\u024d\n\t\2\2\u024c\u024a\3\2\2\2\u024c\u024b\3\2\2\2\u024d\u0250\3\2"+ - "\2\2\u024e\u024c\3\2\2\2\u024e\u024f\3\2\2\2\u024f\u0251\3\2\2\2\u0250"+ - "\u024e\3\2\2\2\u0251\u0252\7$\2\2\u0252\u0253\b\\\4\2\u0253\u00b8\3\2"+ - "\2\2\u0254\u0255\7}\2\2\u0255\u0256\7}\2\2\u0256\u0258\3\2\2\2\u0257\u0259"+ - "\13\2\2\2\u0258\u0257\3\2\2\2\u0259\u025a\3\2\2\2\u025a\u025b\3\2\2\2"+ - "\u025a\u0258\3\2\2\2\u025b\u025c\3\2\2\2\u025c\u025d\7\177\2\2\u025d\u025e"+ - "\7\177\2\2\u025e\u025f\3\2\2\2\u025f\u0260\b]\5\2\u0260\u00ba\3\2\2\2"+ - "\25\2\u01f9\u0204\u0210\u0216\u021e\u0220\u0224\u0226\u022c\u0231\u0234"+ - "\u0239\u023f\u0241\u0247\u024c\u024e\u025a\6\2\3\2\b\2\2\3\\\2\3]\3"; + "\u0142\7r\2\2\u0142.\3\2\2\2\u0143\u0144\7u\2\2\u0144\u0145\7v\2\2\u0145"+ + "\u0146\7t\2\2\u0146\u0147\7a\2\2\u0147\u0148\7u\2\2\u0148\60\3\2\2\2\u0149"+ + "\u014a\7u\2\2\u014a\u014b\7v\2\2\u014b\u014c\7t\2\2\u014c\u014d\7a\2\2"+ + "\u014d\u014e\7r\2\2\u014e\u014f\7u\2\2\u014f\62\3\2\2\2\u0150\u0151\7"+ + "]\2\2\u0151\64\3\2\2\2\u0152\u0153\7_\2\2\u0153\66\3\2\2\2\u0154\u0155"+ + "\7-\2\2\u0155\u0156\7?\2\2\u01568\3\2\2\2\u0157\u0158\7/\2\2\u0158\u0159"+ + "\7?\2\2\u0159:\3\2\2\2\u015a\u015b\7\61\2\2\u015b\u015c\7?\2\2\u015c<"+ + "\3\2\2\2\u015d\u015e\7,\2\2\u015e\u015f\7?\2\2\u015f>\3\2\2\2\u0160\u0161"+ + "\7,\2\2\u0161\u0162\7,\2\2\u0162\u0163\7?\2\2\u0163@\3\2\2\2\u0164\u0165"+ + "\7>\2\2\u0165\u0166\7>\2\2\u0166\u0167\7?\2\2\u0167B\3\2\2\2\u0168\u0169"+ + "\7@\2\2\u0169\u016a\7@\2\2\u016a\u016b\7?\2\2\u016bD\3\2\2\2\u016c\u016d"+ + "\7>\2\2\u016d\u016e\7>\2\2\u016e\u016f\7B\2\2\u016f\u0170\7?\2\2\u0170"+ + "F\3\2\2\2\u0171\u0172\7@\2\2\u0172\u0173\7@\2\2\u0173\u0174\7B\2\2\u0174"+ + "\u0175\7?\2\2\u0175H\3\2\2\2\u0176\u0177\7(\2\2\u0177\u0178\7?\2\2\u0178"+ + "J\3\2\2\2\u0179\u017a\7~\2\2\u017a\u017b\7?\2\2\u017bL\3\2\2\2\u017c\u017d"+ + "\7`\2\2\u017d\u017e\7?\2\2\u017eN\3\2\2\2\u017f\u0180\7-\2\2\u0180\u0181"+ + "\7-\2\2\u0181P\3\2\2\2\u0182\u0183\7/\2\2\u0183\u0184\7/\2\2\u0184R\3"+ + "\2\2\2\u0185\u0186\7*\2\2\u0186T\3\2\2\2\u0187\u0188\7+\2\2\u0188V\3\2"+ + "\2\2\u0189\u018a\7-\2\2\u018aX\3\2\2\2\u018b\u018c\7/\2\2\u018cZ\3\2\2"+ + "\2\u018d\u018e\7,\2\2\u018e\u018f\7,\2\2\u018f\\\3\2\2\2\u0190\u0191\7"+ + ",\2\2\u0191^\3\2\2\2\u0192\u0193\7\61\2\2\u0193`\3\2\2\2\u0194\u0195\7"+ + ">\2\2\u0195\u0196\7>\2\2\u0196b\3\2\2\2\u0197\u0198\7@\2\2\u0198\u0199"+ + "\7@\2\2\u0199d\3\2\2\2\u019a\u019b\7>\2\2\u019b\u019c\7>\2\2\u019c\u019d"+ + "\7B\2\2\u019df\3\2\2\2\u019e\u019f\7@\2\2\u019f\u01a0\7@\2\2\u01a0\u01a1"+ + "\7B\2\2\u01a1h\3\2\2\2\u01a2\u01a3\7>\2\2\u01a3j\3\2\2\2\u01a4\u01a5\7"+ + "@\2\2\u01a5l\3\2\2\2\u01a6\u01a7\7>\2\2\u01a7\u01a8\7?\2\2\u01a8n\3\2"+ + "\2\2\u01a9\u01aa\7@\2\2\u01aa\u01ab\7?\2\2\u01abp\3\2\2\2\u01ac\u01ad"+ + "\7?\2\2\u01ad\u01ae\7?\2\2\u01aer\3\2\2\2\u01af\u01b0\7#\2\2\u01b0\u01b1"+ + "\7?\2\2\u01b1t\3\2\2\2\u01b2\u01b3\7(\2\2\u01b3v\3\2\2\2\u01b4\u01b5\7"+ + "`\2\2\u01b5x\3\2\2\2\u01b6\u01b7\7~\2\2\u01b7z\3\2\2\2\u01b8\u01b9\7c"+ + "\2\2\u01b9\u01ba\7p\2\2\u01ba\u01bb\7f\2\2\u01bb|\3\2\2\2\u01bc\u01bd"+ + "\7q\2\2\u01bd\u01be\7t\2\2\u01be~\3\2\2\2\u01bf\u01c0\7z\2\2\u01c0\u01c1"+ + "\7q\2\2\u01c1\u01c2\7t\2\2\u01c2\u0080\3\2\2\2\u01c3\u01c4\7p\2\2\u01c4"+ + "\u01c5\7q\2\2\u01c5\u01c6\7v\2\2\u01c6\u0082\3\2\2\2\u01c7\u01c8\7v\2"+ + "\2\u01c8\u01c9\7q\2\2\u01c9\u0084\3\2\2\2\u01ca\u01cb\7t\2\2\u01cb\u01cc"+ + "\7g\2\2\u01cc\u01cd\7v\2\2\u01cd\u01ce\7w\2\2\u01ce\u01cf\7t\2\2\u01cf"+ + "\u01d0\7p\2\2\u01d0\u0086\3\2\2\2\u01d1\u01d2\7\60\2\2\u01d2\u0088\3\2"+ + "\2\2\u01d3\u01d4\7C\2\2\u01d4\u008a\3\2\2\2\u01d5\u01d6\7Z\2\2\u01d6\u008c"+ + "\3\2\2\2\u01d7\u01d8\7[\2\2\u01d8\u008e\3\2\2\2\u01d9\u01da\7C\2\2\u01da"+ + "\u01db\7Z\2\2\u01db\u0090\3\2\2\2\u01dc\u01dd\7C\2\2\u01dd\u01de\7[\2"+ + "\2\u01de\u0092\3\2\2\2\u01df\u01e0\7Z\2\2\u01e0\u01e1\7[\2\2\u01e1\u0094"+ + "\3\2\2\2\u01e2\u01e3\7U\2\2\u01e3\u01e4\7E\2\2\u01e4\u0096\3\2\2\2\u01e5"+ + "\u01e6\7U\2\2\u01e6\u01e7\7K\2\2\u01e7\u0098\3\2\2\2\u01e8\u01e9\7U\2"+ + "\2\u01e9\u01ea\7\\\2\2\u01ea\u009a\3\2\2\2\u01eb\u01ec\7v\2\2\u01ec\u01ed"+ + "\7t\2\2\u01ed\u01ee\7w\2\2\u01ee\u01ef\7g\2\2\u01ef\u009c\3\2\2\2\u01f0"+ + "\u01f1\7h\2\2\u01f1\u01f2\7c\2\2\u01f2\u01f3\7n\2\2\u01f3\u01f4\7u\2\2"+ + "\u01f4\u01f5\7g\2\2\u01f5\u009e\3\2\2\2\u01f6\u01f7\7\'\2\2\u01f7\u01f8"+ + "\7c\2\2\u01f8\u01f9\7u\2\2\u01f9\u01fa\7o\2\2\u01fa\u00a0\3\2\2\2\u01fb"+ + "\u01fc\7u\2\2\u01fc\u01fd\7w\2\2\u01fd\u01fe\7d\2\2\u01fe\u00a2\3\2\2"+ + "\2\u01ff\u0200\7/\2\2\u0200\u0201\7@\2\2\u0201\u00a4\3\2\2\2\u0202\u0203"+ + "\7A\2\2\u0203\u00a6\3\2\2\2\u0204\u0208\t\2\2\2\u0205\u0207\t\3\2\2\u0206"+ + "\u0205\3\2\2\2\u0207\u020a\3\2\2\2\u0208\u0206\3\2\2\2\u0208\u0209\3\2"+ + "\2\2\u0209\u020b\3\2\2\2\u020a\u0208\3\2\2\2\u020b\u020c\5\u00a9U\2\u020c"+ + "\u020d\3\2\2\2\u020d\u020e\bT\2\2\u020e\u00a8\3\2\2\2\u020f\u0213\7=\2"+ + "\2\u0210\u0212\n\2\2\2\u0211\u0210\3\2\2\2\u0212\u0215\3\2\2\2\u0213\u0211"+ + "\3\2\2\2\u0213\u0214\3\2\2\2\u0214\u0216\3\2\2\2\u0215\u0213\3\2\2\2\u0216"+ + "\u0217\bU\2\2\u0217\u00aa\3\2\2\2\u0218\u0219\t\3\2\2\u0219\u021a\3\2"+ + "\2\2\u021a\u021b\bV\3\2\u021b\u00ac\3\2\2\2\u021c\u021e\t\2\2\2\u021d"+ + "\u021c\3\2\2\2\u021e\u021f\3\2\2\2\u021f\u021d\3\2\2\2\u021f\u0220\3\2"+ + "\2\2\u0220\u00ae\3\2\2\2\u0221\u0225\t\4\2\2\u0222\u0224\t\5\2\2\u0223"+ + "\u0222\3\2\2\2\u0224\u0227\3\2\2\2\u0225\u0223\3\2\2\2\u0225\u0226\3\2"+ + "\2\2\u0226\u00b0\3\2\2\2\u0227\u0225\3\2\2\2\u0228\u0230\4\62;\2\u0229"+ + "\u022b\4\63;\2\u022a\u022c\4\62;\2\u022b\u022a\3\2\2\2\u022c\u022d\3\2"+ + "\2\2\u022d\u022b\3\2\2\2\u022d\u022e\3\2\2\2\u022e\u0230\3\2\2\2\u022f"+ + "\u0228\3\2\2\2\u022f\u0229\3\2\2\2\u0230\u00b2\3\2\2\2\u0231\u0233\7&"+ + "\2\2\u0232\u0234\t\6\2\2\u0233\u0232\3\2\2\2\u0234\u0235\3\2\2\2\u0235"+ + "\u0233\3\2\2\2\u0235\u0236\3\2\2\2\u0236\u00b4\3\2\2\2\u0237\u0239\7\'"+ + "\2\2\u0238\u023a\4\62\63\2\u0239\u0238\3\2\2\2\u023a\u023b\3\2\2\2\u023b"+ + "\u0239\3\2\2\2\u023b\u023c\3\2\2\2\u023c\u00b6\3\2\2\2\u023d\u0243\5\u00b9"+ + "]\2\u023e\u0240\t\7\2\2\u023f\u0241\t\b\2\2\u0240\u023f\3\2\2\2\u0240"+ + "\u0241\3\2\2\2\u0241\u0242\3\2\2\2\u0242\u0244\5\u00b9]\2\u0243\u023e"+ + "\3\2\2\2\u0243\u0244\3\2\2\2\u0244\u00b8\3\2\2\2\u0245\u0247\4\62;\2\u0246"+ + "\u0245\3\2\2\2\u0247\u0248\3\2\2\2\u0248\u0246\3\2\2\2\u0248\u0249\3\2"+ + "\2\2\u0249\u0250\3\2\2\2\u024a\u024c\7\60\2\2\u024b\u024d\4\62;\2\u024c"+ + "\u024b\3\2\2\2\u024d\u024e\3\2\2\2\u024e\u024c\3\2\2\2\u024e\u024f\3\2"+ + "\2\2\u024f\u0251\3\2\2\2\u0250\u024a\3\2\2\2\u0250\u0251\3\2\2\2\u0251"+ + "\u00ba\3\2\2\2\u0252\u0253\7^\2\2\u0253\u0257\13\2\2\2\u0254\u0255\7^"+ + "\2\2\u0255\u0257\5\u00adW\2\u0256\u0252\3\2\2\2\u0256\u0254\3\2\2\2\u0257"+ + "\u00bc\3\2\2\2\u0258\u025d\7$\2\2\u0259\u025c\5\u00bb^\2\u025a\u025c\n"+ + "\t\2\2\u025b\u0259\3\2\2\2\u025b\u025a\3\2\2\2\u025c\u025f\3\2\2\2\u025d"+ + "\u025b\3\2\2\2\u025d\u025e\3\2\2\2\u025e\u0260\3\2\2\2\u025f\u025d\3\2"+ + "\2\2\u0260\u0261\7$\2\2\u0261\u0262\b_\4\2\u0262\u00be\3\2\2\2\u0263\u0264"+ + "\7}\2\2\u0264\u0265\7}\2\2\u0265\u0267\3\2\2\2\u0266\u0268\13\2\2\2\u0267"+ + "\u0266\3\2\2\2\u0268\u0269\3\2\2\2\u0269\u026a\3\2\2\2\u0269\u0267\3\2"+ + "\2\2\u026a\u026b\3\2\2\2\u026b\u026c\7\177\2\2\u026c\u026d\7\177\2\2\u026d"+ + "\u026e\3\2\2\2\u026e\u026f\b`\5\2\u026f\u00c0\3\2\2\2\25\2\u0208\u0213"+ + "\u021f\u0225\u022d\u022f\u0233\u0235\u023b\u0240\u0243\u0248\u024e\u0250"+ + "\u0256\u025b\u025d\u0269\6\2\3\2\b\2\2\3_\2\3`\3"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/il65/src/il65/parser/il65Lexer.tokens b/il65/src/il65/parser/il65Lexer.tokens index bb740cab2..cab6eb14f 100644 --- a/il65/src/il65/parser/il65Lexer.tokens +++ b/il65/src/il65/parser/il65Lexer.tokens @@ -77,17 +77,20 @@ T__75=76 T__76=77 T__77=78 T__78=79 -LINECOMMENT=80 -COMMENT=81 -WS=82 -EOL=83 -NAME=84 -DEC_INTEGER=85 -HEX_INTEGER=86 -BIN_INTEGER=87 -FLOAT_NUMBER=88 -STRING=89 -INLINEASMBLOCK=90 +T__79=80 +T__80=81 +T__81=82 +LINECOMMENT=83 +COMMENT=84 +WS=85 +EOL=86 +NAME=87 +DEC_INTEGER=88 +HEX_INTEGER=89 +BIN_INTEGER=90 +FLOAT_NUMBER=91 +STRING=92 +INLINEASMBLOCK=93 '~'=1 '{'=2 '}'=3 @@ -167,3 +170,6 @@ INLINEASMBLOCK=90 'true'=77 'false'=78 '%asm'=79 +'sub'=80 +'->'=81 +'?'=82 diff --git a/il65/src/il65/parser/il65Parser.java b/il65/src/il65/parser/il65Parser.java index e333d5167..d55e6ff4e 100644 --- a/il65/src/il65/parser/il65Parser.java +++ b/il65/src/il65/parser/il65Parser.java @@ -27,9 +27,10 @@ public class il65Parser extends Parser { T__52=53, T__53=54, T__54=55, T__55=56, T__56=57, T__57=58, T__58=59, T__59=60, T__60=61, T__61=62, T__62=63, T__63=64, T__64=65, T__65=66, T__66=67, T__67=68, T__68=69, T__69=70, T__70=71, T__71=72, T__72=73, - T__73=74, T__74=75, T__75=76, T__76=77, T__77=78, T__78=79, LINECOMMENT=80, - COMMENT=81, WS=82, EOL=83, NAME=84, DEC_INTEGER=85, HEX_INTEGER=86, BIN_INTEGER=87, - FLOAT_NUMBER=88, STRING=89, INLINEASMBLOCK=90; + T__73=74, T__74=75, T__75=76, T__76=77, T__77=78, T__78=79, T__79=80, + T__80=81, T__81=82, LINECOMMENT=83, COMMENT=84, WS=85, EOL=86, NAME=87, + DEC_INTEGER=88, HEX_INTEGER=89, BIN_INTEGER=90, FLOAT_NUMBER=91, STRING=92, + INLINEASMBLOCK=93; public static final int RULE_module = 0, RULE_modulestatement = 1, RULE_block = 2, RULE_statement = 3, RULE_labeldef = 4, RULE_call_location = 5, RULE_unconditionaljump = 6, @@ -40,7 +41,8 @@ public class il65Parser extends Parser { RULE_expression_list = 21, RULE_returnstmt = 22, RULE_identifier = 23, RULE_scoped_identifier = 24, RULE_register = 25, RULE_integerliteral = 26, RULE_booleanliteral = 27, RULE_arrayliteral = 28, RULE_stringliteral = 29, - RULE_floatliteral = 30, RULE_literalvalue = 31, RULE_inlineasm = 32; + RULE_floatliteral = 30, RULE_literalvalue = 31, RULE_inlineasm = 32, RULE_subroutine = 33, + RULE_sub_params = 34, RULE_sub_param = 35, RULE_sub_returns = 36, RULE_sub_return = 37; public static final String[] ruleNames = { "module", "modulestatement", "block", "statement", "labeldef", "call_location", "unconditionaljump", "directive", "directivearg", "vardecl", "varinitializer", @@ -48,7 +50,7 @@ public class il65Parser extends Parser { "assign_target", "postincrdecr", "expression", "functioncall", "expression_list", "returnstmt", "identifier", "scoped_identifier", "register", "integerliteral", "booleanliteral", "arrayliteral", "stringliteral", "floatliteral", "literalvalue", - "inlineasm" + "inlineasm", "subroutine", "sub_params", "sub_param", "sub_returns", "sub_return" }; private static final String[] _LITERAL_NAMES = { @@ -61,7 +63,8 @@ public class il65Parser extends Parser { "'*'", "'/'", "'<<'", "'>>'", "'<<@'", "'>>@'", "'<'", "'>'", "'<='", "'>='", "'=='", "'!='", "'&'", "'^'", "'|'", "'and'", "'or'", "'xor'", "'not'", "'to'", "'return'", "'.'", "'A'", "'X'", "'Y'", "'AX'", "'AY'", - "'XY'", "'SC'", "'SI'", "'SZ'", "'true'", "'false'", "'%asm'" + "'XY'", "'SC'", "'SI'", "'SZ'", "'true'", "'false'", "'%asm'", "'sub'", + "'->'", "'?'" }; private static final String[] _SYMBOLIC_NAMES = { null, null, null, null, null, null, null, null, null, null, null, null, @@ -70,9 +73,9 @@ public class il65Parser extends Parser { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, "LINECOMMENT", "COMMENT", - "WS", "EOL", "NAME", "DEC_INTEGER", "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", - "STRING", "INLINEASMBLOCK" + null, null, null, null, null, null, null, null, null, null, null, "LINECOMMENT", + "COMMENT", "WS", "EOL", "NAME", "DEC_INTEGER", "HEX_INTEGER", "BIN_INTEGER", + "FLOAT_NUMBER", "STRING", "INLINEASMBLOCK" }; public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); @@ -148,12 +151,12 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(70); + setState(80); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__5) | (1L << T__6) | (1L << T__7) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12))) != 0) || _la==EOL) { { - setState(68); + setState(78); _errHandler.sync(this); switch (_input.LA(1)) { case T__0: @@ -166,13 +169,13 @@ public class il65Parser extends Parser { case T__11: case T__12: { - setState(66); + setState(76); modulestatement(); } break; case EOL: { - setState(67); + setState(77); match(EOL); } break; @@ -180,11 +183,11 @@ public class il65Parser extends Parser { throw new NoViableAltException(this); } } - setState(72); + setState(82); _errHandler.sync(this); _la = _input.LA(1); } - setState(73); + setState(83); match(EOF); } } @@ -216,7 +219,7 @@ public class il65Parser extends Parser { ModulestatementContext _localctx = new ModulestatementContext(_ctx, getState()); enterRule(_localctx, 2, RULE_modulestatement); try { - setState(77); + setState(87); _errHandler.sync(this); switch (_input.LA(1)) { case T__5: @@ -229,14 +232,14 @@ public class il65Parser extends Parser { case T__12: enterOuterAlt(_localctx, 1); { - setState(75); + setState(85); directive(); } break; case T__0: enterOuterAlt(_localctx, 2); { - setState(76); + setState(86); block(); } break; @@ -285,30 +288,30 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(79); + setState(89); match(T__0); - setState(80); + setState(90); identifier(); - setState(82); + setState(92); _errHandler.sync(this); _la = _input.LA(1); - if (((((_la - 85)) & ~0x3f) == 0 && ((1L << (_la - 85)) & ((1L << (DEC_INTEGER - 85)) | (1L << (HEX_INTEGER - 85)) | (1L << (BIN_INTEGER - 85)))) != 0)) { + if (((((_la - 88)) & ~0x3f) == 0 && ((1L << (_la - 88)) & ((1L << (DEC_INTEGER - 88)) | (1L << (HEX_INTEGER - 88)) | (1L << (BIN_INTEGER - 88)))) != 0)) { { - setState(81); + setState(91); integerliteral(); } } - setState(84); + setState(94); match(T__1); - setState(85); + setState(95); match(EOL); - setState(90); + setState(100); _errHandler.sync(this); _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__5) | (1L << T__6) | (1L << T__7) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__15) | (1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (T__72 - 66)) | (1L << (T__73 - 66)) | (1L << (T__74 - 66)) | (1L << (T__75 - 66)) | (1L << (T__78 - 66)) | (1L << (EOL - 66)) | (1L << (NAME - 66)))) != 0)) { + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__5) | (1L << T__6) | (1L << T__7) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__15) | (1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (T__72 - 66)) | (1L << (T__73 - 66)) | (1L << (T__74 - 66)) | (1L << (T__75 - 66)) | (1L << (T__78 - 66)) | (1L << (T__79 - 66)) | (1L << (EOL - 66)) | (1L << (NAME - 66)))) != 0)) { { - setState(88); + setState(98); _errHandler.sync(this); switch (_input.LA(1)) { case T__4: @@ -340,15 +343,16 @@ public class il65Parser extends Parser { case T__74: case T__75: case T__78: + case T__79: case NAME: { - setState(86); + setState(96); statement(); } break; case EOL: { - setState(87); + setState(97); match(EOL); } break; @@ -356,13 +360,13 @@ public class il65Parser extends Parser { throw new NoViableAltException(this); } } - setState(92); + setState(102); _errHandler.sync(this); _la = _input.LA(1); } - setState(93); + setState(103); match(T__2); - setState(94); + setState(104); match(EOL); } } @@ -405,6 +409,9 @@ public class il65Parser extends Parser { public PostincrdecrContext postincrdecr() { return getRuleContext(PostincrdecrContext.class,0); } + public SubroutineContext subroutine() { + return getRuleContext(SubroutineContext.class,0); + } public InlineasmContext inlineasm() { return getRuleContext(InlineasmContext.class,0); } @@ -424,90 +431,97 @@ public class il65Parser extends Parser { StatementContext _localctx = new StatementContext(_ctx, getState()); enterRule(_localctx, 6, RULE_statement); try { - setState(108); + setState(119); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(96); + setState(106); directive(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(97); + setState(107); varinitializer(); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(98); + setState(108); vardecl(); } break; case 4: enterOuterAlt(_localctx, 4); { - setState(99); + setState(109); constdecl(); } break; case 5: enterOuterAlt(_localctx, 5); { - setState(100); + setState(110); memoryvardecl(); } break; case 6: enterOuterAlt(_localctx, 6); { - setState(101); + setState(111); assignment(); } break; case 7: enterOuterAlt(_localctx, 7); { - setState(102); + setState(112); augassignment(); } break; case 8: enterOuterAlt(_localctx, 8); { - setState(103); + setState(113); unconditionaljump(); } break; case 9: enterOuterAlt(_localctx, 9); { - setState(104); + setState(114); postincrdecr(); } break; case 10: enterOuterAlt(_localctx, 10); { - setState(105); - inlineasm(); + setState(115); + subroutine(); } break; case 11: enterOuterAlt(_localctx, 11); { - setState(106); - labeldef(); + setState(116); + inlineasm(); } break; case 12: enterOuterAlt(_localctx, 12); { - setState(107); + setState(117); + labeldef(); + } + break; + case 13: + enterOuterAlt(_localctx, 13); + { + setState(118); returnstmt(); } break; @@ -540,9 +554,9 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(110); + setState(121); identifier(); - setState(111); + setState(122); match(T__3); } } @@ -577,27 +591,27 @@ public class il65Parser extends Parser { Call_locationContext _localctx = new Call_locationContext(_ctx, getState()); enterRule(_localctx, 10, RULE_call_location); try { - setState(116); + setState(127); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(113); + setState(124); integerliteral(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(114); + setState(125); identifier(); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(115); + setState(126); scoped_identifier(); } break; @@ -630,9 +644,9 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(118); + setState(129); match(T__4); - setState(119); + setState(130); call_location(); } } @@ -668,7 +682,7 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(121); + setState(132); ((DirectiveContext)_localctx).directivename = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__6) | (1L << T__7) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12))) != 0)) ) { @@ -679,17 +693,17 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(133); + setState(144); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { case 1: { - setState(123); + setState(134); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { case 1: { - setState(122); + setState(133); directivearg(); } break; @@ -698,21 +712,21 @@ public class il65Parser extends Parser { break; case 2: { - setState(125); + setState(136); directivearg(); - setState(130); + setState(141); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__13) { { { - setState(126); + setState(137); match(T__13); - setState(127); + setState(138); directivearg(); } } - setState(132); + setState(143); _errHandler.sync(this); _la = _input.LA(1); } @@ -752,20 +766,20 @@ public class il65Parser extends Parser { DirectiveargContext _localctx = new DirectiveargContext(_ctx, getState()); enterRule(_localctx, 16, RULE_directivearg); try { - setState(138); + setState(149); _errHandler.sync(this); switch (_input.LA(1)) { case STRING: enterOuterAlt(_localctx, 1); { - setState(135); + setState(146); stringliteral(); } break; case NAME: enterOuterAlt(_localctx, 2); { - setState(136); + setState(147); identifier(); } break; @@ -774,7 +788,7 @@ public class il65Parser extends Parser { case BIN_INTEGER: enterOuterAlt(_localctx, 3); { - setState(137); + setState(148); integerliteral(); } break; @@ -816,19 +830,19 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(140); + setState(151); datatype(); - setState(142); + setState(153); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__24) { { - setState(141); + setState(152); arrayspec(); } } - setState(144); + setState(155); identifier(); } } @@ -869,23 +883,23 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(146); + setState(157); datatype(); - setState(148); + setState(159); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__24) { { - setState(147); + setState(158); arrayspec(); } } - setState(150); + setState(161); identifier(); - setState(151); + setState(162); match(T__14); - setState(152); + setState(163); expression(0); } } @@ -916,9 +930,9 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(154); + setState(165); match(T__15); - setState(155); + setState(166); varinitializer(); } } @@ -949,9 +963,9 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(157); + setState(168); match(T__16); - setState(158); + setState(169); varinitializer(); } } @@ -980,7 +994,7 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(160); + setState(171); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23))) != 0)) ) { _errHandler.recoverInline(this); @@ -1023,23 +1037,23 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(162); + setState(173); match(T__24); - setState(163); + setState(174); expression(0); - setState(166); + setState(177); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__13) { { - setState(164); + setState(175); match(T__13); - setState(165); + setState(176); expression(0); } } - setState(168); + setState(179); match(T__25); } } @@ -1073,11 +1087,11 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(170); + setState(181); assign_target(); - setState(171); + setState(182); match(T__14); - setState(172); + setState(183); expression(0); } } @@ -1113,9 +1127,9 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(174); + setState(185); assign_target(); - setState(175); + setState(186); ((AugassignmentContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37))) != 0)) ) { @@ -1126,7 +1140,7 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(176); + setState(187); expression(0); } } @@ -1161,27 +1175,27 @@ public class il65Parser extends Parser { Assign_targetContext _localctx = new Assign_targetContext(_ctx, getState()); enterRule(_localctx, 34, RULE_assign_target); try { - setState(181); + setState(192); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(178); + setState(189); register(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(179); + setState(190); identifier(); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(180); + setState(191); scoped_identifier(); } break; @@ -1216,9 +1230,9 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(183); + setState(194); assign_target(); - setState(184); + setState(195); ((PostincrdecrContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !(_la==T__38 || _la==T__39) ) { @@ -1295,28 +1309,28 @@ public class il65Parser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(200); + setState(211); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) { case 1: { - setState(187); + setState(198); match(T__40); - setState(188); + setState(199); expression(0); - setState(189); + setState(200); match(T__41); } break; case 2: { - setState(191); + setState(202); functioncall(); } break; case 3: { - setState(192); + setState(203); ((ExpressionContext)_localctx).prefix = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__42) | (1L << T__43))) != 0)) ) { @@ -1327,45 +1341,45 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(193); + setState(204); expression(19); } break; case 4: { - setState(194); + setState(205); ((ExpressionContext)_localctx).prefix = match(T__63); - setState(195); + setState(206); expression(6); } break; case 5: { - setState(196); + setState(207); literalvalue(); } break; case 6: { - setState(197); + setState(208); register(); } break; case 7: { - setState(198); + setState(209); identifier(); } break; case 8: { - setState(199); + setState(210); scoped_identifier(); } break; } _ctx.stop = _input.LT(-1); - setState(245); + setState(256); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,18,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { @@ -1373,7 +1387,7 @@ public class il65Parser extends Parser { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(243); + setState(254); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,17,_ctx) ) { case 1: @@ -1382,11 +1396,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(202); + setState(213); if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); - setState(203); + setState(214); ((ExpressionContext)_localctx).bop = match(T__44); - setState(204); + setState(215); ((ExpressionContext)_localctx).right = expression(19); } break; @@ -1396,9 +1410,9 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(205); + setState(216); if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)"); - setState(206); + setState(217); ((ExpressionContext)_localctx).bop = _input.LT(1); _la = _input.LA(1); if ( !(_la==T__45 || _la==T__46) ) { @@ -1409,7 +1423,7 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(207); + setState(218); ((ExpressionContext)_localctx).right = expression(18); } break; @@ -1419,9 +1433,9 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(208); + setState(219); if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); - setState(209); + setState(220); ((ExpressionContext)_localctx).bop = _input.LT(1); _la = _input.LA(1); if ( !(_la==T__42 || _la==T__43) ) { @@ -1432,7 +1446,7 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(210); + setState(221); ((ExpressionContext)_localctx).right = expression(17); } break; @@ -1442,9 +1456,9 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(211); + setState(222); if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)"); - setState(212); + setState(223); ((ExpressionContext)_localctx).bop = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__47) | (1L << T__48) | (1L << T__49) | (1L << T__50))) != 0)) ) { @@ -1455,7 +1469,7 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(213); + setState(224); ((ExpressionContext)_localctx).right = expression(16); } break; @@ -1465,9 +1479,9 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(214); + setState(225); if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); - setState(215); + setState(226); ((ExpressionContext)_localctx).bop = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__51) | (1L << T__52) | (1L << T__53) | (1L << T__54))) != 0)) ) { @@ -1478,7 +1492,7 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(216); + setState(227); ((ExpressionContext)_localctx).right = expression(15); } break; @@ -1488,9 +1502,9 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(217); + setState(228); if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); - setState(218); + setState(229); ((ExpressionContext)_localctx).bop = _input.LT(1); _la = _input.LA(1); if ( !(_la==T__55 || _la==T__56) ) { @@ -1501,7 +1515,7 @@ public class il65Parser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(219); + setState(230); ((ExpressionContext)_localctx).right = expression(14); } break; @@ -1511,11 +1525,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(220); + setState(231); if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); - setState(221); + setState(232); ((ExpressionContext)_localctx).bop = match(T__57); - setState(222); + setState(233); ((ExpressionContext)_localctx).right = expression(13); } break; @@ -1525,11 +1539,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(223); + setState(234); if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); - setState(224); + setState(235); ((ExpressionContext)_localctx).bop = match(T__58); - setState(225); + setState(236); ((ExpressionContext)_localctx).right = expression(12); } break; @@ -1539,11 +1553,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(226); + setState(237); if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); - setState(227); + setState(238); ((ExpressionContext)_localctx).bop = match(T__59); - setState(228); + setState(239); ((ExpressionContext)_localctx).right = expression(11); } break; @@ -1553,11 +1567,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(229); + setState(240); if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); - setState(230); + setState(241); ((ExpressionContext)_localctx).bop = match(T__60); - setState(231); + setState(242); ((ExpressionContext)_localctx).right = expression(10); } break; @@ -1567,11 +1581,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(232); + setState(243); if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); - setState(233); + setState(244); ((ExpressionContext)_localctx).bop = match(T__61); - setState(234); + setState(245); ((ExpressionContext)_localctx).right = expression(9); } break; @@ -1581,11 +1595,11 @@ public class il65Parser extends Parser { _localctx.left = _prevctx; _localctx.left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(235); + setState(246); if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(236); + setState(247); ((ExpressionContext)_localctx).bop = match(T__62); - setState(237); + setState(248); ((ExpressionContext)_localctx).right = expression(8); } break; @@ -1595,11 +1609,11 @@ public class il65Parser extends Parser { _localctx.rangefrom = _prevctx; _localctx.rangefrom = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(238); + setState(249); if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); - setState(239); + setState(250); match(T__64); - setState(240); + setState(251); ((ExpressionContext)_localctx).rangeto = expression(6); } break; @@ -1607,16 +1621,16 @@ public class il65Parser extends Parser { { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); - setState(241); + setState(252); if (!(precpred(_ctx, 21))) throw new FailedPredicateException(this, "precpred(_ctx, 21)"); - setState(242); + setState(253); arrayspec(); } break; } } } - setState(247); + setState(258); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,18,_ctx); } @@ -1653,21 +1667,21 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(248); + setState(259); call_location(); - setState(249); + setState(260); match(T__40); - setState(251); + setState(262); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__24) | (1L << T__40) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (T__67 - 64)) | (1L << (T__68 - 64)) | (1L << (T__69 - 64)) | (1L << (T__70 - 64)) | (1L << (T__71 - 64)) | (1L << (T__72 - 64)) | (1L << (T__73 - 64)) | (1L << (T__74 - 64)) | (1L << (T__75 - 64)) | (1L << (T__76 - 64)) | (1L << (T__77 - 64)) | (1L << (NAME - 64)) | (1L << (DEC_INTEGER - 64)) | (1L << (HEX_INTEGER - 64)) | (1L << (BIN_INTEGER - 64)) | (1L << (FLOAT_NUMBER - 64)) | (1L << (STRING - 64)))) != 0)) { { - setState(250); + setState(261); expression_list(); } } - setState(253); + setState(264); match(T__41); } } @@ -1702,21 +1716,21 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(255); + setState(266); expression(0); - setState(260); + setState(271); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__13) { { { - setState(256); + setState(267); match(T__13); - setState(257); + setState(268); expression(0); } } - setState(262); + setState(273); _errHandler.sync(this); _la = _input.LA(1); } @@ -1749,14 +1763,14 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(263); + setState(274); match(T__65); - setState(265); + setState(276); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,21,_ctx) ) { case 1: { - setState(264); + setState(275); expression_list(); } break; @@ -1788,7 +1802,7 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(267); + setState(278); match(NAME); } } @@ -1821,9 +1835,9 @@ public class il65Parser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(269); + setState(280); match(NAME); - setState(272); + setState(283); _errHandler.sync(this); _alt = 1; do { @@ -1831,9 +1845,9 @@ public class il65Parser extends Parser { case 1: { { - setState(270); + setState(281); match(T__66); - setState(271); + setState(282); match(NAME); } } @@ -1841,7 +1855,7 @@ public class il65Parser extends Parser { default: throw new NoViableAltException(this); } - setState(274); + setState(285); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,22,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); @@ -1872,7 +1886,7 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(276); + setState(287); _la = _input.LA(1); if ( !(((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (T__67 - 68)) | (1L << (T__68 - 68)) | (1L << (T__69 - 68)) | (1L << (T__70 - 68)) | (1L << (T__71 - 68)) | (1L << (T__72 - 68)) | (1L << (T__73 - 68)) | (1L << (T__74 - 68)) | (1L << (T__75 - 68)))) != 0)) ) { _errHandler.recoverInline(this); @@ -1912,9 +1926,9 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(278); + setState(289); _la = _input.LA(1); - if ( !(((((_la - 85)) & ~0x3f) == 0 && ((1L << (_la - 85)) & ((1L << (DEC_INTEGER - 85)) | (1L << (HEX_INTEGER - 85)) | (1L << (BIN_INTEGER - 85)))) != 0)) ) { + if ( !(((((_la - 88)) & ~0x3f) == 0 && ((1L << (_la - 88)) & ((1L << (DEC_INTEGER - 88)) | (1L << (HEX_INTEGER - 88)) | (1L << (BIN_INTEGER - 88)))) != 0)) ) { _errHandler.recoverInline(this); } else { @@ -1949,7 +1963,7 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(280); + setState(291); _la = _input.LA(1); if ( !(_la==T__76 || _la==T__77) ) { _errHandler.recoverInline(this); @@ -1992,27 +2006,27 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(282); + setState(293); match(T__24); - setState(283); + setState(294); expression(0); - setState(288); + setState(299); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__13) { { { - setState(284); + setState(295); match(T__13); - setState(285); + setState(296); expression(0); } } - setState(290); + setState(301); _errHandler.sync(this); _la = _input.LA(1); } - setState(291); + setState(302); match(T__25); } } @@ -2041,7 +2055,7 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(293); + setState(304); match(STRING); } } @@ -2070,7 +2084,7 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(295); + setState(306); match(FLOAT_NUMBER); } } @@ -2111,7 +2125,7 @@ public class il65Parser extends Parser { LiteralvalueContext _localctx = new LiteralvalueContext(_ctx, getState()); enterRule(_localctx, 62, RULE_literalvalue); try { - setState(302); + setState(313); _errHandler.sync(this); switch (_input.LA(1)) { case DEC_INTEGER: @@ -2119,7 +2133,7 @@ public class il65Parser extends Parser { case BIN_INTEGER: enterOuterAlt(_localctx, 1); { - setState(297); + setState(308); integerliteral(); } break; @@ -2127,28 +2141,28 @@ public class il65Parser extends Parser { case T__77: enterOuterAlt(_localctx, 2); { - setState(298); + setState(309); booleanliteral(); } break; case T__24: enterOuterAlt(_localctx, 3); { - setState(299); + setState(310); arrayliteral(); } break; case STRING: enterOuterAlt(_localctx, 4); { - setState(300); + setState(311); stringliteral(); } break; case FLOAT_NUMBER: enterOuterAlt(_localctx, 5); { - setState(301); + setState(312); floatliteral(); } break; @@ -2181,9 +2195,9 @@ public class il65Parser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(304); + setState(315); match(T__78); - setState(305); + setState(316); match(INLINEASMBLOCK); } } @@ -2198,6 +2212,359 @@ public class il65Parser extends Parser { return _localctx; } + public static class SubroutineContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public List EOL() { return getTokens(il65Parser.EOL); } + public TerminalNode EOL(int i) { + return getToken(il65Parser.EOL, i); + } + public Sub_paramsContext sub_params() { + return getRuleContext(Sub_paramsContext.class,0); + } + public Sub_returnsContext sub_returns() { + return getRuleContext(Sub_returnsContext.class,0); + } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public SubroutineContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_subroutine; } + } + + public final SubroutineContext subroutine() throws RecognitionException { + SubroutineContext _localctx = new SubroutineContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_subroutine); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(318); + match(T__79); + setState(319); + identifier(); + setState(320); + match(T__40); + setState(322); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==NAME) { + { + setState(321); + sub_params(); + } + } + + setState(324); + match(T__41); + setState(325); + match(T__80); + setState(326); + match(T__40); + setState(328); + _errHandler.sync(this); + _la = _input.LA(1); + if (((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (T__67 - 68)) | (1L << (T__68 - 68)) | (1L << (T__69 - 68)) | (1L << (T__70 - 68)) | (1L << (T__71 - 68)) | (1L << (T__72 - 68)) | (1L << (T__73 - 68)) | (1L << (T__74 - 68)) | (1L << (T__75 - 68)) | (1L << (T__81 - 68)))) != 0)) { + { + setState(327); + sub_returns(); + } + } + + setState(330); + match(T__41); + setState(331); + match(T__1); + setState(332); + match(EOL); + setState(337); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__5) | (1L << T__6) | (1L << T__7) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__15) | (1L << T__16) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (T__72 - 66)) | (1L << (T__73 - 66)) | (1L << (T__74 - 66)) | (1L << (T__75 - 66)) | (1L << (T__78 - 66)) | (1L << (T__79 - 66)) | (1L << (EOL - 66)) | (1L << (NAME - 66)))) != 0)) { + { + setState(335); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__4: + case T__5: + case T__6: + case T__7: + case T__8: + case T__9: + case T__10: + case T__11: + case T__12: + case T__15: + case T__16: + case T__17: + case T__18: + case T__19: + case T__20: + case T__21: + case T__22: + case T__23: + case T__65: + case T__67: + case T__68: + case T__69: + case T__70: + case T__71: + case T__72: + case T__73: + case T__74: + case T__75: + case T__78: + case T__79: + case NAME: + { + setState(333); + statement(); + } + break; + case EOL: + { + setState(334); + match(EOL); + } + break; + default: + throw new NoViableAltException(this); + } + } + setState(339); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(340); + match(T__2); + setState(341); + match(EOL); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Sub_paramsContext extends ParserRuleContext { + public List sub_param() { + return getRuleContexts(Sub_paramContext.class); + } + public Sub_paramContext sub_param(int i) { + return getRuleContext(Sub_paramContext.class,i); + } + public Sub_paramsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_sub_params; } + } + + public final Sub_paramsContext sub_params() throws RecognitionException { + Sub_paramsContext _localctx = new Sub_paramsContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_sub_params); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(343); + sub_param(); + setState(348); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__13) { + { + { + setState(344); + match(T__13); + setState(345); + sub_param(); + } + } + setState(350); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Sub_paramContext extends ParserRuleContext { + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); + } + public RegisterContext register() { + return getRuleContext(RegisterContext.class,0); + } + public Sub_paramContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_sub_param; } + } + + public final Sub_paramContext sub_param() throws RecognitionException { + Sub_paramContext _localctx = new Sub_paramContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_sub_param); + try { + enterOuterAlt(_localctx, 1); + { + setState(351); + identifier(); + setState(352); + match(T__3); + setState(353); + register(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Sub_returnsContext extends ParserRuleContext { + public List sub_return() { + return getRuleContexts(Sub_returnContext.class); + } + public Sub_returnContext sub_return(int i) { + return getRuleContext(Sub_returnContext.class,i); + } + public Sub_returnsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_sub_returns; } + } + + public final Sub_returnsContext sub_returns() throws RecognitionException { + Sub_returnsContext _localctx = new Sub_returnsContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_sub_returns); + int _la; + try { + setState(364); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__81: + enterOuterAlt(_localctx, 1); + { + setState(355); + match(T__81); + } + break; + case T__67: + case T__68: + case T__69: + case T__70: + case T__71: + case T__72: + case T__73: + case T__74: + case T__75: + enterOuterAlt(_localctx, 2); + { + { + setState(356); + sub_return(); + setState(361); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__13) { + { + { + setState(357); + match(T__13); + setState(358); + sub_return(); + } + } + setState(363); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + 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 Sub_returnContext extends ParserRuleContext { + public RegisterContext register() { + return getRuleContext(RegisterContext.class,0); + } + public Sub_returnContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_sub_return; } + } + + public final Sub_returnContext sub_return() throws RecognitionException { + Sub_returnContext _localctx = new Sub_returnContext(_ctx, getState()); + enterRule(_localctx, 74, RULE_sub_return); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(366); + register(); + setState(368); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==T__81) { + { + setState(367); + match(T__81); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { switch (ruleIndex) { case 19: @@ -2240,114 +2607,138 @@ public class il65Parser extends Parser { } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\\\u0136\4\2\t\2\4"+ + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3_\u0175\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\"\3\2\3\2\7\2G\n\2\f\2\16\2J\13\2\3\2\3\2\3\3\3\3\5\3P\n\3\3"+ - "\4\3\4\3\4\5\4U\n\4\3\4\3\4\3\4\3\4\7\4[\n\4\f\4\16\4^\13\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\5\5o\n\5\3\6\3\6\3"+ - "\6\3\7\3\7\3\7\5\7w\n\7\3\b\3\b\3\b\3\t\3\t\5\t~\n\t\3\t\3\t\3\t\7\t\u0083"+ - "\n\t\f\t\16\t\u0086\13\t\5\t\u0088\n\t\3\n\3\n\3\n\5\n\u008d\n\n\3\13"+ - "\3\13\5\13\u0091\n\13\3\13\3\13\3\f\3\f\5\f\u0097\n\f\3\f\3\f\3\f\3\f"+ - "\3\r\3\r\3\r\3\16\3\16\3\16\3\17\3\17\3\20\3\20\3\20\3\20\5\20\u00a9\n"+ - "\20\3\20\3\20\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22\3\23\3\23\3\23\5"+ - "\23\u00b8\n\23\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25"+ - "\3\25\3\25\3\25\3\25\3\25\3\25\5\25\u00cb\n\25\3\25\3\25\3\25\3\25\3\25"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\3\2\3\2\7\2Q\n\2\f\2\16\2"+ + "T\13\2\3\2\3\2\3\3\3\3\5\3Z\n\3\3\4\3\4\3\4\5\4_\n\4\3\4\3\4\3\4\3\4\7"+ + "\4e\n\4\f\4\16\4h\13\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\5\5z\n\5\3\6\3\6\3\6\3\7\3\7\3\7\5\7\u0082\n\7\3\b\3"+ + "\b\3\b\3\t\3\t\5\t\u0089\n\t\3\t\3\t\3\t\7\t\u008e\n\t\f\t\16\t\u0091"+ + "\13\t\5\t\u0093\n\t\3\n\3\n\3\n\5\n\u0098\n\n\3\13\3\13\5\13\u009c\n\13"+ + "\3\13\3\13\3\f\3\f\5\f\u00a2\n\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\16\3\16"+ + "\3\16\3\17\3\17\3\20\3\20\3\20\3\20\5\20\u00b4\n\20\3\20\3\20\3\21\3\21"+ + "\3\21\3\21\3\22\3\22\3\22\3\22\3\23\3\23\3\23\5\23\u00c3\n\23\3\24\3\24"+ + "\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25"+ + "\3\25\5\25\u00d6\n\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25"+ "\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25"+ "\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25"+ - "\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\7\25\u00f6\n\25\f\25\16\25\u00f9"+ - "\13\25\3\26\3\26\3\26\5\26\u00fe\n\26\3\26\3\26\3\27\3\27\3\27\7\27\u0105"+ - "\n\27\f\27\16\27\u0108\13\27\3\30\3\30\5\30\u010c\n\30\3\31\3\31\3\32"+ - "\3\32\3\32\6\32\u0113\n\32\r\32\16\32\u0114\3\33\3\33\3\34\3\34\3\35\3"+ - "\35\3\36\3\36\3\36\3\36\7\36\u0121\n\36\f\36\16\36\u0124\13\36\3\36\3"+ - "\36\3\37\3\37\3 \3 \3!\3!\3!\3!\3!\5!\u0131\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:<>@B\2\17"+ - "\3\2\b\17\3\2\24\32\3\2\35(\3\2)*\4\2\3\3-.\3\2\60\61\3\2-.\3\2\62\65"+ - "\3\2\669\3\2:;\3\2FN\3\2WY\3\2OP\2\u014f\2H\3\2\2\2\4O\3\2\2\2\6Q\3\2"+ - "\2\2\bn\3\2\2\2\np\3\2\2\2\fv\3\2\2\2\16x\3\2\2\2\20{\3\2\2\2\22\u008c"+ - "\3\2\2\2\24\u008e\3\2\2\2\26\u0094\3\2\2\2\30\u009c\3\2\2\2\32\u009f\3"+ - "\2\2\2\34\u00a2\3\2\2\2\36\u00a4\3\2\2\2 \u00ac\3\2\2\2\"\u00b0\3\2\2"+ - "\2$\u00b7\3\2\2\2&\u00b9\3\2\2\2(\u00ca\3\2\2\2*\u00fa\3\2\2\2,\u0101"+ - "\3\2\2\2.\u0109\3\2\2\2\60\u010d\3\2\2\2\62\u010f\3\2\2\2\64\u0116\3\2"+ - "\2\2\66\u0118\3\2\2\28\u011a\3\2\2\2:\u011c\3\2\2\2<\u0127\3\2\2\2>\u0129"+ - "\3\2\2\2@\u0130\3\2\2\2B\u0132\3\2\2\2DG\5\4\3\2EG\7U\2\2FD\3\2\2\2FE"+ - "\3\2\2\2GJ\3\2\2\2HF\3\2\2\2HI\3\2\2\2IK\3\2\2\2JH\3\2\2\2KL\7\2\2\3L"+ - "\3\3\2\2\2MP\5\20\t\2NP\5\6\4\2OM\3\2\2\2ON\3\2\2\2P\5\3\2\2\2QR\7\3\2"+ - "\2RT\5\60\31\2SU\5\66\34\2TS\3\2\2\2TU\3\2\2\2UV\3\2\2\2VW\7\4\2\2W\\"+ - "\7U\2\2X[\5\b\5\2Y[\7U\2\2ZX\3\2\2\2ZY\3\2\2\2[^\3\2\2\2\\Z\3\2\2\2\\"+ - "]\3\2\2\2]_\3\2\2\2^\\\3\2\2\2_`\7\5\2\2`a\7U\2\2a\7\3\2\2\2bo\5\20\t"+ - "\2co\5\26\f\2do\5\24\13\2eo\5\30\r\2fo\5\32\16\2go\5 \21\2ho\5\"\22\2"+ - "io\5\16\b\2jo\5&\24\2ko\5B\"\2lo\5\n\6\2mo\5.\30\2nb\3\2\2\2nc\3\2\2\2"+ - "nd\3\2\2\2ne\3\2\2\2nf\3\2\2\2ng\3\2\2\2nh\3\2\2\2ni\3\2\2\2nj\3\2\2\2"+ - "nk\3\2\2\2nl\3\2\2\2nm\3\2\2\2o\t\3\2\2\2pq\5\60\31\2qr\7\6\2\2r\13\3"+ - "\2\2\2sw\5\66\34\2tw\5\60\31\2uw\5\62\32\2vs\3\2\2\2vt\3\2\2\2vu\3\2\2"+ - "\2w\r\3\2\2\2xy\7\7\2\2yz\5\f\7\2z\17\3\2\2\2{\u0087\t\2\2\2|~\5\22\n"+ - "\2}|\3\2\2\2}~\3\2\2\2~\u0088\3\2\2\2\177\u0084\5\22\n\2\u0080\u0081\7"+ - "\20\2\2\u0081\u0083\5\22\n\2\u0082\u0080\3\2\2\2\u0083\u0086\3\2\2\2\u0084"+ - "\u0082\3\2\2\2\u0084\u0085\3\2\2\2\u0085\u0088\3\2\2\2\u0086\u0084\3\2"+ - "\2\2\u0087}\3\2\2\2\u0087\177\3\2\2\2\u0088\21\3\2\2\2\u0089\u008d\5<"+ - "\37\2\u008a\u008d\5\60\31\2\u008b\u008d\5\66\34\2\u008c\u0089\3\2\2\2"+ - "\u008c\u008a\3\2\2\2\u008c\u008b\3\2\2\2\u008d\23\3\2\2\2\u008e\u0090"+ - "\5\34\17\2\u008f\u0091\5\36\20\2\u0090\u008f\3\2\2\2\u0090\u0091\3\2\2"+ - "\2\u0091\u0092\3\2\2\2\u0092\u0093\5\60\31\2\u0093\25\3\2\2\2\u0094\u0096"+ - "\5\34\17\2\u0095\u0097\5\36\20\2\u0096\u0095\3\2\2\2\u0096\u0097\3\2\2"+ - "\2\u0097\u0098\3\2\2\2\u0098\u0099\5\60\31\2\u0099\u009a\7\21\2\2\u009a"+ - "\u009b\5(\25\2\u009b\27\3\2\2\2\u009c\u009d\7\22\2\2\u009d\u009e\5\26"+ - "\f\2\u009e\31\3\2\2\2\u009f\u00a0\7\23\2\2\u00a0\u00a1\5\26\f\2\u00a1"+ - "\33\3\2\2\2\u00a2\u00a3\t\3\2\2\u00a3\35\3\2\2\2\u00a4\u00a5\7\33\2\2"+ - "\u00a5\u00a8\5(\25\2\u00a6\u00a7\7\20\2\2\u00a7\u00a9\5(\25\2\u00a8\u00a6"+ - "\3\2\2\2\u00a8\u00a9\3\2\2\2\u00a9\u00aa\3\2\2\2\u00aa\u00ab\7\34\2\2"+ - "\u00ab\37\3\2\2\2\u00ac\u00ad\5$\23\2\u00ad\u00ae\7\21\2\2\u00ae\u00af"+ - "\5(\25\2\u00af!\3\2\2\2\u00b0\u00b1\5$\23\2\u00b1\u00b2\t\4\2\2\u00b2"+ - "\u00b3\5(\25\2\u00b3#\3\2\2\2\u00b4\u00b8\5\64\33\2\u00b5\u00b8\5\60\31"+ - "\2\u00b6\u00b8\5\62\32\2\u00b7\u00b4\3\2\2\2\u00b7\u00b5\3\2\2\2\u00b7"+ - "\u00b6\3\2\2\2\u00b8%\3\2\2\2\u00b9\u00ba\5$\23\2\u00ba\u00bb\t\5\2\2"+ - "\u00bb\'\3\2\2\2\u00bc\u00bd\b\25\1\2\u00bd\u00be\7+\2\2\u00be\u00bf\5"+ - "(\25\2\u00bf\u00c0\7,\2\2\u00c0\u00cb\3\2\2\2\u00c1\u00cb\5*\26\2\u00c2"+ - "\u00c3\t\6\2\2\u00c3\u00cb\5(\25\25\u00c4\u00c5\7B\2\2\u00c5\u00cb\5("+ - "\25\b\u00c6\u00cb\5@!\2\u00c7\u00cb\5\64\33\2\u00c8\u00cb\5\60\31\2\u00c9"+ - "\u00cb\5\62\32\2\u00ca\u00bc\3\2\2\2\u00ca\u00c1\3\2\2\2\u00ca\u00c2\3"+ - "\2\2\2\u00ca\u00c4\3\2\2\2\u00ca\u00c6\3\2\2\2\u00ca\u00c7\3\2\2\2\u00ca"+ - "\u00c8\3\2\2\2\u00ca\u00c9\3\2\2\2\u00cb\u00f7\3\2\2\2\u00cc\u00cd\f\24"+ - "\2\2\u00cd\u00ce\7/\2\2\u00ce\u00f6\5(\25\25\u00cf\u00d0\f\23\2\2\u00d0"+ - "\u00d1\t\7\2\2\u00d1\u00f6\5(\25\24\u00d2\u00d3\f\22\2\2\u00d3\u00d4\t"+ - "\b\2\2\u00d4\u00f6\5(\25\23\u00d5\u00d6\f\21\2\2\u00d6\u00d7\t\t\2\2\u00d7"+ - "\u00f6\5(\25\22\u00d8\u00d9\f\20\2\2\u00d9\u00da\t\n\2\2\u00da\u00f6\5"+ - "(\25\21\u00db\u00dc\f\17\2\2\u00dc\u00dd\t\13\2\2\u00dd\u00f6\5(\25\20"+ - "\u00de\u00df\f\16\2\2\u00df\u00e0\7<\2\2\u00e0\u00f6\5(\25\17\u00e1\u00e2"+ - "\f\r\2\2\u00e2\u00e3\7=\2\2\u00e3\u00f6\5(\25\16\u00e4\u00e5\f\f\2\2\u00e5"+ - "\u00e6\7>\2\2\u00e6\u00f6\5(\25\r\u00e7\u00e8\f\13\2\2\u00e8\u00e9\7?"+ - "\2\2\u00e9\u00f6\5(\25\f\u00ea\u00eb\f\n\2\2\u00eb\u00ec\7@\2\2\u00ec"+ - "\u00f6\5(\25\13\u00ed\u00ee\f\t\2\2\u00ee\u00ef\7A\2\2\u00ef\u00f6\5("+ - "\25\n\u00f0\u00f1\f\7\2\2\u00f1\u00f2\7C\2\2\u00f2\u00f6\5(\25\b\u00f3"+ - "\u00f4\f\27\2\2\u00f4\u00f6\5\36\20\2\u00f5\u00cc\3\2\2\2\u00f5\u00cf"+ - "\3\2\2\2\u00f5\u00d2\3\2\2\2\u00f5\u00d5\3\2\2\2\u00f5\u00d8\3\2\2\2\u00f5"+ - "\u00db\3\2\2\2\u00f5\u00de\3\2\2\2\u00f5\u00e1\3\2\2\2\u00f5\u00e4\3\2"+ - "\2\2\u00f5\u00e7\3\2\2\2\u00f5\u00ea\3\2\2\2\u00f5\u00ed\3\2\2\2\u00f5"+ - "\u00f0\3\2\2\2\u00f5\u00f3\3\2\2\2\u00f6\u00f9\3\2\2\2\u00f7\u00f5\3\2"+ - "\2\2\u00f7\u00f8\3\2\2\2\u00f8)\3\2\2\2\u00f9\u00f7\3\2\2\2\u00fa\u00fb"+ - "\5\f\7\2\u00fb\u00fd\7+\2\2\u00fc\u00fe\5,\27\2\u00fd\u00fc\3\2\2\2\u00fd"+ - "\u00fe\3\2\2\2\u00fe\u00ff\3\2\2\2\u00ff\u0100\7,\2\2\u0100+\3\2\2\2\u0101"+ - "\u0106\5(\25\2\u0102\u0103\7\20\2\2\u0103\u0105\5(\25\2\u0104\u0102\3"+ - "\2\2\2\u0105\u0108\3\2\2\2\u0106\u0104\3\2\2\2\u0106\u0107\3\2\2\2\u0107"+ - "-\3\2\2\2\u0108\u0106\3\2\2\2\u0109\u010b\7D\2\2\u010a\u010c\5,\27\2\u010b"+ - "\u010a\3\2\2\2\u010b\u010c\3\2\2\2\u010c/\3\2\2\2\u010d\u010e\7V\2\2\u010e"+ - "\61\3\2\2\2\u010f\u0112\7V\2\2\u0110\u0111\7E\2\2\u0111\u0113\7V\2\2\u0112"+ - "\u0110\3\2\2\2\u0113\u0114\3\2\2\2\u0114\u0112\3\2\2\2\u0114\u0115\3\2"+ - "\2\2\u0115\63\3\2\2\2\u0116\u0117\t\f\2\2\u0117\65\3\2\2\2\u0118\u0119"+ - "\t\r\2\2\u0119\67\3\2\2\2\u011a\u011b\t\16\2\2\u011b9\3\2\2\2\u011c\u011d"+ - "\7\33\2\2\u011d\u0122\5(\25\2\u011e\u011f\7\20\2\2\u011f\u0121\5(\25\2"+ - "\u0120\u011e\3\2\2\2\u0121\u0124\3\2\2\2\u0122\u0120\3\2\2\2\u0122\u0123"+ - "\3\2\2\2\u0123\u0125\3\2\2\2\u0124\u0122\3\2\2\2\u0125\u0126\7\34\2\2"+ - "\u0126;\3\2\2\2\u0127\u0128\7[\2\2\u0128=\3\2\2\2\u0129\u012a\7Z\2\2\u012a"+ - "?\3\2\2\2\u012b\u0131\5\66\34\2\u012c\u0131\58\35\2\u012d\u0131\5:\36"+ - "\2\u012e\u0131\5<\37\2\u012f\u0131\5> \2\u0130\u012b\3\2\2\2\u0130\u012c"+ - "\3\2\2\2\u0130\u012d\3\2\2\2\u0130\u012e\3\2\2\2\u0130\u012f\3\2\2\2\u0131"+ - "A\3\2\2\2\u0132\u0133\7Q\2\2\u0133\u0134\7\\\2\2\u0134C\3\2\2\2\33FHO"+ - "TZ\\nv}\u0084\u0087\u008c\u0090\u0096\u00a8\u00b7\u00ca\u00f5\u00f7\u00fd"+ - "\u0106\u010b\u0114\u0122\u0130"; + "\3\25\3\25\3\25\7\25\u0101\n\25\f\25\16\25\u0104\13\25\3\26\3\26\3\26"+ + "\5\26\u0109\n\26\3\26\3\26\3\27\3\27\3\27\7\27\u0110\n\27\f\27\16\27\u0113"+ + "\13\27\3\30\3\30\5\30\u0117\n\30\3\31\3\31\3\32\3\32\3\32\6\32\u011e\n"+ + "\32\r\32\16\32\u011f\3\33\3\33\3\34\3\34\3\35\3\35\3\36\3\36\3\36\3\36"+ + "\7\36\u012c\n\36\f\36\16\36\u012f\13\36\3\36\3\36\3\37\3\37\3 \3 \3!\3"+ + "!\3!\3!\3!\5!\u013c\n!\3\"\3\"\3\"\3#\3#\3#\3#\5#\u0145\n#\3#\3#\3#\3"+ + "#\5#\u014b\n#\3#\3#\3#\3#\3#\7#\u0152\n#\f#\16#\u0155\13#\3#\3#\3#\3$"+ + "\3$\3$\7$\u015d\n$\f$\16$\u0160\13$\3%\3%\3%\3%\3&\3&\3&\3&\7&\u016a\n"+ + "&\f&\16&\u016d\13&\5&\u016f\n&\3\'\3\'\5\'\u0173\n\'\3\'\2\3((\2\4\6\b"+ + "\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJL\2\17\3"+ + "\2\b\17\3\2\24\32\3\2\35(\3\2)*\4\2\3\3-.\3\2\60\61\3\2-.\3\2\62\65\3"+ + "\2\669\3\2:;\3\2FN\3\2Z\\\3\2OP\2\u0192\2R\3\2\2\2\4Y\3\2\2\2\6[\3\2\2"+ + "\2\by\3\2\2\2\n{\3\2\2\2\f\u0081\3\2\2\2\16\u0083\3\2\2\2\20\u0086\3\2"+ + "\2\2\22\u0097\3\2\2\2\24\u0099\3\2\2\2\26\u009f\3\2\2\2\30\u00a7\3\2\2"+ + "\2\32\u00aa\3\2\2\2\34\u00ad\3\2\2\2\36\u00af\3\2\2\2 \u00b7\3\2\2\2\""+ + "\u00bb\3\2\2\2$\u00c2\3\2\2\2&\u00c4\3\2\2\2(\u00d5\3\2\2\2*\u0105\3\2"+ + "\2\2,\u010c\3\2\2\2.\u0114\3\2\2\2\60\u0118\3\2\2\2\62\u011a\3\2\2\2\64"+ + "\u0121\3\2\2\2\66\u0123\3\2\2\28\u0125\3\2\2\2:\u0127\3\2\2\2<\u0132\3"+ + "\2\2\2>\u0134\3\2\2\2@\u013b\3\2\2\2B\u013d\3\2\2\2D\u0140\3\2\2\2F\u0159"+ + "\3\2\2\2H\u0161\3\2\2\2J\u016e\3\2\2\2L\u0170\3\2\2\2NQ\5\4\3\2OQ\7X\2"+ + "\2PN\3\2\2\2PO\3\2\2\2QT\3\2\2\2RP\3\2\2\2RS\3\2\2\2SU\3\2\2\2TR\3\2\2"+ + "\2UV\7\2\2\3V\3\3\2\2\2WZ\5\20\t\2XZ\5\6\4\2YW\3\2\2\2YX\3\2\2\2Z\5\3"+ + "\2\2\2[\\\7\3\2\2\\^\5\60\31\2]_\5\66\34\2^]\3\2\2\2^_\3\2\2\2_`\3\2\2"+ + "\2`a\7\4\2\2af\7X\2\2be\5\b\5\2ce\7X\2\2db\3\2\2\2dc\3\2\2\2eh\3\2\2\2"+ + "fd\3\2\2\2fg\3\2\2\2gi\3\2\2\2hf\3\2\2\2ij\7\5\2\2jk\7X\2\2k\7\3\2\2\2"+ + "lz\5\20\t\2mz\5\26\f\2nz\5\24\13\2oz\5\30\r\2pz\5\32\16\2qz\5 \21\2rz"+ + "\5\"\22\2sz\5\16\b\2tz\5&\24\2uz\5D#\2vz\5B\"\2wz\5\n\6\2xz\5.\30\2yl"+ + "\3\2\2\2ym\3\2\2\2yn\3\2\2\2yo\3\2\2\2yp\3\2\2\2yq\3\2\2\2yr\3\2\2\2y"+ + "s\3\2\2\2yt\3\2\2\2yu\3\2\2\2yv\3\2\2\2yw\3\2\2\2yx\3\2\2\2z\t\3\2\2\2"+ + "{|\5\60\31\2|}\7\6\2\2}\13\3\2\2\2~\u0082\5\66\34\2\177\u0082\5\60\31"+ + "\2\u0080\u0082\5\62\32\2\u0081~\3\2\2\2\u0081\177\3\2\2\2\u0081\u0080"+ + "\3\2\2\2\u0082\r\3\2\2\2\u0083\u0084\7\7\2\2\u0084\u0085\5\f\7\2\u0085"+ + "\17\3\2\2\2\u0086\u0092\t\2\2\2\u0087\u0089\5\22\n\2\u0088\u0087\3\2\2"+ + "\2\u0088\u0089\3\2\2\2\u0089\u0093\3\2\2\2\u008a\u008f\5\22\n\2\u008b"+ + "\u008c\7\20\2\2\u008c\u008e\5\22\n\2\u008d\u008b\3\2\2\2\u008e\u0091\3"+ + "\2\2\2\u008f\u008d\3\2\2\2\u008f\u0090\3\2\2\2\u0090\u0093\3\2\2\2\u0091"+ + "\u008f\3\2\2\2\u0092\u0088\3\2\2\2\u0092\u008a\3\2\2\2\u0093\21\3\2\2"+ + "\2\u0094\u0098\5<\37\2\u0095\u0098\5\60\31\2\u0096\u0098\5\66\34\2\u0097"+ + "\u0094\3\2\2\2\u0097\u0095\3\2\2\2\u0097\u0096\3\2\2\2\u0098\23\3\2\2"+ + "\2\u0099\u009b\5\34\17\2\u009a\u009c\5\36\20\2\u009b\u009a\3\2\2\2\u009b"+ + "\u009c\3\2\2\2\u009c\u009d\3\2\2\2\u009d\u009e\5\60\31\2\u009e\25\3\2"+ + "\2\2\u009f\u00a1\5\34\17\2\u00a0\u00a2\5\36\20\2\u00a1\u00a0\3\2\2\2\u00a1"+ + "\u00a2\3\2\2\2\u00a2\u00a3\3\2\2\2\u00a3\u00a4\5\60\31\2\u00a4\u00a5\7"+ + "\21\2\2\u00a5\u00a6\5(\25\2\u00a6\27\3\2\2\2\u00a7\u00a8\7\22\2\2\u00a8"+ + "\u00a9\5\26\f\2\u00a9\31\3\2\2\2\u00aa\u00ab\7\23\2\2\u00ab\u00ac\5\26"+ + "\f\2\u00ac\33\3\2\2\2\u00ad\u00ae\t\3\2\2\u00ae\35\3\2\2\2\u00af\u00b0"+ + "\7\33\2\2\u00b0\u00b3\5(\25\2\u00b1\u00b2\7\20\2\2\u00b2\u00b4\5(\25\2"+ + "\u00b3\u00b1\3\2\2\2\u00b3\u00b4\3\2\2\2\u00b4\u00b5\3\2\2\2\u00b5\u00b6"+ + "\7\34\2\2\u00b6\37\3\2\2\2\u00b7\u00b8\5$\23\2\u00b8\u00b9\7\21\2\2\u00b9"+ + "\u00ba\5(\25\2\u00ba!\3\2\2\2\u00bb\u00bc\5$\23\2\u00bc\u00bd\t\4\2\2"+ + "\u00bd\u00be\5(\25\2\u00be#\3\2\2\2\u00bf\u00c3\5\64\33\2\u00c0\u00c3"+ + "\5\60\31\2\u00c1\u00c3\5\62\32\2\u00c2\u00bf\3\2\2\2\u00c2\u00c0\3\2\2"+ + "\2\u00c2\u00c1\3\2\2\2\u00c3%\3\2\2\2\u00c4\u00c5\5$\23\2\u00c5\u00c6"+ + "\t\5\2\2\u00c6\'\3\2\2\2\u00c7\u00c8\b\25\1\2\u00c8\u00c9\7+\2\2\u00c9"+ + "\u00ca\5(\25\2\u00ca\u00cb\7,\2\2\u00cb\u00d6\3\2\2\2\u00cc\u00d6\5*\26"+ + "\2\u00cd\u00ce\t\6\2\2\u00ce\u00d6\5(\25\25\u00cf\u00d0\7B\2\2\u00d0\u00d6"+ + "\5(\25\b\u00d1\u00d6\5@!\2\u00d2\u00d6\5\64\33\2\u00d3\u00d6\5\60\31\2"+ + "\u00d4\u00d6\5\62\32\2\u00d5\u00c7\3\2\2\2\u00d5\u00cc\3\2\2\2\u00d5\u00cd"+ + "\3\2\2\2\u00d5\u00cf\3\2\2\2\u00d5\u00d1\3\2\2\2\u00d5\u00d2\3\2\2\2\u00d5"+ + "\u00d3\3\2\2\2\u00d5\u00d4\3\2\2\2\u00d6\u0102\3\2\2\2\u00d7\u00d8\f\24"+ + "\2\2\u00d8\u00d9\7/\2\2\u00d9\u0101\5(\25\25\u00da\u00db\f\23\2\2\u00db"+ + "\u00dc\t\7\2\2\u00dc\u0101\5(\25\24\u00dd\u00de\f\22\2\2\u00de\u00df\t"+ + "\b\2\2\u00df\u0101\5(\25\23\u00e0\u00e1\f\21\2\2\u00e1\u00e2\t\t\2\2\u00e2"+ + "\u0101\5(\25\22\u00e3\u00e4\f\20\2\2\u00e4\u00e5\t\n\2\2\u00e5\u0101\5"+ + "(\25\21\u00e6\u00e7\f\17\2\2\u00e7\u00e8\t\13\2\2\u00e8\u0101\5(\25\20"+ + "\u00e9\u00ea\f\16\2\2\u00ea\u00eb\7<\2\2\u00eb\u0101\5(\25\17\u00ec\u00ed"+ + "\f\r\2\2\u00ed\u00ee\7=\2\2\u00ee\u0101\5(\25\16\u00ef\u00f0\f\f\2\2\u00f0"+ + "\u00f1\7>\2\2\u00f1\u0101\5(\25\r\u00f2\u00f3\f\13\2\2\u00f3\u00f4\7?"+ + "\2\2\u00f4\u0101\5(\25\f\u00f5\u00f6\f\n\2\2\u00f6\u00f7\7@\2\2\u00f7"+ + "\u0101\5(\25\13\u00f8\u00f9\f\t\2\2\u00f9\u00fa\7A\2\2\u00fa\u0101\5("+ + "\25\n\u00fb\u00fc\f\7\2\2\u00fc\u00fd\7C\2\2\u00fd\u0101\5(\25\b\u00fe"+ + "\u00ff\f\27\2\2\u00ff\u0101\5\36\20\2\u0100\u00d7\3\2\2\2\u0100\u00da"+ + "\3\2\2\2\u0100\u00dd\3\2\2\2\u0100\u00e0\3\2\2\2\u0100\u00e3\3\2\2\2\u0100"+ + "\u00e6\3\2\2\2\u0100\u00e9\3\2\2\2\u0100\u00ec\3\2\2\2\u0100\u00ef\3\2"+ + "\2\2\u0100\u00f2\3\2\2\2\u0100\u00f5\3\2\2\2\u0100\u00f8\3\2\2\2\u0100"+ + "\u00fb\3\2\2\2\u0100\u00fe\3\2\2\2\u0101\u0104\3\2\2\2\u0102\u0100\3\2"+ + "\2\2\u0102\u0103\3\2\2\2\u0103)\3\2\2\2\u0104\u0102\3\2\2\2\u0105\u0106"+ + "\5\f\7\2\u0106\u0108\7+\2\2\u0107\u0109\5,\27\2\u0108\u0107\3\2\2\2\u0108"+ + "\u0109\3\2\2\2\u0109\u010a\3\2\2\2\u010a\u010b\7,\2\2\u010b+\3\2\2\2\u010c"+ + "\u0111\5(\25\2\u010d\u010e\7\20\2\2\u010e\u0110\5(\25\2\u010f\u010d\3"+ + "\2\2\2\u0110\u0113\3\2\2\2\u0111\u010f\3\2\2\2\u0111\u0112\3\2\2\2\u0112"+ + "-\3\2\2\2\u0113\u0111\3\2\2\2\u0114\u0116\7D\2\2\u0115\u0117\5,\27\2\u0116"+ + "\u0115\3\2\2\2\u0116\u0117\3\2\2\2\u0117/\3\2\2\2\u0118\u0119\7Y\2\2\u0119"+ + "\61\3\2\2\2\u011a\u011d\7Y\2\2\u011b\u011c\7E\2\2\u011c\u011e\7Y\2\2\u011d"+ + "\u011b\3\2\2\2\u011e\u011f\3\2\2\2\u011f\u011d\3\2\2\2\u011f\u0120\3\2"+ + "\2\2\u0120\63\3\2\2\2\u0121\u0122\t\f\2\2\u0122\65\3\2\2\2\u0123\u0124"+ + "\t\r\2\2\u0124\67\3\2\2\2\u0125\u0126\t\16\2\2\u01269\3\2\2\2\u0127\u0128"+ + "\7\33\2\2\u0128\u012d\5(\25\2\u0129\u012a\7\20\2\2\u012a\u012c\5(\25\2"+ + "\u012b\u0129\3\2\2\2\u012c\u012f\3\2\2\2\u012d\u012b\3\2\2\2\u012d\u012e"+ + "\3\2\2\2\u012e\u0130\3\2\2\2\u012f\u012d\3\2\2\2\u0130\u0131\7\34\2\2"+ + "\u0131;\3\2\2\2\u0132\u0133\7^\2\2\u0133=\3\2\2\2\u0134\u0135\7]\2\2\u0135"+ + "?\3\2\2\2\u0136\u013c\5\66\34\2\u0137\u013c\58\35\2\u0138\u013c\5:\36"+ + "\2\u0139\u013c\5<\37\2\u013a\u013c\5> \2\u013b\u0136\3\2\2\2\u013b\u0137"+ + "\3\2\2\2\u013b\u0138\3\2\2\2\u013b\u0139\3\2\2\2\u013b\u013a\3\2\2\2\u013c"+ + "A\3\2\2\2\u013d\u013e\7Q\2\2\u013e\u013f\7_\2\2\u013fC\3\2\2\2\u0140\u0141"+ + "\7R\2\2\u0141\u0142\5\60\31\2\u0142\u0144\7+\2\2\u0143\u0145\5F$\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\u0148\7S\2\2\u0148\u014a\7+\2\2\u0149\u014b\5J&\2\u014a\u0149"+ + "\3\2\2\2\u014a\u014b\3\2\2\2\u014b\u014c\3\2\2\2\u014c\u014d\7,\2\2\u014d"+ + "\u014e\7\4\2\2\u014e\u0153\7X\2\2\u014f\u0152\5\b\5\2\u0150\u0152\7X\2"+ + "\2\u0151\u014f\3\2\2\2\u0151\u0150\3\2\2\2\u0152\u0155\3\2\2\2\u0153\u0151"+ + "\3\2\2\2\u0153\u0154\3\2\2\2\u0154\u0156\3\2\2\2\u0155\u0153\3\2\2\2\u0156"+ + "\u0157\7\5\2\2\u0157\u0158\7X\2\2\u0158E\3\2\2\2\u0159\u015e\5H%\2\u015a"+ + "\u015b\7\20\2\2\u015b\u015d\5H%\2\u015c\u015a\3\2\2\2\u015d\u0160\3\2"+ + "\2\2\u015e\u015c\3\2\2\2\u015e\u015f\3\2\2\2\u015fG\3\2\2\2\u0160\u015e"+ + "\3\2\2\2\u0161\u0162\5\60\31\2\u0162\u0163\7\6\2\2\u0163\u0164\5\64\33"+ + "\2\u0164I\3\2\2\2\u0165\u016f\7T\2\2\u0166\u016b\5L\'\2\u0167\u0168\7"+ + "\20\2\2\u0168\u016a\5L\'\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\u016f\3\2\2\2\u016d\u016b\3\2"+ + "\2\2\u016e\u0165\3\2\2\2\u016e\u0166\3\2\2\2\u016fK\3\2\2\2\u0170\u0172"+ + "\5\64\33\2\u0171\u0173\7T\2\2\u0172\u0171\3\2\2\2\u0172\u0173\3\2\2\2"+ + "\u0173M\3\2\2\2#PRY^dfy\u0081\u0088\u008f\u0092\u0097\u009b\u00a1\u00b3"+ + "\u00c2\u00d5\u0100\u0102\u0108\u0111\u0116\u011f\u012d\u013b\u0144\u014a"+ + "\u0151\u0153\u015e\u016b\u016e\u0172"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/lib65/c64lib.ill b/lib65/c64lib.ill index be2bb4b03..5cc9f75c0 100644 --- a/lib65/c64lib.ill +++ b/lib65/c64lib.ill @@ -28,61 +28,61 @@ memory word RESET_VEC = $FFFC ; 6502 reset vector, determined by the kernal if banked in memory word IRQ_VEC = $FFFE ; 6502 interrupt vector, determined by the kernal if banked in - memory matrix(40, 25) Screen = $0400 ; default character screen matrix - memory matrix(40, 25) Colors = $d800 ; character screen colors + memory byte[40, 25] Screen = $0400 ; default character screen matrix + memory byte[40, 25] Colors = $d800 ; character screen colors ; ---- VIC-II registers ---- - memory SP0X = $d000 - memory SP0Y = $d001 - memory SP1X = $d002 - memory SP1Y = $d003 - memory SP2X = $d004 - memory SP2Y = $d005 - memory SP3X = $d006 - memory SP3Y = $d007 - memory SP4X = $d008 - memory SP4Y = $d009 - memory SP5X = $d00a - memory SP5Y = $d00b - memory SP6X = $d00c - memory SP6Y = $d00d - memory SP7X = $d00e - memory SP7Y = $d00f + memory byte SP0X = $d000 + memory byte SP0Y = $d001 + memory byte SP1X = $d002 + memory byte SP1Y = $d003 + memory byte SP2X = $d004 + memory byte SP2Y = $d005 + memory byte SP3X = $d006 + memory byte SP3Y = $d007 + memory byte SP4X = $d008 + memory byte SP4Y = $d009 + memory byte SP5X = $d00a + memory byte SP5Y = $d00b + memory byte SP6X = $d00c + memory byte SP6Y = $d00d + memory byte SP7X = $d00e + memory byte SP7Y = $d00f - memory MSIGX = $d010 - memory SCROLY = $d011 - memory RASTER = $d012 - memory LPENX = $d013 - memory LPENY = $d014 - memory SPENA = $d015 - memory SCROLX = $d016 - memory YXPAND = $d017 - memory VMCSB = $d018 - memory VICIRQ = $d019 - memory IREQMASK = $d01a - memory SPBGPR = $d01b - memory SPMC = $d01c - memory XXPAND = $d01d - memory SPSPCL = $d01e - memory SPBGCL = $d01f + memory byte MSIGX = $d010 + memory byte SCROLY = $d011 + memory byte RASTER = $d012 + memory byte LPENX = $d013 + memory byte LPENY = $d014 + memory byte SPENA = $d015 + memory byte SCROLX = $d016 + memory byte YXPAND = $d017 + memory byte VMCSB = $d018 + memory byte VICIRQ = $d019 + memory byte IREQMASK = $d01a + memory byte SPBGPR = $d01b + memory byte SPMC = $d01c + memory byte XXPAND = $d01d + memory byte SPSPCL = $d01e + memory byte SPBGCL = $d01f - memory EXTCOL = $d020 ; border color - memory BGCOL0 = $d021 ; screen color - memory BGCOL1 = $d022 - memory BGCOL2 = $d023 - memory BGCOL4 = $d024 - memory SPMC0 = $d025 - memory SPMC1 = $d026 - memory SP0COL = $d027 - memory SP1COL = $d028 - memory SP2COL = $d029 - memory SP3COL = $d02a - memory SP4COL = $d02b - memory SP5COL = $d02c - memory SP6COL = $d02d - memory SP7COL = $d02e + memory byte EXTCOL = $d020 ; border color + memory byte BGCOL0 = $d021 ; screen color + memory byte BGCOL1 = $d022 + memory byte BGCOL2 = $d023 + memory byte BGCOL4 = $d024 + memory byte SPMC0 = $d025 + memory byte SPMC1 = $d026 + memory byte SP0COL = $d027 + memory byte SP1COL = $d028 + memory byte SP2COL = $d029 + memory byte SP3COL = $d02a + memory byte SP4COL = $d02b + memory byte SP5COL = $d02c + memory byte SP6COL = $d02d + memory byte SP7COL = $d02e ; ---- end of VIC-II registers ---- @@ -244,7 +244,7 @@ sub init_system () -> (?) { ; This means that the BASIC, KERNAL and CHARGEN ROMs are banked in, ; the VIC, SID and CIA chips are reset, screen is cleared, and the default IRQ is set. ; Also a different color scheme is chosen to identify ourselves a little. - %asm { + %asm {{ sei cld lda #%00101111 @@ -266,7 +266,7 @@ sub init_system () -> (?) { clv cli rts - } + }} } %noreturn @@ -279,30 +279,30 @@ sub init_system () -> (?) { sub FREADS32 () -> (?) { ; ---- fac1 = signed int32 from $62-$65 big endian (MSB FIRST) - %asm { + %asm {{ lda $62 eor #$ff asl a lda #0 ldx #$a0 jmp $bc4f ; internal BASIC routine - } + }} } sub FREADUS32 () -> (?) { ; ---- fac1 = uint32 from $62-$65 big endian (MSB FIRST) - %asm { + %asm {{ sec lda #0 ldx #$a0 jmp $bc4f ; internal BASIC routine - } + }} } sub FREADS24AXY (lo: A, mid: X, hi: Y) -> (?) { ; ---- fac1 = signed int24 (A/X/Y contain lo/mid/hi bytes) ; note: there is no FREADU24AXY (unsigned), use FREADUS32 instead. - %asm { + %asm {{ sty $62 stx $63 sta $64 @@ -313,57 +313,57 @@ sub FREADS24AXY (lo: A, mid: X, hi: Y) -> (?) { sta $65 ldx #$98 jmp $bc4f ; internal BASIC routine - } + }} } sub GIVUAYF (uword: AY) -> (?) { ; ---- unsigned 16 bit word in A/Y (lo/hi) to fac1 - %asm { + %asm {{ sty $62 sta $63 ldx #$90 sec jmp $bc49 ; internal BASIC routine - } + }} } sub GIVAYFAY (sword: AY) -> (?) { ; ---- signed 16 bit word in A/Y (lo/hi) to float in fac1 - %asm { + %asm {{ sta c64.SCRATCH_ZP1 tya ldy c64.SCRATCH_ZP1 jmp c64.GIVAYF ; this uses the inverse order, Y/A - } + }} } sub FTOSWRDAY () -> (AY, X?) { ; ---- fac1 to signed word in A/Y - %asm { + %asm {{ jsr c64.FTOSWORDYA ; note the inverse Y/A order sta c64.SCRATCH_ZP1 tya ldy c64.SCRATCH_ZP1 rts - } + }} } sub GETADRAY () -> (AY, X?) { ; ---- fac1 to unsigned word in A/Y - %asm { + %asm {{ jsr c64.GETADR ; this uses the inverse order, Y/A sta c64.SCRATCH_ZP1 tya ldy c64.SCRATCH_ZP1 rts - } + }} } sub copy_mflt (source: XY) -> (A?, Y?) { ; ---- copy a 5 byte MFLT floating point variable to another place ; input: X/Y = source address, c64.SCRATCH_ZPWORD1 = destination address - %asm { + %asm {{ stx c64.SCRATCH_ZP1 sty c64.SCRATCH_ZPWORD1+1 ldy #0 @@ -383,12 +383,12 @@ sub copy_mflt (source: XY) -> (A?, Y?) { sta (c64.SCRATCH_ZPWORD1),y ldy c64.SCRATCH_ZPWORD1+1 rts - } + }} } sub float_add_one (mflt: XY) -> (?) { ; ---- add 1 to the MFLT pointed to by X/Y. Clobbers A, X, Y - %asm { + %asm {{ stx c64.SCRATCH_ZP1 sty c64.SCRATCH_ZP2 txa @@ -399,12 +399,12 @@ sub float_add_one (mflt: XY) -> (?) { ldx c64.SCRATCH_ZP1 ldy c64.SCRATCH_ZP2 jmp c64.FTOMEMXY ; float XY = fac1 - } + }} } sub float_sub_one (mflt: XY) -> (?) { ; ---- subtract 1 from the MFLT pointed to by X/Y. Clobbers A, X, Y - %asm { + %asm {{ stx c64.SCRATCH_ZP1 sty c64.SCRATCH_ZP2 lda # (?) { ldx c64.SCRATCH_ZP1 ldy c64.SCRATCH_ZP2 jmp c64.FTOMEMXY ; float XY = fac1 - } + }} } sub float_add_SW1_to_XY (mflt: XY) -> (?) { ; ---- add MFLT pointed to by SCRATCH_ZPWORD1 to the MFLT pointed to by X/Y. Clobbers A, X, Y - %asm { + %asm {{ stx c64.SCRATCH_ZP1 sty c64.SCRATCH_ZP2 txa @@ -432,12 +432,12 @@ sub float_add_SW1_to_XY (mflt: XY) -> (?) { ldx c64.SCRATCH_ZP1 ldy c64.SCRATCH_ZP2 jmp c64.FTOMEMXY ; float XY = fac1 - } + }} } sub float_sub_SW1_from_XY (mflt: XY) -> (?) { ; ---- subtract MFLT pointed to by SCRATCH_ZPWORD1 from the MFLT pointed to by X/Y. Clobbers A, X, Y - %asm { + %asm {{ stx c64.SCRATCH_ZP1 sty c64.SCRATCH_ZP2 lda c64.SCRATCH_ZPWORD1 @@ -449,7 +449,7 @@ sub float_sub_SW1_from_XY (mflt: XY) -> (?) { ldx c64.SCRATCH_ZP1 ldy c64.SCRATCH_ZP2 jmp c64.FTOMEMXY ; float XY = fac1 - } + }} } %noreturn @@ -467,7 +467,7 @@ sub clear_screen (char: A, color: Y) -> () { ; (assumes screen is at $0400, could be altered in the future with self-modifying code) ; @todo X = SCREEN ADDR HI BYTE - %asm { + %asm {{ sta _loop + 1 ; self-modifying stx c64.SCRATCH_ZP1 ldx #0 @@ -487,7 +487,7 @@ _loop lda #0 lda _loop+1 ; restore A and X ldx c64.SCRATCH_ZP1 rts - } + }} } @@ -496,7 +496,7 @@ sub scroll_left_full (alsocolors: SC) -> (A?, X?, Y?) { ; ---- scroll the whole screen 1 character to the left ; contents of the rightmost column are unchanged, you should clear/refill this yourself ; Carry flag determines if screen color data must be scrolled too - %asm { + %asm {{ bcs + jmp _scroll_screen @@ -547,7 +547,7 @@ _scroll_screen ; scroll the screen memory bpl - rts - } + }} } @@ -555,7 +555,7 @@ sub scroll_right_full (alsocolors: SC) -> (A?, X?) { ; ---- scroll the whole screen 1 character to the right ; contents of the leftmost column are unchanged, you should clear/refill this yourself ; Carry flag determines if screen color data must be scrolled too - %asm { + %asm {{ bcs + jmp _scroll_screen @@ -598,7 +598,7 @@ _scroll_screen ; scroll the screen memory bpl - rts - } + }} } @@ -606,7 +606,7 @@ sub scroll_up_full (alsocolors: SC) -> (A?, X?) { ; ---- scroll the whole screen 1 character up ; contents of the bottom row are unchanged, you should refill/clear this yourself ; Carry flag determines if screen color data must be scrolled too - %asm { + %asm {{ bcs + jmp _scroll_screen @@ -649,7 +649,7 @@ _scroll_screen ; scroll the screen memory bpl - rts - } + }} } @@ -657,7 +657,7 @@ sub scroll_down_full (alsocolors: SC) -> (A?, X?) { ; ---- scroll the whole screen 1 character down ; contents of the top row are unchanged, you should refill/clear this yourself ; Carry flag determines if screen color data must be scrolled too - %asm { + %asm {{ bcs + jmp _scroll_screen @@ -700,13 +700,13 @@ _scroll_screen ; scroll the screen memory bpl - rts - } + }} } sub byte2decimal (ubyte: A) -> (Y, X, A) { ; ---- A to decimal string in Y/X/A (100s in Y, 10s in X, 1s in A) - %asm { + %asm {{ ldy #$2f ldx #$3a sec @@ -718,12 +718,12 @@ sub byte2decimal (ubyte: A) -> (Y, X, A) { bmi - adc #$2f rts - } + }} } sub byte2hex (ubyte: A) -> (X, Y, A?) { ; ---- A to hex string in XY (first hex char in X, second hex char in Y) - %asm { + %asm {{ pha and #$0f tax @@ -739,14 +739,14 @@ sub byte2hex (ubyte: A) -> (X, Y, A?) { rts hex_digits .str "0123456789abcdef" ; can probably be reused for other stuff as well - } + }} } var str word2hex_output = "1234" ; 0-terminated, to make printing easier sub word2hex (word: XY) -> (?) { ; ---- convert 16 bit word in X/Y into 4-character hexadecimal string into memory 'word2hex_output' - %asm { + %asm {{ stx c64.SCRATCH_ZP2 tya jsr byte2hex @@ -757,7 +757,7 @@ sub word2hex (word: XY) -> (?) { stx word2hex_output+2 sty word2hex_output+3 rts - } + }} } @@ -770,7 +770,7 @@ sub word2bcd (word: XY) -> (A?, X?) { ; into a BCD value that is being doubled on each iteration. As all the ; arithmetic is being done in BCD the result is a binary to decimal ; conversion. - %asm { + %asm {{ stx c64.SCRATCH_ZP1 sty c64.SCRATCH_ZP2 sed ; switch to decimal mode @@ -795,14 +795,14 @@ sub word2bcd (word: XY) -> (A?, X?) { bne - cld ; back to binary rts - } + }} } var array(5) word2decimal_output sub word2decimal (word: XY) -> (?) { ; ---- convert 16 bit word in X/Y into decimal string into memory 'word2decimal_output' - %asm { + %asm {{ jsr word2bcd lda word2bcd_bcdbuff+2 clc @@ -828,7 +828,7 @@ sub word2decimal (word: XY) -> (?) { sta word2decimal_output,y iny rts - } + }} } @@ -840,7 +840,7 @@ sub print_string (address: XY) -> (A?, Y?) { ; note: the IL65 compiler contains an optimization that will replace ; a call to this subroutine with a string argument of just one char, ; by just one call to c64.CHROUT of that single char. - %asm { + %asm {{ stx c64.SCRATCH_ZP1 sty c64.SCRATCH_ZP2 ldy #0 @@ -850,13 +850,13 @@ sub print_string (address: XY) -> (A?, Y?) { iny bne - + rts - } + }} } sub print_pstring (address: XY) -> (A?, X?, Y) { ; ---- print pstring (length as first byte) from X/Y, returns str len in Y - %asm { + %asm {{ stx c64.SCRATCH_ZP1 sty c64.SCRATCH_ZP2 ldy #0 @@ -869,14 +869,14 @@ sub print_pstring (address: XY) -> (A?, X?, Y) { dex bne - + rts ; output string length is in Y - } + }} } sub print_pimmediate () -> () { ; ---- print pstring in memory immediately following the subroutine fast call instruction ; note that the clobbered registers (A,X,Y) are not listed ON PURPOSE - %asm { + %asm {{ tsx lda $102,x tay ; put high byte in y @@ -898,13 +898,13 @@ sub print_pimmediate () -> () { bne + ; if that made it (the low byte) roll over to 00, inc $102,x ; increment the high byte of the return addr too. + rts - } + }} } sub print_byte_decimal0 (ubyte: A) -> (?) { ; ---- print the byte in A in decimal form, with left padding 0s (3 positions total) - %asm { + %asm {{ jsr byte2decimal pha tya @@ -913,13 +913,13 @@ sub print_byte_decimal0 (ubyte: A) -> (?) { jsr c64.CHROUT pla jmp c64.CHROUT - } + }} } sub print_byte_decimal (ubyte: A) -> (?) { ; ---- print the byte in A in decimal form, without left padding 0s - %asm { + %asm {{ jsr byte2decimal pha cpy #'0' @@ -934,13 +934,13 @@ _print_tens txa jsr c64.CHROUT pla jmp c64.CHROUT - } + }} } sub print_byte_hex (prefix: SC, ubyte: A) -> (?) { ; ---- print the byte in A in hex form (if Carry is set, a radix prefix '$' is printed as well) - %asm { + %asm {{ bcc + pha lda #'$' @@ -951,27 +951,27 @@ sub print_byte_hex (prefix: SC, ubyte: A) -> (?) { jsr c64.CHROUT tya jmp c64.CHROUT - } + }} } sub print_word_hex (prefix: SC, word: XY) -> (?) { ; ---- print the (unsigned) word in X/Y in hexadecimal form (4 digits) ; (if Carry is set, a radix prefix '$' is printed as well) - %asm { + %asm {{ stx c64.SCRATCH_ZP1 tya jsr print_byte_hex lda c64.SCRATCH_ZP1 clc jmp print_byte_hex - } + }} } sub print_word_decimal0 (word: XY) -> (?) { ; ---- print the (unsigned) word in X/Y in decimal form, with left padding 0s (5 positions total) - %asm { + %asm {{ jsr word2decimal lda word2decimal_output jsr c64.CHROUT @@ -983,13 +983,13 @@ sub print_word_decimal0 (word: XY) -> (?) { jsr c64.CHROUT lda word2decimal_output+4 jmp c64.CHROUT - } + }} } sub print_word_decimal (word: XY) -> (A?, X?, Y?) { ; ---- print the word in X/Y in decimal form, without left padding 0s - %asm { + %asm {{ jsr word2decimal ldy #0 lda word2decimal_output @@ -1016,7 +1016,7 @@ _pr_decimal cpy #5 bcc _pr_decimal rts - } + }} } @@ -1024,7 +1024,7 @@ sub input_chars (buffer: AX) -> (A?, Y) { ; ---- Input a string (max. 80 chars) from the keyboard. ; It assumes the keyboard is selected as I/O channel!! - %asm { + %asm {{ sta c64.SCRATCH_ZP1 stx c64.SCRATCH_ZP2 ldy #0 ; char counter = 0 @@ -1038,7 +1038,7 @@ sub input_chars (buffer: AX) -> (A?, Y) { sta (c64.SCRATCH_ZP1),y ; finish string with 0 byte rts - } + }} } %noreturn @@ -1056,7 +1056,7 @@ sub input_chars (buffer: AX) -> (A?, Y) { ; ; higher addresses are copied first, so: ; ; - moving data to higher addresses works even if areas overlap ; ; - moving data to lower addresses only works if areas do not overlap -; %asm { +; %asm {{ ; lda #src_start ; sta $5f diff --git a/lib65/il65lib.ill b/lib65/il65lib.ill index 33d3347cc..5a9dd6df6 100644 --- a/lib65/il65lib.ill +++ b/lib65/il65lib.ill @@ -13,7 +13,7 @@ memory word SCRATCH_ZPWORD2 = $fd ; scratch word in ZP ($fd/$fe) - %asm { + %asm {{ ; ---- jmp (indirect) routines for register pairs containing the indirect address ; @todo still needed?? jsr_indirect_nozpuse_AX @@ -272,7 +272,5 @@ _shift cpx #0 + rts - } - - %noreturn + }} } diff --git a/lib65/lib65.iml b/lib65/lib65.iml new file mode 100644 index 000000000..8021953ed --- /dev/null +++ b/lib65/lib65.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/lib65/mathlib.ill b/lib65/mathlib.ill index 0019c09e3..d4327af78 100644 --- a/lib65/mathlib.ill +++ b/lib65/mathlib.ill @@ -21,7 +21,7 @@ sub multiply_bytes (byte1: X, byte2: Y) -> (A, X?) { ; ---- multiply 2 bytes, result as byte in A (signed or unsigned) - %asm { + %asm {{ stx SCRATCH_ZP1 sty SCRATCH_ZP2 ldx #8 @@ -33,13 +33,13 @@ sub multiply_bytes (byte1: X, byte2: Y) -> (A, X?) { + dex bne - rts - } + }} } sub multiply_bytes_16 (byte1: X, byte2: Y) -> (A?, XY) { ; ---- multiply 2 bytes, result as word in X/Y (unsigned) - %asm { + %asm {{ lda #0 _m_with_add stx SCRATCH_ZP1 sty SCRATCH_ZP2 @@ -55,23 +55,23 @@ _m_with_add stx SCRATCH_ZP1 tay ldx SCRATCH_ZP1 rts - } + }} } sub multiply_bytes_addA_16 (byte1: X, byte2: Y, add: A) -> (A?, XY) { ; ---- multiply 2 bytes and add A, result as word in X/Y (unsigned) - %asm { + %asm {{ jmp multiply_bytes_16._m_with_add - } + }} } - var .wordarray(2) multiply_words_product + word[2] multiply_words_product = 0 sub multiply_words (number: XY) -> (?) { ; ---- multiply two 16-bit words into a 32-bit result ; input: X/Y = first 16-bit number, SCRATCH_ZPWORD1 in ZP = second 16-bit number ; output: multiply_words_product 32-bits product, LSB order (low-to-high) - %asm { + %asm {{ stx SCRATCH_ZPWORD2 sty SCRATCH_ZPWORD2+1 @@ -96,14 +96,14 @@ mult16 lda #$00 dex bne - rts - } + }} } sub divmod_bytes (number: X, divisor: Y) -> (X, A) { ; ---- divide X by Y, result quotient in X, remainder in A (unsigned) ; division by zero will result in quotient = 255 and remainder = original number - %asm { + %asm {{ stx SCRATCH_ZP1 sty SCRATCH_ZP2 @@ -120,7 +120,7 @@ sub divmod_bytes (number: X, divisor: Y) -> (X, A) { ldx SCRATCH_ZP1 rts - } + }} } sub divmod_words (divisor: XY) -> (A?, XY) { @@ -129,7 +129,7 @@ sub divmod_words (divisor: XY) -> (A?, XY) { ; output: SCRATCH_ZPWORD1 in ZP: 16 bit result, X/Y: 16 bit remainder ; division by zero will result in quotient = 65535 and remainder = divident - %asm { + %asm {{ remainder = SCRATCH_ZP1 stx SCRATCH_ZPWORD2 @@ -168,14 +168,14 @@ remainder = SCRATCH_ZP1 rts - } + }} } sub randbyte () -> (A) { ; ---- 8-bit pseudo random number generator into A - %asm { + %asm {{ lda _seed beq + asl a @@ -191,13 +191,13 @@ _magiceors .byte $1d, $2b, $2d, $4d, $5f, $63, $65, $69 .byte $71, $87, $8d, $a9, $c3, $cf, $e7, $f5 ;returns - this comment avoids compiler warning - } + }} } sub randword () -> (XY) { ; ---- 16 bit pseudo random number generator into XY - %asm { + %asm {{ lda _seed beq _lowZero ; $0000 and $8000 are special values to test for @@ -239,7 +239,7 @@ _magiceors .word $3f1d, $3f81, $3fa5, $3fc5, $4075, $409d, $40cd, $4109 .word $413f, $414b, $4153, $4159, $4193, $4199, $41af, $41bb ;returns - this comment avoids compiler warning - } + }} }