diff --git a/src/main/java/dk/camelot64/kickc/parser/KickC.g4 b/src/main/java/dk/camelot64/kickc/parser/KickC.g4 index 9c0cbfe03..a30ea0b67 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickC.g4 +++ b/src/main/java/dk/camelot64/kickc/parser/KickC.g4 @@ -146,7 +146,7 @@ expr | '{' expr (',' expr )* '}' #initList | NAME #exprId | NUMBER #exprNumber - | STRING #exprString + | STRING+ #exprString | CHAR #exprChar | BOOLEAN #exprBool ; diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCBaseListener.java b/src/main/java/dk/camelot64/kickc/parser/KickCBaseListener.java index 64996623d..02bba947a 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCBaseListener.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCBaseListener.java @@ -1,4 +1,4 @@ -// Generated from /Users/jespergravgaard/c64/kickc/src/main/java/dk/camelot64/kickc/parser/KickC.g4 by ANTLR 4.7 +// Generated from C:/c64/kickc/src/main/java/dk/camelot64/kickc/parser\KickC.g4 by ANTLR 4.7 package dk.camelot64.kickc.parser; import org.antlr.v4.runtime.ParserRuleContext; diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCBaseVisitor.java b/src/main/java/dk/camelot64/kickc/parser/KickCBaseVisitor.java index 984232061..709766578 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCBaseVisitor.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCBaseVisitor.java @@ -1,4 +1,4 @@ -// Generated from /Users/jespergravgaard/c64/kickc/src/main/java/dk/camelot64/kickc/parser/KickC.g4 by ANTLR 4.7 +// Generated from C:/c64/kickc/src/main/java/dk/camelot64/kickc/parser\KickC.g4 by ANTLR 4.7 package dk.camelot64.kickc.parser; import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCLexer.java b/src/main/java/dk/camelot64/kickc/parser/KickCLexer.java index 4b9fc4407..951b0e72e 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCLexer.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCLexer.java @@ -1,4 +1,4 @@ -// Generated from /Users/jespergravgaard/c64/kickc/src/main/java/dk/camelot64/kickc/parser/KickC.g4 by ANTLR 4.7 +// Generated from C:/c64/kickc/src/main/java/dk/camelot64/kickc/parser\KickC.g4 by ANTLR 4.7 package dk.camelot64.kickc.parser; import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.CharStream; diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCListener.java b/src/main/java/dk/camelot64/kickc/parser/KickCListener.java index aef2c95a7..54517c054 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCListener.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCListener.java @@ -1,4 +1,4 @@ -// Generated from /Users/jespergravgaard/c64/kickc/src/main/java/dk/camelot64/kickc/parser/KickC.g4 by ANTLR 4.7 +// Generated from C:/c64/kickc/src/main/java/dk/camelot64/kickc/parser\KickC.g4 by ANTLR 4.7 package dk.camelot64.kickc.parser; import org.antlr.v4.runtime.tree.ParseTreeListener; diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCParser.java b/src/main/java/dk/camelot64/kickc/parser/KickCParser.java index 383fd8a0a..807940f33 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCParser.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCParser.java @@ -1,4 +1,4 @@ -// Generated from /Users/jespergravgaard/c64/kickc/src/main/java/dk/camelot64/kickc/parser/KickC.g4 by ANTLR 4.7 +// Generated from C:/c64/kickc/src/main/java/dk/camelot64/kickc/parser\KickC.g4 by ANTLR 4.7 package dk.camelot64.kickc.parser; import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; @@ -2820,7 +2820,10 @@ public class KickCParser extends Parser { } } public static class ExprStringContext extends ExprContext { - public TerminalNode STRING() { return getToken(KickCParser.STRING, 0); } + public List STRING() { return getTokens(KickCParser.STRING); } + public TerminalNode STRING(int i) { + return getToken(KickCParser.STRING, i); + } public ExprStringContext(ExprContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -2975,9 +2978,9 @@ public class KickCParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(388); + setState(392); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) { case 1: { _localctx = new ExprParContext(_localctx); @@ -3185,8 +3188,26 @@ public class KickCParser extends Parser { _localctx = new ExprStringContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(385); - match(STRING); + setState(386); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(385); + match(STRING); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(388); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,37,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } break; case 13: @@ -3194,7 +3215,7 @@ public class KickCParser extends Parser { _localctx = new ExprCharContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(386); + setState(390); match(CHAR); } break; @@ -3203,30 +3224,30 @@ public class KickCParser extends Parser { _localctx = new ExprBoolContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(387); + setState(391); match(BOOLEAN); } break; } _ctx.stop = _input.LT(-1); - setState(444); + setState(448); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,40,_ctx); + _alt = getInterpreter().adaptivePredict(_input,41,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(442); + setState(446); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) { case 1: { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(390); + setState(394); if (!(precpred(_ctx, 19))) throw new FailedPredicateException(this, "precpred(_ctx, 19)"); - setState(391); + setState(395); _la = _input.LA(1); if ( !(_la==T__41 || _la==T__42) ) { _errHandler.recoverInline(this); @@ -3236,7 +3257,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(392); + setState(396); expr(20); } break; @@ -3244,9 +3265,9 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(393); + setState(397); if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); - setState(394); + setState(398); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__29) | (1L << T__43) | (1L << T__44))) != 0)) ) { _errHandler.recoverInline(this); @@ -3256,7 +3277,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(395); + setState(399); expr(19); } break; @@ -3264,9 +3285,9 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(396); + setState(400); if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)"); - setState(397); + setState(401); _la = _input.LA(1); if ( !(_la==T__36 || _la==T__37) ) { _errHandler.recoverInline(this); @@ -3276,7 +3297,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(398); + setState(402); expr(18); } break; @@ -3284,9 +3305,9 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(399); + setState(403); if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)"); - setState(400); + setState(404); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__45) | (1L << T__46) | (1L << T__47) | (1L << T__48) | (1L << T__49) | (1L << T__50))) != 0)) ) { _errHandler.recoverInline(this); @@ -3296,7 +3317,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(401); + setState(405); expr(16); } break; @@ -3304,13 +3325,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(402); + setState(406); if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); { - setState(403); + setState(407); match(T__39); } - setState(404); + setState(408); expr(15); } break; @@ -3318,13 +3339,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(405); + setState(409); if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); { - setState(406); + setState(410); match(T__51); } - setState(407); + setState(411); expr(14); } break; @@ -3332,13 +3353,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(408); + setState(412); if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); { - setState(409); + setState(413); match(T__52); } - setState(410); + setState(414); expr(13); } break; @@ -3346,13 +3367,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(411); + setState(415); if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); { - setState(412); + setState(416); match(T__53); } - setState(413); + setState(417); expr(12); } break; @@ -3360,13 +3381,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(414); + setState(418); if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); { - setState(415); + setState(419); match(T__54); } - setState(416); + setState(420); expr(11); } break; @@ -3374,15 +3395,15 @@ public class KickCParser extends Parser { { _localctx = new ExprTernaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(417); - if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); - setState(418); - match(T__55); - setState(419); - expr(0); - setState(420); - match(T__25); setState(421); + if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); + setState(422); + match(T__55); + setState(423); + expr(0); + setState(424); + match(T__25); + setState(425); expr(10); } break; @@ -3390,11 +3411,11 @@ public class KickCParser extends Parser { { _localctx = new ExprAssignmentContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(423); + setState(427); if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); - setState(424); + setState(428); match(T__3); - setState(425); + setState(429); expr(8); } break; @@ -3402,9 +3423,9 @@ public class KickCParser extends Parser { { _localctx = new ExprAssignmentCompoundContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(426); + setState(430); if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(427); + setState(431); _la = _input.LA(1); if ( !(((((_la - 57)) & ~0x3f) == 0 && ((1L << (_la - 57)) & ((1L << (T__56 - 57)) | (1L << (T__57 - 57)) | (1L << (T__58 - 57)) | (1L << (T__59 - 57)) | (1L << (T__60 - 57)) | (1L << (T__61 - 57)) | (1L << (T__62 - 57)) | (1L << (T__63 - 57)) | (1L << (T__64 - 57)) | (1L << (T__65 - 57)))) != 0)) ) { _errHandler.recoverInline(this); @@ -3414,7 +3435,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(428); + setState(432); expr(7); } break; @@ -3422,21 +3443,21 @@ public class KickCParser extends Parser { { _localctx = new ExprCallContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(429); + setState(433); if (!(precpred(_ctx, 28))) throw new FailedPredicateException(this, "precpred(_ctx, 28)"); - setState(430); + setState(434); match(T__4); - setState(432); + setState(436); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__6) | (1L << T__29) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__39) | (1L << T__40) | (1L << T__45) | (1L << T__46))) != 0) || ((((_la - 80)) & ~0x3f) == 0 && ((1L << (_la - 80)) & ((1L << (STRING - 80)) | (1L << (CHAR - 80)) | (1L << (BOOLEAN - 80)) | (1L << (NUMBER - 80)) | (1L << (NAME - 80)))) != 0)) { { - setState(431); + setState(435); parameterList(); } } - setState(434); + setState(438); match(T__5); } break; @@ -3444,13 +3465,13 @@ public class KickCParser extends Parser { { _localctx = new ExprArrayContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(435); + setState(439); if (!(precpred(_ctx, 25))) throw new FailedPredicateException(this, "precpred(_ctx, 25)"); - setState(436); + setState(440); match(T__30); - setState(437); + setState(441); commaExpr(0); - setState(438); + setState(442); match(T__31); } break; @@ -3458,9 +3479,9 @@ public class KickCParser extends Parser { { _localctx = new ExprPostModContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(440); + setState(444); if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); - setState(441); + setState(445); _la = _input.LA(1); if ( !(_la==T__34 || _la==T__35) ) { _errHandler.recoverInline(this); @@ -3475,9 +3496,9 @@ public class KickCParser extends Parser { } } } - setState(446); + setState(450); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,40,_ctx); + _alt = getInterpreter().adaptivePredict(_input,41,_ctx); } } } @@ -3525,21 +3546,21 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(447); + setState(451); expr(0); - setState(452); + setState(456); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(448); + setState(452); match(T__2); - setState(449); + setState(453); expr(0); } } - setState(454); + setState(458); _errHandler.sync(this); _la = _input.LA(1); } @@ -3587,19 +3608,19 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(455); + setState(459); match(T__66); - setState(457); + setState(461); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__4) { { - setState(456); + setState(460); asmDirectives(); } } - setState(459); + setState(463); match(KICKASM); } } @@ -3647,27 +3668,27 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(461); + setState(465); match(T__4); - setState(462); + setState(466); asmDirective(); - setState(467); + setState(471); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(463); + setState(467); match(T__2); - setState(464); + setState(468); asmDirective(); } } - setState(469); + setState(473); _errHandler.sync(this); _la = _input.LA(1); } - setState(470); + setState(474); match(T__5); } } @@ -3806,16 +3827,16 @@ public class KickCParser extends Parser { AsmDirectiveContext _localctx = new AsmDirectiveContext(_ctx, getState()); enterRule(_localctx, 52, RULE_asmDirective); try { - setState(487); + setState(491); _errHandler.sync(this); switch (_input.LA(1)) { case T__67: _localctx = new AsmDirectiveResourceContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(472); + setState(476); match(T__67); - setState(473); + setState(477); match(STRING); } break; @@ -3823,9 +3844,9 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveUsesContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(474); + setState(478); match(T__68); - setState(475); + setState(479); match(NAME); } break; @@ -3833,9 +3854,9 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveClobberContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(476); + setState(480); match(T__69); - setState(477); + setState(481); match(STRING); } break; @@ -3843,9 +3864,9 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveBytesContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(478); + setState(482); match(T__70); - setState(479); + setState(483); expr(0); } break; @@ -3853,9 +3874,9 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveCyclesContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(480); + setState(484); match(T__71); - setState(481); + setState(485); expr(0); } break; @@ -3863,14 +3884,14 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveAddressContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(482); + setState(486); match(T__72); - setState(485); + setState(489); _errHandler.sync(this); switch (_input.LA(1)) { case T__12: { - setState(483); + setState(487); match(T__12); } break; @@ -3894,7 +3915,7 @@ public class KickCParser extends Parser { case NUMBER: case NAME: { - setState(484); + setState(488); expr(0); } break; @@ -3951,17 +3972,17 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(492); + setState(496); _errHandler.sync(this); _la = _input.LA(1); while (((((_la - 39)) & ~0x3f) == 0 && ((1L << (_la - 39)) & ((1L << (T__38 - 39)) | (1L << (T__73 - 39)) | (1L << (MNEMONIC - 39)) | (1L << (NAME - 39)))) != 0)) { { { - setState(489); + setState(493); asmLine(); } } - setState(494); + setState(498); _errHandler.sync(this); _la = _input.LA(1); } @@ -4011,28 +4032,28 @@ public class KickCParser extends Parser { AsmLineContext _localctx = new AsmLineContext(_ctx, getState()); enterRule(_localctx, 56, RULE_asmLine); try { - setState(498); + setState(502); _errHandler.sync(this); switch (_input.LA(1)) { case T__38: case NAME: enterOuterAlt(_localctx, 1); { - setState(495); + setState(499); asmLabel(); } break; case MNEMONIC: enterOuterAlt(_localctx, 2); { - setState(496); + setState(500); asmInstruction(); } break; case T__73: enterOuterAlt(_localctx, 3); { - setState(497); + setState(501); asmBytes(); } break; @@ -4102,16 +4123,16 @@ public class KickCParser extends Parser { enterRule(_localctx, 58, RULE_asmLabel); int _la; try { - setState(507); + setState(511); _errHandler.sync(this); switch (_input.LA(1)) { case NAME: _localctx = new AsmLabelNameContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(500); + setState(504); match(NAME); - setState(501); + setState(505); match(T__25); } break; @@ -4119,19 +4140,19 @@ public class KickCParser extends Parser { _localctx = new AsmLabelMultiContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(502); + setState(506); match(T__38); - setState(504); + setState(508); _errHandler.sync(this); _la = _input.LA(1); if (_la==NAME) { { - setState(503); + setState(507); match(NAME); } } - setState(506); + setState(510); match(T__25); } break; @@ -4180,14 +4201,14 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(509); + setState(513); match(MNEMONIC); - setState(511); + setState(515); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,50,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,51,_ctx) ) { case 1: { - setState(510); + setState(514); asmParamMode(); } break; @@ -4238,23 +4259,23 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(513); + setState(517); match(T__73); - setState(514); + setState(518); asmExpr(0); - setState(519); + setState(523); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(515); + setState(519); match(T__2); - setState(516); + setState(520); asmExpr(0); } } - setState(521); + setState(525); _errHandler.sync(this); _la = _input.LA(1); } @@ -4404,14 +4425,14 @@ public class KickCParser extends Parser { AsmParamModeContext _localctx = new AsmParamModeContext(_ctx, getState()); enterRule(_localctx, 64, RULE_asmParamMode); try { - setState(545); + setState(549); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,52,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,53,_ctx) ) { case 1: _localctx = new AsmModeAbsContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(522); + setState(526); asmExpr(0); } break; @@ -4419,9 +4440,9 @@ public class KickCParser extends Parser { _localctx = new AsmModeImmContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(523); + setState(527); match(T__74); - setState(524); + setState(528); asmExpr(0); } break; @@ -4429,11 +4450,11 @@ public class KickCParser extends Parser { _localctx = new AsmModeAbsXYContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(525); + setState(529); asmExpr(0); - setState(526); + setState(530); match(T__2); - setState(527); + setState(531); match(NAME); } break; @@ -4441,15 +4462,15 @@ public class KickCParser extends Parser { _localctx = new AsmModeIndIdxXYContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(529); - match(T__4); - setState(530); - asmExpr(0); - setState(531); - match(T__5); - setState(532); - match(T__2); setState(533); + match(T__4); + setState(534); + asmExpr(0); + setState(535); + match(T__5); + setState(536); + match(T__2); + setState(537); match(NAME); } break; @@ -4457,15 +4478,15 @@ public class KickCParser extends Parser { _localctx = new AsmModeIdxIndXYContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(535); - match(T__4); - setState(536); - asmExpr(0); - setState(537); - match(T__2); - setState(538); - match(NAME); setState(539); + match(T__4); + setState(540); + asmExpr(0); + setState(541); + match(T__2); + setState(542); + match(NAME); + setState(543); match(T__5); } break; @@ -4473,11 +4494,11 @@ public class KickCParser extends Parser { _localctx = new AsmModeIndContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(541); + setState(545); match(T__4); - setState(542); + setState(546); asmExpr(0); - setState(543); + setState(547); match(T__5); } break; @@ -4667,7 +4688,7 @@ public class KickCParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(561); + setState(565); _errHandler.sync(this); switch (_input.LA(1)) { case T__30: @@ -4676,11 +4697,11 @@ public class KickCParser extends Parser { _ctx = _localctx; _prevctx = _localctx; - setState(548); + setState(552); match(T__30); - setState(549); + setState(553); asmExpr(0); - setState(550); + setState(554); match(T__31); } break; @@ -4692,7 +4713,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprUnaryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(552); + setState(556); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__36) | (1L << T__37) | (1L << T__45) | (1L << T__46))) != 0)) ) { _errHandler.recoverInline(this); @@ -4702,7 +4723,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(553); + setState(557); asmExpr(8); } break; @@ -4711,7 +4732,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprLabelContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(554); + setState(558); match(NAME); } break; @@ -4720,7 +4741,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprLabelRelContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(555); + setState(559); match(ASMREL); } break; @@ -4729,11 +4750,11 @@ public class KickCParser extends Parser { _localctx = new AsmExprReplaceContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(556); + setState(560); match(T__6); - setState(557); + setState(561); match(NAME); - setState(558); + setState(562); match(T__7); } break; @@ -4742,7 +4763,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprIntContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(559); + setState(563); match(NUMBER); } break; @@ -4751,7 +4772,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprCharContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(560); + setState(564); match(CHAR); } break; @@ -4759,28 +4780,28 @@ public class KickCParser extends Parser { throw new NoViableAltException(this); } _ctx.stop = _input.LT(-1); - setState(577); + setState(581); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + _alt = getInterpreter().adaptivePredict(_input,56,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(575); + setState(579); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,54,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,55,_ctx) ) { case 1: { _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); - setState(563); + setState(567); if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); { - setState(564); + setState(568); match(T__75); } - setState(565); + setState(569); asmExpr(11); } break; @@ -4788,9 +4809,9 @@ public class KickCParser extends Parser { { _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); - setState(566); + setState(570); if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); - setState(567); + setState(571); _la = _input.LA(1); if ( !(_la==T__41 || _la==T__42) ) { _errHandler.recoverInline(this); @@ -4800,7 +4821,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(568); + setState(572); asmExpr(10); } break; @@ -4808,9 +4829,9 @@ public class KickCParser extends Parser { { _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); - setState(569); + setState(573); if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(570); + setState(574); _la = _input.LA(1); if ( !(_la==T__29 || _la==T__43) ) { _errHandler.recoverInline(this); @@ -4820,7 +4841,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(571); + setState(575); asmExpr(8); } break; @@ -4828,9 +4849,9 @@ public class KickCParser extends Parser { { _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); - setState(572); + setState(576); if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); - setState(573); + setState(577); _la = _input.LA(1); if ( !(_la==T__36 || _la==T__37) ) { _errHandler.recoverInline(this); @@ -4840,16 +4861,16 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(574); + setState(578); asmExpr(7); } break; } } } - setState(579); + setState(583); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + _alt = getInterpreter().adaptivePredict(_input,56,_ctx); } } } @@ -4954,7 +4975,7 @@ public class KickCParser extends Parser { } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3b\u0247\4\2\t\2\4"+ + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3b\u024b\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"+ @@ -4984,203 +5005,205 @@ public class KickCParser extends Parser { "\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\5\30\u015e\n\30\3\30\3\30"+ "\3\30\3\30\3\30\3\30\5\30\u0166\n\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30"+ "\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\7\30\u017b"+ - "\n\30\f\30\16\30\u017e\13\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\5\30\u0187"+ - "\n\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30"+ - "\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30"+ - "\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30"+ - "\3\30\5\30\u01b3\n\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\7\30\u01bd"+ - "\n\30\f\30\16\30\u01c0\13\30\3\31\3\31\3\31\7\31\u01c5\n\31\f\31\16\31"+ - "\u01c8\13\31\3\32\3\32\5\32\u01cc\n\32\3\32\3\32\3\33\3\33\3\33\3\33\7"+ - "\33\u01d4\n\33\f\33\16\33\u01d7\13\33\3\33\3\33\3\34\3\34\3\34\3\34\3"+ - "\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34\5\34\u01e8\n\34\5\34\u01ea"+ - "\n\34\3\35\7\35\u01ed\n\35\f\35\16\35\u01f0\13\35\3\36\3\36\3\36\5\36"+ - "\u01f5\n\36\3\37\3\37\3\37\3\37\5\37\u01fb\n\37\3\37\5\37\u01fe\n\37\3"+ - " \3 \5 \u0202\n \3!\3!\3!\3!\7!\u0208\n!\f!\16!\u020b\13!\3\"\3\"\3\""+ - "\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3"+ - "\"\3\"\3\"\5\"\u0224\n\"\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\5#"+ - "\u0234\n#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\7#\u0242\n#\f#\16#\u0245"+ - "\13#\3#\2\7\22*,.D$\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60"+ - "\62\64\668:<>@BD\2\r\3\2\36\37\3\2%&\3\2\'+\3\2\60\61\3\2,-\4\2 ./\3"+ - "\2\'(\3\2\60\65\3\2;D\4\2\'(\60\61\4\2 ..\2\u0299\2F\3\2\2\2\4J\3\2\2"+ - "\2\6P\3\2\2\2\bS\3\2\2\2\nW\3\2\2\2\fa\3\2\2\2\16f\3\2\2\2\20p\3\2\2\2"+ - "\22s\3\2\2\2\24~\3\2\2\2\26\u0083\3\2\2\2\30\u0090\3\2\2\2\32\u009c\3"+ - "\2\2\2\34\u009e\3\2\2\2\36\u00b4\3\2\2\2 \u00b6\3\2\2\2\"\u00c3\3\2\2"+ - "\2$\u0113\3\2\2\2&\u0125\3\2\2\2(\u012b\3\2\2\2*\u0137\3\2\2\2,\u0149"+ - "\3\2\2\2.\u0186\3\2\2\2\60\u01c1\3\2\2\2\62\u01c9\3\2\2\2\64\u01cf\3\2"+ - "\2\2\66\u01e9\3\2\2\28\u01ee\3\2\2\2:\u01f4\3\2\2\2<\u01fd\3\2\2\2>\u01ff"+ - "\3\2\2\2@\u0203\3\2\2\2B\u0223\3\2\2\2D\u0233\3\2\2\2FG\5\6\4\2GH\5\n"+ - "\6\2HI\7\2\2\3I\3\3\2\2\2JK\58\35\2KL\7\2\2\3L\5\3\2\2\2MO\5\b\5\2NM\3"+ - "\2\2\2OR\3\2\2\2PN\3\2\2\2PQ\3\2\2\2Q\7\3\2\2\2RP\3\2\2\2ST\7\3\2\2TU"+ - "\7R\2\2U\t\3\2\2\2VX\5\f\7\2WV\3\2\2\2XY\3\2\2\2YW\3\2\2\2YZ\3\2\2\2Z"+ - "\13\3\2\2\2[\\\5\20\t\2\\]\7\4\2\2]b\3\2\2\2^b\5\26\f\2_b\5\62\32\2`b"+ - "\5\34\17\2a[\3\2\2\2a^\3\2\2\2a_\3\2\2\2a`\3\2\2\2b\r\3\2\2\2ce\5\36\20"+ - "\2dc\3\2\2\2eh\3\2\2\2fd\3\2\2\2fg\3\2\2\2gi\3\2\2\2hf\3\2\2\2im\5*\26"+ - "\2jl\5\36\20\2kj\3\2\2\2lo\3\2\2\2mk\3\2\2\2mn\3\2\2\2n\17\3\2\2\2om\3"+ - "\2\2\2pq\5\16\b\2qr\5\22\n\2r\21\3\2\2\2st\b\n\1\2tu\5\24\13\2u{\3\2\2"+ - "\2vw\f\3\2\2wx\7\5\2\2xz\5\24\13\2yv\3\2\2\2z}\3\2\2\2{y\3\2\2\2{|\3\2"+ - "\2\2|\23\3\2\2\2}{\3\2\2\2~\u0081\7^\2\2\177\u0080\7\6\2\2\u0080\u0082"+ - "\5.\30\2\u0081\177\3\2\2\2\u0081\u0082\3\2\2\2\u0082\25\3\2\2\2\u0083"+ - "\u0084\5\16\b\2\u0084\u0085\7^\2\2\u0085\u0087\7\7\2\2\u0086\u0088\5\30"+ - "\r\2\u0087\u0086\3\2\2\2\u0087\u0088\3\2\2\2\u0088\u0089\3\2\2\2\u0089"+ - "\u008a\7\b\2\2\u008a\u008c\7\t\2\2\u008b\u008d\5\"\22\2\u008c\u008b\3"+ - "\2\2\2\u008c\u008d\3\2\2\2\u008d\u008e\3\2\2\2\u008e\u008f\7\n\2\2\u008f"+ - "\27\3\2\2\2\u0090\u0095\5\32\16\2\u0091\u0092\7\5\2\2\u0092\u0094\5\32"+ - "\16\2\u0093\u0091\3\2\2\2\u0094\u0097\3\2\2\2\u0095\u0093\3\2\2\2\u0095"+ - "\u0096\3\2\2\2\u0096\31\3\2\2\2\u0097\u0095\3\2\2\2\u0098\u0099\5\16\b"+ - "\2\u0099\u009a\7^\2\2\u009a\u009d\3\2\2\2\u009b\u009d\7Q\2\2\u009c\u0098"+ - "\3\2\2\2\u009c\u009b\3\2\2\2\u009d\33\3\2\2\2\u009e\u009f\5 \21\2\u009f"+ - "\u00a0\7\4\2\2\u00a0\35\3\2\2\2\u00a1\u00b5\7\13\2\2\u00a2\u00b5\7\f\2"+ - "\2\u00a3\u00a4\7\r\2\2\u00a4\u00a5\7\7\2\2\u00a5\u00a6\7U\2\2\u00a6\u00b5"+ - "\7\b\2\2\u00a7\u00a8\7\16\2\2\u00a8\u00a9\7\7\2\2\u00a9\u00aa\7^\2\2\u00aa"+ - "\u00b5\7\b\2\2\u00ab\u00b5\7\17\2\2\u00ac\u00b5\7\20\2\2\u00ad\u00b1\7"+ - "\21\2\2\u00ae\u00af\7\7\2\2\u00af\u00b0\7^\2\2\u00b0\u00b2\7\b\2\2\u00b1"+ - "\u00ae\3\2\2\2\u00b1\u00b2\3\2\2\2\u00b2\u00b5\3\2\2\2\u00b3\u00b5\5 "+ - "\21\2\u00b4\u00a1\3\2\2\2\u00b4\u00a2\3\2\2\2\u00b4\u00a3\3\2\2\2\u00b4"+ - "\u00a7\3\2\2\2\u00b4\u00ab\3\2\2\2\u00b4\u00ac\3\2\2\2\u00b4\u00ad\3\2"+ - "\2\2\u00b4\u00b3\3\2\2\2\u00b5\37\3\2\2\2\u00b6\u00b7\7\22\2\2\u00b7\u00b8"+ - "\7\7\2\2\u00b8\u00bd\7U\2\2\u00b9\u00ba\7\5\2\2\u00ba\u00bc\7U\2\2\u00bb"+ - "\u00b9\3\2\2\2\u00bc\u00bf\3\2\2\2\u00bd\u00bb\3\2\2\2\u00bd\u00be\3\2"+ - "\2\2\u00be\u00c0\3\2\2\2\u00bf\u00bd\3\2\2\2\u00c0\u00c1\7\b\2\2\u00c1"+ - "!\3\2\2\2\u00c2\u00c4\5$\23\2\u00c3\u00c2\3\2\2\2\u00c4\u00c5\3\2\2\2"+ - "\u00c5\u00c3\3\2\2\2\u00c5\u00c6\3\2\2\2\u00c6#\3\2\2\2\u00c7\u00c8\5"+ - "\20\t\2\u00c8\u00c9\7\4\2\2\u00c9\u0114\3\2\2\2\u00ca\u00cc\7\t\2\2\u00cb"+ - "\u00cd\5\"\22\2\u00cc\u00cb\3\2\2\2\u00cc\u00cd\3\2\2\2\u00cd\u00ce\3"+ - "\2\2\2\u00ce\u0114\7\n\2\2\u00cf\u00d0\5,\27\2\u00d0\u00d1\7\4\2\2\u00d1"+ - "\u0114\3\2\2\2\u00d2\u00d3\7\23\2\2\u00d3\u00d4\7\7\2\2\u00d4\u00d5\5"+ - ",\27\2\u00d5\u00d6\7\b\2\2\u00d6\u00d9\5$\23\2\u00d7\u00d8\7\24\2\2\u00d8"+ - "\u00da\5$\23\2\u00d9\u00d7\3\2\2\2\u00d9\u00da\3\2\2\2\u00da\u0114\3\2"+ - "\2\2\u00db\u00dd\5\36\20\2\u00dc\u00db\3\2\2\2\u00dd\u00e0\3\2\2\2\u00de"+ - "\u00dc\3\2\2\2\u00de\u00df\3\2\2\2\u00df\u00e1\3\2\2\2\u00e0\u00de\3\2"+ - "\2\2\u00e1\u00e2\7\25\2\2\u00e2\u00e3\7\7\2\2\u00e3\u00e4\5,\27\2\u00e4"+ - "\u00e5\7\b\2\2\u00e5\u00e6\5$\23\2\u00e6\u0114\3\2\2\2\u00e7\u00e9\5\36"+ - "\20\2\u00e8\u00e7\3\2\2\2\u00e9\u00ec\3\2\2\2\u00ea\u00e8\3\2\2\2\u00ea"+ - "\u00eb\3\2\2\2\u00eb\u00ed\3\2\2\2\u00ec\u00ea\3\2\2\2\u00ed\u00ee\7\26"+ - "\2\2\u00ee\u00ef\5$\23\2\u00ef\u00f0\7\25\2\2\u00f0\u00f1\7\7\2\2\u00f1"+ - "\u00f2\5,\27\2\u00f2\u00f3\7\b\2\2\u00f3\u00f4\7\4\2\2\u00f4\u0114\3\2"+ - "\2\2\u00f5\u00f7\5\36\20\2\u00f6\u00f5\3\2\2\2\u00f7\u00fa\3\2\2\2\u00f8"+ - "\u00f6\3\2\2\2\u00f8\u00f9\3\2\2\2\u00f9\u00fb\3\2\2\2\u00fa\u00f8\3\2"+ - "\2\2\u00fb\u00fc\7\27\2\2\u00fc\u00fd\7\7\2\2\u00fd\u00fe\5&\24\2\u00fe"+ - "\u00ff\7\b\2\2\u00ff\u0100\5$\23\2\u0100\u0114\3\2\2\2\u0101\u0103\7\30"+ - "\2\2\u0102\u0104\5,\27\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\31\2\2\u0107\u0114\7"+ - "\4\2\2\u0108\u0109\7\32\2\2\u0109\u0114\7\4\2\2\u010a\u010c\7\33\2\2\u010b"+ - "\u010d\5\64\33\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\58\35\2\u0110\u0111\7\n\2\2\u0111"+ - "\u0114\3\2\2\2\u0112\u0114\5\62\32\2\u0113\u00c7\3\2\2\2\u0113\u00ca\3"+ - "\2\2\2\u0113\u00cf\3\2\2\2\u0113\u00d2\3\2\2\2\u0113\u00de\3\2\2\2\u0113"+ - "\u00ea\3\2\2\2\u0113\u00f8\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"+ - "%\3\2\2\2\u0115\u0116\5(\25\2\u0116\u0117\7\4\2\2\u0117\u0118\5,\27\2"+ - "\u0118\u011a\7\4\2\2\u0119\u011b\5,\27\2\u011a\u0119\3\2\2\2\u011a\u011b"+ - "\3\2\2\2\u011b\u0126\3\2\2\2\u011c\u011e\5\16\b\2\u011d\u011c\3\2\2\2"+ - "\u011d\u011e\3\2\2\2\u011e\u011f\3\2\2\2\u011f\u0120\7^\2\2\u0120\u0121"+ - "\7\34\2\2\u0121\u0122\5.\30\2\u0122\u0123\7\35\2\2\u0123\u0124\5.\30\2"+ - "\u0124\u0126\3\2\2\2\u0125\u0115\3\2\2\2\u0125\u011d\3\2\2\2\u0126\'\3"+ - "\2\2\2\u0127\u0129\5\20\t\2\u0128\u0127\3\2\2\2\u0128\u0129\3\2\2\2\u0129"+ - "\u012c\3\2\2\2\u012a\u012c\5,\27\2\u012b\u0128\3\2\2\2\u012b\u012a\3\2"+ - "\2\2\u012c)\3\2\2\2\u012d\u012e\b\26\1\2\u012e\u012f\7\7\2\2\u012f\u0130"+ - "\5*\26\2\u0130\u0131\7\b\2\2\u0131\u0138\3\2\2\2\u0132\u0138\7Q\2\2\u0133"+ - "\u0135\t\2\2\2\u0134\u0136\7Q\2\2\u0135\u0134\3\2\2\2\u0135\u0136\3\2"+ - "\2\2\u0136\u0138\3\2\2\2\u0137\u012d\3\2\2\2\u0137\u0132\3\2\2\2\u0137"+ - "\u0133\3\2\2\2\u0138\u0146\3\2\2\2\u0139\u013a\f\5\2\2\u013a\u0145\7 "+ - "\2\2\u013b\u013c\f\4\2\2\u013c\u013e\7!\2\2\u013d\u013f\5.\30\2\u013e"+ - "\u013d\3\2\2\2\u013e\u013f\3\2\2\2\u013f\u0140\3\2\2\2\u0140\u0145\7\""+ - "\2\2\u0141\u0142\f\3\2\2\u0142\u0143\7\7\2\2\u0143\u0145\7\b\2\2\u0144"+ - "\u0139\3\2\2\2\u0144\u013b\3\2\2\2\u0144\u0141\3\2\2\2\u0145\u0148\3\2"+ - "\2\2\u0146\u0144\3\2\2\2\u0146\u0147\3\2\2\2\u0147+\3\2\2\2\u0148\u0146"+ - "\3\2\2\2\u0149\u014a\b\27\1\2\u014a\u014b\5.\30\2\u014b\u0151\3\2\2\2"+ - "\u014c\u014d\f\3\2\2\u014d\u014e\7\5\2\2\u014e\u0150\5.\30\2\u014f\u014c"+ - "\3\2\2\2\u0150\u0153\3\2\2\2\u0151\u014f\3\2\2\2\u0151\u0152\3\2\2\2\u0152"+ - "-\3\2\2\2\u0153\u0151\3\2\2\2\u0154\u0155\b\30\1\2\u0155\u0156\7\7\2\2"+ - "\u0156\u0157\5,\27\2\u0157\u0158\7\b\2\2\u0158\u0187\3\2\2\2\u0159\u015a"+ - "\7#\2\2\u015a\u015d\7\7\2\2\u015b\u015e\5*\26\2\u015c\u015e\5.\30\2\u015d"+ - "\u015b\3\2\2\2\u015d\u015c\3\2\2\2\u015e\u015f\3\2\2\2\u015f\u0160\7\b"+ - "\2\2\u0160\u0187\3\2\2\2\u0161\u0162\7$\2\2\u0162\u0165\7\7\2\2\u0163"+ - "\u0166\5*\26\2\u0164\u0166\5.\30\2\u0165\u0163\3\2\2\2\u0165\u0164\3\2"+ - "\2\2\u0166\u0167\3\2\2\2\u0167\u0168\7\b\2\2\u0168\u0187\3\2\2\2\u0169"+ - "\u016a\7\7\2\2\u016a\u016b\5*\26\2\u016b\u016c\7\b\2\2\u016c\u016d\5."+ - "\30\32\u016d\u0187\3\2\2\2\u016e\u016f\t\3\2\2\u016f\u0187\5.\30\31\u0170"+ - "\u0171\7 \2\2\u0171\u0187\5.\30\27\u0172\u0173\t\4\2\2\u0173\u0187\5."+ - "\30\26\u0174\u0175\t\5\2\2\u0175\u0187\5.\30\22\u0176\u0177\7\t\2\2\u0177"+ - "\u017c\5.\30\2\u0178\u0179\7\5\2\2\u0179\u017b\5.\30\2\u017a\u0178\3\2"+ - "\2\2\u017b\u017e\3\2\2\2\u017c\u017a\3\2\2\2\u017c\u017d\3\2\2\2\u017d"+ - "\u017f\3\2\2\2\u017e\u017c\3\2\2\2\u017f\u0180\7\n\2\2\u0180\u0187\3\2"+ - "\2\2\u0181\u0187\7^\2\2\u0182\u0187\7U\2\2\u0183\u0187\7R\2\2\u0184\u0187"+ - "\7S\2\2\u0185\u0187\7T\2\2\u0186\u0154\3\2\2\2\u0186\u0159\3\2\2\2\u0186"+ - "\u0161\3\2\2\2\u0186\u0169\3\2\2\2\u0186\u016e\3\2\2\2\u0186\u0170\3\2"+ - "\2\2\u0186\u0172\3\2\2\2\u0186\u0174\3\2\2\2\u0186\u0176\3\2\2\2\u0186"+ - "\u0181\3\2\2\2\u0186\u0182\3\2\2\2\u0186\u0183\3\2\2\2\u0186\u0184\3\2"+ - "\2\2\u0186\u0185\3\2\2\2\u0187\u01be\3\2\2\2\u0188\u0189\f\25\2\2\u0189"+ - "\u018a\t\6\2\2\u018a\u01bd\5.\30\26\u018b\u018c\f\24\2\2\u018c\u018d\t"+ - "\7\2\2\u018d\u01bd\5.\30\25\u018e\u018f\f\23\2\2\u018f\u0190\t\b\2\2\u0190"+ - "\u01bd\5.\30\24\u0191\u0192\f\21\2\2\u0192\u0193\t\t\2\2\u0193\u01bd\5"+ - ".\30\22\u0194\u0195\f\20\2\2\u0195\u0196\7*\2\2\u0196\u01bd\5.\30\21\u0197"+ - "\u0198\f\17\2\2\u0198\u0199\7\66\2\2\u0199\u01bd\5.\30\20\u019a\u019b"+ - "\f\16\2\2\u019b\u019c\7\67\2\2\u019c\u01bd\5.\30\17\u019d\u019e\f\r\2"+ - "\2\u019e\u019f\78\2\2\u019f\u01bd\5.\30\16\u01a0\u01a1\f\f\2\2\u01a1\u01a2"+ - "\79\2\2\u01a2\u01bd\5.\30\r\u01a3\u01a4\f\13\2\2\u01a4\u01a5\7:\2\2\u01a5"+ - "\u01a6\5.\30\2\u01a6\u01a7\7\34\2\2\u01a7\u01a8\5.\30\f\u01a8\u01bd\3"+ - "\2\2\2\u01a9\u01aa\f\n\2\2\u01aa\u01ab\7\6\2\2\u01ab\u01bd\5.\30\n\u01ac"+ - "\u01ad\f\t\2\2\u01ad\u01ae\t\n\2\2\u01ae\u01bd\5.\30\t\u01af\u01b0\f\36"+ - "\2\2\u01b0\u01b2\7\7\2\2\u01b1\u01b3\5\60\31\2\u01b2\u01b1\3\2\2\2\u01b2"+ - "\u01b3\3\2\2\2\u01b3\u01b4\3\2\2\2\u01b4\u01bd\7\b\2\2\u01b5\u01b6\f\33"+ - "\2\2\u01b6\u01b7\7!\2\2\u01b7\u01b8\5,\27\2\u01b8\u01b9\7\"\2\2\u01b9"+ - "\u01bd\3\2\2\2\u01ba\u01bb\f\30\2\2\u01bb\u01bd\t\3\2\2\u01bc\u0188\3"+ - "\2\2\2\u01bc\u018b\3\2\2\2\u01bc\u018e\3\2\2\2\u01bc\u0191\3\2\2\2\u01bc"+ - "\u0194\3\2\2\2\u01bc\u0197\3\2\2\2\u01bc\u019a\3\2\2\2\u01bc\u019d\3\2"+ - "\2\2\u01bc\u01a0\3\2\2\2\u01bc\u01a3\3\2\2\2\u01bc\u01a9\3\2\2\2\u01bc"+ - "\u01ac\3\2\2\2\u01bc\u01af\3\2\2\2\u01bc\u01b5\3\2\2\2\u01bc\u01ba\3\2"+ - "\2\2\u01bd\u01c0\3\2\2\2\u01be\u01bc\3\2\2\2\u01be\u01bf\3\2\2\2\u01bf"+ - "/\3\2\2\2\u01c0\u01be\3\2\2\2\u01c1\u01c6\5.\30\2\u01c2\u01c3\7\5\2\2"+ - "\u01c3\u01c5\5.\30\2\u01c4\u01c2\3\2\2\2\u01c5\u01c8\3\2\2\2\u01c6\u01c4"+ - "\3\2\2\2\u01c6\u01c7\3\2\2\2\u01c7\61\3\2\2\2\u01c8\u01c6\3\2\2\2\u01c9"+ - "\u01cb\7E\2\2\u01ca\u01cc\5\64\33\2\u01cb\u01ca\3\2\2\2\u01cb\u01cc\3"+ - "\2\2\2\u01cc\u01cd\3\2\2\2\u01cd\u01ce\7P\2\2\u01ce\63\3\2\2\2\u01cf\u01d0"+ - "\7\7\2\2\u01d0\u01d5\5\66\34\2\u01d1\u01d2\7\5\2\2\u01d2\u01d4\5\66\34"+ - "\2\u01d3\u01d1\3\2\2\2\u01d4\u01d7\3\2\2\2\u01d5\u01d3\3\2\2\2\u01d5\u01d6"+ - "\3\2\2\2\u01d6\u01d8\3\2\2\2\u01d7\u01d5\3\2\2\2\u01d8\u01d9\7\b\2\2\u01d9"+ - "\65\3\2\2\2\u01da\u01db\7F\2\2\u01db\u01ea\7R\2\2\u01dc\u01dd\7G\2\2\u01dd"+ - "\u01ea\7^\2\2\u01de\u01df\7H\2\2\u01df\u01ea\7R\2\2\u01e0\u01e1\7I\2\2"+ - "\u01e1\u01ea\5.\30\2\u01e2\u01e3\7J\2\2\u01e3\u01ea\5.\30\2\u01e4\u01e7"+ - "\7K\2\2\u01e5\u01e8\7\17\2\2\u01e6\u01e8\5.\30\2\u01e7\u01e5\3\2\2\2\u01e7"+ - "\u01e6\3\2\2\2\u01e8\u01ea\3\2\2\2\u01e9\u01da\3\2\2\2\u01e9\u01dc\3\2"+ - "\2\2\u01e9\u01de\3\2\2\2\u01e9\u01e0\3\2\2\2\u01e9\u01e2\3\2\2\2\u01e9"+ - "\u01e4\3\2\2\2\u01ea\67\3\2\2\2\u01eb\u01ed\5:\36\2\u01ec\u01eb\3\2\2"+ - "\2\u01ed\u01f0\3\2\2\2\u01ee\u01ec\3\2\2\2\u01ee\u01ef\3\2\2\2\u01ef9"+ - "\3\2\2\2\u01f0\u01ee\3\2\2\2\u01f1\u01f5\5<\37\2\u01f2\u01f5\5> \2\u01f3"+ - "\u01f5\5@!\2\u01f4\u01f1\3\2\2\2\u01f4\u01f2\3\2\2\2\u01f4\u01f3\3\2\2"+ - "\2\u01f5;\3\2\2\2\u01f6\u01f7\7^\2\2\u01f7\u01fe\7\34\2\2\u01f8\u01fa"+ - "\7)\2\2\u01f9\u01fb\7^\2\2\u01fa\u01f9\3\2\2\2\u01fa\u01fb\3\2\2\2\u01fb"+ - "\u01fc\3\2\2\2\u01fc\u01fe\7\34\2\2\u01fd\u01f6\3\2\2\2\u01fd\u01f8\3"+ - "\2\2\2\u01fe=\3\2\2\2\u01ff\u0201\7O\2\2\u0200\u0202\5B\"\2\u0201\u0200"+ - "\3\2\2\2\u0201\u0202\3\2\2\2\u0202?\3\2\2\2\u0203\u0204\7L\2\2\u0204\u0209"+ - "\5D#\2\u0205\u0206\7\5\2\2\u0206\u0208\5D#\2\u0207\u0205\3\2\2\2\u0208"+ - "\u020b\3\2\2\2\u0209\u0207\3\2\2\2\u0209\u020a\3\2\2\2\u020aA\3\2\2\2"+ - "\u020b\u0209\3\2\2\2\u020c\u0224\5D#\2\u020d\u020e\7M\2\2\u020e\u0224"+ - "\5D#\2\u020f\u0210\5D#\2\u0210\u0211\7\5\2\2\u0211\u0212\7^\2\2\u0212"+ - "\u0224\3\2\2\2\u0213\u0214\7\7\2\2\u0214\u0215\5D#\2\u0215\u0216\7\b\2"+ - "\2\u0216\u0217\7\5\2\2\u0217\u0218\7^\2\2\u0218\u0224\3\2\2\2\u0219\u021a"+ - "\7\7\2\2\u021a\u021b\5D#\2\u021b\u021c\7\5\2\2\u021c\u021d\7^\2\2\u021d"+ - "\u021e\7\b\2\2\u021e\u0224\3\2\2\2\u021f\u0220\7\7\2\2\u0220\u0221\5D"+ - "#\2\u0221\u0222\7\b\2\2\u0222\u0224\3\2\2\2\u0223\u020c\3\2\2\2\u0223"+ - "\u020d\3\2\2\2\u0223\u020f\3\2\2\2\u0223\u0213\3\2\2\2\u0223\u0219\3\2"+ - "\2\2\u0223\u021f\3\2\2\2\u0224C\3\2\2\2\u0225\u0226\b#\1\2\u0226\u0227"+ - "\7!\2\2\u0227\u0228\5D#\2\u0228\u0229\7\"\2\2\u0229\u0234\3\2\2\2\u022a"+ - "\u022b\t\13\2\2\u022b\u0234\5D#\n\u022c\u0234\7^\2\2\u022d\u0234\7_\2"+ - "\2\u022e\u022f\7\t\2\2\u022f\u0230\7^\2\2\u0230\u0234\7\n\2\2\u0231\u0234"+ - "\7U\2\2\u0232\u0234\7S\2\2\u0233\u0225\3\2\2\2\u0233\u022a\3\2\2\2\u0233"+ - "\u022c\3\2\2\2\u0233\u022d\3\2\2\2\u0233\u022e\3\2\2\2\u0233\u0231\3\2"+ - "\2\2\u0233\u0232\3\2\2\2\u0234\u0243\3\2\2\2\u0235\u0236\f\f\2\2\u0236"+ - "\u0237\7N\2\2\u0237\u0242\5D#\r\u0238\u0239\f\13\2\2\u0239\u023a\t\6\2"+ - "\2\u023a\u0242\5D#\f\u023b\u023c\f\t\2\2\u023c\u023d\t\f\2\2\u023d\u0242"+ - "\5D#\n\u023e\u023f\f\b\2\2\u023f\u0240\t\b\2\2\u0240\u0242\5D#\t\u0241"+ - "\u0235\3\2\2\2\u0241\u0238\3\2\2\2\u0241\u023b\3\2\2\2\u0241\u023e\3\2"+ - "\2\2\u0242\u0245\3\2\2\2\u0243\u0241\3\2\2\2\u0243\u0244\3\2\2\2\u0244"+ - "E\3\2\2\2\u0245\u0243\3\2\2\2:PYafm{\u0081\u0087\u008c\u0095\u009c\u00b1"+ + "\n\30\f\30\16\30\u017e\13\30\3\30\3\30\3\30\3\30\3\30\6\30\u0185\n\30"+ + "\r\30\16\30\u0186\3\30\3\30\5\30\u018b\n\30\3\30\3\30\3\30\3\30\3\30\3"+ + "\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3"+ + "\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3"+ + "\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\5\30\u01b7\n\30\3\30\3\30"+ + "\3\30\3\30\3\30\3\30\3\30\3\30\7\30\u01c1\n\30\f\30\16\30\u01c4\13\30"+ + "\3\31\3\31\3\31\7\31\u01c9\n\31\f\31\16\31\u01cc\13\31\3\32\3\32\5\32"+ + "\u01d0\n\32\3\32\3\32\3\33\3\33\3\33\3\33\7\33\u01d8\n\33\f\33\16\33\u01db"+ + "\13\33\3\33\3\33\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34"+ + "\3\34\3\34\5\34\u01ec\n\34\5\34\u01ee\n\34\3\35\7\35\u01f1\n\35\f\35\16"+ + "\35\u01f4\13\35\3\36\3\36\3\36\5\36\u01f9\n\36\3\37\3\37\3\37\3\37\5\37"+ + "\u01ff\n\37\3\37\5\37\u0202\n\37\3 \3 \5 \u0206\n \3!\3!\3!\3!\7!\u020c"+ + "\n!\f!\16!\u020f\13!\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3"+ + "\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\5\"\u0228\n\"\3#\3#\3#\3#\3"+ + "#\3#\3#\3#\3#\3#\3#\3#\3#\3#\5#\u0238\n#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3"+ + "#\3#\3#\7#\u0246\n#\f#\16#\u0249\13#\3#\2\7\22*,.D$\2\4\6\b\n\f\16\20"+ + "\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BD\2\r\3\2\36\37\3\2%&"+ + "\3\2\'+\3\2\60\61\3\2,-\4\2 ./\3\2\'(\3\2\60\65\3\2;D\4\2\'(\60\61\4"+ + "\2 ..\2\u029e\2F\3\2\2\2\4J\3\2\2\2\6P\3\2\2\2\bS\3\2\2\2\nW\3\2\2\2"+ + "\fa\3\2\2\2\16f\3\2\2\2\20p\3\2\2\2\22s\3\2\2\2\24~\3\2\2\2\26\u0083\3"+ + "\2\2\2\30\u0090\3\2\2\2\32\u009c\3\2\2\2\34\u009e\3\2\2\2\36\u00b4\3\2"+ + "\2\2 \u00b6\3\2\2\2\"\u00c3\3\2\2\2$\u0113\3\2\2\2&\u0125\3\2\2\2(\u012b"+ + "\3\2\2\2*\u0137\3\2\2\2,\u0149\3\2\2\2.\u018a\3\2\2\2\60\u01c5\3\2\2\2"+ + "\62\u01cd\3\2\2\2\64\u01d3\3\2\2\2\66\u01ed\3\2\2\28\u01f2\3\2\2\2:\u01f8"+ + "\3\2\2\2<\u0201\3\2\2\2>\u0203\3\2\2\2@\u0207\3\2\2\2B\u0227\3\2\2\2D"+ + "\u0237\3\2\2\2FG\5\6\4\2GH\5\n\6\2HI\7\2\2\3I\3\3\2\2\2JK\58\35\2KL\7"+ + "\2\2\3L\5\3\2\2\2MO\5\b\5\2NM\3\2\2\2OR\3\2\2\2PN\3\2\2\2PQ\3\2\2\2Q\7"+ + "\3\2\2\2RP\3\2\2\2ST\7\3\2\2TU\7R\2\2U\t\3\2\2\2VX\5\f\7\2WV\3\2\2\2X"+ + "Y\3\2\2\2YW\3\2\2\2YZ\3\2\2\2Z\13\3\2\2\2[\\\5\20\t\2\\]\7\4\2\2]b\3\2"+ + "\2\2^b\5\26\f\2_b\5\62\32\2`b\5\34\17\2a[\3\2\2\2a^\3\2\2\2a_\3\2\2\2"+ + "a`\3\2\2\2b\r\3\2\2\2ce\5\36\20\2dc\3\2\2\2eh\3\2\2\2fd\3\2\2\2fg\3\2"+ + "\2\2gi\3\2\2\2hf\3\2\2\2im\5*\26\2jl\5\36\20\2kj\3\2\2\2lo\3\2\2\2mk\3"+ + "\2\2\2mn\3\2\2\2n\17\3\2\2\2om\3\2\2\2pq\5\16\b\2qr\5\22\n\2r\21\3\2\2"+ + "\2st\b\n\1\2tu\5\24\13\2u{\3\2\2\2vw\f\3\2\2wx\7\5\2\2xz\5\24\13\2yv\3"+ + "\2\2\2z}\3\2\2\2{y\3\2\2\2{|\3\2\2\2|\23\3\2\2\2}{\3\2\2\2~\u0081\7^\2"+ + "\2\177\u0080\7\6\2\2\u0080\u0082\5.\30\2\u0081\177\3\2\2\2\u0081\u0082"+ + "\3\2\2\2\u0082\25\3\2\2\2\u0083\u0084\5\16\b\2\u0084\u0085\7^\2\2\u0085"+ + "\u0087\7\7\2\2\u0086\u0088\5\30\r\2\u0087\u0086\3\2\2\2\u0087\u0088\3"+ + "\2\2\2\u0088\u0089\3\2\2\2\u0089\u008a\7\b\2\2\u008a\u008c\7\t\2\2\u008b"+ + "\u008d\5\"\22\2\u008c\u008b\3\2\2\2\u008c\u008d\3\2\2\2\u008d\u008e\3"+ + "\2\2\2\u008e\u008f\7\n\2\2\u008f\27\3\2\2\2\u0090\u0095\5\32\16\2\u0091"+ + "\u0092\7\5\2\2\u0092\u0094\5\32\16\2\u0093\u0091\3\2\2\2\u0094\u0097\3"+ + "\2\2\2\u0095\u0093\3\2\2\2\u0095\u0096\3\2\2\2\u0096\31\3\2\2\2\u0097"+ + "\u0095\3\2\2\2\u0098\u0099\5\16\b\2\u0099\u009a\7^\2\2\u009a\u009d\3\2"+ + "\2\2\u009b\u009d\7Q\2\2\u009c\u0098\3\2\2\2\u009c\u009b\3\2\2\2\u009d"+ + "\33\3\2\2\2\u009e\u009f\5 \21\2\u009f\u00a0\7\4\2\2\u00a0\35\3\2\2\2\u00a1"+ + "\u00b5\7\13\2\2\u00a2\u00b5\7\f\2\2\u00a3\u00a4\7\r\2\2\u00a4\u00a5\7"+ + "\7\2\2\u00a5\u00a6\7U\2\2\u00a6\u00b5\7\b\2\2\u00a7\u00a8\7\16\2\2\u00a8"+ + "\u00a9\7\7\2\2\u00a9\u00aa\7^\2\2\u00aa\u00b5\7\b\2\2\u00ab\u00b5\7\17"+ + "\2\2\u00ac\u00b5\7\20\2\2\u00ad\u00b1\7\21\2\2\u00ae\u00af\7\7\2\2\u00af"+ + "\u00b0\7^\2\2\u00b0\u00b2\7\b\2\2\u00b1\u00ae\3\2\2\2\u00b1\u00b2\3\2"+ + "\2\2\u00b2\u00b5\3\2\2\2\u00b3\u00b5\5 \21\2\u00b4\u00a1\3\2\2\2\u00b4"+ + "\u00a2\3\2\2\2\u00b4\u00a3\3\2\2\2\u00b4\u00a7\3\2\2\2\u00b4\u00ab\3\2"+ + "\2\2\u00b4\u00ac\3\2\2\2\u00b4\u00ad\3\2\2\2\u00b4\u00b3\3\2\2\2\u00b5"+ + "\37\3\2\2\2\u00b6\u00b7\7\22\2\2\u00b7\u00b8\7\7\2\2\u00b8\u00bd\7U\2"+ + "\2\u00b9\u00ba\7\5\2\2\u00ba\u00bc\7U\2\2\u00bb\u00b9\3\2\2\2\u00bc\u00bf"+ + "\3\2\2\2\u00bd\u00bb\3\2\2\2\u00bd\u00be\3\2\2\2\u00be\u00c0\3\2\2\2\u00bf"+ + "\u00bd\3\2\2\2\u00c0\u00c1\7\b\2\2\u00c1!\3\2\2\2\u00c2\u00c4\5$\23\2"+ + "\u00c3\u00c2\3\2\2\2\u00c4\u00c5\3\2\2\2\u00c5\u00c3\3\2\2\2\u00c5\u00c6"+ + "\3\2\2\2\u00c6#\3\2\2\2\u00c7\u00c8\5\20\t\2\u00c8\u00c9\7\4\2\2\u00c9"+ + "\u0114\3\2\2\2\u00ca\u00cc\7\t\2\2\u00cb\u00cd\5\"\22\2\u00cc\u00cb\3"+ + "\2\2\2\u00cc\u00cd\3\2\2\2\u00cd\u00ce\3\2\2\2\u00ce\u0114\7\n\2\2\u00cf"+ + "\u00d0\5,\27\2\u00d0\u00d1\7\4\2\2\u00d1\u0114\3\2\2\2\u00d2\u00d3\7\23"+ + "\2\2\u00d3\u00d4\7\7\2\2\u00d4\u00d5\5,\27\2\u00d5\u00d6\7\b\2\2\u00d6"+ + "\u00d9\5$\23\2\u00d7\u00d8\7\24\2\2\u00d8\u00da\5$\23\2\u00d9\u00d7\3"+ + "\2\2\2\u00d9\u00da\3\2\2\2\u00da\u0114\3\2\2\2\u00db\u00dd\5\36\20\2\u00dc"+ + "\u00db\3\2\2\2\u00dd\u00e0\3\2\2\2\u00de\u00dc\3\2\2\2\u00de\u00df\3\2"+ + "\2\2\u00df\u00e1\3\2\2\2\u00e0\u00de\3\2\2\2\u00e1\u00e2\7\25\2\2\u00e2"+ + "\u00e3\7\7\2\2\u00e3\u00e4\5,\27\2\u00e4\u00e5\7\b\2\2\u00e5\u00e6\5$"+ + "\23\2\u00e6\u0114\3\2\2\2\u00e7\u00e9\5\36\20\2\u00e8\u00e7\3\2\2\2\u00e9"+ + "\u00ec\3\2\2\2\u00ea\u00e8\3\2\2\2\u00ea\u00eb\3\2\2\2\u00eb\u00ed\3\2"+ + "\2\2\u00ec\u00ea\3\2\2\2\u00ed\u00ee\7\26\2\2\u00ee\u00ef\5$\23\2\u00ef"+ + "\u00f0\7\25\2\2\u00f0\u00f1\7\7\2\2\u00f1\u00f2\5,\27\2\u00f2\u00f3\7"+ + "\b\2\2\u00f3\u00f4\7\4\2\2\u00f4\u0114\3\2\2\2\u00f5\u00f7\5\36\20\2\u00f6"+ + "\u00f5\3\2\2\2\u00f7\u00fa\3\2\2\2\u00f8\u00f6\3\2\2\2\u00f8\u00f9\3\2"+ + "\2\2\u00f9\u00fb\3\2\2\2\u00fa\u00f8\3\2\2\2\u00fb\u00fc\7\27\2\2\u00fc"+ + "\u00fd\7\7\2\2\u00fd\u00fe\5&\24\2\u00fe\u00ff\7\b\2\2\u00ff\u0100\5$"+ + "\23\2\u0100\u0114\3\2\2\2\u0101\u0103\7\30\2\2\u0102\u0104\5,\27\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\31\2\2\u0107\u0114\7\4\2\2\u0108\u0109\7\32\2\2\u0109"+ + "\u0114\7\4\2\2\u010a\u010c\7\33\2\2\u010b\u010d\5\64\33\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\58\35\2\u0110\u0111\7\n\2\2\u0111\u0114\3\2\2\2\u0112\u0114\5\62"+ + "\32\2\u0113\u00c7\3\2\2\2\u0113\u00ca\3\2\2\2\u0113\u00cf\3\2\2\2\u0113"+ + "\u00d2\3\2\2\2\u0113\u00de\3\2\2\2\u0113\u00ea\3\2\2\2\u0113\u00f8\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%\3\2\2\2\u0115\u0116\5(\25\2"+ + "\u0116\u0117\7\4\2\2\u0117\u0118\5,\27\2\u0118\u011a\7\4\2\2\u0119\u011b"+ + "\5,\27\2\u011a\u0119\3\2\2\2\u011a\u011b\3\2\2\2\u011b\u0126\3\2\2\2\u011c"+ + "\u011e\5\16\b\2\u011d\u011c\3\2\2\2\u011d\u011e\3\2\2\2\u011e\u011f\3"+ + "\2\2\2\u011f\u0120\7^\2\2\u0120\u0121\7\34\2\2\u0121\u0122\5.\30\2\u0122"+ + "\u0123\7\35\2\2\u0123\u0124\5.\30\2\u0124\u0126\3\2\2\2\u0125\u0115\3"+ + "\2\2\2\u0125\u011d\3\2\2\2\u0126\'\3\2\2\2\u0127\u0129\5\20\t\2\u0128"+ + "\u0127\3\2\2\2\u0128\u0129\3\2\2\2\u0129\u012c\3\2\2\2\u012a\u012c\5,"+ + "\27\2\u012b\u0128\3\2\2\2\u012b\u012a\3\2\2\2\u012c)\3\2\2\2\u012d\u012e"+ + "\b\26\1\2\u012e\u012f\7\7\2\2\u012f\u0130\5*\26\2\u0130\u0131\7\b\2\2"+ + "\u0131\u0138\3\2\2\2\u0132\u0138\7Q\2\2\u0133\u0135\t\2\2\2\u0134\u0136"+ + "\7Q\2\2\u0135\u0134\3\2\2\2\u0135\u0136\3\2\2\2\u0136\u0138\3\2\2\2\u0137"+ + "\u012d\3\2\2\2\u0137\u0132\3\2\2\2\u0137\u0133\3\2\2\2\u0138\u0146\3\2"+ + "\2\2\u0139\u013a\f\5\2\2\u013a\u0145\7 \2\2\u013b\u013c\f\4\2\2\u013c"+ + "\u013e\7!\2\2\u013d\u013f\5.\30\2\u013e\u013d\3\2\2\2\u013e\u013f\3\2"+ + "\2\2\u013f\u0140\3\2\2\2\u0140\u0145\7\"\2\2\u0141\u0142\f\3\2\2\u0142"+ + "\u0143\7\7\2\2\u0143\u0145\7\b\2\2\u0144\u0139\3\2\2\2\u0144\u013b\3\2"+ + "\2\2\u0144\u0141\3\2\2\2\u0145\u0148\3\2\2\2\u0146\u0144\3\2\2\2\u0146"+ + "\u0147\3\2\2\2\u0147+\3\2\2\2\u0148\u0146\3\2\2\2\u0149\u014a\b\27\1\2"+ + "\u014a\u014b\5.\30\2\u014b\u0151\3\2\2\2\u014c\u014d\f\3\2\2\u014d\u014e"+ + "\7\5\2\2\u014e\u0150\5.\30\2\u014f\u014c\3\2\2\2\u0150\u0153\3\2\2\2\u0151"+ + "\u014f\3\2\2\2\u0151\u0152\3\2\2\2\u0152-\3\2\2\2\u0153\u0151\3\2\2\2"+ + "\u0154\u0155\b\30\1\2\u0155\u0156\7\7\2\2\u0156\u0157\5,\27\2\u0157\u0158"+ + "\7\b\2\2\u0158\u018b\3\2\2\2\u0159\u015a\7#\2\2\u015a\u015d\7\7\2\2\u015b"+ + "\u015e\5*\26\2\u015c\u015e\5.\30\2\u015d\u015b\3\2\2\2\u015d\u015c\3\2"+ + "\2\2\u015e\u015f\3\2\2\2\u015f\u0160\7\b\2\2\u0160\u018b\3\2\2\2\u0161"+ + "\u0162\7$\2\2\u0162\u0165\7\7\2\2\u0163\u0166\5*\26\2\u0164\u0166\5.\30"+ + "\2\u0165\u0163\3\2\2\2\u0165\u0164\3\2\2\2\u0166\u0167\3\2\2\2\u0167\u0168"+ + "\7\b\2\2\u0168\u018b\3\2\2\2\u0169\u016a\7\7\2\2\u016a\u016b\5*\26\2\u016b"+ + "\u016c\7\b\2\2\u016c\u016d\5.\30\32\u016d\u018b\3\2\2\2\u016e\u016f\t"+ + "\3\2\2\u016f\u018b\5.\30\31\u0170\u0171\7 \2\2\u0171\u018b\5.\30\27\u0172"+ + "\u0173\t\4\2\2\u0173\u018b\5.\30\26\u0174\u0175\t\5\2\2\u0175\u018b\5"+ + ".\30\22\u0176\u0177\7\t\2\2\u0177\u017c\5.\30\2\u0178\u0179\7\5\2\2\u0179"+ + "\u017b\5.\30\2\u017a\u0178\3\2\2\2\u017b\u017e\3\2\2\2\u017c\u017a\3\2"+ + "\2\2\u017c\u017d\3\2\2\2\u017d\u017f\3\2\2\2\u017e\u017c\3\2\2\2\u017f"+ + "\u0180\7\n\2\2\u0180\u018b\3\2\2\2\u0181\u018b\7^\2\2\u0182\u018b\7U\2"+ + "\2\u0183\u0185\7R\2\2\u0184\u0183\3\2\2\2\u0185\u0186\3\2\2\2\u0186\u0184"+ + "\3\2\2\2\u0186\u0187\3\2\2\2\u0187\u018b\3\2\2\2\u0188\u018b\7S\2\2\u0189"+ + "\u018b\7T\2\2\u018a\u0154\3\2\2\2\u018a\u0159\3\2\2\2\u018a\u0161\3\2"+ + "\2\2\u018a\u0169\3\2\2\2\u018a\u016e\3\2\2\2\u018a\u0170\3\2\2\2\u018a"+ + "\u0172\3\2\2\2\u018a\u0174\3\2\2\2\u018a\u0176\3\2\2\2\u018a\u0181\3\2"+ + "\2\2\u018a\u0182\3\2\2\2\u018a\u0184\3\2\2\2\u018a\u0188\3\2\2\2\u018a"+ + "\u0189\3\2\2\2\u018b\u01c2\3\2\2\2\u018c\u018d\f\25\2\2\u018d\u018e\t"+ + "\6\2\2\u018e\u01c1\5.\30\26\u018f\u0190\f\24\2\2\u0190\u0191\t\7\2\2\u0191"+ + "\u01c1\5.\30\25\u0192\u0193\f\23\2\2\u0193\u0194\t\b\2\2\u0194\u01c1\5"+ + ".\30\24\u0195\u0196\f\21\2\2\u0196\u0197\t\t\2\2\u0197\u01c1\5.\30\22"+ + "\u0198\u0199\f\20\2\2\u0199\u019a\7*\2\2\u019a\u01c1\5.\30\21\u019b\u019c"+ + "\f\17\2\2\u019c\u019d\7\66\2\2\u019d\u01c1\5.\30\20\u019e\u019f\f\16\2"+ + "\2\u019f\u01a0\7\67\2\2\u01a0\u01c1\5.\30\17\u01a1\u01a2\f\r\2\2\u01a2"+ + "\u01a3\78\2\2\u01a3\u01c1\5.\30\16\u01a4\u01a5\f\f\2\2\u01a5\u01a6\79"+ + "\2\2\u01a6\u01c1\5.\30\r\u01a7\u01a8\f\13\2\2\u01a8\u01a9\7:\2\2\u01a9"+ + "\u01aa\5.\30\2\u01aa\u01ab\7\34\2\2\u01ab\u01ac\5.\30\f\u01ac\u01c1\3"+ + "\2\2\2\u01ad\u01ae\f\n\2\2\u01ae\u01af\7\6\2\2\u01af\u01c1\5.\30\n\u01b0"+ + "\u01b1\f\t\2\2\u01b1\u01b2\t\n\2\2\u01b2\u01c1\5.\30\t\u01b3\u01b4\f\36"+ + "\2\2\u01b4\u01b6\7\7\2\2\u01b5\u01b7\5\60\31\2\u01b6\u01b5\3\2\2\2\u01b6"+ + "\u01b7\3\2\2\2\u01b7\u01b8\3\2\2\2\u01b8\u01c1\7\b\2\2\u01b9\u01ba\f\33"+ + "\2\2\u01ba\u01bb\7!\2\2\u01bb\u01bc\5,\27\2\u01bc\u01bd\7\"\2\2\u01bd"+ + "\u01c1\3\2\2\2\u01be\u01bf\f\30\2\2\u01bf\u01c1\t\3\2\2\u01c0\u018c\3"+ + "\2\2\2\u01c0\u018f\3\2\2\2\u01c0\u0192\3\2\2\2\u01c0\u0195\3\2\2\2\u01c0"+ + "\u0198\3\2\2\2\u01c0\u019b\3\2\2\2\u01c0\u019e\3\2\2\2\u01c0\u01a1\3\2"+ + "\2\2\u01c0\u01a4\3\2\2\2\u01c0\u01a7\3\2\2\2\u01c0\u01ad\3\2\2\2\u01c0"+ + "\u01b0\3\2\2\2\u01c0\u01b3\3\2\2\2\u01c0\u01b9\3\2\2\2\u01c0\u01be\3\2"+ + "\2\2\u01c1\u01c4\3\2\2\2\u01c2\u01c0\3\2\2\2\u01c2\u01c3\3\2\2\2\u01c3"+ + "/\3\2\2\2\u01c4\u01c2\3\2\2\2\u01c5\u01ca\5.\30\2\u01c6\u01c7\7\5\2\2"+ + "\u01c7\u01c9\5.\30\2\u01c8\u01c6\3\2\2\2\u01c9\u01cc\3\2\2\2\u01ca\u01c8"+ + "\3\2\2\2\u01ca\u01cb\3\2\2\2\u01cb\61\3\2\2\2\u01cc\u01ca\3\2\2\2\u01cd"+ + "\u01cf\7E\2\2\u01ce\u01d0\5\64\33\2\u01cf\u01ce\3\2\2\2\u01cf\u01d0\3"+ + "\2\2\2\u01d0\u01d1\3\2\2\2\u01d1\u01d2\7P\2\2\u01d2\63\3\2\2\2\u01d3\u01d4"+ + "\7\7\2\2\u01d4\u01d9\5\66\34\2\u01d5\u01d6\7\5\2\2\u01d6\u01d8\5\66\34"+ + "\2\u01d7\u01d5\3\2\2\2\u01d8\u01db\3\2\2\2\u01d9\u01d7\3\2\2\2\u01d9\u01da"+ + "\3\2\2\2\u01da\u01dc\3\2\2\2\u01db\u01d9\3\2\2\2\u01dc\u01dd\7\b\2\2\u01dd"+ + "\65\3\2\2\2\u01de\u01df\7F\2\2\u01df\u01ee\7R\2\2\u01e0\u01e1\7G\2\2\u01e1"+ + "\u01ee\7^\2\2\u01e2\u01e3\7H\2\2\u01e3\u01ee\7R\2\2\u01e4\u01e5\7I\2\2"+ + "\u01e5\u01ee\5.\30\2\u01e6\u01e7\7J\2\2\u01e7\u01ee\5.\30\2\u01e8\u01eb"+ + "\7K\2\2\u01e9\u01ec\7\17\2\2\u01ea\u01ec\5.\30\2\u01eb\u01e9\3\2\2\2\u01eb"+ + "\u01ea\3\2\2\2\u01ec\u01ee\3\2\2\2\u01ed\u01de\3\2\2\2\u01ed\u01e0\3\2"+ + "\2\2\u01ed\u01e2\3\2\2\2\u01ed\u01e4\3\2\2\2\u01ed\u01e6\3\2\2\2\u01ed"+ + "\u01e8\3\2\2\2\u01ee\67\3\2\2\2\u01ef\u01f1\5:\36\2\u01f0\u01ef\3\2\2"+ + "\2\u01f1\u01f4\3\2\2\2\u01f2\u01f0\3\2\2\2\u01f2\u01f3\3\2\2\2\u01f39"+ + "\3\2\2\2\u01f4\u01f2\3\2\2\2\u01f5\u01f9\5<\37\2\u01f6\u01f9\5> \2\u01f7"+ + "\u01f9\5@!\2\u01f8\u01f5\3\2\2\2\u01f8\u01f6\3\2\2\2\u01f8\u01f7\3\2\2"+ + "\2\u01f9;\3\2\2\2\u01fa\u01fb\7^\2\2\u01fb\u0202\7\34\2\2\u01fc\u01fe"+ + "\7)\2\2\u01fd\u01ff\7^\2\2\u01fe\u01fd\3\2\2\2\u01fe\u01ff\3\2\2\2\u01ff"+ + "\u0200\3\2\2\2\u0200\u0202\7\34\2\2\u0201\u01fa\3\2\2\2\u0201\u01fc\3"+ + "\2\2\2\u0202=\3\2\2\2\u0203\u0205\7O\2\2\u0204\u0206\5B\"\2\u0205\u0204"+ + "\3\2\2\2\u0205\u0206\3\2\2\2\u0206?\3\2\2\2\u0207\u0208\7L\2\2\u0208\u020d"+ + "\5D#\2\u0209\u020a\7\5\2\2\u020a\u020c\5D#\2\u020b\u0209\3\2\2\2\u020c"+ + "\u020f\3\2\2\2\u020d\u020b\3\2\2\2\u020d\u020e\3\2\2\2\u020eA\3\2\2\2"+ + "\u020f\u020d\3\2\2\2\u0210\u0228\5D#\2\u0211\u0212\7M\2\2\u0212\u0228"+ + "\5D#\2\u0213\u0214\5D#\2\u0214\u0215\7\5\2\2\u0215\u0216\7^\2\2\u0216"+ + "\u0228\3\2\2\2\u0217\u0218\7\7\2\2\u0218\u0219\5D#\2\u0219\u021a\7\b\2"+ + "\2\u021a\u021b\7\5\2\2\u021b\u021c\7^\2\2\u021c\u0228\3\2\2\2\u021d\u021e"+ + "\7\7\2\2\u021e\u021f\5D#\2\u021f\u0220\7\5\2\2\u0220\u0221\7^\2\2\u0221"+ + "\u0222\7\b\2\2\u0222\u0228\3\2\2\2\u0223\u0224\7\7\2\2\u0224\u0225\5D"+ + "#\2\u0225\u0226\7\b\2\2\u0226\u0228\3\2\2\2\u0227\u0210\3\2\2\2\u0227"+ + "\u0211\3\2\2\2\u0227\u0213\3\2\2\2\u0227\u0217\3\2\2\2\u0227\u021d\3\2"+ + "\2\2\u0227\u0223\3\2\2\2\u0228C\3\2\2\2\u0229\u022a\b#\1\2\u022a\u022b"+ + "\7!\2\2\u022b\u022c\5D#\2\u022c\u022d\7\"\2\2\u022d\u0238\3\2\2\2\u022e"+ + "\u022f\t\13\2\2\u022f\u0238\5D#\n\u0230\u0238\7^\2\2\u0231\u0238\7_\2"+ + "\2\u0232\u0233\7\t\2\2\u0233\u0234\7^\2\2\u0234\u0238\7\n\2\2\u0235\u0238"+ + "\7U\2\2\u0236\u0238\7S\2\2\u0237\u0229\3\2\2\2\u0237\u022e\3\2\2\2\u0237"+ + "\u0230\3\2\2\2\u0237\u0231\3\2\2\2\u0237\u0232\3\2\2\2\u0237\u0235\3\2"+ + "\2\2\u0237\u0236\3\2\2\2\u0238\u0247\3\2\2\2\u0239\u023a\f\f\2\2\u023a"+ + "\u023b\7N\2\2\u023b\u0246\5D#\r\u023c\u023d\f\13\2\2\u023d\u023e\t\6\2"+ + "\2\u023e\u0246\5D#\f\u023f\u0240\f\t\2\2\u0240\u0241\t\f\2\2\u0241\u0246"+ + "\5D#\n\u0242\u0243\f\b\2\2\u0243\u0244\t\b\2\2\u0244\u0246\5D#\t\u0245"+ + "\u0239\3\2\2\2\u0245\u023c\3\2\2\2\u0245\u023f\3\2\2\2\u0245\u0242\3\2"+ + "\2\2\u0246\u0249\3\2\2\2\u0247\u0245\3\2\2\2\u0247\u0248\3\2\2\2\u0248"+ + "E\3\2\2\2\u0249\u0247\3\2\2\2;PYafm{\u0081\u0087\u008c\u0095\u009c\u00b1"+ "\u00b4\u00bd\u00c5\u00cc\u00d9\u00de\u00ea\u00f8\u0103\u010c\u0113\u011a"+ "\u011d\u0125\u0128\u012b\u0135\u0137\u013e\u0144\u0146\u0151\u015d\u0165"+ - "\u017c\u0186\u01b2\u01bc\u01be\u01c6\u01cb\u01d5\u01e7\u01e9\u01ee\u01f4"+ - "\u01fa\u01fd\u0201\u0209\u0223\u0233\u0241\u0243"; + "\u017c\u0186\u018a\u01b6\u01c0\u01c2\u01ca\u01cf\u01d9\u01eb\u01ed\u01f2"+ + "\u01f8\u01fe\u0201\u0205\u020d\u0227\u0237\u0245\u0247"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCVisitor.java b/src/main/java/dk/camelot64/kickc/parser/KickCVisitor.java index 84d1ddcb7..98035b89e 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCVisitor.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCVisitor.java @@ -1,4 +1,4 @@ -// Generated from /Users/jespergravgaard/c64/kickc/src/main/java/dk/camelot64/kickc/parser/KickC.g4 by ANTLR 4.7 +// Generated from C:/c64/kickc/src/main/java/dk/camelot64/kickc/parser\KickC.g4 by ANTLR 4.7 package dk.camelot64.kickc.parser; import org.antlr.v4.runtime.tree.ParseTreeVisitor; diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java b/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java index 2a5e5faea..63febda6c 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java @@ -1307,12 +1307,18 @@ public class Pass0GenerateStatementSequence extends KickCBaseVisitor { @Override public RValue visitExprString(KickCParser.ExprStringContext ctx) { - String text = ctx.getText(); - String stringValue; - if(text.endsWith("z")) { - stringValue = text.substring(1, text.length() - 2); - } else { - stringValue = text.substring(1, text.length() - 1)+"@"; + String stringValue =""; + String subText = ""; + for(TerminalNode stringNode : ctx.STRING()) { + subText = stringNode.getText(); + if(subText.endsWith("z")) { + stringValue += subText.substring(1, subText.length() - 2); + } else { + stringValue += subText.substring(1, subText.length() - 1); + } + } + if(!subText.endsWith("z")) { + stringValue += "@"; } return new ConstantString(stringValue); } diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 23c2cc2b7..5fb692d96 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -32,23 +32,9 @@ public class TestPrograms { public TestPrograms() { } - /* - * Avaiting String concatenation - @Test - public void testLiterals() throws IOException, URISyntaxException { - compileAndCompare("literals"); - } - - - @Test - public void testConstantStringConcat() throws IOException, URISyntaxException { - compileAndCompare("constant-string-concat"); - } - - @Test - public void testConcatChar() throws IOException, URISyntaxException { - compileAndCompare("concat-char"); + public void testC64DtvGfxExplorer() throws IOException, URISyntaxException { + compileAndCompare("c64dtv-gfxexplorer", 10); } @Test @@ -57,11 +43,20 @@ public class TestPrograms { } @Test - public void testC64DtvGfxExplorer() throws IOException, URISyntaxException { - compileAndCompare("c64dtv-gfxexplorer", 10); + public void testConstantStringConcat0() throws IOException, URISyntaxException { + compileAndCompare("constant-string-concat-0", log().verboseParse().verboseStatementSequence().verboseCreateSsa()); } - */ + @Test + public void testLiterals() throws IOException, URISyntaxException { + compileAndCompare("literals"); + } + + + @Test + public void testConstantStringConcat() throws IOException, URISyntaxException { + compileAndCompare("constant-string-concat"); + } @Test public void testStatementSequence1() throws IOException, URISyntaxException { diff --git a/src/test/kc/c64dtv-gfxexplorer.kc b/src/test/kc/c64dtv-gfxexplorer.kc index 0eba729d9..6c35edfb6 100644 --- a/src/test/kc/c64dtv-gfxexplorer.kc +++ b/src/test/kc/c64dtv-gfxexplorer.kc @@ -115,40 +115,40 @@ const byte* FORM_SCREEN = $0400; const byte* FORM_CHARSET = $1800; // Charset ROM byte[] FORM_TEXT = - " C64 DTV Graphics Mode Explorer @"z + - " @"z + - " PRESET 0 Standard Charset @"z + - " @"z + - " CONTROL PLANE A VIC II @"z + - " bmm 0 pattern p0 screen s0 @"z + - " mcm 0 start 00 gfx g0 @"z + - " ecm 0 step 00 colors c0 @"z + - " hicolor 0 modulo 00 @"z + - " linear 0 COLORS @"z + - " color off 0 PLANE B palet 0 @"z + - " chunky 0 pattern p0 bgcol0 00 @"z + - " border off 0 start 00 bgcol1 00 @"z + - " overscan 0 step 00 bgcol2 00 @"z + - " modulo 00 bgcol3 00 @"z + - "@"z ; + " C64 DTV Graphics Mode Explorer @" + " @" + " PRESET 0 Standard Charset @" + " @" + " CONTROL PLANE A VIC II @" + " bmm 0 pattern p0 screen s0 @" + " mcm 0 start 00 gfx g0 @" + " ecm 0 step 00 colors c0 @" + " hicolor 0 modulo 00 @" + " linear 0 COLORS @" + " color off 0 PLANE B palet 0 @" + " chunky 0 pattern p0 bgcol0 00 @" + " border off 0 start 00 bgcol1 00 @" + " overscan 0 step 00 bgcol2 00 @" + " modulo 00 bgcol3 00 @" + ; byte[] FORM_COLS = - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@"z + - " @"z + - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@"z + - " @"z + - " nnnnnnnnnnnn mmmmmmmmmm ooooooooo @"z + - " nnnnnnnnnnnn mmmmmmmmmm ooooooooo @"z + - " nnnnnnnnnnnn mmmmmmmmmm ooooooooo @"z + - " nnnnnnnnnnnn mmmmmmmmmm ooooooooo @"z + - " nnnnnnnnnnnn mmmmmmmmmm @"z + - " nnnnnnnnnnnn jjjjjjjjj @"z + - " nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @"z + - " nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @"z + - " nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @"z + - " nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @"z + - " nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @"z + - " nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @"z + - "@"z ; + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@" + " @" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@" + " @" + " nnnnnnnnnnnn mmmmmmmmmm ooooooooo @" + " nnnnnnnnnnnn mmmmmmmmmm ooooooooo @" + " nnnnnnnnnnnn mmmmmmmmmm ooooooooo @" + " nnnnnnnnnnnn mmmmmmmmmm ooooooooo @" + " nnnnnnnnnnnn mmmmmmmmmm @" + " nnnnnnnnnnnn jjjjjjjjj @" + " nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @" + " nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @" + " nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @" + " nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @" + " nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @" + " nnnnnnnnnnnn mmmmmmmmmm jjjjjjjjj @" + ; // Number of form fields byte form_fields_cnt = 36; diff --git a/src/test/kc/c64dtv-gfxmodes.kc b/src/test/kc/c64dtv-gfxmodes.kc index 79a3bd30c..87dcd7a88 100644 --- a/src/test/kc/c64dtv-gfxmodes.kc +++ b/src/test/kc/c64dtv-gfxmodes.kc @@ -18,27 +18,28 @@ void main() { } byte[] MENU_TEXT = - "C64DTV Graphics Modes CCLHBME@"z + - " OHIIMCC@"z + - " LUNCMMM@"z + - "----------------------------------------@"z + - "1. Standard Char (V) 0000000@"z + - "2. Extended Color Char (V) 0000001@"z + - "3. Multicolor Char (V) 0000010@"z + - "4. Standard Bitmap (V) 0000100@"z + - "5. Multicolor Bitmap (V) 0000110@"z + - "6. High Color Standard Char (H) 0001000@"z + - "7. High Extended Color Char (H) 0001001@"z + - "8. High Multicolor Char (H) 0001010@"z + - "9. High Multicolor Bitmap (H) 0001110@"z + - "a. Sixs Fred 2 (D) 0010111@"z + - "b. Two Plane Bitmap (D) 0011101@"z + - "c. Sixs Fred (2 Plane MC BM) (D) 0011111@"z + - "d. 8bpp Pixel Cell (D) 0111011@"z + - "e. Chunky 8bpp Bitmap (D) 1111011@"z + - "----------------------------------------@"z + - " (V) vicII (H) vicII+hicol (D) c64dtv@"z + - "@"z ; + "C64DTV Graphics Modes CCLHBME@" + " OHIIMCC@" + " LUNCMMM@" + "----------------------------------------@" + "1. Standard Char (V) 0000000@" + "2. Extended Color Char (V) 0000001@" + "3. Multicolor Char (V) 0000010@" + "4. Standard Bitmap (V) 0000100@" + "5. Multicolor Bitmap (V) 0000110@" + "6. High Color Standard Char (H) 0001000@" + "7. High Extended Color Char (H) 0001001@" + "8. High Multicolor Char (H) 0001010@" + "9. High Multicolor Bitmap (H) 0001110@" + "a. Sixs Fred 2 (D) 0010111@" + "b. Two Plane Bitmap (D) 0011101@" + "c. Sixs Fred (2 Plane MC BM) (D) 0011111@" + "d. 8bpp Pixel Cell (D) 0111011@" + "e. Chunky 8bpp Bitmap (D) 1111011@" + "----------------------------------------@" + " (V) vicII (H) vicII+hicol (D) c64dtv@" + ; + void menu() { const byte* SCREEN = $8000; diff --git a/src/test/kc/concat-char.kc b/src/test/kc/concat-char.kc deleted file mode 100644 index c51f6ae5c..000000000 --- a/src/test/kc/concat-char.kc +++ /dev/null @@ -1,10 +0,0 @@ -// Concatenate a char to a string - -void main() { - byte* screen = $400; - byte l = 'l'; - byte[] msg = "cm"z+l; - for( byte i: 0..2 ) { - screen[i] = msg[i]; - } -} \ No newline at end of file diff --git a/src/test/kc/constant-string-concat-0.kc b/src/test/kc/constant-string-concat-0.kc new file mode 100644 index 000000000..f3b35771b --- /dev/null +++ b/src/test/kc/constant-string-concat-0.kc @@ -0,0 +1,8 @@ +// Concatenates string constants in different ways +void main() { + byte[] msg = "camel" "ot"; + byte* SCREEN = 0x0400; + for( byte i=0;msg[i]!=0;i++) { + SCREEN[i] = msg[i]; + } +} \ No newline at end of file diff --git a/src/test/kc/constant-string-concat.kc b/src/test/kc/constant-string-concat.kc index 218825e62..0acbe2a1a 100644 --- a/src/test/kc/constant-string-concat.kc +++ b/src/test/kc/constant-string-concat.kc @@ -1,13 +1,10 @@ // Concatenates string constants in different ways void main() { - byte[] s = "e"z+"l"z; - byte[] s2 = s+'o'; - byte[] s3 = "cam"z+s2; - byte e = '!'; - byte[] s4 = ""z+'t'+ e; - byte[] s5 = s3+s4; + byte[] s = "c" + "ame" + "lot"; byte* SCREEN = $400; for( byte i: 0..7) { - SCREEN[i] = s5[i]; + SCREEN[i] = s[i]; } } \ No newline at end of file diff --git a/src/test/kc/literals.kc b/src/test/kc/literals.kc index e72097339..043c30658 100644 --- a/src/test/kc/literals.kc +++ b/src/test/kc/literals.kc @@ -2,7 +2,7 @@ byte* SCREEN = $0400; byte ch = 'a'; byte num = 1; -byte[] str = "bc"z+"d"z+'e'; +byte[] str = "bc" "d" "e"; byte[] nums = { 2, 3, 4, 5}; void main() { diff --git a/src/test/ref/c64dtv-gfxexplorer.asm b/src/test/ref/c64dtv-gfxexplorer.asm index a1a01b569..18ca5b0bb 100644 --- a/src/test/ref/c64dtv-gfxexplorer.asm +++ b/src/test/ref/c64dtv-gfxexplorer.asm @@ -130,41 +130,6 @@ .const FORM_CURSOR_BLINK = $28 // Any shift is pressed .const KEY_MODIFIER_SHIFT = KEY_MODIFIER_LSHIFT|KEY_MODIFIER_RSHIFT - .label form_ctrl_bmm = form_fields_val+1 - .label form_ctrl_mcm = form_fields_val+2 - .label form_ctrl_ecm = form_fields_val+3 - .label form_ctrl_hicol = form_fields_val+4 - .label form_ctrl_line = form_fields_val+5 - .label form_ctrl_colof = form_fields_val+6 - .label form_ctrl_chunk = form_fields_val+7 - .label form_ctrl_borof = form_fields_val+8 - .label form_ctrl_overs = form_fields_val+9 - .label form_a_pattern = form_fields_val+$a - .label form_a_start_hi = form_fields_val+$b - .label form_a_start_lo = form_fields_val+$c - .label form_a_step_hi = form_fields_val+$d - .label form_a_step_lo = form_fields_val+$e - .label form_a_mod_hi = form_fields_val+$f - .label form_a_mod_lo = form_fields_val+$10 - .label form_b_pattern = form_fields_val+$11 - .label form_b_start_hi = form_fields_val+$12 - .label form_b_start_lo = form_fields_val+$13 - .label form_b_step_hi = form_fields_val+$14 - .label form_b_step_lo = form_fields_val+$15 - .label form_b_mod_hi = form_fields_val+$16 - .label form_b_mod_lo = form_fields_val+$17 - .label form_vic_screen = form_fields_val+$18 - .label form_vic_gfx = form_fields_val+$19 - .label form_vic_cols = form_fields_val+$1a - .label form_dtv_palet = form_fields_val+$1b - .label form_vic_bg0_hi = form_fields_val+$1c - .label form_vic_bg0_lo = form_fields_val+$1d - .label form_vic_bg1_hi = form_fields_val+$1e - .label form_vic_bg1_lo = form_fields_val+$1f - .label form_vic_bg2_hi = form_fields_val+$20 - .label form_vic_bg2_lo = form_fields_val+$21 - .label form_vic_bg3_hi = form_fields_val+$22 - .label form_vic_bg3_lo = form_fields_val+$23 .label print_char_cursor = 5 .label print_line_cursor = $10 .label keyboard_events_size = 8 @@ -196,61 +161,61 @@ main: { // Change graphics mode to show the selected graphics mode gfx_mode: { .label _22 = 9 - .label _24 = 3 .label _26 = 3 .label _28 = 3 .label _36 = 9 - .label _38 = 3 .label _40 = 3 .label _42 = 3 .label _52 = 3 + .label _53 = 3 .label _54 = 3 .label _55 = 3 .label _56 = 2 .label _57 = 3 + .label _58 = 3 .label _59 = 3 .label plane_a = 9 .label plane_b = 9 .label vic_colors = 3 .label col = 5 .label cy = 2 - lda form_ctrl_line + lda form_fields_val+5 cmp #0 beq b10 - ldx #0|DTV_LINEAR + ldx #DTV_LINEAR jmp b1 b10: ldx #0 b1: - lda form_ctrl_borof + lda form_fields_val+8 cmp #0 beq b2 txa ora #DTV_BORDER_OFF tax b2: - lda form_ctrl_hicol + lda form_fields_val+4 cmp #0 beq b3 txa ora #DTV_HIGHCOLOR tax b3: - lda form_ctrl_overs + lda form_fields_val+9 cmp #0 beq b4 txa ora #DTV_OVERSCAN tax b4: - lda form_ctrl_colof + lda form_fields_val+6 cmp #0 beq b5 txa ora #DTV_COLORRAM_OFF tax b5: - lda form_ctrl_chunk + lda form_fields_val+7 cmp #0 beq b6 txa @@ -258,7 +223,7 @@ gfx_mode: { tax b6: stx DTV_CONTROL - lda form_ctrl_ecm + lda form_fields_val+3 cmp #0 beq b11 ldx #VIC_DEN|VIC_RSEL|3|VIC_ECM @@ -266,7 +231,7 @@ gfx_mode: { b11: ldx #VIC_DEN|VIC_RSEL|3 b7: - lda form_ctrl_bmm + lda form_fields_val+1 cmp #0 beq b8 txa @@ -274,7 +239,7 @@ gfx_mode: { tax b8: stx VIC_CONTROL - lda form_ctrl_mcm + lda form_fields_val+2 cmp #0 beq b12 lda #VIC_CSEL|VIC_MCM @@ -283,14 +248,14 @@ gfx_mode: { lda #VIC_CSEL b9: sta VIC_CONTROL2 - lda form_a_start_hi + lda form_fields_val+$b asl asl asl asl - ora form_a_start_lo + ora form_fields_val+$c tax - lda form_a_pattern + lda form_fields_val+$a jsr get_plane txa clc @@ -306,15 +271,12 @@ gfx_mode: { adc #0 sta plane_a+3 lda plane_a - sta _24 - lda plane_a+1 - sta _24+1 - lda _24 - sta DTV_PLANEA_START_LO - lda plane_a sta _26 lda plane_a+1 sta _26+1 + lda _26 + sta DTV_PLANEA_START_LO + lda _26+1 sta DTV_PLANEA_START_MI lda plane_a+2 sta _28 @@ -322,30 +284,30 @@ gfx_mode: { sta _28+1 lda _28 sta DTV_PLANEA_START_HI - lda form_a_step_hi + lda form_fields_val+$d asl asl asl asl - ora form_a_step_lo + ora form_fields_val+$e sta DTV_PLANEA_STEP - lda form_a_mod_hi + lda form_fields_val+$f asl asl asl asl - ora form_a_mod_lo + ora form_fields_val+$10 sta DTV_PLANEA_MODULO_LO lda #0 sta DTV_PLANEA_MODULO_HI - lda form_b_start_hi + lda form_fields_val+$12 asl asl asl asl - ora form_b_start_lo + ora form_fields_val+$13 tax - lda form_b_pattern + lda form_fields_val+$11 jsr get_plane txa clc @@ -361,15 +323,12 @@ gfx_mode: { adc #0 sta plane_b+3 lda plane_b - sta _38 - lda plane_b+1 - sta _38+1 - lda _38 - sta DTV_PLANEB_START_LO - lda plane_b sta _40 lda plane_b+1 sta _40+1 + lda _40 + sta DTV_PLANEB_START_LO + lda _40+1 sta DTV_PLANEB_START_MI lda plane_b+2 sta _42 @@ -377,19 +336,19 @@ gfx_mode: { sta _42+1 lda _42 sta DTV_PLANEB_START_HI - lda form_b_step_hi + lda form_fields_val+$14 asl asl asl asl - ora form_b_step_lo + ora form_fields_val+$15 sta DTV_PLANEB_STEP - lda form_b_mod_hi + lda form_fields_val+$16 asl asl asl asl - ora form_b_mod_lo + ora form_fields_val+$17 sta DTV_PLANEB_MODULO_LO lda #0 sta DTV_PLANEB_MODULO_HI @@ -399,7 +358,7 @@ gfx_mode: { // Set VIC Bank bits to output - all others to input lda #3^VIC_SCREEN0/$4000 sta CIA2_PORT_A - lda form_vic_screen + lda form_fields_val+$18 jsr get_vic_screen lda _54 and #<$3fff @@ -415,7 +374,7 @@ gfx_mode: { bne !- lda _55 sta _56 - lda form_vic_gfx + lda form_fields_val+$19 jsr get_vic_charset lda _59 and #<$3fff @@ -429,7 +388,7 @@ gfx_mode: { // Set VIC Bank // VIC memory sta VIC_MEMORY - lda form_vic_cols + lda form_fields_val+$1a jsr get_vic_screen lda #0 sta cy @@ -461,36 +420,36 @@ gfx_mode: { // Background colors lda #0 sta BORDERCOL - lda form_vic_bg0_hi + lda form_fields_val+$1c asl asl asl asl - ora form_vic_bg0_lo + ora form_fields_val+$1d sta BGCOL1 - lda form_vic_bg1_hi + lda form_fields_val+$1e asl asl asl asl - ora form_vic_bg1_lo + ora form_fields_val+$1f sta BGCOL2 - lda form_vic_bg2_hi + lda form_fields_val+$20 asl asl asl asl - ora form_vic_bg2_lo + ora form_fields_val+$21 sta BGCOL3 - lda form_vic_bg3_hi + lda form_fields_val+$22 asl asl asl asl - ora form_vic_bg3_lo + ora form_fields_val+$23 sta BGCOL4 // DTV Palette - lda form_dtv_palet + lda form_fields_val+$1b cmp #0 beq b13 ldx #0 @@ -508,7 +467,9 @@ gfx_mode: { jsr keyboard_event_scan jsr keyboard_event_get cmp #KEY_SPACE - bne b25 + beq breturn + jmp b25 + breturn: rts // DTV Palette - default b13: @@ -567,7 +528,7 @@ keyboard_event_scan: { jsr keyboard_event_pressed cmp #0 beq b4 - ldx #0|KEY_MODIFIER_LSHIFT + ldx #KEY_MODIFIER_LSHIFT jmp b1 b4: ldx #0 @@ -679,39 +640,39 @@ keyboard_matrix_read: { get_vic_screen: { .label return = 3 cmp #0 - beq b2 + beq b1 cmp #1 - beq b3 + beq b2 cmp #2 - beq b4 + beq b3 cmp #3 - beq b5 + beq b4 cmp #4 - bne b2 + bne b1 lda #VIC_SCREEN4 sta return+1 rts - b2: + b1: lda #VIC_SCREEN0 sta return+1 rts - b3: + b2: lda #VIC_SCREEN1 sta return+1 rts - b4: + b3: lda #VIC_SCREEN2 sta return+1 rts - b5: + b4: lda #VIC_SCREEN3 @@ -723,15 +684,15 @@ get_vic_screen: { get_vic_charset: { .label return = 3 cmp #0 - beq b2 + beq b1 cmp #1 - bne b2 + bne b1 lda #VIC_BITMAP sta return+1 rts - b2: + b1: lda #VIC_CHARSET_ROM @@ -785,7 +746,7 @@ get_plane: { cmp #$c beq b6 cmp #$d - bne b2 + bne b1 lda #PLANE_FULL @@ -795,14 +756,24 @@ get_plane: { lda #>PLANE_FULL>>$10 sta return+3 rts - b2: - lda #<$ffffffff&VIC_SCREEN0 + b1: + lda #$ffffffff&VIC_SCREEN0 + lda #>VIC_SCREEN0 sta return+1 - lda #<$ffffffff&VIC_SCREEN0>>$10 + lda #>$10 sta return+2 - lda #>$ffffffff&VIC_SCREEN0>>$10 + lda #>VIC_SCREEN0>>$10 + sta return+3 + rts + b2: + lda #VIC_SCREEN0 + sta return+1 + lda #>$10 + sta return+2 + lda #>VIC_SCREEN0>>$10 sta return+3 rts b3: @@ -846,53 +817,53 @@ get_plane: { sta return+3 rts b7: - lda #<$ffffffff&VIC_SCREEN1 + lda #$ffffffff&VIC_SCREEN1 + lda #>VIC_SCREEN1 sta return+1 - lda #<$ffffffff&VIC_SCREEN1>>$10 + lda #>$10 sta return+2 - lda #>$ffffffff&VIC_SCREEN1>>$10 + lda #>VIC_SCREEN1>>$10 sta return+3 rts b8: - lda #<$ffffffff&VIC_SCREEN2 + lda #$ffffffff&VIC_SCREEN2 + lda #>VIC_SCREEN2 sta return+1 - lda #<$ffffffff&VIC_SCREEN2>>$10 + lda #>$10 sta return+2 - lda #>$ffffffff&VIC_SCREEN2>>$10 + lda #>VIC_SCREEN2>>$10 sta return+3 rts b9: - lda #<$ffffffff&VIC_SCREEN3 + lda #$ffffffff&VIC_SCREEN3 + lda #>VIC_SCREEN3 sta return+1 - lda #<$ffffffff&VIC_SCREEN3>>$10 + lda #>$10 sta return+2 - lda #>$ffffffff&VIC_SCREEN3>>$10 + lda #>VIC_SCREEN3>>$10 sta return+3 rts b10: - lda #<$ffffffff&VIC_BITMAP + lda #$ffffffff&VIC_BITMAP + lda #>VIC_BITMAP sta return+1 - lda #<$ffffffff&VIC_BITMAP>>$10 + lda #>$10 sta return+2 - lda #>$ffffffff&VIC_BITMAP>>$10 + lda #>VIC_BITMAP>>$10 sta return+3 rts b11: - lda #<$ffffffff&VIC_CHARSET_ROM + lda #$ffffffff&VIC_CHARSET_ROM + lda #>VIC_CHARSET_ROM sta return+1 - lda #<$ffffffff&VIC_CHARSET_ROM>>$10 + lda #>$10 sta return+2 - lda #>$ffffffff&VIC_CHARSET_ROM>>$10 + lda #>VIC_CHARSET_ROM>>$10 sta return+3 rts b12: @@ -956,10 +927,10 @@ form_mode: { lda form_fields_val jsr render_preset_name // DTV Graphics Bank - lda #($ffffffff&FORM_CHARSET)/$10000 + lda #0 sta DTV_GRAPHICS_VIC_BANK // DTV Color Bank - lda #DTV_COLOR_BANK_DEFAULT/$400 + lda #FORM_SCREEN sta DTV_PLANEA_START_MI @@ -1030,93 +1000,93 @@ form_mode: { render_preset_name: { .label name = 3 cmp #0 - beq b12 - cmp #1 - beq b4 - cmp #2 - beq b5 - cmp #3 - beq b6 - cmp #4 - beq b7 - cmp #5 - beq b8 - cmp #6 - beq b9 - cmp #7 - beq b10 - cmp #8 - beq b11 - cmp #9 - beq b2 - cmp #$a beq b3 - b12: + cmp #1 + beq b6 + cmp #2 + beq b7 + cmp #3 + beq b8 + cmp #4 + beq b9 + cmp #5 + beq b10 + cmp #6 + beq b11 + cmp #7 + beq b12 + cmp #8 + beq b4 + cmp #9 + beq b5 + cmp #$a + beq b1 + b3: lda #name_1 sta name+1 - jmp b1 - b2: - lda #name_10 - sta name+1 - jmp b1 - b3: + jmp b2 + b1: lda #name_11 sta name+1 - jmp b1 + jmp b2 b4: - lda #name_2 - sta name+1 - jmp b1 - b5: - lda #name_3 - sta name+1 - jmp b1 - b6: - lda #name_4 - sta name+1 - jmp b1 - b7: - lda #name_5 - sta name+1 - jmp b1 - b8: - lda #name_6 - sta name+1 - jmp b1 - b9: - lda #name_7 - sta name+1 - jmp b1 - b10: - lda #name_8 - sta name+1 - jmp b1 - b11: lda #name_9 sta name+1 - b1: + jmp b2 + b5: + lda #name_10 + sta name+1 + jmp b2 + b6: + lda #name_2 + sta name+1 + jmp b2 + b7: + lda #name_3 + sta name+1 + jmp b2 + b8: + lda #name_4 + sta name+1 + jmp b2 + b9: + lda #name_5 + sta name+1 + jmp b2 + b10: + lda #name_6 + sta name+1 + jmp b2 + b11: + lda #name_7 + sta name+1 + jmp b2 + b12: + lda #name_8 + sta name+1 + b2: jsr print_str_at rts name_1: .text "Standard Charset @" @@ -1168,7 +1138,7 @@ form_render_values: { ldy form_fields_val,x lda print_hextab,y ldy form_field_ptr.x - sta (form_field_ptr._2),y + sta (form_field_ptr.line),y inx cpx #form_fields_cnt bcc b1 @@ -1178,6 +1148,7 @@ form_render_values: { // field_idx is the index of the field to get the screen address for // form_field_ptr(byte register(X) field_idx) form_field_ptr: { + .label line = 3 .label x = $13 .label _2 = 3 lda form_fields_y,x @@ -1196,93 +1167,93 @@ form_field_ptr: { apply_preset: { .label preset = 3 cmp #0 - beq b12 - cmp #1 - beq b4 - cmp #2 - beq b5 - cmp #3 - beq b6 - cmp #4 - beq b7 - cmp #5 - beq b8 - cmp #6 - beq b9 - cmp #7 - beq b10 - cmp #8 - beq b11 - cmp #9 - beq b2 - cmp #$a beq b3 - b12: + cmp #1 + beq b6 + cmp #2 + beq b7 + cmp #3 + beq b8 + cmp #4 + beq b9 + cmp #5 + beq b10 + cmp #6 + beq b11 + cmp #7 + beq b12 + cmp #8 + beq b4 + cmp #9 + beq b5 + cmp #$a + beq b1 + b3: lda #preset_stdchar sta preset+1 - jmp b1 - b2: - lda #preset_sixsfred2 - sta preset+1 - jmp b1 - b3: + jmp b2 + b1: lda #preset_8bpppixelcell sta preset+1 - jmp b1 + jmp b2 b4: - lda #preset_ecmchar - sta preset+1 - jmp b1 - b5: - lda #preset_stdbm - sta preset+1 - jmp b1 - b6: - lda #preset_mcbm - sta preset+1 - jmp b1 - b7: - lda #preset_hi_stdchar - sta preset+1 - jmp b1 - b8: - lda #preset_hi_ecmchar - sta preset+1 - jmp b1 - b9: - lda #preset_twoplane - sta preset+1 - jmp b1 - b10: - lda #preset_chunky - sta preset+1 - jmp b1 - b11: lda #preset_sixsfred sta preset+1 - b1: + jmp b2 + b5: + lda #preset_sixsfred2 + sta preset+1 + jmp b2 + b6: + lda #preset_ecmchar + sta preset+1 + jmp b2 + b7: + lda #preset_stdbm + sta preset+1 + jmp b2 + b8: + lda #preset_mcbm + sta preset+1 + jmp b2 + b9: + lda #preset_hi_stdchar + sta preset+1 + jmp b2 + b10: + lda #preset_hi_ecmchar + sta preset+1 + jmp b2 + b11: + lda #preset_twoplane + sta preset+1 + jmp b2 + b12: + lda #preset_chunky + sta preset+1 + b2: ldy #0 // Copy preset values into the fields b13: @@ -1316,8 +1287,8 @@ form_control: { !b2: lda #$7f ldy form_field_ptr.x - and (form_field_ptr._2),y - sta (form_field_ptr._2),y + and (form_field_ptr.line),y + sta (form_field_ptr.line),y b3: jsr keyboard_event_scan jsr keyboard_event_get @@ -1325,78 +1296,78 @@ form_control: { bne b4 lda #$7f ldy form_field_ptr.x - and (form_field_ptr._2),y + and (form_field_ptr.line),y // Unblink the cursor - sta (form_field_ptr._2),y + sta (form_field_ptr.line),y txa and #KEY_MODIFIER_SHIFT cmp #0 - beq b12 + beq b13 dec form_field_idx lda #$ff cmp form_field_idx - bne b13 + bne b14 lda #form_fields_cnt-1 sta form_field_idx - b13: + b14: lda #FORM_CURSOR_BLINK/2 sta form_cursor_count ldx #0 rts - b12: + b13: inc form_field_idx lda #form_fields_cnt cmp form_field_idx - bne b13 + bne b14 lda #0 sta form_field_idx - jmp b13 + jmp b14 b4: cmp #KEY_CRSR_RIGHT bne b5 txa and #KEY_MODIFIER_SHIFT cmp #0 - beq b14 + beq b15 ldx form_field_idx dec form_fields_val,x lda #$ff ldy form_field_idx cmp form_fields_val,y - bne b15 + bne b16 lda form_fields_max,y sta form_fields_val,y - b15: + b16: // Render field value ldx form_field_idx ldy form_fields_val,x lda print_hextab,y ldy form_field_ptr.x - sta (form_field_ptr._2),y - b6: + sta (form_field_ptr.line),y + b7: ldx #0 rts - b14: + b15: ldx form_field_idx inc form_fields_val,x ldy form_field_idx lda form_fields_val,y cmp form_fields_max,y - bcc b15 - beq b15 + bcc b16 + beq b16 lda #0 sta form_fields_val,y - jmp b15 + jmp b16 b5: cmp #KEY_SPACE - bne b6 + bne b7 ldx #$ff rts b2: lda #$80 ldy form_field_ptr.x - ora (form_field_ptr._2),y - sta (form_field_ptr._2),y + ora (form_field_ptr.line),y + sta (form_field_ptr.line),y jmp b3 } // Set the screen to use for the form. @@ -1680,9 +1651,9 @@ gfx_init_plane_horisontal2: { .label ay = 2 lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 - lda #<$4000+(PLANE_HORISONTAL2&$3fff) + lda #<$4000 sta gfxa - lda #>$4000+(PLANE_HORISONTAL2&$3fff) + lda #>$4000 sta gfxa+1 lda #0 sta ay @@ -1753,9 +1724,9 @@ gfx_init_plane_horisontal: { .label ay = 2 lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 - lda #<$4000+(PLANE_HORISONTAL&$3fff) + lda #<$4000 sta gfxa - lda #>$4000+(PLANE_HORISONTAL&$3fff) + lda #>$4000 sta gfxa+1 lda #0 sta ay @@ -1810,9 +1781,9 @@ gfx_init_plane_charset8: { lda #0 sta ch sta col - lda #<$4000+(PLANE_CHARSET8&$3fff) + lda #<$4000 sta gfxa - lda #>$4000+(PLANE_CHARSET8&$3fff) + lda #>$4000 sta gfxa+1 lda #>$10 + lda #>$10 sta DTV_PLANEB_START_HI lda #8 sta DTV_PLANEB_STEP @@ -525,7 +524,7 @@ mode_8bpppixelcell: { lda #VIC_MCM|VIC_CSEL sta VIC_CONTROL2 // Linear Graphics Plane A Counter - lda #PLANEA sta DTV_PLANEA_START_MI @@ -537,7 +536,6 @@ mode_8bpppixelcell: { sta DTV_PLANEA_MODULO_LO sta DTV_PLANEA_MODULO_HI // Linear Graphics Plane B Counter - lda #PLANEB sta DTV_PLANEB_START_MI @@ -674,7 +672,7 @@ mode_sixsfred: { lda #VIC_MCM|VIC_CSEL sta VIC_CONTROL2 // Linear Graphics Plane A Counter - lda #PLANEA sta DTV_PLANEA_START_MI @@ -686,7 +684,6 @@ mode_sixsfred: { sta DTV_PLANEA_MODULO_LO sta DTV_PLANEA_MODULO_HI // Linear Graphics Plane B Counter - lda #PLANEB sta DTV_PLANEB_START_MI @@ -700,9 +697,9 @@ mode_sixsfred: { // DTV Color Bank lda #COLORS/$400 + lda #0 sta DTV_COLOR_BANK_HI - ldx #0 + tax // DTV Palette - Grey Tones b1: txa @@ -823,7 +820,7 @@ mode_twoplanebitmap: { lda #VIC_CSEL sta VIC_CONTROL2 // Linear Graphics Plane A Counter - lda #PLANEA sta DTV_PLANEA_START_MI @@ -835,7 +832,6 @@ mode_twoplanebitmap: { sta DTV_PLANEA_MODULO_LO sta DTV_PLANEA_MODULO_HI // Linear Graphics Plane B Counter - lda #PLANEB sta DTV_PLANEB_START_MI @@ -849,9 +845,9 @@ mode_twoplanebitmap: { // DTV Color Bank lda #COLORS/$400 + lda #0 sta DTV_COLOR_BANK_HI - ldx #0 + tax // DTV Palette - Grey Tones b1: txa @@ -989,7 +985,7 @@ mode_sixsfred2: { lda #VIC_MCM|VIC_CSEL sta VIC_CONTROL2 // Linear Graphics Plane A Counter - lda #PLANEA sta DTV_PLANEA_START_MI @@ -1001,7 +997,6 @@ mode_sixsfred2: { sta DTV_PLANEA_MODULO_LO sta DTV_PLANEA_MODULO_HI // Linear Graphics Plane B Counter - lda #PLANEB sta DTV_PLANEB_START_MI @@ -1015,9 +1010,9 @@ mode_sixsfred2: { // DTV Color Bank lda #COLORS/$400 + lda #0 sta DTV_COLOR_BANK_HI - ldx #0 + tax // DTV Palette - Grey Tones b1: txa @@ -1138,10 +1133,10 @@ mode_hicolmcchar: { .label ch = 5 .label cy = 4 // DTV Graphics Bank - lda #($ffffffff&CHARSET)/$10000 + lda #0 sta DTV_GRAPHICS_VIC_BANK // DTV Color Bank - lda #COLORS/$400 + lda #@1] -b1_from_bbegin: - jmp b1 -//SEG5 @1 -b1: -//SEG6 [2] call main -//SEG7 [4] phi from @1 to main [phi:@1->main] -main_from_b1: - jsr main -//SEG8 [3] phi from @1 to @end [phi:@1->@end] -bend_from_b1: - jmp bend -//SEG9 @end -bend: -//SEG10 main -main: { - .label screen = $400 - .label i = 2 - //SEG11 [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - //SEG12 [5] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 - lda #0 - sta i - jmp b1 - //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1] - b1_from_b1: - //SEG14 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy - jmp b1 - //SEG15 main::@1 - b1: - //SEG16 [6] *((const byte*) main::screen#0 + (byte) main::i#2) ← *((const byte[]) main::msg#0 + (byte) main::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 - ldy i - lda msg,y - sta screen,y - //SEG17 [7] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 - inc i - //SEG18 [8] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #3 - cmp i - bne b1_from_b1 - jmp breturn - //SEG19 main::@return - breturn: - //SEG20 [9] return - rts - msg: .text "cm"+'l' -} - -REGISTER UPLIFT POTENTIAL REGISTERS -Statement [6] *((const byte*) main::screen#0 + (byte) main::i#2) ← *((const byte[]) main::msg#0 + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Statement [6] *((const byte*) main::screen#0 + (byte) main::i#2) ← *((const byte[]) main::msg#0 + (byte) main::i#2) [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , - -REGISTER UPLIFT SCOPES -Uplift Scope [main] 38.5: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Uplift Scope [] - -Uplifting [main] best 288 combination reg byte x [ main::i#2 main::i#1 ] -Uplifting [] best 288 combination - -ASSEMBLER BEFORE OPTIMIZATION -//SEG0 File Comments -// Concatenate a char to a string -//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 -//SEG7 [4] phi from @1 to main [phi:@1->main] -main_from_b1: - jsr main -//SEG8 [3] phi from @1 to @end [phi:@1->@end] -bend_from_b1: - jmp bend -//SEG9 @end -bend: -//SEG10 main -main: { - .label screen = $400 - //SEG11 [5] phi from main to main::@1 [phi:main->main::@1] - b1_from_main: - //SEG12 [5] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 - ldx #0 - jmp b1 - //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1] - b1_from_b1: - //SEG14 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy - jmp b1 - //SEG15 main::@1 - b1: - //SEG16 [6] *((const byte*) main::screen#0 + (byte) main::i#2) ← *((const byte[]) main::msg#0 + (byte) main::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx - lda msg,x - sta screen,x - //SEG17 [7] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx - inx - //SEG18 [8] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 - cpx #3 - bne b1_from_b1 - jmp breturn - //SEG19 main::@return - breturn: - //SEG20 [9] return - rts - msg: .text "cm"+'l' -} - -ASSEMBLER OPTIMIZATIONS -Removing instruction jmp b1 -Removing instruction jmp bend -Removing instruction jmp b1 -Removing instruction jmp breturn -Succesful ASM optimization Pass5NextJumpElimination -Replacing label b1_from_b1 with b1 -Removing instruction b1_from_bbegin: -Removing instruction b1: -Removing instruction main_from_b1: -Removing instruction bend_from_b1: -Removing instruction b1_from_b1: -Succesful ASM optimization Pass5RedundantLabelElimination -Removing instruction bend: -Removing instruction b1_from_main: -Removing instruction breturn: -Succesful ASM optimization Pass5UnusedLabelElimination -Updating BasicUpstart to call main directly -Removing instruction jsr main -Succesful ASM optimization Pass5SkipBegin -Removing instruction jmp b1 -Succesful ASM optimization Pass5NextJumpElimination -Removing instruction bbegin: -Succesful ASM optimization Pass5UnusedLabelElimination - -FINAL SYMBOL TABLE -(label) @1 -(label) @begin -(label) @end -(void()) main() -(label) main::@1 -(label) main::@return -(byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 22.0 -(byte) main::l -(byte[]) main::msg -(const byte[]) main::msg#0 msg = (string) "cm"+(byte) 'l' -(byte*) main::screen -(const byte*) main::screen#0 screen = ((byte*))(word/signed word/dword/signed dword) $400 - -reg byte x [ main::i#2 main::i#1 ] - - -FINAL ASSEMBLER -Score: 186 - -//SEG0 File Comments -// Concatenate a char to a string -//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 [4] phi from @1 to main [phi:@1->main] -//SEG8 [3] phi from @1 to @end [phi:@1->@end] -//SEG9 @end -//SEG10 main -main: { - .label screen = $400 - //SEG11 [5] phi from main to main::@1 [phi:main->main::@1] - //SEG12 [5] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 - ldx #0 - //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1] - //SEG14 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy - //SEG15 main::@1 - b1: - //SEG16 [6] *((const byte*) main::screen#0 + (byte) main::i#2) ← *((const byte[]) main::msg#0 + (byte) main::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx - lda msg,x - sta screen,x - //SEG17 [7] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuxx=_inc_vbuxx - inx - //SEG18 [8] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 - cpx #3 - bne b1 - //SEG19 main::@return - //SEG20 [9] return - rts - msg: .text "cm"+'l' -} - diff --git a/src/test/ref/concat-char.sym b/src/test/ref/concat-char.sym deleted file mode 100644 index 118c86105..000000000 --- a/src/test/ref/concat-char.sym +++ /dev/null @@ -1,16 +0,0 @@ -(label) @1 -(label) @begin -(label) @end -(void()) main() -(label) main::@1 -(label) main::@return -(byte) main::i -(byte) main::i#1 reg byte x 16.5 -(byte) main::i#2 reg byte x 22.0 -(byte) main::l -(byte[]) main::msg -(const byte[]) main::msg#0 msg = (string) "cm"+(byte) 'l' -(byte*) main::screen -(const byte*) main::screen#0 screen = ((byte*))(word/signed word/dword/signed dword) $400 - -reg byte x [ main::i#2 main::i#1 ] diff --git a/src/test/ref/constant-string-concat-0.asm b/src/test/ref/constant-string-concat-0.asm new file mode 100644 index 000000000..7fff00ab2 --- /dev/null +++ b/src/test/ref/constant-string-concat-0.asm @@ -0,0 +1,17 @@ +// Concatenates string constants in different ways +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +main: { + .label SCREEN = $400 + ldx #0 + b1: + lda msg,x + sta SCREEN,x + inx + lda msg,x + cmp #0 + bne b1 + rts + msg: .text "camelot@" +} diff --git a/src/test/ref/constant-string-concat.asm b/src/test/ref/constant-string-concat.asm index 4fa0ed741..c832a5567 100644 --- a/src/test/ref/constant-string-concat.asm +++ b/src/test/ref/constant-string-concat.asm @@ -6,14 +6,11 @@ main: { .label SCREEN = $400 ldx #0 b1: - lda s5,x + lda s,x sta SCREEN,x inx cpx #8 bne b1 rts - s: .text "e"+"l" - s4: .text ""+'t'+'!' - s3: .text "cam"+s+'o' - s5: .text s3+s4 + s: .text "camelot@" } diff --git a/src/test/ref/literals.asm b/src/test/ref/literals.asm index 3ad59a6a7..31f1584a0 100644 --- a/src/test/ref/literals.asm +++ b/src/test/ref/literals.asm @@ -20,5 +20,5 @@ main: { bne b1 rts } + str: .text "bcde@" nums: .byte 2, 3, 4, 5 - str: .text "bc"+"d"+'e'