diff --git a/src/main/java/dk/camelot64/kickc/parser/KickC.g4 b/src/main/java/dk/camelot64/kickc/parser/KickC.g4 index 03b98b70e..5d18b3c8e 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickC.g4 +++ b/src/main/java/dk/camelot64/kickc/parser/KickC.g4 @@ -28,7 +28,16 @@ decl ; declVariable - : directive* typeDecl directive* NAME ('=' expr)? ';' + : directive* typeDecl directive* declVariableList ';' + ; + +declVariableList + : declVariableInit + | declVariableList ',' declVariableInit + ; + +declVariableInit + : NAME ('=' expr)? ; declFunction @@ -60,12 +69,12 @@ stmtSeq stmt : declVariable #stmtDeclVar | '{' stmtSeq? '}' #stmtBlock - | expr ';' #stmtExpr - | 'if' '(' expr ')' stmt ( 'else' stmt )? #stmtIfElse - | directive* 'while' '(' expr ')' stmt #stmtWhile - | directive* 'do' stmt 'while' '(' expr ')' ';' #stmtDoWhile + | commaExpr ';' #stmtExpr + | 'if' '(' commaExpr ')' stmt ( 'else' stmt )? #stmtIfElse + | directive* 'while' '(' commaExpr ')' stmt #stmtWhile + | directive* 'do' stmt 'while' '(' commaExpr ')' ';' #stmtDoWhile | directive* 'for' '(' forDeclaration? forIteration ')' stmt #stmtFor - | 'return' expr? ';' #stmtReturn + | 'return' commaExpr? ';' #stmtReturn | 'break' ';' #stmtBreak | 'continue' ';' #stmtContinue | 'asm' asmDirectives? '{' asmLines '}' #stmtAsm diff --git a/src/main/java/dk/camelot64/kickc/parser/KickC.tokens b/src/main/java/dk/camelot64/kickc/parser/KickC.tokens index d173ca275..2872b6483 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickC.tokens +++ b/src/main/java/dk/camelot64/kickc/parser/KickC.tokens @@ -92,13 +92,13 @@ WS=91 COMMENT_LINE=92 COMMENT_BLOCK=93 'import'=1 -'='=2 -';'=3 -'('=4 -')'=5 -'{'=6 -'}'=7 -','=8 +';'=2 +','=3 +'='=4 +'('=5 +')'=6 +'{'=7 +'}'=8 'const'=9 'extern'=10 'align'=11 diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCBaseListener.java b/src/main/java/dk/camelot64/kickc/parser/KickCBaseListener.java index 50ff9fcef..23e15dfb6 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCBaseListener.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCBaseListener.java @@ -95,6 +95,30 @@ public class KickCBaseListener implements KickCListener { *

The default implementation does nothing.

*/ @Override public void exitDeclVariable(KickCParser.DeclVariableContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDeclVariableList(KickCParser.DeclVariableListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDeclVariableList(KickCParser.DeclVariableListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDeclVariableInit(KickCParser.DeclVariableInitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDeclVariableInit(KickCParser.DeclVariableInitContext ctx) { } /** * {@inheritDoc} * diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCBaseVisitor.java b/src/main/java/dk/camelot64/kickc/parser/KickCBaseVisitor.java index eedd3baa4..5cbec542f 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCBaseVisitor.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCBaseVisitor.java @@ -60,6 +60,20 @@ public class KickCBaseVisitor extends AbstractParseTreeVisitor implements * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitDeclVariable(KickCParser.DeclVariableContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitDeclVariableList(KickCParser.DeclVariableListContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitDeclVariableInit(KickCParser.DeclVariableInitContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCLexer.java b/src/main/java/dk/camelot64/kickc/parser/KickCLexer.java index 8afb88425..f0e509592 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCLexer.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCLexer.java @@ -56,7 +56,7 @@ public class KickCLexer extends Lexer { }; private static final String[] _LITERAL_NAMES = { - null, "'import'", "'='", "';'", "'('", "')'", "'{'", "'}'", "','", "'const'", + null, "'import'", "';'", "','", "'='", "'('", "')'", "'{'", "'}'", "'const'", "'extern'", "'align'", "'register'", "'inline'", "'volatile'", "'interrupt'", "'if'", "'else'", "'while'", "'do'", "'for'", "'return'", "'break'", "'continue'", "'asm'", "':'", "'..'", "'signed'", "'unsigned'", "'*'", "'['", "']'", @@ -240,10 +240,10 @@ public class KickCLexer extends Lexer { "\u038f\3\2\2\2\u00c1\u039c\3\2\2\2\u00c3\u03a2\3\2\2\2\u00c5\u03ad\3\2"+ "\2\2\u00c7\u00c8\7k\2\2\u00c8\u00c9\7o\2\2\u00c9\u00ca\7r\2\2\u00ca\u00cb"+ "\7q\2\2\u00cb\u00cc\7t\2\2\u00cc\u00cd\7v\2\2\u00cd\4\3\2\2\2\u00ce\u00cf"+ - "\7?\2\2\u00cf\6\3\2\2\2\u00d0\u00d1\7=\2\2\u00d1\b\3\2\2\2\u00d2\u00d3"+ - "\7*\2\2\u00d3\n\3\2\2\2\u00d4\u00d5\7+\2\2\u00d5\f\3\2\2\2\u00d6\u00d7"+ - "\7}\2\2\u00d7\16\3\2\2\2\u00d8\u00d9\7\177\2\2\u00d9\20\3\2\2\2\u00da"+ - "\u00db\7.\2\2\u00db\22\3\2\2\2\u00dc\u00dd\7e\2\2\u00dd\u00de\7q\2\2\u00de"+ + "\7=\2\2\u00cf\6\3\2\2\2\u00d0\u00d1\7.\2\2\u00d1\b\3\2\2\2\u00d2\u00d3"+ + "\7?\2\2\u00d3\n\3\2\2\2\u00d4\u00d5\7*\2\2\u00d5\f\3\2\2\2\u00d6\u00d7"+ + "\7+\2\2\u00d7\16\3\2\2\2\u00d8\u00d9\7}\2\2\u00d9\20\3\2\2\2\u00da\u00db"+ + "\7\177\2\2\u00db\22\3\2\2\2\u00dc\u00dd\7e\2\2\u00dd\u00de\7q\2\2\u00de"+ "\u00df\7p\2\2\u00df\u00e0\7u\2\2\u00e0\u00e1\7v\2\2\u00e1\24\3\2\2\2\u00e2"+ "\u00e3\7g\2\2\u00e3\u00e4\7z\2\2\u00e4\u00e5\7v\2\2\u00e5\u00e6\7g\2\2"+ "\u00e6\u00e7\7t\2\2\u00e7\u00e8\7p\2\2\u00e8\26\3\2\2\2\u00e9\u00ea\7"+ diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCLexer.tokens b/src/main/java/dk/camelot64/kickc/parser/KickCLexer.tokens index d173ca275..2872b6483 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCLexer.tokens +++ b/src/main/java/dk/camelot64/kickc/parser/KickCLexer.tokens @@ -92,13 +92,13 @@ WS=91 COMMENT_LINE=92 COMMENT_BLOCK=93 'import'=1 -'='=2 -';'=3 -'('=4 -')'=5 -'{'=6 -'}'=7 -','=8 +';'=2 +','=3 +'='=4 +'('=5 +')'=6 +'{'=7 +'}'=8 'const'=9 'extern'=10 'align'=11 diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCListener.java b/src/main/java/dk/camelot64/kickc/parser/KickCListener.java index e6df6a345..f1cb9c998 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCListener.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCListener.java @@ -77,6 +77,26 @@ public interface KickCListener extends ParseTreeListener { * @param ctx the parse tree */ void exitDeclVariable(KickCParser.DeclVariableContext ctx); + /** + * Enter a parse tree produced by {@link KickCParser#declVariableList}. + * @param ctx the parse tree + */ + void enterDeclVariableList(KickCParser.DeclVariableListContext ctx); + /** + * Exit a parse tree produced by {@link KickCParser#declVariableList}. + * @param ctx the parse tree + */ + void exitDeclVariableList(KickCParser.DeclVariableListContext ctx); + /** + * Enter a parse tree produced by {@link KickCParser#declVariableInit}. + * @param ctx the parse tree + */ + void enterDeclVariableInit(KickCParser.DeclVariableInitContext ctx); + /** + * Exit a parse tree produced by {@link KickCParser#declVariableInit}. + * @param ctx the parse tree + */ + void exitDeclVariableInit(KickCParser.DeclVariableInitContext ctx); /** * Enter a parse tree produced by {@link KickCParser#declFunction}. * @param ctx the parse tree diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCParser.java b/src/main/java/dk/camelot64/kickc/parser/KickCParser.java index 43ca2f4cf..9990ecba7 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCParser.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCParser.java @@ -33,23 +33,25 @@ public class KickCParser extends Parser { COMMENT_LINE=92, COMMENT_BLOCK=93; public static final int RULE_file = 0, RULE_asmFile = 1, RULE_importSeq = 2, RULE_importDecl = 3, - RULE_declSeq = 4, RULE_decl = 5, RULE_declVariable = 6, RULE_declFunction = 7, - RULE_parameterListDecl = 8, RULE_parameterDecl = 9, RULE_directive = 10, - RULE_stmtSeq = 11, RULE_stmt = 12, RULE_forDeclaration = 13, RULE_forIteration = 14, - RULE_typeDecl = 15, RULE_commaExpr = 16, RULE_expr = 17, RULE_parameterList = 18, - RULE_declKasm = 19, RULE_asmDirectives = 20, RULE_asmDirective = 21, RULE_asmLines = 22, - RULE_asmLine = 23, RULE_asmLabel = 24, RULE_asmInstruction = 25, RULE_asmBytes = 26, - RULE_asmParamMode = 27, RULE_asmExpr = 28; + RULE_declSeq = 4, RULE_decl = 5, RULE_declVariable = 6, RULE_declVariableList = 7, + RULE_declVariableInit = 8, RULE_declFunction = 9, RULE_parameterListDecl = 10, + RULE_parameterDecl = 11, RULE_directive = 12, RULE_stmtSeq = 13, RULE_stmt = 14, + RULE_forDeclaration = 15, RULE_forIteration = 16, RULE_typeDecl = 17, + RULE_commaExpr = 18, RULE_expr = 19, RULE_parameterList = 20, RULE_declKasm = 21, + RULE_asmDirectives = 22, RULE_asmDirective = 23, RULE_asmLines = 24, RULE_asmLine = 25, + RULE_asmLabel = 26, RULE_asmInstruction = 27, RULE_asmBytes = 28, RULE_asmParamMode = 29, + RULE_asmExpr = 30; public static final String[] ruleNames = { "file", "asmFile", "importSeq", "importDecl", "declSeq", "decl", "declVariable", - "declFunction", "parameterListDecl", "parameterDecl", "directive", "stmtSeq", - "stmt", "forDeclaration", "forIteration", "typeDecl", "commaExpr", "expr", - "parameterList", "declKasm", "asmDirectives", "asmDirective", "asmLines", - "asmLine", "asmLabel", "asmInstruction", "asmBytes", "asmParamMode", "asmExpr" + "declVariableList", "declVariableInit", "declFunction", "parameterListDecl", + "parameterDecl", "directive", "stmtSeq", "stmt", "forDeclaration", "forIteration", + "typeDecl", "commaExpr", "expr", "parameterList", "declKasm", "asmDirectives", + "asmDirective", "asmLines", "asmLine", "asmLabel", "asmInstruction", "asmBytes", + "asmParamMode", "asmExpr" }; private static final String[] _LITERAL_NAMES = { - null, "'import'", "'='", "';'", "'('", "')'", "'{'", "'}'", "','", "'const'", + null, "'import'", "';'", "','", "'='", "'('", "')'", "'{'", "'}'", "'const'", "'extern'", "'align'", "'register'", "'inline'", "'volatile'", "'interrupt'", "'if'", "'else'", "'while'", "'do'", "'for'", "'return'", "'break'", "'continue'", "'asm'", "':'", "'..'", "'signed'", "'unsigned'", "'*'", "'['", "']'", @@ -152,11 +154,11 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(58); + setState(62); importSeq(); - setState(59); + setState(63); declSeq(); - setState(60); + setState(64); match(EOF); } } @@ -201,9 +203,9 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(62); + setState(66); asmLines(); - setState(63); + setState(67); match(EOF); } } @@ -251,17 +253,17 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(68); + setState(72); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__0) { { { - setState(65); + setState(69); importDecl(); } } - setState(70); + setState(74); _errHandler.sync(this); _la = _input.LA(1); } @@ -305,9 +307,9 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(71); + setState(75); match(T__0); - setState(72); + setState(76); match(STRING); } } @@ -355,20 +357,20 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(75); + setState(79); _errHandler.sync(this); _la = _input.LA(1); do { { { - setState(74); + setState(78); decl(); } } - setState(77); + setState(81); _errHandler.sync(this); _la = _input.LA(1); - } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__26) | (1L << T__27))) != 0) || _la==T__63 || _la==SIMPLETYPE ); + } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__26) | (1L << T__27))) != 0) || _la==T__63 || _la==SIMPLETYPE ); } } catch (RecognitionException re) { @@ -415,27 +417,27 @@ public class KickCParser extends Parser { DeclContext _localctx = new DeclContext(_ctx, getState()); enterRule(_localctx, 10, RULE_decl); try { - setState(82); + setState(86); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(79); + setState(83); declVariable(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(80); + setState(84); declFunction(); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(81); + setState(85); declKasm(); } break; @@ -456,16 +458,15 @@ public class KickCParser extends Parser { public TypeDeclContext typeDecl() { return getRuleContext(TypeDeclContext.class,0); } - public TerminalNode NAME() { return getToken(KickCParser.NAME, 0); } + public DeclVariableListContext declVariableList() { + return getRuleContext(DeclVariableListContext.class,0); + } public List directive() { return getRuleContexts(DirectiveContext.class); } public DirectiveContext directive(int i) { return getRuleContext(DirectiveContext.class,i); } - public ExprContext expr() { - return getRuleContext(ExprContext.class,0); - } public DeclVariableContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -492,52 +493,180 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(87); + setState(91); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14))) != 0)) { { { - setState(84); + setState(88); directive(); } } - setState(89); + setState(93); _errHandler.sync(this); _la = _input.LA(1); } - setState(90); - typeDecl(0); setState(94); + typeDecl(0); + setState(98); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14))) != 0)) { { { - setState(91); + setState(95); directive(); } } - setState(96); + setState(100); _errHandler.sync(this); _la = _input.LA(1); } - setState(97); - match(NAME); - setState(100); + setState(101); + declVariableList(0); + setState(102); + match(T__1); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DeclVariableListContext extends ParserRuleContext { + public DeclVariableInitContext declVariableInit() { + return getRuleContext(DeclVariableInitContext.class,0); + } + public DeclVariableListContext declVariableList() { + return getRuleContext(DeclVariableListContext.class,0); + } + public DeclVariableListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_declVariableList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCListener ) ((KickCListener)listener).enterDeclVariableList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCListener ) ((KickCListener)listener).exitDeclVariableList(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCVisitor ) return ((KickCVisitor)visitor).visitDeclVariableList(this); + else return visitor.visitChildren(this); + } + } + + public final DeclVariableListContext declVariableList() throws RecognitionException { + return declVariableList(0); + } + + private DeclVariableListContext declVariableList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + DeclVariableListContext _localctx = new DeclVariableListContext(_ctx, _parentState); + DeclVariableListContext _prevctx = _localctx; + int _startState = 14; + enterRecursionRule(_localctx, 14, RULE_declVariableList, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(105); + declVariableInit(); + } + _ctx.stop = _input.LT(-1); + setState(112); _errHandler.sync(this); - _la = _input.LA(1); - if (_la==T__1) { + _alt = getInterpreter().adaptivePredict(_input,5,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new DeclVariableListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_declVariableList); + setState(107); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(108); + match(T__2); + setState(109); + declVariableInit(); + } + } + } + setState(114); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,5,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class DeclVariableInitContext extends ParserRuleContext { + public TerminalNode NAME() { return getToken(KickCParser.NAME, 0); } + public ExprContext expr() { + return getRuleContext(ExprContext.class,0); + } + public DeclVariableInitContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_declVariableInit; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCListener ) ((KickCListener)listener).enterDeclVariableInit(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCListener ) ((KickCListener)listener).exitDeclVariableInit(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCVisitor ) return ((KickCVisitor)visitor).visitDeclVariableInit(this); + else return visitor.visitChildren(this); + } + } + + public final DeclVariableInitContext declVariableInit() throws RecognitionException { + DeclVariableInitContext _localctx = new DeclVariableInitContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_declVariableInit); + try { + enterOuterAlt(_localctx, 1); + { + setState(115); + match(NAME); + setState(118); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) { + case 1: { - setState(98); - match(T__1); - setState(99); + setState(116); + match(T__3); + setState(117); expr(0); } + break; } - - setState(102); - match(T__2); } } catch (RecognitionException re) { @@ -589,71 +718,71 @@ public class KickCParser extends Parser { public final DeclFunctionContext declFunction() throws RecognitionException { DeclFunctionContext _localctx = new DeclFunctionContext(_ctx, getState()); - enterRule(_localctx, 14, RULE_declFunction); + enterRule(_localctx, 18, RULE_declFunction); int _la; try { enterOuterAlt(_localctx, 1); { - setState(107); + setState(123); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14))) != 0)) { { { - setState(104); + setState(120); directive(); } } - setState(109); + setState(125); _errHandler.sync(this); _la = _input.LA(1); } - setState(110); + setState(126); typeDecl(0); - setState(114); + setState(130); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14))) != 0)) { { { - setState(111); + setState(127); directive(); } } - setState(116); + setState(132); _errHandler.sync(this); _la = _input.LA(1); } - setState(117); + setState(133); match(NAME); - setState(118); - match(T__3); - setState(120); + setState(134); + match(T__4); + setState(136); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__26) | (1L << T__27))) != 0) || _la==SIMPLETYPE) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__26) | (1L << T__27))) != 0) || _la==SIMPLETYPE) { { - setState(119); + setState(135); parameterListDecl(); } } - setState(122); - match(T__4); - setState(123); + setState(138); match(T__5); - setState(125); + setState(139); + match(T__6); + setState(141); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__5) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (SIMPLETYPE - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (BOOLEAN - 64)) | (1L << (NUMBER - 64)) | (1L << (NAME - 64)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__6) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (SIMPLETYPE - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (BOOLEAN - 64)) | (1L << (NUMBER - 64)) | (1L << (NAME - 64)))) != 0)) { { - setState(124); + setState(140); stmtSeq(); } } - setState(127); - match(T__6); + setState(143); + match(T__7); } } catch (RecognitionException re) { @@ -695,26 +824,26 @@ public class KickCParser extends Parser { public final ParameterListDeclContext parameterListDecl() throws RecognitionException { ParameterListDeclContext _localctx = new ParameterListDeclContext(_ctx, getState()); - enterRule(_localctx, 16, RULE_parameterListDecl); + enterRule(_localctx, 20, RULE_parameterListDecl); int _la; try { enterOuterAlt(_localctx, 1); { - setState(129); + setState(145); parameterDecl(); - setState(134); + setState(150); _errHandler.sync(this); _la = _input.LA(1); - while (_la==T__7) { + while (_la==T__2) { { { - setState(130); - match(T__7); - setState(131); + setState(146); + match(T__2); + setState(147); parameterDecl(); } } - setState(136); + setState(152); _errHandler.sync(this); _la = _input.LA(1); } @@ -788,47 +917,47 @@ public class KickCParser extends Parser { public final ParameterDeclContext parameterDecl() throws RecognitionException { ParameterDeclContext _localctx = new ParameterDeclContext(_ctx, getState()); - enterRule(_localctx, 18, RULE_parameterDecl); + enterRule(_localctx, 22, RULE_parameterDecl); int _la; try { - setState(153); + setState(169); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) { case 1: _localctx = new ParameterDeclTypeContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(140); + setState(156); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14))) != 0)) { { { - setState(137); + setState(153); directive(); } } - setState(142); + setState(158); _errHandler.sync(this); _la = _input.LA(1); } - setState(143); + setState(159); typeDecl(0); - setState(147); + setState(163); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14))) != 0)) { { { - setState(144); + setState(160); directive(); } } - setState(149); + setState(165); _errHandler.sync(this); _la = _input.LA(1); } - setState(150); + setState(166); match(NAME); } break; @@ -836,7 +965,7 @@ public class KickCParser extends Parser { _localctx = new ParameterDeclVoidContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(152); + setState(168); match(SIMPLETYPE); } break; @@ -982,16 +1111,16 @@ public class KickCParser extends Parser { public final DirectiveContext directive() throws RecognitionException { DirectiveContext _localctx = new DirectiveContext(_ctx, getState()); - enterRule(_localctx, 20, RULE_directive); + enterRule(_localctx, 24, RULE_directive); try { - setState(173); + setState(189); _errHandler.sync(this); switch (_input.LA(1)) { case T__8: _localctx = new DirectiveConstContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(155); + setState(171); match(T__8); } break; @@ -999,7 +1128,7 @@ public class KickCParser extends Parser { _localctx = new DirectiveExternContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(156); + setState(172); match(T__9); } break; @@ -1007,35 +1136,35 @@ public class KickCParser extends Parser { _localctx = new DirectiveAlignContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(157); + setState(173); match(T__10); - setState(158); - match(T__3); - setState(159); - match(NUMBER); - setState(160); + setState(174); match(T__4); + setState(175); + match(NUMBER); + setState(176); + match(T__5); } break; case T__11: _localctx = new DirectiveRegisterContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(161); + setState(177); match(T__11); - setState(162); - match(T__3); - setState(163); - match(NAME); - setState(164); + setState(178); match(T__4); + setState(179); + match(NAME); + setState(180); + match(T__5); } break; case T__12: _localctx = new DirectiveInlineContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(165); + setState(181); match(T__12); } break; @@ -1043,7 +1172,7 @@ public class KickCParser extends Parser { _localctx = new DirectiveVolatileContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(166); + setState(182); match(T__13); } break; @@ -1051,19 +1180,19 @@ public class KickCParser extends Parser { _localctx = new DirectiveInterruptContext(_localctx); enterOuterAlt(_localctx, 7); { - setState(167); + setState(183); match(T__14); - setState(171); + setState(187); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) { case 1: { - setState(168); - match(T__3); - setState(169); - match(NAME); - setState(170); + setState(184); match(T__4); + setState(185); + match(NAME); + setState(186); + match(T__5); } break; } @@ -1112,25 +1241,25 @@ public class KickCParser extends Parser { public final StmtSeqContext stmtSeq() throws RecognitionException { StmtSeqContext _localctx = new StmtSeqContext(_ctx, getState()); - enterRule(_localctx, 22, RULE_stmtSeq); + enterRule(_localctx, 26, RULE_stmtSeq); int _la; try { enterOuterAlt(_localctx, 1); { - setState(176); + setState(192); _errHandler.sync(this); _la = _input.LA(1); do { { { - setState(175); + setState(191); stmt(); } } - setState(178); + setState(194); _errHandler.sync(this); _la = _input.LA(1); - } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__5) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (SIMPLETYPE - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (BOOLEAN - 64)) | (1L << (NUMBER - 64)) | (1L << (NAME - 64)))) != 0) ); + } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__6) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (SIMPLETYPE - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (BOOLEAN - 64)) | (1L << (NUMBER - 64)) | (1L << (NAME - 64)))) != 0) ); } } catch (RecognitionException re) { @@ -1229,8 +1358,8 @@ public class KickCParser extends Parser { } } public static class StmtExprContext extends StmtContext { - public ExprContext expr() { - return getRuleContext(ExprContext.class,0); + public CommaExprContext commaExpr() { + return getRuleContext(CommaExprContext.class,0); } public StmtExprContext(StmtContext ctx) { copyFrom(ctx); } @Override @@ -1248,8 +1377,8 @@ public class KickCParser extends Parser { } } public static class StmtWhileContext extends StmtContext { - public ExprContext expr() { - return getRuleContext(ExprContext.class,0); + public CommaExprContext commaExpr() { + return getRuleContext(CommaExprContext.class,0); } public StmtContext stmt() { return getRuleContext(StmtContext.class,0); @@ -1279,8 +1408,8 @@ public class KickCParser extends Parser { public StmtContext stmt() { return getRuleContext(StmtContext.class,0); } - public ExprContext expr() { - return getRuleContext(ExprContext.class,0); + public CommaExprContext commaExpr() { + return getRuleContext(CommaExprContext.class,0); } public List directive() { return getRuleContexts(DirectiveContext.class); @@ -1357,8 +1486,8 @@ public class KickCParser extends Parser { } } public static class StmtIfElseContext extends StmtContext { - public ExprContext expr() { - return getRuleContext(ExprContext.class,0); + public CommaExprContext commaExpr() { + return getRuleContext(CommaExprContext.class,0); } public List stmt() { return getRuleContexts(StmtContext.class); @@ -1382,8 +1511,8 @@ public class KickCParser extends Parser { } } public static class StmtReturnContext extends StmtContext { - public ExprContext expr() { - return getRuleContext(ExprContext.class,0); + public CommaExprContext commaExpr() { + return getRuleContext(CommaExprContext.class,0); } public StmtReturnContext(StmtContext ctx) { copyFrom(ctx); } @Override @@ -1419,17 +1548,17 @@ public class KickCParser extends Parser { public final StmtContext stmt() throws RecognitionException { StmtContext _localctx = new StmtContext(_ctx, getState()); - enterRule(_localctx, 24, RULE_stmt); + enterRule(_localctx, 28, RULE_stmt); int _la; try { - setState(257); + setState(273); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) { case 1: _localctx = new StmtDeclVarContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(180); + setState(196); declVariable(); } break; @@ -1437,54 +1566,54 @@ public class KickCParser extends Parser { _localctx = new StmtBlockContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(181); - match(T__5); - setState(183); + setState(197); + match(T__6); + setState(199); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__5) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (SIMPLETYPE - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (BOOLEAN - 64)) | (1L << (NUMBER - 64)) | (1L << (NAME - 64)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__6) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__17) | (1L << T__18) | (1L << T__19) | (1L << T__20) | (1L << T__21) | (1L << T__22) | (1L << T__23) | (1L << T__26) | (1L << T__27) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T__63 - 64)) | (1L << (SIMPLETYPE - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (BOOLEAN - 64)) | (1L << (NUMBER - 64)) | (1L << (NAME - 64)))) != 0)) { { - setState(182); + setState(198); stmtSeq(); } } - setState(185); - match(T__6); + setState(201); + match(T__7); } break; case 3: _localctx = new StmtExprContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(186); - expr(0); - setState(187); - match(T__2); + setState(202); + commaExpr(0); + setState(203); + match(T__1); } break; case 4: _localctx = new StmtIfElseContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(189); + setState(205); match(T__15); - setState(190); - match(T__3); - setState(191); - expr(0); - setState(192); + setState(206); match(T__4); - setState(193); + setState(207); + commaExpr(0); + setState(208); + match(T__5); + setState(209); stmt(); - setState(196); + setState(212); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) { case 1: { - setState(194); + setState(210); match(T__16); - setState(195); + setState(211); stmt(); } break; @@ -1495,29 +1624,29 @@ public class KickCParser extends Parser { _localctx = new StmtWhileContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(201); + setState(217); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14))) != 0)) { { { - setState(198); + setState(214); directive(); } } - setState(203); + setState(219); _errHandler.sync(this); _la = _input.LA(1); } - setState(204); + setState(220); match(T__17); - setState(205); - match(T__3); - setState(206); - expr(0); - setState(207); + setState(221); match(T__4); - setState(208); + setState(222); + commaExpr(0); + setState(223); + match(T__5); + setState(224); stmt(); } break; @@ -1525,73 +1654,73 @@ public class KickCParser extends Parser { _localctx = new StmtDoWhileContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(213); + setState(229); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14))) != 0)) { { { - setState(210); + setState(226); directive(); } } - setState(215); + setState(231); _errHandler.sync(this); _la = _input.LA(1); } - setState(216); + setState(232); match(T__18); - setState(217); + setState(233); stmt(); - setState(218); + setState(234); match(T__17); - setState(219); - match(T__3); - setState(220); - expr(0); - setState(221); + setState(235); match(T__4); - setState(222); - match(T__2); + setState(236); + commaExpr(0); + setState(237); + match(T__5); + setState(238); + match(T__1); } break; case 7: _localctx = new StmtForContext(_localctx); enterOuterAlt(_localctx, 7); { - setState(227); + setState(243); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14))) != 0)) { { { - setState(224); + setState(240); directive(); } } - setState(229); + setState(245); _errHandler.sync(this); _la = _input.LA(1); } - setState(230); + setState(246); match(T__19); - setState(231); - match(T__3); - setState(233); + setState(247); + match(T__4); + setState(249); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__26) | (1L << T__27))) != 0) || _la==SIMPLETYPE || _la==NAME) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__26) | (1L << T__27))) != 0) || _la==SIMPLETYPE || _la==NAME) { { - setState(232); + setState(248); forDeclaration(); } } - setState(235); + setState(251); forIteration(); - setState(236); - match(T__4); - setState(237); + setState(252); + match(T__5); + setState(253); stmt(); } break; @@ -1599,71 +1728,71 @@ public class KickCParser extends Parser { _localctx = new StmtReturnContext(_localctx); enterOuterAlt(_localctx, 8); { - setState(239); + setState(255); match(T__20); - setState(241); + setState(257); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__5) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 77)) & ~0x3f) == 0 && ((1L << (_la - 77)) & ((1L << (STRING - 77)) | (1L << (CHAR - 77)) | (1L << (BOOLEAN - 77)) | (1L << (NUMBER - 77)) | (1L << (NAME - 77)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__6) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 77)) & ~0x3f) == 0 && ((1L << (_la - 77)) & ((1L << (STRING - 77)) | (1L << (CHAR - 77)) | (1L << (BOOLEAN - 77)) | (1L << (NUMBER - 77)) | (1L << (NAME - 77)))) != 0)) { { - setState(240); - expr(0); + setState(256); + commaExpr(0); } } - setState(243); - match(T__2); + setState(259); + match(T__1); } break; case 9: _localctx = new StmtBreakContext(_localctx); enterOuterAlt(_localctx, 9); { - setState(244); + setState(260); match(T__21); - setState(245); - match(T__2); + setState(261); + match(T__1); } break; case 10: _localctx = new StmtContinueContext(_localctx); enterOuterAlt(_localctx, 10); { - setState(246); + setState(262); match(T__22); - setState(247); - match(T__2); + setState(263); + match(T__1); } break; case 11: _localctx = new StmtAsmContext(_localctx); enterOuterAlt(_localctx, 11); { - setState(248); + setState(264); match(T__23); - setState(250); + setState(266); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__3) { + if (_la==T__4) { { - setState(249); + setState(265); asmDirectives(); } } - setState(252); - match(T__5); - setState(253); - asmLines(); - setState(254); + setState(268); match(T__6); + setState(269); + asmLines(); + setState(270); + match(T__7); } break; case 12: _localctx = new StmtDeclKasmContext(_localctx); enterOuterAlt(_localctx, 12); { - setState(256); + setState(272); declKasm(); } break; @@ -1723,63 +1852,63 @@ public class KickCParser extends Parser { public final ForDeclarationContext forDeclaration() throws RecognitionException { ForDeclarationContext _localctx = new ForDeclarationContext(_ctx, getState()); - enterRule(_localctx, 26, RULE_forDeclaration); + enterRule(_localctx, 30, RULE_forDeclaration); int _la; try { int _alt; _localctx = new ForDeclContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(262); + setState(278); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,26,_ctx); + _alt = getInterpreter().adaptivePredict(_input,27,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(259); + setState(275); directive(); } } } - setState(264); + setState(280); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,26,_ctx); + _alt = getInterpreter().adaptivePredict(_input,27,_ctx); } - setState(266); + setState(282); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__26) | (1L << T__27))) != 0) || _la==SIMPLETYPE) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__26) | (1L << T__27))) != 0) || _la==SIMPLETYPE) { { - setState(265); + setState(281); typeDecl(0); } } - setState(271); + setState(287); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14))) != 0)) { { { - setState(268); + setState(284); directive(); } } - setState(273); + setState(289); _errHandler.sync(this); _la = _input.LA(1); } - setState(274); + setState(290); match(NAME); - setState(277); + setState(293); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__1) { + if (_la==T__3) { { - setState(275); - match(T__1); - setState(276); + setState(291); + match(T__3); + setState(292); expr(0); } } @@ -1855,28 +1984,28 @@ public class KickCParser extends Parser { public final ForIterationContext forIteration() throws RecognitionException { ForIterationContext _localctx = new ForIterationContext(_ctx, getState()); - enterRule(_localctx, 28, RULE_forIteration); + enterRule(_localctx, 32, RULE_forIteration); int _la; try { - setState(290); + setState(306); _errHandler.sync(this); switch (_input.LA(1)) { - case T__2: + case T__1: _localctx = new ForClassicContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(279); - match(T__2); - setState(280); + setState(295); + match(T__1); + setState(296); commaExpr(0); - setState(281); - match(T__2); - setState(283); + setState(297); + match(T__1); + setState(299); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__5) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 77)) & ~0x3f) == 0 && ((1L << (_la - 77)) & ((1L << (STRING - 77)) | (1L << (CHAR - 77)) | (1L << (BOOLEAN - 77)) | (1L << (NUMBER - 77)) | (1L << (NAME - 77)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__6) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 77)) & ~0x3f) == 0 && ((1L << (_la - 77)) & ((1L << (STRING - 77)) | (1L << (CHAR - 77)) | (1L << (BOOLEAN - 77)) | (1L << (NUMBER - 77)) | (1L << (NAME - 77)))) != 0)) { { - setState(282); + setState(298); commaExpr(0); } } @@ -1887,15 +2016,15 @@ public class KickCParser extends Parser { _localctx = new ForRangeContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(285); + setState(301); match(T__24); - setState(286); + setState(302); expr(0); { - setState(287); + setState(303); match(T__25); } - setState(288); + setState(304); expr(0); } break; @@ -2048,28 +2177,28 @@ public class KickCParser extends Parser { int _parentState = getState(); TypeDeclContext _localctx = new TypeDeclContext(_ctx, _parentState); TypeDeclContext _prevctx = _localctx; - int _startState = 30; - enterRecursionRule(_localctx, 30, RULE_typeDecl, _p); + int _startState = 34; + enterRecursionRule(_localctx, 34, RULE_typeDecl, _p); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { - setState(300); + setState(316); _errHandler.sync(this); switch (_input.LA(1)) { - case T__3: + case T__4: { _localctx = new TypeParContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(293); - match(T__3); - setState(294); - typeDecl(0); - setState(295); + setState(309); match(T__4); + setState(310); + typeDecl(0); + setState(311); + match(T__5); } break; case SIMPLETYPE: @@ -2077,7 +2206,7 @@ public class KickCParser extends Parser { _localctx = new TypeSimpleContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(297); + setState(313); match(SIMPLETYPE); } break; @@ -2087,7 +2216,7 @@ public class KickCParser extends Parser { _localctx = new TypeSignedSimpleContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(298); + setState(314); _la = _input.LA(1); if ( !(_la==T__26 || _la==T__27) ) { _errHandler.recoverInline(this); @@ -2097,7 +2226,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(299); + setState(315); match(SIMPLETYPE); } break; @@ -2105,24 +2234,24 @@ public class KickCParser extends Parser { throw new NoViableAltException(this); } _ctx.stop = _input.LT(-1); - setState(315); + setState(331); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + _alt = getInterpreter().adaptivePredict(_input,36,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(313); + setState(329); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) { case 1: { _localctx = new TypePtrContext(new TypeDeclContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_typeDecl); - setState(302); + setState(318); if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); - setState(303); + setState(319); match(T__28); } break; @@ -2130,21 +2259,21 @@ public class KickCParser extends Parser { { _localctx = new TypeArrayContext(new TypeDeclContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_typeDecl); - setState(304); + setState(320); if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); - setState(305); + setState(321); match(T__29); - setState(307); + setState(323); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__5) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 77)) & ~0x3f) == 0 && ((1L << (_la - 77)) & ((1L << (STRING - 77)) | (1L << (CHAR - 77)) | (1L << (BOOLEAN - 77)) | (1L << (NUMBER - 77)) | (1L << (NAME - 77)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__6) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 77)) & ~0x3f) == 0 && ((1L << (_la - 77)) & ((1L << (STRING - 77)) | (1L << (CHAR - 77)) | (1L << (BOOLEAN - 77)) | (1L << (NUMBER - 77)) | (1L << (NAME - 77)))) != 0)) { { - setState(306); + setState(322); expr(0); } } - setState(309); + setState(325); match(T__30); } break; @@ -2152,20 +2281,20 @@ public class KickCParser extends Parser { { _localctx = new TypeProcedureContext(new TypeDeclContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_typeDecl); - setState(310); + setState(326); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(311); - match(T__3); - setState(312); + setState(327); match(T__4); + setState(328); + match(T__5); } break; } } } - setState(317); + setState(333); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + _alt = getInterpreter().adaptivePredict(_input,36,_ctx); } } } @@ -2242,8 +2371,8 @@ public class KickCParser extends Parser { int _parentState = getState(); CommaExprContext _localctx = new CommaExprContext(_ctx, _parentState); CommaExprContext _prevctx = _localctx; - int _startState = 32; - enterRecursionRule(_localctx, 32, RULE_commaExpr, _p); + int _startState = 36; + enterRecursionRule(_localctx, 36, RULE_commaExpr, _p); try { int _alt; enterOuterAlt(_localctx, 1); @@ -2253,13 +2382,13 @@ public class KickCParser extends Parser { _ctx = _localctx; _prevctx = _localctx; - setState(319); + setState(335); expr(0); } _ctx.stop = _input.LT(-1); - setState(326); + setState(342); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,36,_ctx); + _alt = getInterpreter().adaptivePredict(_input,37,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); @@ -2268,18 +2397,18 @@ public class KickCParser extends Parser { { _localctx = new CommaSimpleContext(new CommaExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_commaExpr); - setState(321); + setState(337); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(322); - match(T__7); - setState(323); + setState(338); + match(T__2); + setState(339); expr(0); } } } - setState(328); + setState(344); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,36,_ctx); + _alt = getInterpreter().adaptivePredict(_input,37,_ctx); } } } @@ -2671,28 +2800,28 @@ public class KickCParser extends Parser { int _parentState = getState(); ExprContext _localctx = new ExprContext(_ctx, _parentState); ExprContext _prevctx = _localctx; - int _startState = 34; - enterRecursionRule(_localctx, 34, RULE_expr, _p); + int _startState = 38; + enterRecursionRule(_localctx, 38, RULE_expr, _p); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { - setState(363); + setState(379); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) { case 1: { _localctx = new ExprParContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(330); - match(T__3); - setState(331); - commaExpr(0); - setState(332); + setState(346); match(T__4); + setState(347); + commaExpr(0); + setState(348); + match(T__5); } break; case 2: @@ -2700,13 +2829,13 @@ public class KickCParser extends Parser { _localctx = new ExprCastContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(334); - match(T__3); - setState(335); - typeDecl(0); - setState(336); + setState(350); match(T__4); - setState(337); + setState(351); + typeDecl(0); + setState(352); + match(T__5); + setState(353); expr(24); } break; @@ -2715,7 +2844,7 @@ public class KickCParser extends Parser { _localctx = new ExprPreModContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(339); + setState(355); _la = _input.LA(1); if ( !(_la==T__31 || _la==T__32) ) { _errHandler.recoverInline(this); @@ -2725,7 +2854,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(340); + setState(356); expr(23); } break; @@ -2734,9 +2863,9 @@ public class KickCParser extends Parser { _localctx = new ExprPtrContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(341); + setState(357); match(T__28); - setState(342); + setState(358); expr(21); } break; @@ -2745,7 +2874,7 @@ public class KickCParser extends Parser { _localctx = new ExprUnaryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(343); + setState(359); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37))) != 0)) ) { _errHandler.recoverInline(this); @@ -2755,7 +2884,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(344); + setState(360); expr(20); } break; @@ -2764,7 +2893,7 @@ public class KickCParser extends Parser { _localctx = new ExprUnaryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(345); + setState(361); _la = _input.LA(1); if ( !(_la==T__42 || _la==T__43) ) { _errHandler.recoverInline(this); @@ -2774,7 +2903,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(346); + setState(362); expr(16); } break; @@ -2783,28 +2912,28 @@ public class KickCParser extends Parser { _localctx = new InitListContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(347); - match(T__5); - setState(348); + setState(363); + match(T__6); + setState(364); expr(0); - setState(353); + setState(369); _errHandler.sync(this); _la = _input.LA(1); - while (_la==T__7) { + while (_la==T__2) { { { - setState(349); - match(T__7); - setState(350); + setState(365); + match(T__2); + setState(366); expr(0); } } - setState(355); + setState(371); _errHandler.sync(this); _la = _input.LA(1); } - setState(356); - match(T__6); + setState(372); + match(T__7); } break; case 8: @@ -2812,7 +2941,7 @@ public class KickCParser extends Parser { _localctx = new ExprIdContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(358); + setState(374); match(NAME); } break; @@ -2821,7 +2950,7 @@ public class KickCParser extends Parser { _localctx = new ExprNumberContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(359); + setState(375); match(NUMBER); } break; @@ -2830,7 +2959,7 @@ public class KickCParser extends Parser { _localctx = new ExprStringContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(360); + setState(376); match(STRING); } break; @@ -2839,7 +2968,7 @@ public class KickCParser extends Parser { _localctx = new ExprCharContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(361); + setState(377); match(CHAR); } break; @@ -2848,30 +2977,30 @@ public class KickCParser extends Parser { _localctx = new ExprBoolContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(362); + setState(378); match(BOOLEAN); } break; } _ctx.stop = _input.LT(-1); - setState(419); + setState(435); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,41,_ctx); + _alt = getInterpreter().adaptivePredict(_input,42,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(417); + setState(433); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,41,_ctx) ) { case 1: { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(365); + setState(381); if (!(precpred(_ctx, 19))) throw new FailedPredicateException(this, "precpred(_ctx, 19)"); - setState(366); + setState(382); _la = _input.LA(1); if ( !(_la==T__38 || _la==T__39) ) { _errHandler.recoverInline(this); @@ -2881,7 +3010,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(367); + setState(383); expr(20); } break; @@ -2889,9 +3018,9 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(368); + setState(384); if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); - setState(369); + setState(385); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__28) | (1L << T__40) | (1L << T__41))) != 0)) ) { _errHandler.recoverInline(this); @@ -2901,7 +3030,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(370); + setState(386); expr(19); } break; @@ -2909,9 +3038,9 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(371); + setState(387); if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)"); - setState(372); + setState(388); _la = _input.LA(1); if ( !(_la==T__33 || _la==T__34) ) { _errHandler.recoverInline(this); @@ -2921,7 +3050,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(373); + setState(389); expr(18); } break; @@ -2929,9 +3058,9 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(374); + setState(390); if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)"); - setState(375); + setState(391); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__42) | (1L << T__43) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47))) != 0)) ) { _errHandler.recoverInline(this); @@ -2941,7 +3070,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(376); + setState(392); expr(16); } break; @@ -2949,13 +3078,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(377); + setState(393); if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); { - setState(378); + setState(394); match(T__36); } - setState(379); + setState(395); expr(15); } break; @@ -2963,13 +3092,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(380); + setState(396); if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); { - setState(381); + setState(397); match(T__48); } - setState(382); + setState(398); expr(14); } break; @@ -2977,13 +3106,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(383); + setState(399); if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); { - setState(384); + setState(400); match(T__49); } - setState(385); + setState(401); expr(13); } break; @@ -2991,13 +3120,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(386); + setState(402); if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); { - setState(387); + setState(403); match(T__50); } - setState(388); + setState(404); expr(12); } break; @@ -3005,13 +3134,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(389); + setState(405); if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); { - setState(390); + setState(406); match(T__51); } - setState(391); + setState(407); expr(11); } break; @@ -3019,15 +3148,15 @@ public class KickCParser extends Parser { { _localctx = new ExprTernaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(392); + setState(408); if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); - setState(393); + setState(409); match(T__52); - setState(394); + setState(410); expr(0); - setState(395); + setState(411); match(T__24); - setState(396); + setState(412); expr(10); } break; @@ -3035,11 +3164,11 @@ public class KickCParser extends Parser { { _localctx = new ExprAssignmentContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(398); + setState(414); if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); - setState(399); - match(T__1); - setState(400); + setState(415); + match(T__3); + setState(416); expr(8); } break; @@ -3047,9 +3176,9 @@ public class KickCParser extends Parser { { _localctx = new ExprAssignmentCompoundContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(401); + setState(417); if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(402); + setState(418); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__53) | (1L << T__54) | (1L << T__55) | (1L << T__56) | (1L << T__57) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0)) ) { _errHandler.recoverInline(this); @@ -3059,7 +3188,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(403); + setState(419); expr(7); } break; @@ -3067,35 +3196,35 @@ public class KickCParser extends Parser { { _localctx = new ExprCallContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(404); + setState(420); if (!(precpred(_ctx, 26))) throw new FailedPredicateException(this, "precpred(_ctx, 26)"); - setState(405); - match(T__3); - setState(407); + setState(421); + match(T__4); + setState(423); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__5) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 77)) & ~0x3f) == 0 && ((1L << (_la - 77)) & ((1L << (STRING - 77)) | (1L << (CHAR - 77)) | (1L << (BOOLEAN - 77)) | (1L << (NUMBER - 77)) | (1L << (NAME - 77)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__6) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__42) | (1L << T__43))) != 0) || ((((_la - 77)) & ~0x3f) == 0 && ((1L << (_la - 77)) & ((1L << (STRING - 77)) | (1L << (CHAR - 77)) | (1L << (BOOLEAN - 77)) | (1L << (NUMBER - 77)) | (1L << (NAME - 77)))) != 0)) { { - setState(406); + setState(422); parameterList(); } } - setState(409); - match(T__4); + setState(425); + match(T__5); } break; case 14: { _localctx = new ExprArrayContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(410); + setState(426); if (!(precpred(_ctx, 25))) throw new FailedPredicateException(this, "precpred(_ctx, 25)"); - setState(411); + setState(427); match(T__29); - setState(412); + setState(428); commaExpr(0); - setState(413); + setState(429); match(T__30); } break; @@ -3103,9 +3232,9 @@ public class KickCParser extends Parser { { _localctx = new ExprPostModContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(415); + setState(431); if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); - setState(416); + setState(432); _la = _input.LA(1); if ( !(_la==T__31 || _la==T__32) ) { _errHandler.recoverInline(this); @@ -3120,9 +3249,9 @@ public class KickCParser extends Parser { } } } - setState(421); + setState(437); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,41,_ctx); + _alt = getInterpreter().adaptivePredict(_input,42,_ctx); } } } @@ -3165,26 +3294,26 @@ public class KickCParser extends Parser { public final ParameterListContext parameterList() throws RecognitionException { ParameterListContext _localctx = new ParameterListContext(_ctx, getState()); - enterRule(_localctx, 36, RULE_parameterList); + enterRule(_localctx, 40, RULE_parameterList); int _la; try { enterOuterAlt(_localctx, 1); { - setState(422); + setState(438); expr(0); - setState(427); + setState(443); _errHandler.sync(this); _la = _input.LA(1); - while (_la==T__7) { + while (_la==T__2) { { { - setState(423); - match(T__7); - setState(424); + setState(439); + match(T__2); + setState(440); expr(0); } } - setState(429); + setState(445); _errHandler.sync(this); _la = _input.LA(1); } @@ -3227,24 +3356,24 @@ public class KickCParser extends Parser { public final DeclKasmContext declKasm() throws RecognitionException { DeclKasmContext _localctx = new DeclKasmContext(_ctx, getState()); - enterRule(_localctx, 38, RULE_declKasm); + enterRule(_localctx, 42, RULE_declKasm); int _la; try { enterOuterAlt(_localctx, 1); { - setState(430); + setState(446); match(T__63); - setState(432); + setState(448); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__3) { + if (_la==T__4) { { - setState(431); + setState(447); asmDirectives(); } } - setState(434); + setState(450); match(KICKASM); } } @@ -3287,33 +3416,33 @@ public class KickCParser extends Parser { public final AsmDirectivesContext asmDirectives() throws RecognitionException { AsmDirectivesContext _localctx = new AsmDirectivesContext(_ctx, getState()); - enterRule(_localctx, 40, RULE_asmDirectives); + enterRule(_localctx, 44, RULE_asmDirectives); int _la; try { enterOuterAlt(_localctx, 1); { - setState(436); - match(T__3); - setState(437); + setState(452); + match(T__4); + setState(453); asmDirective(); - setState(442); + setState(458); _errHandler.sync(this); _la = _input.LA(1); - while (_la==T__7) { + while (_la==T__2) { { { - setState(438); - match(T__7); - setState(439); + setState(454); + match(T__2); + setState(455); asmDirective(); } } - setState(444); + setState(460); _errHandler.sync(this); _la = _input.LA(1); } - setState(445); - match(T__4); + setState(461); + match(T__5); } } catch (RecognitionException re) { @@ -3449,18 +3578,18 @@ public class KickCParser extends Parser { public final AsmDirectiveContext asmDirective() throws RecognitionException { AsmDirectiveContext _localctx = new AsmDirectiveContext(_ctx, getState()); - enterRule(_localctx, 42, RULE_asmDirective); + enterRule(_localctx, 46, RULE_asmDirective); try { - setState(462); + setState(478); _errHandler.sync(this); switch (_input.LA(1)) { case T__64: _localctx = new AsmDirectiveResourceContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(447); + setState(463); match(T__64); - setState(448); + setState(464); match(STRING); } break; @@ -3468,9 +3597,9 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveUsesContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(449); + setState(465); match(T__65); - setState(450); + setState(466); match(NAME); } break; @@ -3478,9 +3607,9 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveClobberContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(451); + setState(467); match(T__66); - setState(452); + setState(468); match(STRING); } break; @@ -3488,9 +3617,9 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveBytesContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(453); + setState(469); match(T__67); - setState(454); + setState(470); expr(0); } break; @@ -3498,9 +3627,9 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveCyclesContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(455); + setState(471); match(T__68); - setState(456); + setState(472); expr(0); } break; @@ -3508,19 +3637,19 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveAddressContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(457); + setState(473); match(T__69); - setState(460); + setState(476); _errHandler.sync(this); switch (_input.LA(1)) { case T__12: { - setState(458); + setState(474); match(T__12); } break; - case T__3: - case T__5: + case T__4: + case T__6: case T__28: case T__31: case T__32: @@ -3537,7 +3666,7 @@ public class KickCParser extends Parser { case NUMBER: case NAME: { - setState(459); + setState(475); expr(0); } break; @@ -3589,22 +3718,22 @@ public class KickCParser extends Parser { public final AsmLinesContext asmLines() throws RecognitionException { AsmLinesContext _localctx = new AsmLinesContext(_ctx, getState()); - enterRule(_localctx, 44, RULE_asmLines); + enterRule(_localctx, 48, RULE_asmLines); int _la; try { enterOuterAlt(_localctx, 1); { - setState(467); + setState(483); _errHandler.sync(this); _la = _input.LA(1); while (((((_la - 36)) & ~0x3f) == 0 && ((1L << (_la - 36)) & ((1L << (T__35 - 36)) | (1L << (T__70 - 36)) | (1L << (MNEMONIC - 36)) | (1L << (NAME - 36)))) != 0)) { { { - setState(464); + setState(480); asmLine(); } } - setState(469); + setState(485); _errHandler.sync(this); _la = _input.LA(1); } @@ -3652,30 +3781,30 @@ public class KickCParser extends Parser { public final AsmLineContext asmLine() throws RecognitionException { AsmLineContext _localctx = new AsmLineContext(_ctx, getState()); - enterRule(_localctx, 46, RULE_asmLine); + enterRule(_localctx, 50, RULE_asmLine); try { - setState(473); + setState(489); _errHandler.sync(this); switch (_input.LA(1)) { case T__35: case NAME: enterOuterAlt(_localctx, 1); { - setState(470); + setState(486); asmLabel(); } break; case MNEMONIC: enterOuterAlt(_localctx, 2); { - setState(471); + setState(487); asmInstruction(); } break; case T__70: enterOuterAlt(_localctx, 3); { - setState(472); + setState(488); asmBytes(); } break; @@ -3742,19 +3871,19 @@ public class KickCParser extends Parser { public final AsmLabelContext asmLabel() throws RecognitionException { AsmLabelContext _localctx = new AsmLabelContext(_ctx, getState()); - enterRule(_localctx, 48, RULE_asmLabel); + enterRule(_localctx, 52, RULE_asmLabel); int _la; try { - setState(482); + setState(498); _errHandler.sync(this); switch (_input.LA(1)) { case NAME: _localctx = new AsmLabelNameContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(475); + setState(491); match(NAME); - setState(476); + setState(492); match(T__24); } break; @@ -3762,19 +3891,19 @@ public class KickCParser extends Parser { _localctx = new AsmLabelMultiContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(477); + setState(493); match(T__35); - setState(479); + setState(495); _errHandler.sync(this); _la = _input.LA(1); if (_la==NAME) { { - setState(478); + setState(494); match(NAME); } } - setState(481); + setState(497); match(T__24); } break; @@ -3819,18 +3948,18 @@ public class KickCParser extends Parser { public final AsmInstructionContext asmInstruction() throws RecognitionException { AsmInstructionContext _localctx = new AsmInstructionContext(_ctx, getState()); - enterRule(_localctx, 50, RULE_asmInstruction); + enterRule(_localctx, 54, RULE_asmInstruction); try { enterOuterAlt(_localctx, 1); { - setState(484); + setState(500); match(MNEMONIC); - setState(486); + setState(502); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,51,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,52,_ctx) ) { case 1: { - setState(485); + setState(501); asmParamMode(); } break; @@ -3876,28 +4005,28 @@ public class KickCParser extends Parser { public final AsmBytesContext asmBytes() throws RecognitionException { AsmBytesContext _localctx = new AsmBytesContext(_ctx, getState()); - enterRule(_localctx, 52, RULE_asmBytes); + enterRule(_localctx, 56, RULE_asmBytes); int _la; try { enterOuterAlt(_localctx, 1); { - setState(488); + setState(504); match(T__70); - setState(489); + setState(505); asmExpr(0); - setState(494); + setState(510); _errHandler.sync(this); _la = _input.LA(1); - while (_la==T__7) { + while (_la==T__2) { { { - setState(490); - match(T__7); - setState(491); + setState(506); + match(T__2); + setState(507); asmExpr(0); } } - setState(496); + setState(512); _errHandler.sync(this); _la = _input.LA(1); } @@ -4045,16 +4174,16 @@ public class KickCParser extends Parser { public final AsmParamModeContext asmParamMode() throws RecognitionException { AsmParamModeContext _localctx = new AsmParamModeContext(_ctx, getState()); - enterRule(_localctx, 54, RULE_asmParamMode); + enterRule(_localctx, 58, RULE_asmParamMode); try { - setState(520); + setState(536); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,53,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,54,_ctx) ) { case 1: _localctx = new AsmModeAbsContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(497); + setState(513); asmExpr(0); } break; @@ -4062,9 +4191,9 @@ public class KickCParser extends Parser { _localctx = new AsmModeImmContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(498); + setState(514); match(T__71); - setState(499); + setState(515); asmExpr(0); } break; @@ -4072,11 +4201,11 @@ public class KickCParser extends Parser { _localctx = new AsmModeAbsXYContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(500); + setState(516); asmExpr(0); - setState(501); - match(T__7); - setState(502); + setState(517); + match(T__2); + setState(518); match(NAME); } break; @@ -4084,15 +4213,15 @@ public class KickCParser extends Parser { _localctx = new AsmModeIndIdxXYContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(504); - match(T__3); - setState(505); - asmExpr(0); - setState(506); + setState(520); match(T__4); - setState(507); - match(T__7); - setState(508); + setState(521); + asmExpr(0); + setState(522); + match(T__5); + setState(523); + match(T__2); + setState(524); match(NAME); } break; @@ -4100,28 +4229,28 @@ public class KickCParser extends Parser { _localctx = new AsmModeIdxIndXYContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(510); - match(T__3); - setState(511); - asmExpr(0); - setState(512); - match(T__7); - setState(513); - match(NAME); - setState(514); + setState(526); match(T__4); + setState(527); + asmExpr(0); + setState(528); + match(T__2); + setState(529); + match(NAME); + setState(530); + match(T__5); } break; case 6: _localctx = new AsmModeIndContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(516); - match(T__3); - setState(517); - asmExpr(0); - setState(518); + setState(532); match(T__4); + setState(533); + asmExpr(0); + setState(534); + match(T__5); } break; } @@ -4303,14 +4432,14 @@ public class KickCParser extends Parser { int _parentState = getState(); AsmExprContext _localctx = new AsmExprContext(_ctx, _parentState); AsmExprContext _prevctx = _localctx; - int _startState = 56; - enterRecursionRule(_localctx, 56, RULE_asmExpr, _p); + int _startState = 60; + enterRecursionRule(_localctx, 60, RULE_asmExpr, _p); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { - setState(536); + setState(552); _errHandler.sync(this); switch (_input.LA(1)) { case T__29: @@ -4319,11 +4448,11 @@ public class KickCParser extends Parser { _ctx = _localctx; _prevctx = _localctx; - setState(523); + setState(539); match(T__29); - setState(524); + setState(540); asmExpr(0); - setState(525); + setState(541); match(T__30); } break; @@ -4335,7 +4464,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprUnaryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(527); + setState(543); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__33) | (1L << T__34) | (1L << T__42) | (1L << T__43))) != 0)) ) { _errHandler.recoverInline(this); @@ -4345,7 +4474,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(528); + setState(544); asmExpr(8); } break; @@ -4354,7 +4483,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprLabelContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(529); + setState(545); match(NAME); } break; @@ -4363,21 +4492,21 @@ public class KickCParser extends Parser { _localctx = new AsmExprLabelRelContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(530); + setState(546); match(ASMREL); } break; - case T__5: + case T__6: { _localctx = new AsmExprReplaceContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(531); - match(T__5); - setState(532); - match(NAME); - setState(533); + setState(547); match(T__6); + setState(548); + match(NAME); + setState(549); + match(T__7); } break; case NUMBER: @@ -4385,7 +4514,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprIntContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(534); + setState(550); match(NUMBER); } break; @@ -4394,7 +4523,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprCharContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(535); + setState(551); match(CHAR); } break; @@ -4402,28 +4531,28 @@ public class KickCParser extends Parser { throw new NoViableAltException(this); } _ctx.stop = _input.LT(-1); - setState(552); + setState(568); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,56,_ctx); + _alt = getInterpreter().adaptivePredict(_input,57,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(550); + setState(566); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,55,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,56,_ctx) ) { case 1: { _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); - setState(538); + setState(554); if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); { - setState(539); + setState(555); match(T__72); } - setState(540); + setState(556); asmExpr(11); } break; @@ -4431,9 +4560,9 @@ public class KickCParser extends Parser { { _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); - setState(541); + setState(557); if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); - setState(542); + setState(558); _la = _input.LA(1); if ( !(_la==T__38 || _la==T__39) ) { _errHandler.recoverInline(this); @@ -4443,7 +4572,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(543); + setState(559); asmExpr(10); } break; @@ -4451,9 +4580,9 @@ public class KickCParser extends Parser { { _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); - setState(544); + setState(560); if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(545); + setState(561); _la = _input.LA(1); if ( !(_la==T__28 || _la==T__40) ) { _errHandler.recoverInline(this); @@ -4463,7 +4592,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(546); + setState(562); asmExpr(8); } break; @@ -4471,9 +4600,9 @@ public class KickCParser extends Parser { { _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); - setState(547); + setState(563); if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); - setState(548); + setState(564); _la = _input.LA(1); if ( !(_la==T__33 || _la==T__34) ) { _errHandler.recoverInline(this); @@ -4483,16 +4612,16 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(549); + setState(565); asmExpr(7); } break; } } } - setState(554); + setState(570); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,56,_ctx); + _alt = getInterpreter().adaptivePredict(_input,57,_ctx); } } } @@ -4509,305 +4638,319 @@ public class KickCParser extends Parser { public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { switch (ruleIndex) { - case 15: - return typeDecl_sempred((TypeDeclContext)_localctx, predIndex); - case 16: - return commaExpr_sempred((CommaExprContext)_localctx, predIndex); + case 7: + return declVariableList_sempred((DeclVariableListContext)_localctx, predIndex); case 17: + return typeDecl_sempred((TypeDeclContext)_localctx, predIndex); + case 18: + return commaExpr_sempred((CommaExprContext)_localctx, predIndex); + case 19: return expr_sempred((ExprContext)_localctx, predIndex); - case 28: + case 30: return asmExpr_sempred((AsmExprContext)_localctx, predIndex); } return true; } + private boolean declVariableList_sempred(DeclVariableListContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return precpred(_ctx, 1); + } + return true; + } private boolean typeDecl_sempred(TypeDeclContext _localctx, int predIndex) { switch (predIndex) { - case 0: - return precpred(_ctx, 3); case 1: - return precpred(_ctx, 2); + return precpred(_ctx, 3); case 2: + return precpred(_ctx, 2); + case 3: return precpred(_ctx, 1); } return true; } private boolean commaExpr_sempred(CommaExprContext _localctx, int predIndex) { switch (predIndex) { - case 3: + case 4: return precpred(_ctx, 1); } return true; } private boolean expr_sempred(ExprContext _localctx, int predIndex) { switch (predIndex) { - case 4: - return precpred(_ctx, 19); case 5: - return precpred(_ctx, 18); + return precpred(_ctx, 19); case 6: - return precpred(_ctx, 17); + return precpred(_ctx, 18); case 7: - return precpred(_ctx, 15); + return precpred(_ctx, 17); case 8: - return precpred(_ctx, 14); + return precpred(_ctx, 15); case 9: - return precpred(_ctx, 13); + return precpred(_ctx, 14); case 10: - return precpred(_ctx, 12); + return precpred(_ctx, 13); case 11: - return precpred(_ctx, 11); + return precpred(_ctx, 12); case 12: - return precpred(_ctx, 10); + return precpred(_ctx, 11); case 13: - return precpred(_ctx, 9); + return precpred(_ctx, 10); case 14: - return precpred(_ctx, 8); + return precpred(_ctx, 9); case 15: - return precpred(_ctx, 7); + return precpred(_ctx, 8); case 16: - return precpred(_ctx, 26); + return precpred(_ctx, 7); case 17: - return precpred(_ctx, 25); + return precpred(_ctx, 26); case 18: + return precpred(_ctx, 25); + case 19: return precpred(_ctx, 22); } return true; } private boolean asmExpr_sempred(AsmExprContext _localctx, int predIndex) { switch (predIndex) { - case 19: - return precpred(_ctx, 10); case 20: - return precpred(_ctx, 9); + return precpred(_ctx, 10); case 21: - return precpred(_ctx, 7); + return precpred(_ctx, 9); case 22: + return precpred(_ctx, 7); + case 23: return precpred(_ctx, 6); } return true; } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3_\u022e\4\2\t\2\4"+ + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3_\u023e\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\3\2\3\2\3\2\3\2\3\3"+ - "\3\3\3\3\3\4\7\4E\n\4\f\4\16\4H\13\4\3\5\3\5\3\5\3\6\6\6N\n\6\r\6\16\6"+ - "O\3\7\3\7\3\7\5\7U\n\7\3\b\7\bX\n\b\f\b\16\b[\13\b\3\b\3\b\7\b_\n\b\f"+ - "\b\16\bb\13\b\3\b\3\b\3\b\5\bg\n\b\3\b\3\b\3\t\7\tl\n\t\f\t\16\to\13\t"+ - "\3\t\3\t\7\ts\n\t\f\t\16\tv\13\t\3\t\3\t\3\t\5\t{\n\t\3\t\3\t\3\t\5\t"+ - "\u0080\n\t\3\t\3\t\3\n\3\n\3\n\7\n\u0087\n\n\f\n\16\n\u008a\13\n\3\13"+ - "\7\13\u008d\n\13\f\13\16\13\u0090\13\13\3\13\3\13\7\13\u0094\n\13\f\13"+ - "\16\13\u0097\13\13\3\13\3\13\3\13\5\13\u009c\n\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\f\3\f\3\f\3\f\5\f\u00ae\n\f\5\f\u00b0\n"+ - "\f\3\r\6\r\u00b3\n\r\r\r\16\r\u00b4\3\16\3\16\3\16\5\16\u00ba\n\16\3\16"+ - "\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\5\16\u00c7\n\16\3\16"+ - "\7\16\u00ca\n\16\f\16\16\16\u00cd\13\16\3\16\3\16\3\16\3\16\3\16\3\16"+ - "\3\16\7\16\u00d6\n\16\f\16\16\16\u00d9\13\16\3\16\3\16\3\16\3\16\3\16"+ - "\3\16\3\16\3\16\3\16\7\16\u00e4\n\16\f\16\16\16\u00e7\13\16\3\16\3\16"+ - "\3\16\5\16\u00ec\n\16\3\16\3\16\3\16\3\16\3\16\3\16\5\16\u00f4\n\16\3"+ - "\16\3\16\3\16\3\16\3\16\3\16\3\16\5\16\u00fd\n\16\3\16\3\16\3\16\3\16"+ - "\3\16\5\16\u0104\n\16\3\17\7\17\u0107\n\17\f\17\16\17\u010a\13\17\3\17"+ - "\5\17\u010d\n\17\3\17\7\17\u0110\n\17\f\17\16\17\u0113\13\17\3\17\3\17"+ - "\3\17\5\17\u0118\n\17\3\20\3\20\3\20\3\20\5\20\u011e\n\20\3\20\3\20\3"+ - "\20\3\20\3\20\5\20\u0125\n\20\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21"+ - "\5\21\u012f\n\21\3\21\3\21\3\21\3\21\3\21\5\21\u0136\n\21\3\21\3\21\3"+ - "\21\3\21\7\21\u013c\n\21\f\21\16\21\u013f\13\21\3\22\3\22\3\22\3\22\3"+ - "\22\3\22\7\22\u0147\n\22\f\22\16\22\u014a\13\22\3\23\3\23\3\23\3\23\3"+ - "\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3"+ - "\23\3\23\3\23\3\23\7\23\u0162\n\23\f\23\16\23\u0165\13\23\3\23\3\23\3"+ - "\23\3\23\3\23\3\23\3\23\5\23\u016e\n\23\3\23\3\23\3\23\3\23\3\23\3\23"+ - "\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23"+ - "\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23"+ - "\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\5\23\u019a\n\23\3\23\3\23\3\23"+ - "\3\23\3\23\3\23\3\23\3\23\7\23\u01a4\n\23\f\23\16\23\u01a7\13\23\3\24"+ - "\3\24\3\24\7\24\u01ac\n\24\f\24\16\24\u01af\13\24\3\25\3\25\5\25\u01b3"+ - "\n\25\3\25\3\25\3\26\3\26\3\26\3\26\7\26\u01bb\n\26\f\26\16\26\u01be\13"+ - "\26\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3"+ - "\27\3\27\5\27\u01cf\n\27\5\27\u01d1\n\27\3\30\7\30\u01d4\n\30\f\30\16"+ - "\30\u01d7\13\30\3\31\3\31\3\31\5\31\u01dc\n\31\3\32\3\32\3\32\3\32\5\32"+ - "\u01e2\n\32\3\32\5\32\u01e5\n\32\3\33\3\33\5\33\u01e9\n\33\3\34\3\34\3"+ - "\34\3\34\7\34\u01ef\n\34\f\34\16\34\u01f2\13\34\3\35\3\35\3\35\3\35\3"+ - "\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3"+ - "\35\3\35\3\35\3\35\3\35\5\35\u020b\n\35\3\36\3\36\3\36\3\36\3\36\3\36"+ - "\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\5\36\u021b\n\36\3\36\3\36\3\36"+ - "\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\7\36\u0229\n\36\f\36\16"+ - "\36\u022c\13\36\3\36\2\6 \"$:\37\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36"+ - " \"$&(*,.\60\62\64\668:\2\r\3\2\35\36\3\2\"#\3\2$(\3\2-.\3\2)*\4\2\37"+ - "\37+,\3\2$%\3\2-\62\3\28A\4\2$%-.\4\2\37\37++\2\u0282\2<\3\2\2\2\4@\3"+ - "\2\2\2\6F\3\2\2\2\bI\3\2\2\2\nM\3\2\2\2\fT\3\2\2\2\16Y\3\2\2\2\20m\3\2"+ - "\2\2\22\u0083\3\2\2\2\24\u009b\3\2\2\2\26\u00af\3\2\2\2\30\u00b2\3\2\2"+ - "\2\32\u0103\3\2\2\2\34\u0108\3\2\2\2\36\u0124\3\2\2\2 \u012e\3\2\2\2\""+ - "\u0140\3\2\2\2$\u016d\3\2\2\2&\u01a8\3\2\2\2(\u01b0\3\2\2\2*\u01b6\3\2"+ - "\2\2,\u01d0\3\2\2\2.\u01d5\3\2\2\2\60\u01db\3\2\2\2\62\u01e4\3\2\2\2\64"+ - "\u01e6\3\2\2\2\66\u01ea\3\2\2\28\u020a\3\2\2\2:\u021a\3\2\2\2<=\5\6\4"+ - "\2=>\5\n\6\2>?\7\2\2\3?\3\3\2\2\2@A\5.\30\2AB\7\2\2\3B\5\3\2\2\2CE\5\b"+ - "\5\2DC\3\2\2\2EH\3\2\2\2FD\3\2\2\2FG\3\2\2\2G\7\3\2\2\2HF\3\2\2\2IJ\7"+ - "\3\2\2JK\7O\2\2K\t\3\2\2\2LN\5\f\7\2ML\3\2\2\2NO\3\2\2\2OM\3\2\2\2OP\3"+ - "\2\2\2P\13\3\2\2\2QU\5\16\b\2RU\5\20\t\2SU\5(\25\2TQ\3\2\2\2TR\3\2\2\2"+ - "TS\3\2\2\2U\r\3\2\2\2VX\5\26\f\2WV\3\2\2\2X[\3\2\2\2YW\3\2\2\2YZ\3\2\2"+ - "\2Z\\\3\2\2\2[Y\3\2\2\2\\`\5 \21\2]_\5\26\f\2^]\3\2\2\2_b\3\2\2\2`^\3"+ - "\2\2\2`a\3\2\2\2ac\3\2\2\2b`\3\2\2\2cf\7[\2\2de\7\4\2\2eg\5$\23\2fd\3"+ - "\2\2\2fg\3\2\2\2gh\3\2\2\2hi\7\5\2\2i\17\3\2\2\2jl\5\26\f\2kj\3\2\2\2"+ - "lo\3\2\2\2mk\3\2\2\2mn\3\2\2\2np\3\2\2\2om\3\2\2\2pt\5 \21\2qs\5\26\f"+ - "\2rq\3\2\2\2sv\3\2\2\2tr\3\2\2\2tu\3\2\2\2uw\3\2\2\2vt\3\2\2\2wx\7[\2"+ - "\2xz\7\6\2\2y{\5\22\n\2zy\3\2\2\2z{\3\2\2\2{|\3\2\2\2|}\7\7\2\2}\177\7"+ - "\b\2\2~\u0080\5\30\r\2\177~\3\2\2\2\177\u0080\3\2\2\2\u0080\u0081\3\2"+ - "\2\2\u0081\u0082\7\t\2\2\u0082\21\3\2\2\2\u0083\u0088\5\24\13\2\u0084"+ - "\u0085\7\n\2\2\u0085\u0087\5\24\13\2\u0086\u0084\3\2\2\2\u0087\u008a\3"+ - "\2\2\2\u0088\u0086\3\2\2\2\u0088\u0089\3\2\2\2\u0089\23\3\2\2\2\u008a"+ - "\u0088\3\2\2\2\u008b\u008d\5\26\f\2\u008c\u008b\3\2\2\2\u008d\u0090\3"+ - "\2\2\2\u008e\u008c\3\2\2\2\u008e\u008f\3\2\2\2\u008f\u0091\3\2\2\2\u0090"+ - "\u008e\3\2\2\2\u0091\u0095\5 \21\2\u0092\u0094\5\26\f\2\u0093\u0092\3"+ - "\2\2\2\u0094\u0097\3\2\2\2\u0095\u0093\3\2\2\2\u0095\u0096\3\2\2\2\u0096"+ - "\u0098\3\2\2\2\u0097\u0095\3\2\2\2\u0098\u0099\7[\2\2\u0099\u009c\3\2"+ - "\2\2\u009a\u009c\7N\2\2\u009b\u008e\3\2\2\2\u009b\u009a\3\2\2\2\u009c"+ - "\25\3\2\2\2\u009d\u00b0\7\13\2\2\u009e\u00b0\7\f\2\2\u009f\u00a0\7\r\2"+ - "\2\u00a0\u00a1\7\6\2\2\u00a1\u00a2\7R\2\2\u00a2\u00b0\7\7\2\2\u00a3\u00a4"+ - "\7\16\2\2\u00a4\u00a5\7\6\2\2\u00a5\u00a6\7[\2\2\u00a6\u00b0\7\7\2\2\u00a7"+ - "\u00b0\7\17\2\2\u00a8\u00b0\7\20\2\2\u00a9\u00ad\7\21\2\2\u00aa\u00ab"+ - "\7\6\2\2\u00ab\u00ac\7[\2\2\u00ac\u00ae\7\7\2\2\u00ad\u00aa\3\2\2\2\u00ad"+ - "\u00ae\3\2\2\2\u00ae\u00b0\3\2\2\2\u00af\u009d\3\2\2\2\u00af\u009e\3\2"+ - "\2\2\u00af\u009f\3\2\2\2\u00af\u00a3\3\2\2\2\u00af\u00a7\3\2\2\2\u00af"+ - "\u00a8\3\2\2\2\u00af\u00a9\3\2\2\2\u00b0\27\3\2\2\2\u00b1\u00b3\5\32\16"+ - "\2\u00b2\u00b1\3\2\2\2\u00b3\u00b4\3\2\2\2\u00b4\u00b2\3\2\2\2\u00b4\u00b5"+ - "\3\2\2\2\u00b5\31\3\2\2\2\u00b6\u0104\5\16\b\2\u00b7\u00b9\7\b\2\2\u00b8"+ - "\u00ba\5\30\r\2\u00b9\u00b8\3\2\2\2\u00b9\u00ba\3\2\2\2\u00ba\u00bb\3"+ - "\2\2\2\u00bb\u0104\7\t\2\2\u00bc\u00bd\5$\23\2\u00bd\u00be\7\5\2\2\u00be"+ - "\u0104\3\2\2\2\u00bf\u00c0\7\22\2\2\u00c0\u00c1\7\6\2\2\u00c1\u00c2\5"+ - "$\23\2\u00c2\u00c3\7\7\2\2\u00c3\u00c6\5\32\16\2\u00c4\u00c5\7\23\2\2"+ - "\u00c5\u00c7\5\32\16\2\u00c6\u00c4\3\2\2\2\u00c6\u00c7\3\2\2\2\u00c7\u0104"+ - "\3\2\2\2\u00c8\u00ca\5\26\f\2\u00c9\u00c8\3\2\2\2\u00ca\u00cd\3\2\2\2"+ - "\u00cb\u00c9\3\2\2\2\u00cb\u00cc\3\2\2\2\u00cc\u00ce\3\2\2\2\u00cd\u00cb"+ - "\3\2\2\2\u00ce\u00cf\7\24\2\2\u00cf\u00d0\7\6\2\2\u00d0\u00d1\5$\23\2"+ - "\u00d1\u00d2\7\7\2\2\u00d2\u00d3\5\32\16\2\u00d3\u0104\3\2\2\2\u00d4\u00d6"+ - "\5\26\f\2\u00d5\u00d4\3\2\2\2\u00d6\u00d9\3\2\2\2\u00d7\u00d5\3\2\2\2"+ - "\u00d7\u00d8\3\2\2\2\u00d8\u00da\3\2\2\2\u00d9\u00d7\3\2\2\2\u00da\u00db"+ - "\7\25\2\2\u00db\u00dc\5\32\16\2\u00dc\u00dd\7\24\2\2\u00dd\u00de\7\6\2"+ - "\2\u00de\u00df\5$\23\2\u00df\u00e0\7\7\2\2\u00e0\u00e1\7\5\2\2\u00e1\u0104"+ - "\3\2\2\2\u00e2\u00e4\5\26\f\2\u00e3\u00e2\3\2\2\2\u00e4\u00e7\3\2\2\2"+ - "\u00e5\u00e3\3\2\2\2\u00e5\u00e6\3\2\2\2\u00e6\u00e8\3\2\2\2\u00e7\u00e5"+ - "\3\2\2\2\u00e8\u00e9\7\26\2\2\u00e9\u00eb\7\6\2\2\u00ea\u00ec\5\34\17"+ - "\2\u00eb\u00ea\3\2\2\2\u00eb\u00ec\3\2\2\2\u00ec\u00ed\3\2\2\2\u00ed\u00ee"+ - "\5\36\20\2\u00ee\u00ef\7\7\2\2\u00ef\u00f0\5\32\16\2\u00f0\u0104\3\2\2"+ - "\2\u00f1\u00f3\7\27\2\2\u00f2\u00f4\5$\23\2\u00f3\u00f2\3\2\2\2\u00f3"+ - "\u00f4\3\2\2\2\u00f4\u00f5\3\2\2\2\u00f5\u0104\7\5\2\2\u00f6\u00f7\7\30"+ - "\2\2\u00f7\u0104\7\5\2\2\u00f8\u00f9\7\31\2\2\u00f9\u0104\7\5\2\2\u00fa"+ - "\u00fc\7\32\2\2\u00fb\u00fd\5*\26\2\u00fc\u00fb\3\2\2\2\u00fc\u00fd\3"+ - "\2\2\2\u00fd\u00fe\3\2\2\2\u00fe\u00ff\7\b\2\2\u00ff\u0100\5.\30\2\u0100"+ - "\u0101\7\t\2\2\u0101\u0104\3\2\2\2\u0102\u0104\5(\25\2\u0103\u00b6\3\2"+ - "\2\2\u0103\u00b7\3\2\2\2\u0103\u00bc\3\2\2\2\u0103\u00bf\3\2\2\2\u0103"+ - "\u00cb\3\2\2\2\u0103\u00d7\3\2\2\2\u0103\u00e5\3\2\2\2\u0103\u00f1\3\2"+ - "\2\2\u0103\u00f6\3\2\2\2\u0103\u00f8\3\2\2\2\u0103\u00fa\3\2\2\2\u0103"+ - "\u0102\3\2\2\2\u0104\33\3\2\2\2\u0105\u0107\5\26\f\2\u0106\u0105\3\2\2"+ - "\2\u0107\u010a\3\2\2\2\u0108\u0106\3\2\2\2\u0108\u0109\3\2\2\2\u0109\u010c"+ - "\3\2\2\2\u010a\u0108\3\2\2\2\u010b\u010d\5 \21\2\u010c\u010b\3\2\2\2\u010c"+ - "\u010d\3\2\2\2\u010d\u0111\3\2\2\2\u010e\u0110\5\26\f\2\u010f\u010e\3"+ - "\2\2\2\u0110\u0113\3\2\2\2\u0111\u010f\3\2\2\2\u0111\u0112\3\2\2\2\u0112"+ - "\u0114\3\2\2\2\u0113\u0111\3\2\2\2\u0114\u0117\7[\2\2\u0115\u0116\7\4"+ - "\2\2\u0116\u0118\5$\23\2\u0117\u0115\3\2\2\2\u0117\u0118\3\2\2\2\u0118"+ - "\35\3\2\2\2\u0119\u011a\7\5\2\2\u011a\u011b\5\"\22\2\u011b\u011d\7\5\2"+ - "\2\u011c\u011e\5\"\22\2\u011d\u011c\3\2\2\2\u011d\u011e\3\2\2\2\u011e"+ - "\u0125\3\2\2\2\u011f\u0120\7\33\2\2\u0120\u0121\5$\23\2\u0121\u0122\7"+ - "\34\2\2\u0122\u0123\5$\23\2\u0123\u0125\3\2\2\2\u0124\u0119\3\2\2\2\u0124"+ - "\u011f\3\2\2\2\u0125\37\3\2\2\2\u0126\u0127\b\21\1\2\u0127\u0128\7\6\2"+ - "\2\u0128\u0129\5 \21\2\u0129\u012a\7\7\2\2\u012a\u012f\3\2\2\2\u012b\u012f"+ - "\7N\2\2\u012c\u012d\t\2\2\2\u012d\u012f\7N\2\2\u012e\u0126\3\2\2\2\u012e"+ - "\u012b\3\2\2\2\u012e\u012c\3\2\2\2\u012f\u013d\3\2\2\2\u0130\u0131\f\5"+ - "\2\2\u0131\u013c\7\37\2\2\u0132\u0133\f\4\2\2\u0133\u0135\7 \2\2\u0134"+ - "\u0136\5$\23\2\u0135\u0134\3\2\2\2\u0135\u0136\3\2\2\2\u0136\u0137\3\2"+ - "\2\2\u0137\u013c\7!\2\2\u0138\u0139\f\3\2\2\u0139\u013a\7\6\2\2\u013a"+ - "\u013c\7\7\2\2\u013b\u0130\3\2\2\2\u013b\u0132\3\2\2\2\u013b\u0138\3\2"+ - "\2\2\u013c\u013f\3\2\2\2\u013d\u013b\3\2\2\2\u013d\u013e\3\2\2\2\u013e"+ - "!\3\2\2\2\u013f\u013d\3\2\2\2\u0140\u0141\b\22\1\2\u0141\u0142\5$\23\2"+ - "\u0142\u0148\3\2\2\2\u0143\u0144\f\3\2\2\u0144\u0145\7\n\2\2\u0145\u0147"+ - "\5$\23\2\u0146\u0143\3\2\2\2\u0147\u014a\3\2\2\2\u0148\u0146\3\2\2\2\u0148"+ - "\u0149\3\2\2\2\u0149#\3\2\2\2\u014a\u0148\3\2\2\2\u014b\u014c\b\23\1\2"+ - "\u014c\u014d\7\6\2\2\u014d\u014e\5\"\22\2\u014e\u014f\7\7\2\2\u014f\u016e"+ - "\3\2\2\2\u0150\u0151\7\6\2\2\u0151\u0152\5 \21\2\u0152\u0153\7\7\2\2\u0153"+ - "\u0154\5$\23\32\u0154\u016e\3\2\2\2\u0155\u0156\t\3\2\2\u0156\u016e\5"+ - "$\23\31\u0157\u0158\7\37\2\2\u0158\u016e\5$\23\27\u0159\u015a\t\4\2\2"+ - "\u015a\u016e\5$\23\26\u015b\u015c\t\5\2\2\u015c\u016e\5$\23\22\u015d\u015e"+ - "\7\b\2\2\u015e\u0163\5$\23\2\u015f\u0160\7\n\2\2\u0160\u0162\5$\23\2\u0161"+ - "\u015f\3\2\2\2\u0162\u0165\3\2\2\2\u0163\u0161\3\2\2\2\u0163\u0164\3\2"+ - "\2\2\u0164\u0166\3\2\2\2\u0165\u0163\3\2\2\2\u0166\u0167\7\t\2\2\u0167"+ - "\u016e\3\2\2\2\u0168\u016e\7[\2\2\u0169\u016e\7R\2\2\u016a\u016e\7O\2"+ - "\2\u016b\u016e\7P\2\2\u016c\u016e\7Q\2\2\u016d\u014b\3\2\2\2\u016d\u0150"+ - "\3\2\2\2\u016d\u0155\3\2\2\2\u016d\u0157\3\2\2\2\u016d\u0159\3\2\2\2\u016d"+ - "\u015b\3\2\2\2\u016d\u015d\3\2\2\2\u016d\u0168\3\2\2\2\u016d\u0169\3\2"+ - "\2\2\u016d\u016a\3\2\2\2\u016d\u016b\3\2\2\2\u016d\u016c\3\2\2\2\u016e"+ - "\u01a5\3\2\2\2\u016f\u0170\f\25\2\2\u0170\u0171\t\6\2\2\u0171\u01a4\5"+ - "$\23\26\u0172\u0173\f\24\2\2\u0173\u0174\t\7\2\2\u0174\u01a4\5$\23\25"+ - "\u0175\u0176\f\23\2\2\u0176\u0177\t\b\2\2\u0177\u01a4\5$\23\24\u0178\u0179"+ - "\f\21\2\2\u0179\u017a\t\t\2\2\u017a\u01a4\5$\23\22\u017b\u017c\f\20\2"+ - "\2\u017c\u017d\7\'\2\2\u017d\u01a4\5$\23\21\u017e\u017f\f\17\2\2\u017f"+ - "\u0180\7\63\2\2\u0180\u01a4\5$\23\20\u0181\u0182\f\16\2\2\u0182\u0183"+ - "\7\64\2\2\u0183\u01a4\5$\23\17\u0184\u0185\f\r\2\2\u0185\u0186\7\65\2"+ - "\2\u0186\u01a4\5$\23\16\u0187\u0188\f\f\2\2\u0188\u0189\7\66\2\2\u0189"+ - "\u01a4\5$\23\r\u018a\u018b\f\13\2\2\u018b\u018c\7\67\2\2\u018c\u018d\5"+ - "$\23\2\u018d\u018e\7\33\2\2\u018e\u018f\5$\23\f\u018f\u01a4\3\2\2\2\u0190"+ - "\u0191\f\n\2\2\u0191\u0192\7\4\2\2\u0192\u01a4\5$\23\n\u0193\u0194\f\t"+ - "\2\2\u0194\u0195\t\n\2\2\u0195\u01a4\5$\23\t\u0196\u0197\f\34\2\2\u0197"+ - "\u0199\7\6\2\2\u0198\u019a\5&\24\2\u0199\u0198\3\2\2\2\u0199\u019a\3\2"+ - "\2\2\u019a\u019b\3\2\2\2\u019b\u01a4\7\7\2\2\u019c\u019d\f\33\2\2\u019d"+ - "\u019e\7 \2\2\u019e\u019f\5\"\22\2\u019f\u01a0\7!\2\2\u01a0\u01a4\3\2"+ - "\2\2\u01a1\u01a2\f\30\2\2\u01a2\u01a4\t\3\2\2\u01a3\u016f\3\2\2\2\u01a3"+ - "\u0172\3\2\2\2\u01a3\u0175\3\2\2\2\u01a3\u0178\3\2\2\2\u01a3\u017b\3\2"+ - "\2\2\u01a3\u017e\3\2\2\2\u01a3\u0181\3\2\2\2\u01a3\u0184\3\2\2\2\u01a3"+ - "\u0187\3\2\2\2\u01a3\u018a\3\2\2\2\u01a3\u0190\3\2\2\2\u01a3\u0193\3\2"+ - "\2\2\u01a3\u0196\3\2\2\2\u01a3\u019c\3\2\2\2\u01a3\u01a1\3\2\2\2\u01a4"+ - "\u01a7\3\2\2\2\u01a5\u01a3\3\2\2\2\u01a5\u01a6\3\2\2\2\u01a6%\3\2\2\2"+ - "\u01a7\u01a5\3\2\2\2\u01a8\u01ad\5$\23\2\u01a9\u01aa\7\n\2\2\u01aa\u01ac"+ - "\5$\23\2\u01ab\u01a9\3\2\2\2\u01ac\u01af\3\2\2\2\u01ad\u01ab\3\2\2\2\u01ad"+ - "\u01ae\3\2\2\2\u01ae\'\3\2\2\2\u01af\u01ad\3\2\2\2\u01b0\u01b2\7B\2\2"+ - "\u01b1\u01b3\5*\26\2\u01b2\u01b1\3\2\2\2\u01b2\u01b3\3\2\2\2\u01b3\u01b4"+ - "\3\2\2\2\u01b4\u01b5\7M\2\2\u01b5)\3\2\2\2\u01b6\u01b7\7\6\2\2\u01b7\u01bc"+ - "\5,\27\2\u01b8\u01b9\7\n\2\2\u01b9\u01bb\5,\27\2\u01ba\u01b8\3\2\2\2\u01bb"+ - "\u01be\3\2\2\2\u01bc\u01ba\3\2\2\2\u01bc\u01bd\3\2\2\2\u01bd\u01bf\3\2"+ - "\2\2\u01be\u01bc\3\2\2\2\u01bf\u01c0\7\7\2\2\u01c0+\3\2\2\2\u01c1\u01c2"+ - "\7C\2\2\u01c2\u01d1\7O\2\2\u01c3\u01c4\7D\2\2\u01c4\u01d1\7[\2\2\u01c5"+ - "\u01c6\7E\2\2\u01c6\u01d1\7O\2\2\u01c7\u01c8\7F\2\2\u01c8\u01d1\5$\23"+ - "\2\u01c9\u01ca\7G\2\2\u01ca\u01d1\5$\23\2\u01cb\u01ce\7H\2\2\u01cc\u01cf"+ - "\7\17\2\2\u01cd\u01cf\5$\23\2\u01ce\u01cc\3\2\2\2\u01ce\u01cd\3\2\2\2"+ - "\u01cf\u01d1\3\2\2\2\u01d0\u01c1\3\2\2\2\u01d0\u01c3\3\2\2\2\u01d0\u01c5"+ - "\3\2\2\2\u01d0\u01c7\3\2\2\2\u01d0\u01c9\3\2\2\2\u01d0\u01cb\3\2\2\2\u01d1"+ - "-\3\2\2\2\u01d2\u01d4\5\60\31\2\u01d3\u01d2\3\2\2\2\u01d4\u01d7\3\2\2"+ - "\2\u01d5\u01d3\3\2\2\2\u01d5\u01d6\3\2\2\2\u01d6/\3\2\2\2\u01d7\u01d5"+ - "\3\2\2\2\u01d8\u01dc\5\62\32\2\u01d9\u01dc\5\64\33\2\u01da\u01dc\5\66"+ - "\34\2\u01db\u01d8\3\2\2\2\u01db\u01d9\3\2\2\2\u01db\u01da\3\2\2\2\u01dc"+ - "\61\3\2\2\2\u01dd\u01de\7[\2\2\u01de\u01e5\7\33\2\2\u01df\u01e1\7&\2\2"+ - "\u01e0\u01e2\7[\2\2\u01e1\u01e0\3\2\2\2\u01e1\u01e2\3\2\2\2\u01e2\u01e3"+ - "\3\2\2\2\u01e3\u01e5\7\33\2\2\u01e4\u01dd\3\2\2\2\u01e4\u01df\3\2\2\2"+ - "\u01e5\63\3\2\2\2\u01e6\u01e8\7L\2\2\u01e7\u01e9\58\35\2\u01e8\u01e7\3"+ - "\2\2\2\u01e8\u01e9\3\2\2\2\u01e9\65\3\2\2\2\u01ea\u01eb\7I\2\2\u01eb\u01f0"+ - "\5:\36\2\u01ec\u01ed\7\n\2\2\u01ed\u01ef\5:\36\2\u01ee\u01ec\3\2\2\2\u01ef"+ - "\u01f2\3\2\2\2\u01f0\u01ee\3\2\2\2\u01f0\u01f1\3\2\2\2\u01f1\67\3\2\2"+ - "\2\u01f2\u01f0\3\2\2\2\u01f3\u020b\5:\36\2\u01f4\u01f5\7J\2\2\u01f5\u020b"+ - "\5:\36\2\u01f6\u01f7\5:\36\2\u01f7\u01f8\7\n\2\2\u01f8\u01f9\7[\2\2\u01f9"+ - "\u020b\3\2\2\2\u01fa\u01fb\7\6\2\2\u01fb\u01fc\5:\36\2\u01fc\u01fd\7\7"+ - "\2\2\u01fd\u01fe\7\n\2\2\u01fe\u01ff\7[\2\2\u01ff\u020b\3\2\2\2\u0200"+ - "\u0201\7\6\2\2\u0201\u0202\5:\36\2\u0202\u0203\7\n\2\2\u0203\u0204\7["+ - "\2\2\u0204\u0205\7\7\2\2\u0205\u020b\3\2\2\2\u0206\u0207\7\6\2\2\u0207"+ - "\u0208\5:\36\2\u0208\u0209\7\7\2\2\u0209\u020b\3\2\2\2\u020a\u01f3\3\2"+ - "\2\2\u020a\u01f4\3\2\2\2\u020a\u01f6\3\2\2\2\u020a\u01fa\3\2\2\2\u020a"+ - "\u0200\3\2\2\2\u020a\u0206\3\2\2\2\u020b9\3\2\2\2\u020c\u020d\b\36\1\2"+ - "\u020d\u020e\7 \2\2\u020e\u020f\5:\36\2\u020f\u0210\7!\2\2\u0210\u021b"+ - "\3\2\2\2\u0211\u0212\t\13\2\2\u0212\u021b\5:\36\n\u0213\u021b\7[\2\2\u0214"+ - "\u021b\7\\\2\2\u0215\u0216\7\b\2\2\u0216\u0217\7[\2\2\u0217\u021b\7\t"+ - "\2\2\u0218\u021b\7R\2\2\u0219\u021b\7P\2\2\u021a\u020c\3\2\2\2\u021a\u0211"+ - "\3\2\2\2\u021a\u0213\3\2\2\2\u021a\u0214\3\2\2\2\u021a\u0215\3\2\2\2\u021a"+ - "\u0218\3\2\2\2\u021a\u0219\3\2\2\2\u021b\u022a\3\2\2\2\u021c\u021d\f\f"+ - "\2\2\u021d\u021e\7K\2\2\u021e\u0229\5:\36\r\u021f\u0220\f\13\2\2\u0220"+ - "\u0221\t\6\2\2\u0221\u0229\5:\36\f\u0222\u0223\f\t\2\2\u0223\u0224\t\f"+ - "\2\2\u0224\u0229\5:\36\n\u0225\u0226\f\b\2\2\u0226\u0227\t\b\2\2\u0227"+ - "\u0229\5:\36\t\u0228\u021c\3\2\2\2\u0228\u021f\3\2\2\2\u0228\u0222\3\2"+ - "\2\2\u0228\u0225\3\2\2\2\u0229\u022c\3\2\2\2\u022a\u0228\3\2\2\2\u022a"+ - "\u022b\3\2\2\2\u022b;\3\2\2\2\u022c\u022a\3\2\2\2;FOTY`fmtz\177\u0088"+ - "\u008e\u0095\u009b\u00ad\u00af\u00b4\u00b9\u00c6\u00cb\u00d7\u00e5\u00eb"+ - "\u00f3\u00fc\u0103\u0108\u010c\u0111\u0117\u011d\u0124\u012e\u0135\u013b"+ - "\u013d\u0148\u0163\u016d\u0199\u01a3\u01a5\u01ad\u01b2\u01bc\u01ce\u01d0"+ - "\u01d5\u01db\u01e1\u01e4\u01e8\u01f0\u020a\u021a\u0228\u022a"; + "\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 \3\2"+ + "\3\2\3\2\3\2\3\3\3\3\3\3\3\4\7\4I\n\4\f\4\16\4L\13\4\3\5\3\5\3\5\3\6\6"+ + "\6R\n\6\r\6\16\6S\3\7\3\7\3\7\5\7Y\n\7\3\b\7\b\\\n\b\f\b\16\b_\13\b\3"+ + "\b\3\b\7\bc\n\b\f\b\16\bf\13\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\7\t"+ + "q\n\t\f\t\16\tt\13\t\3\n\3\n\3\n\5\ny\n\n\3\13\7\13|\n\13\f\13\16\13\177"+ + "\13\13\3\13\3\13\7\13\u0083\n\13\f\13\16\13\u0086\13\13\3\13\3\13\3\13"+ + "\5\13\u008b\n\13\3\13\3\13\3\13\5\13\u0090\n\13\3\13\3\13\3\f\3\f\3\f"+ + "\7\f\u0097\n\f\f\f\16\f\u009a\13\f\3\r\7\r\u009d\n\r\f\r\16\r\u00a0\13"+ + "\r\3\r\3\r\7\r\u00a4\n\r\f\r\16\r\u00a7\13\r\3\r\3\r\3\r\5\r\u00ac\n\r"+ + "\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16"+ + "\3\16\3\16\5\16\u00be\n\16\5\16\u00c0\n\16\3\17\6\17\u00c3\n\17\r\17\16"+ + "\17\u00c4\3\20\3\20\3\20\5\20\u00ca\n\20\3\20\3\20\3\20\3\20\3\20\3\20"+ + "\3\20\3\20\3\20\3\20\3\20\5\20\u00d7\n\20\3\20\7\20\u00da\n\20\f\20\16"+ + "\20\u00dd\13\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\7\20\u00e6\n\20\f\20"+ + "\16\20\u00e9\13\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\7\20\u00f4"+ + "\n\20\f\20\16\20\u00f7\13\20\3\20\3\20\3\20\5\20\u00fc\n\20\3\20\3\20"+ + "\3\20\3\20\3\20\3\20\5\20\u0104\n\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20"+ + "\5\20\u010d\n\20\3\20\3\20\3\20\3\20\3\20\5\20\u0114\n\20\3\21\7\21\u0117"+ + "\n\21\f\21\16\21\u011a\13\21\3\21\5\21\u011d\n\21\3\21\7\21\u0120\n\21"+ + "\f\21\16\21\u0123\13\21\3\21\3\21\3\21\5\21\u0128\n\21\3\22\3\22\3\22"+ + "\3\22\5\22\u012e\n\22\3\22\3\22\3\22\3\22\3\22\5\22\u0135\n\22\3\23\3"+ + "\23\3\23\3\23\3\23\3\23\3\23\3\23\5\23\u013f\n\23\3\23\3\23\3\23\3\23"+ + "\3\23\5\23\u0146\n\23\3\23\3\23\3\23\3\23\7\23\u014c\n\23\f\23\16\23\u014f"+ + "\13\23\3\24\3\24\3\24\3\24\3\24\3\24\7\24\u0157\n\24\f\24\16\24\u015a"+ + "\13\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\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\7\25\u0172\n\25\f\25\16"+ + "\25\u0175\13\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\5\25\u017e\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\5\25"+ + "\u01aa\n\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\7\25\u01b4\n\25\f"+ + "\25\16\25\u01b7\13\25\3\26\3\26\3\26\7\26\u01bc\n\26\f\26\16\26\u01bf"+ + "\13\26\3\27\3\27\5\27\u01c3\n\27\3\27\3\27\3\30\3\30\3\30\3\30\7\30\u01cb"+ + "\n\30\f\30\16\30\u01ce\13\30\3\30\3\30\3\31\3\31\3\31\3\31\3\31\3\31\3"+ + "\31\3\31\3\31\3\31\3\31\3\31\3\31\5\31\u01df\n\31\5\31\u01e1\n\31\3\32"+ + "\7\32\u01e4\n\32\f\32\16\32\u01e7\13\32\3\33\3\33\3\33\5\33\u01ec\n\33"+ + "\3\34\3\34\3\34\3\34\5\34\u01f2\n\34\3\34\5\34\u01f5\n\34\3\35\3\35\5"+ + "\35\u01f9\n\35\3\36\3\36\3\36\3\36\7\36\u01ff\n\36\f\36\16\36\u0202\13"+ + "\36\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3"+ + "\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\5\37\u021b\n\37\3 \3"+ + " \3 \3 \3 \3 \3 \3 \3 \3 \3 \3 \3 \3 \5 \u022b\n \3 \3 \3 \3 \3 \3 \3"+ + " \3 \3 \3 \3 \3 \7 \u0239\n \f \16 \u023c\13 \3 \2\7\20$&(>!\2\4\6\b\n"+ + "\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>\2\r\3\2\35\36\3"+ + "\2\"#\3\2$(\3\2-.\3\2)*\4\2\37\37+,\3\2$%\3\2-\62\3\28A\4\2$%-.\4\2\37"+ + "\37++\2\u0291\2@\3\2\2\2\4D\3\2\2\2\6J\3\2\2\2\bM\3\2\2\2\nQ\3\2\2\2\f"+ + "X\3\2\2\2\16]\3\2\2\2\20j\3\2\2\2\22u\3\2\2\2\24}\3\2\2\2\26\u0093\3\2"+ + "\2\2\30\u00ab\3\2\2\2\32\u00bf\3\2\2\2\34\u00c2\3\2\2\2\36\u0113\3\2\2"+ + "\2 \u0118\3\2\2\2\"\u0134\3\2\2\2$\u013e\3\2\2\2&\u0150\3\2\2\2(\u017d"+ + "\3\2\2\2*\u01b8\3\2\2\2,\u01c0\3\2\2\2.\u01c6\3\2\2\2\60\u01e0\3\2\2\2"+ + "\62\u01e5\3\2\2\2\64\u01eb\3\2\2\2\66\u01f4\3\2\2\28\u01f6\3\2\2\2:\u01fa"+ + "\3\2\2\2<\u021a\3\2\2\2>\u022a\3\2\2\2@A\5\6\4\2AB\5\n\6\2BC\7\2\2\3C"+ + "\3\3\2\2\2DE\5\62\32\2EF\7\2\2\3F\5\3\2\2\2GI\5\b\5\2HG\3\2\2\2IL\3\2"+ + "\2\2JH\3\2\2\2JK\3\2\2\2K\7\3\2\2\2LJ\3\2\2\2MN\7\3\2\2NO\7O\2\2O\t\3"+ + "\2\2\2PR\5\f\7\2QP\3\2\2\2RS\3\2\2\2SQ\3\2\2\2ST\3\2\2\2T\13\3\2\2\2U"+ + "Y\5\16\b\2VY\5\24\13\2WY\5,\27\2XU\3\2\2\2XV\3\2\2\2XW\3\2\2\2Y\r\3\2"+ + "\2\2Z\\\5\32\16\2[Z\3\2\2\2\\_\3\2\2\2][\3\2\2\2]^\3\2\2\2^`\3\2\2\2_"+ + "]\3\2\2\2`d\5$\23\2ac\5\32\16\2ba\3\2\2\2cf\3\2\2\2db\3\2\2\2de\3\2\2"+ + "\2eg\3\2\2\2fd\3\2\2\2gh\5\20\t\2hi\7\4\2\2i\17\3\2\2\2jk\b\t\1\2kl\5"+ + "\22\n\2lr\3\2\2\2mn\f\3\2\2no\7\5\2\2oq\5\22\n\2pm\3\2\2\2qt\3\2\2\2r"+ + "p\3\2\2\2rs\3\2\2\2s\21\3\2\2\2tr\3\2\2\2ux\7[\2\2vw\7\6\2\2wy\5(\25\2"+ + "xv\3\2\2\2xy\3\2\2\2y\23\3\2\2\2z|\5\32\16\2{z\3\2\2\2|\177\3\2\2\2}{"+ + "\3\2\2\2}~\3\2\2\2~\u0080\3\2\2\2\177}\3\2\2\2\u0080\u0084\5$\23\2\u0081"+ + "\u0083\5\32\16\2\u0082\u0081\3\2\2\2\u0083\u0086\3\2\2\2\u0084\u0082\3"+ + "\2\2\2\u0084\u0085\3\2\2\2\u0085\u0087\3\2\2\2\u0086\u0084\3\2\2\2\u0087"+ + "\u0088\7[\2\2\u0088\u008a\7\7\2\2\u0089\u008b\5\26\f\2\u008a\u0089\3\2"+ + "\2\2\u008a\u008b\3\2\2\2\u008b\u008c\3\2\2\2\u008c\u008d\7\b\2\2\u008d"+ + "\u008f\7\t\2\2\u008e\u0090\5\34\17\2\u008f\u008e\3\2\2\2\u008f\u0090\3"+ + "\2\2\2\u0090\u0091\3\2\2\2\u0091\u0092\7\n\2\2\u0092\25\3\2\2\2\u0093"+ + "\u0098\5\30\r\2\u0094\u0095\7\5\2\2\u0095\u0097\5\30\r\2\u0096\u0094\3"+ + "\2\2\2\u0097\u009a\3\2\2\2\u0098\u0096\3\2\2\2\u0098\u0099\3\2\2\2\u0099"+ + "\27\3\2\2\2\u009a\u0098\3\2\2\2\u009b\u009d\5\32\16\2\u009c\u009b\3\2"+ + "\2\2\u009d\u00a0\3\2\2\2\u009e\u009c\3\2\2\2\u009e\u009f\3\2\2\2\u009f"+ + "\u00a1\3\2\2\2\u00a0\u009e\3\2\2\2\u00a1\u00a5\5$\23\2\u00a2\u00a4\5\32"+ + "\16\2\u00a3\u00a2\3\2\2\2\u00a4\u00a7\3\2\2\2\u00a5\u00a3\3\2\2\2\u00a5"+ + "\u00a6\3\2\2\2\u00a6\u00a8\3\2\2\2\u00a7\u00a5\3\2\2\2\u00a8\u00a9\7["+ + "\2\2\u00a9\u00ac\3\2\2\2\u00aa\u00ac\7N\2\2\u00ab\u009e\3\2\2\2\u00ab"+ + "\u00aa\3\2\2\2\u00ac\31\3\2\2\2\u00ad\u00c0\7\13\2\2\u00ae\u00c0\7\f\2"+ + "\2\u00af\u00b0\7\r\2\2\u00b0\u00b1\7\7\2\2\u00b1\u00b2\7R\2\2\u00b2\u00c0"+ + "\7\b\2\2\u00b3\u00b4\7\16\2\2\u00b4\u00b5\7\7\2\2\u00b5\u00b6\7[\2\2\u00b6"+ + "\u00c0\7\b\2\2\u00b7\u00c0\7\17\2\2\u00b8\u00c0\7\20\2\2\u00b9\u00bd\7"+ + "\21\2\2\u00ba\u00bb\7\7\2\2\u00bb\u00bc\7[\2\2\u00bc\u00be\7\b\2\2\u00bd"+ + "\u00ba\3\2\2\2\u00bd\u00be\3\2\2\2\u00be\u00c0\3\2\2\2\u00bf\u00ad\3\2"+ + "\2\2\u00bf\u00ae\3\2\2\2\u00bf\u00af\3\2\2\2\u00bf\u00b3\3\2\2\2\u00bf"+ + "\u00b7\3\2\2\2\u00bf\u00b8\3\2\2\2\u00bf\u00b9\3\2\2\2\u00c0\33\3\2\2"+ + "\2\u00c1\u00c3\5\36\20\2\u00c2\u00c1\3\2\2\2\u00c3\u00c4\3\2\2\2\u00c4"+ + "\u00c2\3\2\2\2\u00c4\u00c5\3\2\2\2\u00c5\35\3\2\2\2\u00c6\u0114\5\16\b"+ + "\2\u00c7\u00c9\7\t\2\2\u00c8\u00ca\5\34\17\2\u00c9\u00c8\3\2\2\2\u00c9"+ + "\u00ca\3\2\2\2\u00ca\u00cb\3\2\2\2\u00cb\u0114\7\n\2\2\u00cc\u00cd\5&"+ + "\24\2\u00cd\u00ce\7\4\2\2\u00ce\u0114\3\2\2\2\u00cf\u00d0\7\22\2\2\u00d0"+ + "\u00d1\7\7\2\2\u00d1\u00d2\5&\24\2\u00d2\u00d3\7\b\2\2\u00d3\u00d6\5\36"+ + "\20\2\u00d4\u00d5\7\23\2\2\u00d5\u00d7\5\36\20\2\u00d6\u00d4\3\2\2\2\u00d6"+ + "\u00d7\3\2\2\2\u00d7\u0114\3\2\2\2\u00d8\u00da\5\32\16\2\u00d9\u00d8\3"+ + "\2\2\2\u00da\u00dd\3\2\2\2\u00db\u00d9\3\2\2\2\u00db\u00dc\3\2\2\2\u00dc"+ + "\u00de\3\2\2\2\u00dd\u00db\3\2\2\2\u00de\u00df\7\24\2\2\u00df\u00e0\7"+ + "\7\2\2\u00e0\u00e1\5&\24\2\u00e1\u00e2\7\b\2\2\u00e2\u00e3\5\36\20\2\u00e3"+ + "\u0114\3\2\2\2\u00e4\u00e6\5\32\16\2\u00e5\u00e4\3\2\2\2\u00e6\u00e9\3"+ + "\2\2\2\u00e7\u00e5\3\2\2\2\u00e7\u00e8\3\2\2\2\u00e8\u00ea\3\2\2\2\u00e9"+ + "\u00e7\3\2\2\2\u00ea\u00eb\7\25\2\2\u00eb\u00ec\5\36\20\2\u00ec\u00ed"+ + "\7\24\2\2\u00ed\u00ee\7\7\2\2\u00ee\u00ef\5&\24\2\u00ef\u00f0\7\b\2\2"+ + "\u00f0\u00f1\7\4\2\2\u00f1\u0114\3\2\2\2\u00f2\u00f4\5\32\16\2\u00f3\u00f2"+ + "\3\2\2\2\u00f4\u00f7\3\2\2\2\u00f5\u00f3\3\2\2\2\u00f5\u00f6\3\2\2\2\u00f6"+ + "\u00f8\3\2\2\2\u00f7\u00f5\3\2\2\2\u00f8\u00f9\7\26\2\2\u00f9\u00fb\7"+ + "\7\2\2\u00fa\u00fc\5 \21\2\u00fb\u00fa\3\2\2\2\u00fb\u00fc\3\2\2\2\u00fc"+ + "\u00fd\3\2\2\2\u00fd\u00fe\5\"\22\2\u00fe\u00ff\7\b\2\2\u00ff\u0100\5"+ + "\36\20\2\u0100\u0114\3\2\2\2\u0101\u0103\7\27\2\2\u0102\u0104\5&\24\2"+ + "\u0103\u0102\3\2\2\2\u0103\u0104\3\2\2\2\u0104\u0105\3\2\2\2\u0105\u0114"+ + "\7\4\2\2\u0106\u0107\7\30\2\2\u0107\u0114\7\4\2\2\u0108\u0109\7\31\2\2"+ + "\u0109\u0114\7\4\2\2\u010a\u010c\7\32\2\2\u010b\u010d\5.\30\2\u010c\u010b"+ + "\3\2\2\2\u010c\u010d\3\2\2\2\u010d\u010e\3\2\2\2\u010e\u010f\7\t\2\2\u010f"+ + "\u0110\5\62\32\2\u0110\u0111\7\n\2\2\u0111\u0114\3\2\2\2\u0112\u0114\5"+ + ",\27\2\u0113\u00c6\3\2\2\2\u0113\u00c7\3\2\2\2\u0113\u00cc\3\2\2\2\u0113"+ + "\u00cf\3\2\2\2\u0113\u00db\3\2\2\2\u0113\u00e7\3\2\2\2\u0113\u00f5\3\2"+ + "\2\2\u0113\u0101\3\2\2\2\u0113\u0106\3\2\2\2\u0113\u0108\3\2\2\2\u0113"+ + "\u010a\3\2\2\2\u0113\u0112\3\2\2\2\u0114\37\3\2\2\2\u0115\u0117\5\32\16"+ + "\2\u0116\u0115\3\2\2\2\u0117\u011a\3\2\2\2\u0118\u0116\3\2\2\2\u0118\u0119"+ + "\3\2\2\2\u0119\u011c\3\2\2\2\u011a\u0118\3\2\2\2\u011b\u011d\5$\23\2\u011c"+ + "\u011b\3\2\2\2\u011c\u011d\3\2\2\2\u011d\u0121\3\2\2\2\u011e\u0120\5\32"+ + "\16\2\u011f\u011e\3\2\2\2\u0120\u0123\3\2\2\2\u0121\u011f\3\2\2\2\u0121"+ + "\u0122\3\2\2\2\u0122\u0124\3\2\2\2\u0123\u0121\3\2\2\2\u0124\u0127\7["+ + "\2\2\u0125\u0126\7\6\2\2\u0126\u0128\5(\25\2\u0127\u0125\3\2\2\2\u0127"+ + "\u0128\3\2\2\2\u0128!\3\2\2\2\u0129\u012a\7\4\2\2\u012a\u012b\5&\24\2"+ + "\u012b\u012d\7\4\2\2\u012c\u012e\5&\24\2\u012d\u012c\3\2\2\2\u012d\u012e"+ + "\3\2\2\2\u012e\u0135\3\2\2\2\u012f\u0130\7\33\2\2\u0130\u0131\5(\25\2"+ + "\u0131\u0132\7\34\2\2\u0132\u0133\5(\25\2\u0133\u0135\3\2\2\2\u0134\u0129"+ + "\3\2\2\2\u0134\u012f\3\2\2\2\u0135#\3\2\2\2\u0136\u0137\b\23\1\2\u0137"+ + "\u0138\7\7\2\2\u0138\u0139\5$\23\2\u0139\u013a\7\b\2\2\u013a\u013f\3\2"+ + "\2\2\u013b\u013f\7N\2\2\u013c\u013d\t\2\2\2\u013d\u013f\7N\2\2\u013e\u0136"+ + "\3\2\2\2\u013e\u013b\3\2\2\2\u013e\u013c\3\2\2\2\u013f\u014d\3\2\2\2\u0140"+ + "\u0141\f\5\2\2\u0141\u014c\7\37\2\2\u0142\u0143\f\4\2\2\u0143\u0145\7"+ + " \2\2\u0144\u0146\5(\25\2\u0145\u0144\3\2\2\2\u0145\u0146\3\2\2\2\u0146"+ + "\u0147\3\2\2\2\u0147\u014c\7!\2\2\u0148\u0149\f\3\2\2\u0149\u014a\7\7"+ + "\2\2\u014a\u014c\7\b\2\2\u014b\u0140\3\2\2\2\u014b\u0142\3\2\2\2\u014b"+ + "\u0148\3\2\2\2\u014c\u014f\3\2\2\2\u014d\u014b\3\2\2\2\u014d\u014e\3\2"+ + "\2\2\u014e%\3\2\2\2\u014f\u014d\3\2\2\2\u0150\u0151\b\24\1\2\u0151\u0152"+ + "\5(\25\2\u0152\u0158\3\2\2\2\u0153\u0154\f\3\2\2\u0154\u0155\7\5\2\2\u0155"+ + "\u0157\5(\25\2\u0156\u0153\3\2\2\2\u0157\u015a\3\2\2\2\u0158\u0156\3\2"+ + "\2\2\u0158\u0159\3\2\2\2\u0159\'\3\2\2\2\u015a\u0158\3\2\2\2\u015b\u015c"+ + "\b\25\1\2\u015c\u015d\7\7\2\2\u015d\u015e\5&\24\2\u015e\u015f\7\b\2\2"+ + "\u015f\u017e\3\2\2\2\u0160\u0161\7\7\2\2\u0161\u0162\5$\23\2\u0162\u0163"+ + "\7\b\2\2\u0163\u0164\5(\25\32\u0164\u017e\3\2\2\2\u0165\u0166\t\3\2\2"+ + "\u0166\u017e\5(\25\31\u0167\u0168\7\37\2\2\u0168\u017e\5(\25\27\u0169"+ + "\u016a\t\4\2\2\u016a\u017e\5(\25\26\u016b\u016c\t\5\2\2\u016c\u017e\5"+ + "(\25\22\u016d\u016e\7\t\2\2\u016e\u0173\5(\25\2\u016f\u0170\7\5\2\2\u0170"+ + "\u0172\5(\25\2\u0171\u016f\3\2\2\2\u0172\u0175\3\2\2\2\u0173\u0171\3\2"+ + "\2\2\u0173\u0174\3\2\2\2\u0174\u0176\3\2\2\2\u0175\u0173\3\2\2\2\u0176"+ + "\u0177\7\n\2\2\u0177\u017e\3\2\2\2\u0178\u017e\7[\2\2\u0179\u017e\7R\2"+ + "\2\u017a\u017e\7O\2\2\u017b\u017e\7P\2\2\u017c\u017e\7Q\2\2\u017d\u015b"+ + "\3\2\2\2\u017d\u0160\3\2\2\2\u017d\u0165\3\2\2\2\u017d\u0167\3\2\2\2\u017d"+ + "\u0169\3\2\2\2\u017d\u016b\3\2\2\2\u017d\u016d\3\2\2\2\u017d\u0178\3\2"+ + "\2\2\u017d\u0179\3\2\2\2\u017d\u017a\3\2\2\2\u017d\u017b\3\2\2\2\u017d"+ + "\u017c\3\2\2\2\u017e\u01b5\3\2\2\2\u017f\u0180\f\25\2\2\u0180\u0181\t"+ + "\6\2\2\u0181\u01b4\5(\25\26\u0182\u0183\f\24\2\2\u0183\u0184\t\7\2\2\u0184"+ + "\u01b4\5(\25\25\u0185\u0186\f\23\2\2\u0186\u0187\t\b\2\2\u0187\u01b4\5"+ + "(\25\24\u0188\u0189\f\21\2\2\u0189\u018a\t\t\2\2\u018a\u01b4\5(\25\22"+ + "\u018b\u018c\f\20\2\2\u018c\u018d\7\'\2\2\u018d\u01b4\5(\25\21\u018e\u018f"+ + "\f\17\2\2\u018f\u0190\7\63\2\2\u0190\u01b4\5(\25\20\u0191\u0192\f\16\2"+ + "\2\u0192\u0193\7\64\2\2\u0193\u01b4\5(\25\17\u0194\u0195\f\r\2\2\u0195"+ + "\u0196\7\65\2\2\u0196\u01b4\5(\25\16\u0197\u0198\f\f\2\2\u0198\u0199\7"+ + "\66\2\2\u0199\u01b4\5(\25\r\u019a\u019b\f\13\2\2\u019b\u019c\7\67\2\2"+ + "\u019c\u019d\5(\25\2\u019d\u019e\7\33\2\2\u019e\u019f\5(\25\f\u019f\u01b4"+ + "\3\2\2\2\u01a0\u01a1\f\n\2\2\u01a1\u01a2\7\6\2\2\u01a2\u01b4\5(\25\n\u01a3"+ + "\u01a4\f\t\2\2\u01a4\u01a5\t\n\2\2\u01a5\u01b4\5(\25\t\u01a6\u01a7\f\34"+ + "\2\2\u01a7\u01a9\7\7\2\2\u01a8\u01aa\5*\26\2\u01a9\u01a8\3\2\2\2\u01a9"+ + "\u01aa\3\2\2\2\u01aa\u01ab\3\2\2\2\u01ab\u01b4\7\b\2\2\u01ac\u01ad\f\33"+ + "\2\2\u01ad\u01ae\7 \2\2\u01ae\u01af\5&\24\2\u01af\u01b0\7!\2\2\u01b0\u01b4"+ + "\3\2\2\2\u01b1\u01b2\f\30\2\2\u01b2\u01b4\t\3\2\2\u01b3\u017f\3\2\2\2"+ + "\u01b3\u0182\3\2\2\2\u01b3\u0185\3\2\2\2\u01b3\u0188\3\2\2\2\u01b3\u018b"+ + "\3\2\2\2\u01b3\u018e\3\2\2\2\u01b3\u0191\3\2\2\2\u01b3\u0194\3\2\2\2\u01b3"+ + "\u0197\3\2\2\2\u01b3\u019a\3\2\2\2\u01b3\u01a0\3\2\2\2\u01b3\u01a3\3\2"+ + "\2\2\u01b3\u01a6\3\2\2\2\u01b3\u01ac\3\2\2\2\u01b3\u01b1\3\2\2\2\u01b4"+ + "\u01b7\3\2\2\2\u01b5\u01b3\3\2\2\2\u01b5\u01b6\3\2\2\2\u01b6)\3\2\2\2"+ + "\u01b7\u01b5\3\2\2\2\u01b8\u01bd\5(\25\2\u01b9\u01ba\7\5\2\2\u01ba\u01bc"+ + "\5(\25\2\u01bb\u01b9\3\2\2\2\u01bc\u01bf\3\2\2\2\u01bd\u01bb\3\2\2\2\u01bd"+ + "\u01be\3\2\2\2\u01be+\3\2\2\2\u01bf\u01bd\3\2\2\2\u01c0\u01c2\7B\2\2\u01c1"+ + "\u01c3\5.\30\2\u01c2\u01c1\3\2\2\2\u01c2\u01c3\3\2\2\2\u01c3\u01c4\3\2"+ + "\2\2\u01c4\u01c5\7M\2\2\u01c5-\3\2\2\2\u01c6\u01c7\7\7\2\2\u01c7\u01cc"+ + "\5\60\31\2\u01c8\u01c9\7\5\2\2\u01c9\u01cb\5\60\31\2\u01ca\u01c8\3\2\2"+ + "\2\u01cb\u01ce\3\2\2\2\u01cc\u01ca\3\2\2\2\u01cc\u01cd\3\2\2\2\u01cd\u01cf"+ + "\3\2\2\2\u01ce\u01cc\3\2\2\2\u01cf\u01d0\7\b\2\2\u01d0/\3\2\2\2\u01d1"+ + "\u01d2\7C\2\2\u01d2\u01e1\7O\2\2\u01d3\u01d4\7D\2\2\u01d4\u01e1\7[\2\2"+ + "\u01d5\u01d6\7E\2\2\u01d6\u01e1\7O\2\2\u01d7\u01d8\7F\2\2\u01d8\u01e1"+ + "\5(\25\2\u01d9\u01da\7G\2\2\u01da\u01e1\5(\25\2\u01db\u01de\7H\2\2\u01dc"+ + "\u01df\7\17\2\2\u01dd\u01df\5(\25\2\u01de\u01dc\3\2\2\2\u01de\u01dd\3"+ + "\2\2\2\u01df\u01e1\3\2\2\2\u01e0\u01d1\3\2\2\2\u01e0\u01d3\3\2\2\2\u01e0"+ + "\u01d5\3\2\2\2\u01e0\u01d7\3\2\2\2\u01e0\u01d9\3\2\2\2\u01e0\u01db\3\2"+ + "\2\2\u01e1\61\3\2\2\2\u01e2\u01e4\5\64\33\2\u01e3\u01e2\3\2\2\2\u01e4"+ + "\u01e7\3\2\2\2\u01e5\u01e3\3\2\2\2\u01e5\u01e6\3\2\2\2\u01e6\63\3\2\2"+ + "\2\u01e7\u01e5\3\2\2\2\u01e8\u01ec\5\66\34\2\u01e9\u01ec\58\35\2\u01ea"+ + "\u01ec\5:\36\2\u01eb\u01e8\3\2\2\2\u01eb\u01e9\3\2\2\2\u01eb\u01ea\3\2"+ + "\2\2\u01ec\65\3\2\2\2\u01ed\u01ee\7[\2\2\u01ee\u01f5\7\33\2\2\u01ef\u01f1"+ + "\7&\2\2\u01f0\u01f2\7[\2\2\u01f1\u01f0\3\2\2\2\u01f1\u01f2\3\2\2\2\u01f2"+ + "\u01f3\3\2\2\2\u01f3\u01f5\7\33\2\2\u01f4\u01ed\3\2\2\2\u01f4\u01ef\3"+ + "\2\2\2\u01f5\67\3\2\2\2\u01f6\u01f8\7L\2\2\u01f7\u01f9\5<\37\2\u01f8\u01f7"+ + "\3\2\2\2\u01f8\u01f9\3\2\2\2\u01f99\3\2\2\2\u01fa\u01fb\7I\2\2\u01fb\u0200"+ + "\5> \2\u01fc\u01fd\7\5\2\2\u01fd\u01ff\5> \2\u01fe\u01fc\3\2\2\2\u01ff"+ + "\u0202\3\2\2\2\u0200\u01fe\3\2\2\2\u0200\u0201\3\2\2\2\u0201;\3\2\2\2"+ + "\u0202\u0200\3\2\2\2\u0203\u021b\5> \2\u0204\u0205\7J\2\2\u0205\u021b"+ + "\5> \2\u0206\u0207\5> \2\u0207\u0208\7\5\2\2\u0208\u0209\7[\2\2\u0209"+ + "\u021b\3\2\2\2\u020a\u020b\7\7\2\2\u020b\u020c\5> \2\u020c\u020d\7\b\2"+ + "\2\u020d\u020e\7\5\2\2\u020e\u020f\7[\2\2\u020f\u021b\3\2\2\2\u0210\u0211"+ + "\7\7\2\2\u0211\u0212\5> \2\u0212\u0213\7\5\2\2\u0213\u0214\7[\2\2\u0214"+ + "\u0215\7\b\2\2\u0215\u021b\3\2\2\2\u0216\u0217\7\7\2\2\u0217\u0218\5>"+ + " \2\u0218\u0219\7\b\2\2\u0219\u021b\3\2\2\2\u021a\u0203\3\2\2\2\u021a"+ + "\u0204\3\2\2\2\u021a\u0206\3\2\2\2\u021a\u020a\3\2\2\2\u021a\u0210\3\2"+ + "\2\2\u021a\u0216\3\2\2\2\u021b=\3\2\2\2\u021c\u021d\b \1\2\u021d\u021e"+ + "\7 \2\2\u021e\u021f\5> \2\u021f\u0220\7!\2\2\u0220\u022b\3\2\2\2\u0221"+ + "\u0222\t\13\2\2\u0222\u022b\5> \n\u0223\u022b\7[\2\2\u0224\u022b\7\\\2"+ + "\2\u0225\u0226\7\t\2\2\u0226\u0227\7[\2\2\u0227\u022b\7\n\2\2\u0228\u022b"+ + "\7R\2\2\u0229\u022b\7P\2\2\u022a\u021c\3\2\2\2\u022a\u0221\3\2\2\2\u022a"+ + "\u0223\3\2\2\2\u022a\u0224\3\2\2\2\u022a\u0225\3\2\2\2\u022a\u0228\3\2"+ + "\2\2\u022a\u0229\3\2\2\2\u022b\u023a\3\2\2\2\u022c\u022d\f\f\2\2\u022d"+ + "\u022e\7K\2\2\u022e\u0239\5> \r\u022f\u0230\f\13\2\2\u0230\u0231\t\6\2"+ + "\2\u0231\u0239\5> \f\u0232\u0233\f\t\2\2\u0233\u0234\t\f\2\2\u0234\u0239"+ + "\5> \n\u0235\u0236\f\b\2\2\u0236\u0237\t\b\2\2\u0237\u0239\5> \t\u0238"+ + "\u022c\3\2\2\2\u0238\u022f\3\2\2\2\u0238\u0232\3\2\2\2\u0238\u0235\3\2"+ + "\2\2\u0239\u023c\3\2\2\2\u023a\u0238\3\2\2\2\u023a\u023b\3\2\2\2\u023b"+ + "?\3\2\2\2\u023c\u023a\3\2\2\2 extends ParseTreeVisitor { * @return the visitor result */ T visitDeclVariable(KickCParser.DeclVariableContext ctx); + /** + * Visit a parse tree produced by {@link KickCParser#declVariableList}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitDeclVariableList(KickCParser.DeclVariableListContext ctx); + /** + * Visit a parse tree produced by {@link KickCParser#declVariableInit}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitDeclVariableInit(KickCParser.DeclVariableInitContext ctx); /** * Visit a parse tree produced by {@link KickCParser#declFunction}. * @param ctx the parse tree diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java b/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java index d8e482fd6..90c829842 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java @@ -172,7 +172,8 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { SymbolType type = (SymbolType) this.visit(ctx.typeDecl()); VariableUnversioned param = new VariableUnversioned(ctx.NAME().getText(), getCurrentScope(), type); // Add directives - addDirectives(type, param, ctx.directive()); + List directives = getDirectives(ctx.directive()); + addDirectives(param, type, directives, new StatementSource(ctx)); return param; } @@ -236,7 +237,7 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { /** will contain the address to generate the KickAssembler-code to. */ private RValue address; - public AsmDirectiveLocation(RValue address) { + AsmDirectiveLocation(RValue address) { this.address = address; } @@ -266,7 +267,7 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { /** bytes for the KickAssembler-code. */ private RValue bytes; - public AsmDirectiveBytes(RValue bytes) { + AsmDirectiveBytes(RValue bytes) { this.bytes = bytes; } @@ -299,7 +300,7 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { return uses; } - public AsmDirectiveUses(SymbolVariableRef uses) { + AsmDirectiveUses(SymbolVariableRef uses) { this.uses = uses; } @@ -335,7 +336,7 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { /** cycles for the KickAssembler-code. */ private RValue cycles; - public AsmDirectiveCycles(RValue cycles) { + AsmDirectiveCycles(RValue cycles) { this.cycles = cycles; } @@ -378,7 +379,7 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { private class AsmDirectiveClobber implements AsmDirective { private AsmClobber clobber; - public AsmDirectiveClobber(AsmClobber clobber) { + AsmDirectiveClobber(AsmClobber clobber) { this.clobber = clobber; } @@ -407,9 +408,41 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { return new AsmDirectiveClobber(clobber); } + /** Holds the declared type when descending into a Variable Declaration. */ + private SymbolType declVarType = null; + /** Holds the declared directives when descending into a Variable Declaration. */ + private List declVarDirectives = null; + /** Holds the declared comments when descending into a Variable Declaration. */ + private List declVarComments = null; + @Override public Object visitDeclVariable(KickCParser.DeclVariableContext ctx) { - SymbolType type = (SymbolType) visit(ctx.typeDecl()); + List directive = ctx.directive(); + this.declVarType = (SymbolType) visit(ctx.typeDecl()); + this.declVarDirectives = getDirectives(directive); + this.declVarComments = getCommentsSymbol(ctx); + this.visit(ctx.declVariableList()); + this.declVarType = null; + this.declVarDirectives = null; + this.declVarComments = null; + return null; + } + + @Override + public Object visitDeclVariableList(KickCParser.DeclVariableListContext ctx) { + if(ctx.declVariableList()!=null) { + this.visit(ctx.declVariableList()); + } + this.visit(ctx.declVariableInit()); + return null; + } + + @Override + public Object visitDeclVariableInit(KickCParser.DeclVariableInitContext ctx) { + List directives = declVarDirectives; + SymbolType type = declVarType; + List comments = declVarComments; + String varName = ctx.NAME().getText(); VariableUnversioned lValue; try { @@ -418,12 +451,11 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { throw new CompileError(e.getMessage(), new StatementSource(ctx)); } // Add directives - addDirectives(type, lValue, ctx.directive()); + addDirectives(lValue, type, directives, new StatementSource(ctx)); // Array / String variables are implicitly constant if(type instanceof SymbolTypeArray || type.equals(SymbolType.STRING)) { lValue.setDeclaredConstant(true); } - List comments = getCommentsSymbol(ctx); if(lValue.isDeclaredConstant()) { // Add comments to constant lValue.setComments(ensureUnusedComments(comments)); @@ -434,7 +466,7 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { } else { if(type instanceof SymbolTypeInteger) { // Add an zero value initializer - ConstantInteger zero = new ConstantInteger(0l); + ConstantInteger zero = new ConstantInteger(0L); Statement stmt = new StatementAssignment(lValue.getRef(), zero, new StatementSource(ctx), ensureUnusedComments(comments)); sequence.addStatement(stmt); } else if(type instanceof SymbolTypeArray) { @@ -449,7 +481,7 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { } else if(type instanceof SymbolTypePointer) { // Add an zero value initializer SymbolTypePointer typePointer = (SymbolTypePointer) type; - ConstantValue zero = new ConstantPointer(0l, typePointer.getElementType()); + ConstantValue zero = new ConstantPointer(0L, typePointer.getElementType()); Statement stmt = new StatementAssignment(lValue.getRef(), zero, new StatementSource(ctx), ensureUnusedComments(comments)); sequence.addStatement(stmt); } else { @@ -457,23 +489,19 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { } } + return null; + } /** * Add declared directives to an lValue (typically a variable). - * + * @param lValue The lValue * @param type The type of the lValue - * @param lValue The lValue - * @param directivesCtx The directives to add + * @param directives The directives to add */ - private void addDirectives(SymbolType type, SymbolVariable lValue, List directivesCtx) { - List directives = new ArrayList<>(); - for(KickCParser.DirectiveContext directiveContext : directivesCtx) { - directives.add((Directive) this.visit(directiveContext)); - } + private void addDirectives(SymbolVariable lValue, SymbolType type, List directives, StatementSource source) { for(Directive directive : directives) { - StatementSource source = new StatementSource(directivesCtx.get(0)); if(directive instanceof DirectiveConst) { lValue.setDeclaredConstant(true); } else if(directive instanceof DirectiveVolatile) { @@ -497,6 +525,19 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { } } + /** + * Find the directives in the parse tree + * @param directivesCtx The directives in the parse tree to examine + * @return Objects representing the found directives + */ + private List getDirectives(List directivesCtx) { + List directives = new ArrayList<>(); + for(KickCParser.DirectiveContext directiveContext : directivesCtx) { + directives.add((Directive) this.visit(directiveContext)); + } + return directives; + } + /** * Add declared directives to a procedure. * @@ -504,10 +545,7 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { * @param directivesCtx The directives to add */ private void addDirectives(Procedure procedure, List directivesCtx) { - List directives = new ArrayList<>(); - for(KickCParser.DirectiveContext directiveContext : directivesCtx) { - directives.add((Directive) this.visit(directiveContext)); - } + List directives = getDirectives(directivesCtx); for(Directive directive : directives) { StatementSource source = new StatementSource(directivesCtx.get(0)); if(directive instanceof DirectiveInline) { @@ -527,10 +565,7 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { * @param directivesCtx The directives to add */ private void addDirectives(StatementConditionalJump conditional, List directivesCtx) { - List directives = new ArrayList<>(); - for(KickCParser.DirectiveContext directiveContext : directivesCtx) { - directives.add((Directive) this.visit(directiveContext)); - } + List directives = getDirectives(directivesCtx); for(Directive directive : directives) { StatementSource source = new StatementSource(directivesCtx.get(0)); if(directive instanceof DirectiveInline) { @@ -603,9 +638,9 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { @Override public Void visitStmtExpr(KickCParser.StmtExprContext ctx) { - PrePostModifierHandler.addPreModifiers(this, ctx.expr()); - this.visit(ctx.expr()); - PrePostModifierHandler.addPostModifiers(this, ctx.expr()); + PrePostModifierHandler.addPreModifiers(this, ctx.commaExpr()); + this.visit(ctx.commaExpr()); + PrePostModifierHandler.addPostModifiers(this, ctx.commaExpr()); return null; } @@ -613,15 +648,15 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { public Void visitStmtIfElse(KickCParser.StmtIfElseContext ctx) { KickCParser.StmtContext ifStmt = ctx.stmt(0); KickCParser.StmtContext elseStmt = ctx.stmt(1); - PrePostModifierHandler.addPreModifiers(this, ctx.expr()); - RValue rValue = (RValue) this.visit(ctx.expr()); + PrePostModifierHandler.addPreModifiers(this, ctx.commaExpr()); + RValue rValue = (RValue) this.visit(ctx.commaExpr()); List comments = ensureUnusedComments(getCommentsSymbol(ctx)); if(elseStmt == null) { // If without else - skip the entire section if condition not met VariableRef notExprVar = getCurrentScope().addVariableIntermediate().getRef(); sequence.addStatement(new StatementAssignment(notExprVar, null, Operators.LOGIC_NOT, rValue, new StatementSource(ctx), comments)); - PrePostModifierHandler.addPostModifiers(this, ctx.expr()); + PrePostModifierHandler.addPostModifiers(this, ctx.commaExpr()); Label endJumpLabel = getCurrentScope().addLabelIntermediate(); sequence.addStatement(new StatementConditionalJump(notExprVar, endJumpLabel.getRef(), new StatementSource(ctx), Comment.NO_COMMENTS)); this.visit(ifStmt); @@ -629,7 +664,7 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { sequence.addStatement(new StatementLabel(endJumpLabel.getRef(), new StatementSource(ctx), Comment.NO_COMMENTS)); } else { // If with else - jump to if section if condition met - fall into else otherwise. - PrePostModifierHandler.addPostModifiers(this, ctx.expr()); + PrePostModifierHandler.addPostModifiers(this, ctx.commaExpr()); Label ifJumpLabel = getCurrentScope().addLabelIntermediate(); sequence.addStatement(new StatementConditionalJump(rValue, ifJumpLabel.getRef(), new StatementSource(ctx), comments)); // Add else body @@ -661,26 +696,26 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { this.loopScope = loopScope; } - public Label getBreakLabel() { + Label getBreakLabel() { return breakLabel; } - public Label getOrCreateBreakLabel() { + Label getOrCreateBreakLabel() { if(breakLabel == null) { breakLabel = loopScope.addLabelIntermediate(); } return breakLabel; } - public Label getContinueLabel() { + Label getContinueLabel() { return continueLabel; } - public void setContinueLabel(Label continueLabel) { + void setContinueLabel(Label continueLabel) { this.continueLabel = continueLabel; } - public Label getOrCreateContinueLabel() { + Label getOrCreateContinueLabel() { if(continueLabel == null) { continueLabel = loopScope.addLabelIntermediate(); } @@ -704,9 +739,9 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { List comments = ensureUnusedComments(getCommentsSymbol(ctx)); StatementLabel beginJumpTarget = new StatementLabel(beginJumpLabel.getRef(), new StatementSource(ctx), comments); sequence.addStatement(beginJumpTarget); - PrePostModifierHandler.addPreModifiers(this, ctx.expr()); - RValue rValue = (RValue) this.visit(ctx.expr()); - PrePostModifierHandler.addPostModifiers(this, ctx.expr()); + PrePostModifierHandler.addPreModifiers(this, ctx.commaExpr()); + RValue rValue = (RValue) this.visit(ctx.commaExpr()); + PrePostModifierHandler.addPostModifiers(this, ctx.commaExpr()); StatementConditionalJump doJmpStmt = new StatementConditionalJump(rValue, doJumpLabel.getRef(), new StatementSource(ctx), Comment.NO_COMMENTS); sequence.addStatement(doJmpStmt); Statement endJmpStmt = new StatementJump(endJumpLabel.getRef(), new StatementSource(ctx), Comment.NO_COMMENTS); @@ -739,9 +774,9 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { sequence.addStatement(beginJumpTarget); addLoopBody(ctx.stmt()); addLoopContinueLabel(loopStack.peek(), ctx); - PrePostModifierHandler.addPreModifiers(this, ctx.expr()); - RValue rValue = (RValue) this.visit(ctx.expr()); - PrePostModifierHandler.addPostModifiers(this, ctx.expr()); + PrePostModifierHandler.addPreModifiers(this, ctx.commaExpr()); + RValue rValue = (RValue) this.visit(ctx.commaExpr()); + PrePostModifierHandler.addPostModifiers(this, ctx.commaExpr()); StatementConditionalJump doJmpStmt = new StatementConditionalJump(rValue, beginJumpLabel.getRef(), new StatementSource(ctx), Comment.NO_COMMENTS); sequence.addStatement(doJmpStmt); addDirectives(doJmpStmt, ctx.directive()); @@ -893,7 +928,8 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { throw new CompileError(e.getMessage(), new StatementSource(forDeclCtx)); } // Add directives - addDirectives(type, lValue, forDeclCtx.directive()); + List directives = getDirectives(forDeclCtx.directive()); + addDirectives(lValue, type, directives, new StatementSource(forDeclCtx)); } else { lValue = getCurrentScope().getVariable(varName); } @@ -1018,7 +1054,7 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { @Override public Void visitStmtReturn(KickCParser.StmtReturnContext ctx) { Procedure procedure = getCurrentProcedure(); - KickCParser.ExprContext exprCtx = ctx.expr(); + KickCParser.CommaExprContext exprCtx = ctx.commaExpr(); RValue rValue; if(exprCtx != null) { PrePostModifierHandler.addPreModifiers(this, exprCtx); @@ -1285,14 +1321,12 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { @Override public Object visitExprPreMod(KickCParser.ExprPreModContext ctx) { - RValue child = (RValue) this.visit(ctx.expr()); - return child; + return this.visit(ctx.expr()); } @Override public Object visitExprPostMod(KickCParser.ExprPostModContext ctx) { - RValue child = (RValue) this.visit(ctx.expr()); - return child; + return this.visit(ctx.expr()); } @Override diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 0e70e7080..788cb2688 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -37,15 +37,26 @@ public class TestPrograms { // compileAndCompare("pointer-cast-3"); //} + @Test + public void testCommaDecl() throws IOException, URISyntaxException { + compileAndCompare("comma-decl"); + } + @Test public void testCommaExprFor() throws IOException, URISyntaxException { compileAndCompare("comma-expr-for"); } + @Test + public void testCommaExpr2() throws IOException, URISyntaxException { + compileAndCompare("comma-expr-2"); + } + @Test public void testCommaExpr1() throws IOException, URISyntaxException { compileAndCompare("comma-expr-1"); } + @Test public void testForRangedNoVar() throws IOException, URISyntaxException { assertError("for-ranged-novar", "Ranged for() must have iteration variable"); diff --git a/src/test/kc/comma-decl.kc b/src/test/kc/comma-decl.kc new file mode 100644 index 000000000..14caa08b1 --- /dev/null +++ b/src/test/kc/comma-decl.kc @@ -0,0 +1,9 @@ +// Tests comma-separated declarations + +void main() { + const byte* SCREEN = $400; + byte b = 'c', c = b+1, d = c+1; + SCREEN[0] = b; + SCREEN[1] = c; + SCREEN[2] = d; +} \ No newline at end of file diff --git a/src/test/kc/comma-expr-2.kc b/src/test/kc/comma-expr-2.kc new file mode 100644 index 000000000..689cb0842 --- /dev/null +++ b/src/test/kc/comma-expr-2.kc @@ -0,0 +1,10 @@ +// Tests simple comma-expressions (without parenthesis) + +void main() { + const byte* SCREEN = $400; + byte b; + byte c; + b = 1,2,3; + c = 1+3,b+1; + SCREEN[1,0] = c; +} \ No newline at end of file diff --git a/src/test/ref/comma-decl.asm b/src/test/ref/comma-decl.asm new file mode 100644 index 000000000..e4ea3dce6 --- /dev/null +++ b/src/test/ref/comma-decl.asm @@ -0,0 +1,17 @@ +// Tests comma-separated declarations +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +main: { + .label SCREEN = $400 + .const b = 'c' + .const c = b+1 + .const d = c+1 + lda #b + sta SCREEN + lda #c + sta SCREEN+1 + lda #d + sta SCREEN+2 + rts +} diff --git a/src/test/ref/comma-decl.cfg b/src/test/ref/comma-decl.cfg new file mode 100644 index 000000000..1e7e04a77 --- /dev/null +++ b/src/test/ref/comma-decl.cfg @@ -0,0 +1,17 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] *((const byte*) main::SCREEN#0) ← (const byte) main::b#0 + [5] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) main::c#0 + [6] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (const byte) main::d#0 + to:main::@return +main::@return: scope:[main] from main + [7] return + to:@return diff --git a/src/test/ref/comma-decl.log b/src/test/ref/comma-decl.log new file mode 100644 index 000000000..db607e37d --- /dev/null +++ b/src/test/ref/comma-decl.log @@ -0,0 +1,274 @@ +Identified constant variable (byte) main::b + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte*) main::SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) $400 + (byte) main::b#0 ← (byte) 'c' + (byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::b#0 + (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::c#0 ← (byte/signed word/word/dword/signed dword~) main::$0 + (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::c#0 + (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) main::d#0 ← (byte/signed word/word/dword/signed dword~) main::$1 + *((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte) main::b#0 + *((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) main::c#0 + *((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) main::d#0 + to:main::@return +main::@return: scope:[main] from main + return + to:@return +@1: scope:[] from @begin + call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +SYMBOL TABLE SSA +(label) @1 +(label) @2 +(label) @begin +(label) @end +(void()) main() +(byte/signed word/word/dword/signed dword~) main::$0 +(byte/signed word/word/dword/signed dword~) main::$1 +(label) main::@return +(byte*) main::SCREEN +(byte*) main::SCREEN#0 +(byte) main::b +(byte) main::b#0 +(byte) main::c +(byte) main::c#0 +(byte) main::d +(byte) main::d#0 + +Culled Empty Block (label) @2 +Successful SSA optimization Pass2CullEmptyBlocks +Alias (byte) main::c#0 = (byte/signed word/word/dword/signed dword~) main::$0 +Alias (byte) main::d#0 = (byte/signed word/word/dword/signed dword~) main::$1 +Successful SSA optimization Pass2AliasElimination +Constant (const byte*) main::SCREEN#0 = ((byte*))$400 +Constant (const byte) main::b#0 = 'c' +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::c#0 = main::b#0+1 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::d#0 = main::c#0+1 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(main::SCREEN#0+0) +Consolidated array index constant in *(main::SCREEN#0+1) +Consolidated array index constant in *(main::SCREEN#0+2) +Successful SSA optimization Pass2ConstantAdditionElimination +Simplifying constant plus zero main::SCREEN#0+0 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +CALL GRAPH +Calls in [] to main:2 + +Created 0 initial phi equivalence classes +Coalesced down to 0 phi equivalence classes +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] *((const byte*) main::SCREEN#0) ← (const byte) main::b#0 + [5] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) main::c#0 + [6] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (const byte) main::d#0 + to:main::@return +main::@return: scope:[main] from main + [7] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(void()) main() +(byte*) main::SCREEN +(byte) main::b +(byte) main::c +(byte) main::d + +Initial phi equivalence classes +Complete equivalence classes + +INITIAL ASM +//SEG0 File Comments +// Tests comma-separated declarations +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main + jsr main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG8 @end +bend: +//SEG9 main +main: { + .label SCREEN = $400 + .const b = 'c' + .const c = b+1 + .const d = c+1 + //SEG10 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::b#0 -- _deref_pbuc1=vbuc2 + lda #b + sta SCREEN + //SEG11 [5] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) main::c#0 -- _deref_pbuc1=vbuc2 + lda #c + sta SCREEN+1 + //SEG12 [6] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (const byte) main::d#0 -- _deref_pbuc1=vbuc2 + lda #d + sta SCREEN+2 + jmp breturn + //SEG13 main::@return + breturn: + //SEG14 [7] return + rts +} + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [4] *((const byte*) main::SCREEN#0) ← (const byte) main::b#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [5] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) main::c#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [6] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (const byte) main::d#0 [ ] ( main:2 [ ] ) always clobbers reg byte a + +REGISTER UPLIFT SCOPES +Uplift Scope [main] +Uplift Scope [] + +Uplifting [main] best 39 combination +Uplifting [] best 39 combination + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +// Tests comma-separated declarations +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main + jsr main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG8 @end +bend: +//SEG9 main +main: { + .label SCREEN = $400 + .const b = 'c' + .const c = b+1 + .const d = c+1 + //SEG10 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::b#0 -- _deref_pbuc1=vbuc2 + lda #b + sta SCREEN + //SEG11 [5] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) main::c#0 -- _deref_pbuc1=vbuc2 + lda #c + sta SCREEN+1 + //SEG12 [6] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (const byte) main::d#0 -- _deref_pbuc1=vbuc2 + lda #d + sta SCREEN+2 + jmp breturn + //SEG13 main::@return + breturn: + //SEG14 [7] return + rts +} + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp bend +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction b1_from_bbegin: +Removing instruction b1: +Removing instruction bend_from_b1: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction bend: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Updating BasicUpstart to call main directly +Removing instruction jsr main +Succesful ASM optimization Pass5SkipBegin +Removing instruction bbegin: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +(label) @1 +(label) @begin +(label) @end +(void()) main() +(label) main::@return +(byte*) main::SCREEN +(const byte*) main::SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400 +(byte) main::b +(const byte) main::b#0 b = (byte) 'c' +(byte) main::c +(const byte) main::c#0 c = (const byte) main::b#0+(byte/signed byte/word/signed word/dword/signed dword) 1 +(byte) main::d +(const byte) main::d#0 d = (const byte) main::c#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + + + +FINAL ASSEMBLER +Score: 24 + +//SEG0 File Comments +// Tests comma-separated declarations +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +//SEG5 @1 +//SEG6 [2] call main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +//SEG8 @end +//SEG9 main +main: { + .label SCREEN = $400 + .const b = 'c' + .const c = b+1 + .const d = c+1 + //SEG10 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::b#0 -- _deref_pbuc1=vbuc2 + lda #b + sta SCREEN + //SEG11 [5] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) main::c#0 -- _deref_pbuc1=vbuc2 + lda #c + sta SCREEN+1 + //SEG12 [6] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (const byte) main::d#0 -- _deref_pbuc1=vbuc2 + lda #d + sta SCREEN+2 + //SEG13 main::@return + //SEG14 [7] return + rts +} + diff --git a/src/test/ref/comma-decl.sym b/src/test/ref/comma-decl.sym new file mode 100644 index 000000000..17ab5e578 --- /dev/null +++ b/src/test/ref/comma-decl.sym @@ -0,0 +1,14 @@ +(label) @1 +(label) @begin +(label) @end +(void()) main() +(label) main::@return +(byte*) main::SCREEN +(const byte*) main::SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400 +(byte) main::b +(const byte) main::b#0 b = (byte) 'c' +(byte) main::c +(const byte) main::c#0 c = (const byte) main::b#0+(byte/signed byte/word/signed word/dword/signed dword) 1 +(byte) main::d +(const byte) main::d#0 d = (const byte) main::c#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + diff --git a/src/test/ref/comma-expr-2.asm b/src/test/ref/comma-expr-2.asm new file mode 100644 index 000000000..411365373 --- /dev/null +++ b/src/test/ref/comma-expr-2.asm @@ -0,0 +1,11 @@ +// Tests simple comma-expressions (without parenthesis) +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +main: { + .label SCREEN = $400 + .const c = 1+3 + lda #c + sta SCREEN + rts +} diff --git a/src/test/ref/comma-expr-2.cfg b/src/test/ref/comma-expr-2.cfg new file mode 100644 index 000000000..c74f72134 --- /dev/null +++ b/src/test/ref/comma-expr-2.cfg @@ -0,0 +1,15 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] *((const byte*) main::SCREEN#0) ← (const byte) main::c#1 + to:main::@return +main::@return: scope:[main] from main + [5] return + to:@return diff --git a/src/test/ref/comma-expr-2.log b/src/test/ref/comma-expr-2.log new file mode 100644 index 000000000..1d023f1d2 --- /dev/null +++ b/src/test/ref/comma-expr-2.log @@ -0,0 +1,226 @@ + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte*) main::SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) $400 + (byte) main::c#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte/signed byte/word/signed word/dword/signed dword~) main::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) main::c#1 ← (byte/signed byte/word/signed word/dword/signed dword~) main::$0 + *((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte) main::c#1 + to:main::@return +main::@return: scope:[main] from main + return + to:@return +@1: scope:[] from @begin + call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +SYMBOL TABLE SSA +(label) @1 +(label) @2 +(label) @begin +(label) @end +(void()) main() +(byte/signed byte/word/signed word/dword/signed dword~) main::$0 +(label) main::@return +(byte*) main::SCREEN +(byte*) main::SCREEN#0 +(byte) main::c +(byte) main::c#0 +(byte) main::c#1 + +Culled Empty Block (label) @2 +Successful SSA optimization Pass2CullEmptyBlocks +Alias (byte) main::c#1 = (byte/signed byte/word/signed word/dword/signed dword~) main::$0 +Successful SSA optimization Pass2AliasElimination +Constant (const byte*) main::SCREEN#0 = ((byte*))$400 +Constant (const byte) main::c#0 = 0 +Constant (const byte) main::c#1 = 1+3 +Successful SSA optimization Pass2ConstantIdentification +Consolidated array index constant in *(main::SCREEN#0+0) +Successful SSA optimization Pass2ConstantAdditionElimination +Successful SSA optimization PassNEliminateUnusedVars +Simplifying constant plus zero main::SCREEN#0+0 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +CALL GRAPH +Calls in [] to main:2 + +Created 0 initial phi equivalence classes +Coalesced down to 0 phi equivalence classes +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] *((const byte*) main::SCREEN#0) ← (const byte) main::c#1 + to:main::@return +main::@return: scope:[main] from main + [5] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(void()) main() +(byte*) main::SCREEN +(byte) main::c + +Initial phi equivalence classes +Complete equivalence classes + +INITIAL ASM +//SEG0 File Comments +// Tests simple comma-expressions (without parenthesis) +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main + jsr main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG8 @end +bend: +//SEG9 main +main: { + .label SCREEN = $400 + .const c = 1+3 + //SEG10 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::c#1 -- _deref_pbuc1=vbuc2 + lda #c + sta SCREEN + jmp breturn + //SEG11 main::@return + breturn: + //SEG12 [5] return + rts +} + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [4] *((const byte*) main::SCREEN#0) ← (const byte) main::c#1 [ ] ( main:2 [ ] ) always clobbers reg byte a + +REGISTER UPLIFT SCOPES +Uplift Scope [main] +Uplift Scope [] + +Uplifting [main] best 27 combination +Uplifting [] best 27 combination + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +// Tests simple comma-expressions (without parenthesis) +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +bbegin: +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG5 @1 +b1: +//SEG6 [2] call main + jsr main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG8 @end +bend: +//SEG9 main +main: { + .label SCREEN = $400 + .const c = 1+3 + //SEG10 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::c#1 -- _deref_pbuc1=vbuc2 + lda #c + sta SCREEN + jmp breturn + //SEG11 main::@return + breturn: + //SEG12 [5] return + rts +} + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp bend +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction b1_from_bbegin: +Removing instruction b1: +Removing instruction bend_from_b1: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction bend: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Updating BasicUpstart to call main directly +Removing instruction jsr main +Succesful ASM optimization Pass5SkipBegin +Removing instruction bbegin: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +(label) @1 +(label) @begin +(label) @end +(void()) main() +(label) main::@return +(byte*) main::SCREEN +(const byte*) main::SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400 +(byte) main::c +(const byte) main::c#1 c = (byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 3 + + + +FINAL ASSEMBLER +Score: 12 + +//SEG0 File Comments +// Tests simple comma-expressions (without parenthesis) +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG2 Global Constants & labels +//SEG3 @begin +//SEG4 [1] phi from @begin to @1 [phi:@begin->@1] +//SEG5 @1 +//SEG6 [2] call main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +//SEG8 @end +//SEG9 main +main: { + .label SCREEN = $400 + .const c = 1+3 + //SEG10 [4] *((const byte*) main::SCREEN#0) ← (const byte) main::c#1 -- _deref_pbuc1=vbuc2 + lda #c + sta SCREEN + //SEG11 main::@return + //SEG12 [5] return + rts +} + diff --git a/src/test/ref/comma-expr-2.sym b/src/test/ref/comma-expr-2.sym new file mode 100644 index 000000000..a5007b0a6 --- /dev/null +++ b/src/test/ref/comma-expr-2.sym @@ -0,0 +1,10 @@ +(label) @1 +(label) @begin +(label) @end +(void()) main() +(label) main::@return +(byte*) main::SCREEN +(const byte*) main::SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400 +(byte) main::c +(const byte) main::c#1 c = (byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 3 +