mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-04-06 15:41:05 +00:00
Added support for #ifdef #ifndef #else #endif. #169
This commit is contained in:
parent
524d789805
commit
9fea02e7ad
@ -65,7 +65,7 @@ public class CParser {
|
||||
this.program = program;
|
||||
this.cFiles = new LinkedHashMap<>();
|
||||
this.cTokenSource = new CTokenSource();
|
||||
final CPreprocessorTokens preprocessorTokens = new CPreprocessorTokens(CHANNEL_WHITESPACE, KickCLexer.WS, KickCLexer.DEFINE, KickCLexer.NAME, KickCLexer.DEFINE_CONTINUE, KickCLexer.UNDEF, KickCLexer.PAR_BEGIN, KickCLexer.PAR_END, KickCLexer.COMMA);
|
||||
final CPreprocessorTokens preprocessorTokens = new CPreprocessorTokens(CHANNEL_WHITESPACE, KickCLexer.WS, KickCLexer.DEFINE, KickCLexer.NAME, KickCLexer.DEFINE_CONTINUE, KickCLexer.UNDEF, KickCLexer.IFDEF, KickCLexer.IFNDEF, KickCLexer.IFELSE, KickCLexer.ENDIF, KickCLexer.PAR_BEGIN, KickCLexer.PAR_END, KickCLexer.COMMA);
|
||||
final CPreprocessor preprocessor = new CPreprocessor(cTokenSource, preprocessorTokens);
|
||||
this.tokenStream = new CommonTokenStream(preprocessor);
|
||||
this.parser = new KickCParser(tokenStream, this);
|
||||
|
@ -126,6 +126,10 @@ CHAR : '\'' ('\\'['"rfn] | ~'\'' ) '\'';
|
||||
DEFINE: '#define' ;
|
||||
DEFINE_CONTINUE: '\\\n' ;
|
||||
UNDEF: '#undef' ;
|
||||
IFDEF: '#ifdef' ;
|
||||
IFNDEF: '#ifndef' ;
|
||||
IFELSE: '#else' ;
|
||||
ENDIF: '#endif' ;
|
||||
|
||||
// Numbers
|
||||
NUMBER : NUMFLOAT | NUMINT ;
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -95,55 +95,59 @@ CHAR=94
|
||||
DEFINE=95
|
||||
DEFINE_CONTINUE=96
|
||||
UNDEF=97
|
||||
NUMBER=98
|
||||
NUMFLOAT=99
|
||||
BINFLOAT=100
|
||||
DECFLOAT=101
|
||||
HEXFLOAT=102
|
||||
NUMINT=103
|
||||
BININTEGER=104
|
||||
DECINTEGER=105
|
||||
HEXINTEGER=106
|
||||
NAME=107
|
||||
WS=108
|
||||
COMMENT_LINE=109
|
||||
COMMENT_BLOCK=110
|
||||
ASM_BYTE=111
|
||||
ASM_MNEMONIC=112
|
||||
ASM_IMM=113
|
||||
ASM_COLON=114
|
||||
ASM_COMMA=115
|
||||
ASM_PAR_BEGIN=116
|
||||
ASM_PAR_END=117
|
||||
ASM_BRACKET_BEGIN=118
|
||||
ASM_BRACKET_END=119
|
||||
ASM_DOT=120
|
||||
ASM_SHIFT_LEFT=121
|
||||
ASM_SHIFT_RIGHT=122
|
||||
ASM_PLUS=123
|
||||
ASM_MINUS=124
|
||||
ASM_LESS_THAN=125
|
||||
ASM_GREATER_THAN=126
|
||||
ASM_MULTIPLY=127
|
||||
ASM_DIVIDE=128
|
||||
ASM_CURLY_BEGIN=129
|
||||
ASM_CURLY_END=130
|
||||
ASM_NUMBER=131
|
||||
ASM_NUMFLOAT=132
|
||||
ASM_BINFLOAT=133
|
||||
ASM_DECFLOAT=134
|
||||
ASM_HEXFLOAT=135
|
||||
ASM_NUMINT=136
|
||||
ASM_BININTEGER=137
|
||||
ASM_DECINTEGER=138
|
||||
ASM_HEXINTEGER=139
|
||||
ASM_CHAR=140
|
||||
ASM_MULTI_REL=141
|
||||
ASM_MULTI_NAME=142
|
||||
ASM_NAME=143
|
||||
ASM_WS=144
|
||||
ASM_COMMENT_LINE=145
|
||||
ASM_COMMENT_BLOCK=146
|
||||
IFDEF=98
|
||||
IFNDEF=99
|
||||
IFELSE=100
|
||||
ENDIF=101
|
||||
NUMBER=102
|
||||
NUMFLOAT=103
|
||||
BINFLOAT=104
|
||||
DECFLOAT=105
|
||||
HEXFLOAT=106
|
||||
NUMINT=107
|
||||
BININTEGER=108
|
||||
DECINTEGER=109
|
||||
HEXINTEGER=110
|
||||
NAME=111
|
||||
WS=112
|
||||
COMMENT_LINE=113
|
||||
COMMENT_BLOCK=114
|
||||
ASM_BYTE=115
|
||||
ASM_MNEMONIC=116
|
||||
ASM_IMM=117
|
||||
ASM_COLON=118
|
||||
ASM_COMMA=119
|
||||
ASM_PAR_BEGIN=120
|
||||
ASM_PAR_END=121
|
||||
ASM_BRACKET_BEGIN=122
|
||||
ASM_BRACKET_END=123
|
||||
ASM_DOT=124
|
||||
ASM_SHIFT_LEFT=125
|
||||
ASM_SHIFT_RIGHT=126
|
||||
ASM_PLUS=127
|
||||
ASM_MINUS=128
|
||||
ASM_LESS_THAN=129
|
||||
ASM_GREATER_THAN=130
|
||||
ASM_MULTIPLY=131
|
||||
ASM_DIVIDE=132
|
||||
ASM_CURLY_BEGIN=133
|
||||
ASM_CURLY_END=134
|
||||
ASM_NUMBER=135
|
||||
ASM_NUMFLOAT=136
|
||||
ASM_BINFLOAT=137
|
||||
ASM_DECFLOAT=138
|
||||
ASM_HEXFLOAT=139
|
||||
ASM_NUMINT=140
|
||||
ASM_BININTEGER=141
|
||||
ASM_DECINTEGER=142
|
||||
ASM_HEXINTEGER=143
|
||||
ASM_CHAR=144
|
||||
ASM_MULTI_REL=145
|
||||
ASM_MULTI_NAME=146
|
||||
ASM_NAME=147
|
||||
ASM_WS=148
|
||||
ASM_COMMENT_LINE=149
|
||||
ASM_COMMENT_BLOCK=150
|
||||
';'=8
|
||||
'..'=11
|
||||
'?'=12
|
||||
@ -215,5 +219,9 @@ ASM_COMMENT_BLOCK=146
|
||||
'#define'=95
|
||||
'\\\n'=96
|
||||
'#undef'=97
|
||||
'.byte'=111
|
||||
'#'=113
|
||||
'#ifdef'=98
|
||||
'#ifndef'=99
|
||||
'#else'=100
|
||||
'#endif'=101
|
||||
'.byte'=115
|
||||
'#'=117
|
||||
|
File diff suppressed because one or more lines are too long
@ -34,18 +34,18 @@ public class KickCParser extends Parser {
|
||||
ASM=75, DEFAULT=76, CASE=77, STRUCT=78, ENUM=79, SIZEOF=80, TYPEID=81,
|
||||
KICKASM=82, RESOURCE=83, USES=84, CLOBBERS=85, BYTES=86, CYCLES=87, LOGIC_NOT=88,
|
||||
SIGNEDNESS=89, SIMPLETYPE=90, BOOLEAN=91, KICKASM_BODY=92, STRING=93,
|
||||
CHAR=94, DEFINE=95, DEFINE_CONTINUE=96, UNDEF=97, NUMBER=98, NUMFLOAT=99,
|
||||
BINFLOAT=100, DECFLOAT=101, HEXFLOAT=102, NUMINT=103, BININTEGER=104,
|
||||
DECINTEGER=105, HEXINTEGER=106, NAME=107, WS=108, COMMENT_LINE=109, COMMENT_BLOCK=110,
|
||||
ASM_BYTE=111, ASM_MNEMONIC=112, ASM_IMM=113, ASM_COLON=114, ASM_COMMA=115,
|
||||
ASM_PAR_BEGIN=116, ASM_PAR_END=117, ASM_BRACKET_BEGIN=118, ASM_BRACKET_END=119,
|
||||
ASM_DOT=120, ASM_SHIFT_LEFT=121, ASM_SHIFT_RIGHT=122, ASM_PLUS=123, ASM_MINUS=124,
|
||||
ASM_LESS_THAN=125, ASM_GREATER_THAN=126, ASM_MULTIPLY=127, ASM_DIVIDE=128,
|
||||
ASM_CURLY_BEGIN=129, ASM_CURLY_END=130, ASM_NUMBER=131, ASM_NUMFLOAT=132,
|
||||
ASM_BINFLOAT=133, ASM_DECFLOAT=134, ASM_HEXFLOAT=135, ASM_NUMINT=136,
|
||||
ASM_BININTEGER=137, ASM_DECINTEGER=138, ASM_HEXINTEGER=139, ASM_CHAR=140,
|
||||
ASM_MULTI_REL=141, ASM_MULTI_NAME=142, ASM_NAME=143, ASM_WS=144, ASM_COMMENT_LINE=145,
|
||||
ASM_COMMENT_BLOCK=146;
|
||||
CHAR=94, DEFINE=95, DEFINE_CONTINUE=96, UNDEF=97, IFDEF=98, IFNDEF=99,
|
||||
IFELSE=100, ENDIF=101, NUMBER=102, NUMFLOAT=103, BINFLOAT=104, DECFLOAT=105,
|
||||
HEXFLOAT=106, NUMINT=107, BININTEGER=108, DECINTEGER=109, HEXINTEGER=110,
|
||||
NAME=111, WS=112, COMMENT_LINE=113, COMMENT_BLOCK=114, ASM_BYTE=115, ASM_MNEMONIC=116,
|
||||
ASM_IMM=117, ASM_COLON=118, ASM_COMMA=119, ASM_PAR_BEGIN=120, ASM_PAR_END=121,
|
||||
ASM_BRACKET_BEGIN=122, ASM_BRACKET_END=123, ASM_DOT=124, ASM_SHIFT_LEFT=125,
|
||||
ASM_SHIFT_RIGHT=126, ASM_PLUS=127, ASM_MINUS=128, ASM_LESS_THAN=129, ASM_GREATER_THAN=130,
|
||||
ASM_MULTIPLY=131, ASM_DIVIDE=132, ASM_CURLY_BEGIN=133, ASM_CURLY_END=134,
|
||||
ASM_NUMBER=135, ASM_NUMFLOAT=136, ASM_BINFLOAT=137, ASM_DECFLOAT=138,
|
||||
ASM_HEXFLOAT=139, ASM_NUMINT=140, ASM_BININTEGER=141, ASM_DECINTEGER=142,
|
||||
ASM_HEXINTEGER=143, ASM_CHAR=144, ASM_MULTI_REL=145, ASM_MULTI_NAME=146,
|
||||
ASM_NAME=147, ASM_WS=148, ASM_COMMENT_LINE=149, ASM_COMMENT_BLOCK=150;
|
||||
public static final int
|
||||
RULE_file = 0, RULE_asmFile = 1, RULE_declSeq = 2, RULE_declOrImport = 3,
|
||||
RULE_importDecl = 4, RULE_decl = 5, RULE_declVariables = 6, RULE_declVariableList = 7,
|
||||
@ -89,8 +89,9 @@ public class KickCParser extends Parser {
|
||||
"'break'", "'continue'", "'asm'", "'default'", "'case'", "'struct'",
|
||||
"'enum'", "'sizeof'", "'typeid'", "'kickasm'", "'resource'", "'uses'",
|
||||
"'clobbers'", "'bytes'", "'cycles'", "'!'", null, null, null, null, null,
|
||||
null, "'#define'", "'\\\n'", "'#undef'", null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, "'.byte'", null, "'#'"
|
||||
null, "'#define'", "'\\\n'", "'#undef'", "'#ifdef'", "'#ifndef'", "'#else'",
|
||||
"'#endif'", null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, "'.byte'", null, "'#'"
|
||||
};
|
||||
}
|
||||
private static final String[] _LITERAL_NAMES = makeLiteralNames();
|
||||
@ -110,11 +111,11 @@ public class KickCParser extends Parser {
|
||||
"CONTINUE", "ASM", "DEFAULT", "CASE", "STRUCT", "ENUM", "SIZEOF", "TYPEID",
|
||||
"KICKASM", "RESOURCE", "USES", "CLOBBERS", "BYTES", "CYCLES", "LOGIC_NOT",
|
||||
"SIGNEDNESS", "SIMPLETYPE", "BOOLEAN", "KICKASM_BODY", "STRING", "CHAR",
|
||||
"DEFINE", "DEFINE_CONTINUE", "UNDEF", "NUMBER", "NUMFLOAT", "BINFLOAT",
|
||||
"DECFLOAT", "HEXFLOAT", "NUMINT", "BININTEGER", "DECINTEGER", "HEXINTEGER",
|
||||
"NAME", "WS", "COMMENT_LINE", "COMMENT_BLOCK", "ASM_BYTE", "ASM_MNEMONIC",
|
||||
"ASM_IMM", "ASM_COLON", "ASM_COMMA", "ASM_PAR_BEGIN", "ASM_PAR_END",
|
||||
"ASM_BRACKET_BEGIN", "ASM_BRACKET_END", "ASM_DOT", "ASM_SHIFT_LEFT",
|
||||
"DEFINE", "DEFINE_CONTINUE", "UNDEF", "IFDEF", "IFNDEF", "IFELSE", "ENDIF",
|
||||
"NUMBER", "NUMFLOAT", "BINFLOAT", "DECFLOAT", "HEXFLOAT", "NUMINT", "BININTEGER",
|
||||
"DECINTEGER", "HEXINTEGER", "NAME", "WS", "COMMENT_LINE", "COMMENT_BLOCK",
|
||||
"ASM_BYTE", "ASM_MNEMONIC", "ASM_IMM", "ASM_COLON", "ASM_COMMA", "ASM_PAR_BEGIN",
|
||||
"ASM_PAR_END", "ASM_BRACKET_BEGIN", "ASM_BRACKET_END", "ASM_DOT", "ASM_SHIFT_LEFT",
|
||||
"ASM_SHIFT_RIGHT", "ASM_PLUS", "ASM_MINUS", "ASM_LESS_THAN", "ASM_GREATER_THAN",
|
||||
"ASM_MULTIPLY", "ASM_DIVIDE", "ASM_CURLY_BEGIN", "ASM_CURLY_END", "ASM_NUMBER",
|
||||
"ASM_NUMFLOAT", "ASM_BINFLOAT", "ASM_DECFLOAT", "ASM_HEXFLOAT", "ASM_NUMINT",
|
||||
@ -6177,7 +6178,7 @@ public class KickCParser extends Parser {
|
||||
setState(784);
|
||||
_errHandler.sync(this);
|
||||
_la = _input.LA(1);
|
||||
while (((((_la - 111)) & ~0x3f) == 0 && ((1L << (_la - 111)) & ((1L << (ASM_BYTE - 111)) | (1L << (ASM_MNEMONIC - 111)) | (1L << (ASM_MULTI_NAME - 111)) | (1L << (ASM_NAME - 111)))) != 0)) {
|
||||
while (((((_la - 115)) & ~0x3f) == 0 && ((1L << (_la - 115)) & ((1L << (ASM_BYTE - 115)) | (1L << (ASM_MNEMONIC - 115)) | (1L << (ASM_MULTI_NAME - 115)) | (1L << (ASM_NAME - 115)))) != 0)) {
|
||||
{
|
||||
{
|
||||
setState(781);
|
||||
@ -6938,7 +6939,7 @@ public class KickCParser extends Parser {
|
||||
_prevctx = _localctx;
|
||||
setState(841);
|
||||
_la = _input.LA(1);
|
||||
if ( !(((((_la - 123)) & ~0x3f) == 0 && ((1L << (_la - 123)) & ((1L << (ASM_PLUS - 123)) | (1L << (ASM_MINUS - 123)) | (1L << (ASM_LESS_THAN - 123)) | (1L << (ASM_GREATER_THAN - 123)))) != 0)) ) {
|
||||
if ( !(((((_la - 127)) & ~0x3f) == 0 && ((1L << (_la - 127)) & ((1L << (ASM_PLUS - 127)) | (1L << (ASM_MINUS - 127)) | (1L << (ASM_LESS_THAN - 127)) | (1L << (ASM_GREATER_THAN - 127)))) != 0)) ) {
|
||||
_errHandler.recoverInline(this);
|
||||
}
|
||||
else {
|
||||
@ -7220,7 +7221,7 @@ public class KickCParser extends Parser {
|
||||
}
|
||||
|
||||
public static final String _serializedATN =
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\u0094\u0368\4\2\t"+
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\u0098\u0368\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"+
|
||||
@ -7285,132 +7286,132 @@ public class KickCParser extends Parser {
|
||||
"/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\7/\u0363\n/\f/\16/\u0366\13/\3/\2\t\20"+
|
||||
"\34\36*DF\\\60\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64"+
|
||||
"\668:<>@BDFHJLNPRTVXZ\\\2\r\3\2\26\27\5\2\21\22\30\31ZZ\4\2 ##\3\2\34"+
|
||||
"\35\3\2\23\25\3\2\21\22\3\2\36#\3\2}\u0080\3\2{|\3\2\u0081\u0082\3\2}"+
|
||||
"~\2\u03e4\2^\3\2\2\2\4a\3\2\2\2\6g\3\2\2\2\bl\3\2\2\2\nn\3\2\2\2\f\u0080"+
|
||||
"\3\2\2\2\16\u0082\3\2\2\2\20\u0085\3\2\2\2\22\u009c\3\2\2\2\24\u00c1\3"+
|
||||
"\2\2\2\26\u00c6\3\2\2\2\30\u00d0\3\2\2\2\32\u00d7\3\2\2\2\34\u00dd\3\2"+
|
||||
"\2\2\36\u00fc\3\2\2\2 \u010c\3\2\2\2\"\u010f\3\2\2\2$\u011b\3\2\2\2&\u011e"+
|
||||
"\3\2\2\2(\u0121\3\2\2\2*\u0129\3\2\2\2,\u0134\3\2\2\2.\u0139\3\2\2\2\60"+
|
||||
"\u014c\3\2\2\2\62\u015e\3\2\2\2\64\u01aa\3\2\2\2\66\u01d6\3\2\2\28\u01d9"+
|
||||
"\3\2\2\2:\u0231\3\2\2\2<\u0234\3\2\2\2>\u023f\3\2\2\2@\u025b\3\2\2\2B"+
|
||||
"\u0261\3\2\2\2D\u0263\3\2\2\2F\u02a4\3\2\2\2H\u02e5\3\2\2\2J\u02ed\3\2"+
|
||||
"\2\2L\u02f3\3\2\2\2N\u030d\3\2\2\2P\u0312\3\2\2\2R\u0318\3\2\2\2T\u031e"+
|
||||
"\3\2\2\2V\u0320\3\2\2\2X\u0324\3\2\2\2Z\u0344\3\2\2\2\\\u0354\3\2\2\2"+
|
||||
"^_\5\6\4\2_`\7\2\2\3`\3\3\2\2\2ab\5P)\2bc\7\2\2\3c\5\3\2\2\2df\5\b\5\2"+
|
||||
"ed\3\2\2\2fi\3\2\2\2ge\3\2\2\2gh\3\2\2\2h\7\3\2\2\2ig\3\2\2\2jm\5\f\7"+
|
||||
"\2km\5\n\6\2lj\3\2\2\2lk\3\2\2\2m\t\3\2\2\2no\7(\2\2op\7_\2\2p\13\3\2"+
|
||||
"\2\2qr\5\16\b\2rs\7\n\2\2s\u0081\3\2\2\2tu\5\"\22\2uv\7\n\2\2v\u0081\3"+
|
||||
"\2\2\2wx\5(\25\2xy\7\n\2\2y\u0081\3\2\2\2z\u0081\5.\30\2{\u0081\5J&\2"+
|
||||
"|\u0081\5\64\33\2}~\5\22\n\2~\177\7\n\2\2\177\u0081\3\2\2\2\u0080q\3\2"+
|
||||
"\2\2\u0080t\3\2\2\2\u0080w\3\2\2\2\u0080z\3\2\2\2\u0080{\3\2\2\2\u0080"+
|
||||
"|\3\2\2\2\u0080}\3\2\2\2\u0081\r\3\2\2\2\u0082\u0083\5\26\f\2\u0083\u0084"+
|
||||
"\5\20\t\2\u0084\17\3\2\2\2\u0085\u0089\b\t\1\2\u0086\u0088\5\30\r\2\u0087"+
|
||||
"\u0086\3\2\2\2\u0088\u008b\3\2\2\2\u0089\u0087\3\2\2\2\u0089\u008a\3\2"+
|
||||
"\2\2\u008a\u008c\3\2\2\2\u008b\u0089\3\2\2\2\u008c\u008d\5\24\13\2\u008d"+
|
||||
"\u0099\3\2\2\2\u008e\u008f\f\3\2\2\u008f\u0093\7\f\2\2\u0090\u0092\5\30"+
|
||||
"\r\2\u0091\u0090\3\2\2\2\u0092\u0095\3\2\2\2\u0093\u0091\3\2\2\2\u0093"+
|
||||
"\u0094\3\2\2\2\u0094\u0096\3\2\2\2\u0095\u0093\3\2\2\2\u0096\u0098\5\24"+
|
||||
"\13\2\u0097\u008e\3\2\2\2\u0098\u009b\3\2\2\2\u0099\u0097\3\2\2\2\u0099"+
|
||||
"\u009a\3\2\2\2\u009a\21\3\2\2\2\u009b\u0099\3\2\2\2\u009c\u009d\7)\2\2"+
|
||||
"\u009d\u00a1\5\26\f\2\u009e\u00a0\5\30\r\2\u009f\u009e\3\2\2\2\u00a0\u00a3"+
|
||||
"\3\2\2\2\u00a1\u009f\3\2\2\2\u00a1\u00a2\3\2\2\2\u00a2\u00a4\3\2\2\2\u00a3"+
|
||||
"\u00a1\3\2\2\2\u00a4\u00a8\7m\2\2\u00a5\u00a7\5\32\16\2\u00a6\u00a5\3"+
|
||||
"\2\2\2\u00a7\u00aa\3\2\2\2\u00a8\u00a6\3\2\2\2\u00a8\u00a9\3\2\2\2\u00a9"+
|
||||
"\u00ab\3\2\2\2\u00aa\u00a8\3\2\2\2\u00ab\u00ac\b\n\1\2\u00ac\23\3\2\2"+
|
||||
"\2\u00ad\u00b1\7m\2\2\u00ae\u00b0\5\32\16\2\u00af\u00ae\3\2\2\2\u00b0"+
|
||||
"\u00b3\3\2\2\2\u00b1\u00af\3\2\2\2\u00b1\u00b2\3\2\2\2\u00b2\u00b6\3\2"+
|
||||
"\2\2\u00b3\u00b1\3\2\2\2\u00b4\u00b5\7&\2\2\u00b5\u00b7\5F$\2\u00b6\u00b4"+
|
||||
"\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7\u00c2\3\2\2\2\u00b8\u00bc\7m\2\2\u00b9"+
|
||||
"\u00bb\5\32\16\2\u00ba\u00b9\3\2\2\2\u00bb\u00be\3\2\2\2\u00bc\u00ba\3"+
|
||||
"\2\2\2\u00bc\u00bd\3\2\2\2\u00bd\u00bf\3\2\2\2\u00be\u00bc\3\2\2\2\u00bf"+
|
||||
"\u00c0\7&\2\2\u00c0\u00c2\5J&\2\u00c1\u00ad\3\2\2\2\u00c1\u00b8\3\2\2"+
|
||||
"\2\u00c2\25\3\2\2\2\u00c3\u00c5\5\66\34\2\u00c4\u00c3\3\2\2\2\u00c5\u00c8"+
|
||||
"\3\2\2\2\u00c6\u00c4\3\2\2\2\u00c6\u00c7\3\2\2\2\u00c7\u00c9\3\2\2\2\u00c8"+
|
||||
"\u00c6\3\2\2\2\u00c9\u00cd\5\36\20\2\u00ca\u00cc\5\66\34\2\u00cb\u00ca"+
|
||||
"\3\2\2\2\u00cc\u00cf\3\2\2\2\u00cd\u00cb\3\2\2\2\u00cd\u00ce\3\2\2\2\u00ce"+
|
||||
"\27\3\2\2\2\u00cf\u00cd\3\2\2\2\u00d0\u00d4\7\23\2\2\u00d1\u00d3\5\66"+
|
||||
"\34\2\u00d2\u00d1\3\2\2\2\u00d3\u00d6\3\2\2\2\u00d4\u00d2\3\2\2\2\u00d4"+
|
||||
"\u00d5\3\2\2\2\u00d5\31\3\2\2\2\u00d6\u00d4\3\2\2\2\u00d7\u00d9\7\6\2"+
|
||||
"\2\u00d8\u00da\5F$\2\u00d9\u00d8\3\2\2\2\u00d9\u00da\3\2\2\2\u00da\u00db"+
|
||||
"\3\2\2\2\u00db\u00dc\7\7\2\2\u00dc\33\3\2\2\2\u00dd\u00de\b\17\1\2\u00de"+
|
||||
"\u00df\5\36\20\2\u00df\u00ea\3\2\2\2\u00e0\u00e1\f\4\2\2\u00e1\u00e9\7"+
|
||||
"\23\2\2\u00e2\u00e3\f\3\2\2\u00e3\u00e5\7\6\2\2\u00e4\u00e6\5F$\2\u00e5"+
|
||||
"\u00e4\3\2\2\2\u00e5\u00e6\3\2\2\2\u00e6\u00e7\3\2\2\2\u00e7\u00e9\7\7"+
|
||||
"\2\2\u00e8\u00e0\3\2\2\2\u00e8\u00e2\3\2\2\2\u00e9\u00ec\3\2\2\2\u00ea"+
|
||||
"\u00e8\3\2\2\2\u00ea\u00eb\3\2\2\2\u00eb\35\3\2\2\2\u00ec\u00ea\3\2\2"+
|
||||
"\2\u00ed\u00ee\b\20\1\2\u00ee\u00ef\7\b\2\2\u00ef\u00f0\5\36\20\2\u00f0"+
|
||||
"\u00f1\7\t\2\2\u00f1\u00fd\3\2\2\2\u00f2\u00fd\7\\\2\2\u00f3\u00f5\7["+
|
||||
"\2\2\u00f4\u00f6\7\\\2\2\u00f5\u00f4\3\2\2\2\u00f5\u00f6\3\2\2\2\u00f6"+
|
||||
"\u00fd\3\2\2\2\u00f7\u00fd\5\"\22\2\u00f8\u00fd\5 \21\2\u00f9\u00fd\5"+
|
||||
"(\25\2\u00fa\u00fd\5&\24\2\u00fb\u00fd\7\3\2\2\u00fc\u00ed\3\2\2\2\u00fc"+
|
||||
"\u00f2\3\2\2\2\u00fc\u00f3\3\2\2\2\u00fc\u00f7\3\2\2\2\u00fc\u00f8\3\2"+
|
||||
"\2\2\u00fc\u00f9\3\2\2\2\u00fc\u00fa\3\2\2\2\u00fc\u00fb\3\2\2\2\u00fd"+
|
||||
"\u0109\3\2\2\2\u00fe\u00ff\f\t\2\2\u00ff\u0101\7\6\2\2\u0100\u0102\5F"+
|
||||
"$\2\u0101\u0100\3\2\2\2\u0101\u0102\3\2\2\2\u0102\u0103\3\2\2\2\u0103"+
|
||||
"\u0108\7\7\2\2\u0104\u0105\f\b\2\2\u0105\u0106\7\b\2\2\u0106\u0108\7\t"+
|
||||
"\2\2\u0107\u00fe\3\2\2\2\u0107\u0104\3\2\2\2\u0108\u010b\3\2\2\2\u0109"+
|
||||
"\u0107\3\2\2\2\u0109\u010a\3\2\2\2\u010a\37\3\2\2\2\u010b\u0109\3\2\2"+
|
||||
"\2\u010c\u010d\7P\2\2\u010d\u010e\7m\2\2\u010e!\3\2\2\2\u010f\u0111\7"+
|
||||
"P\2\2\u0110\u0112\7m\2\2\u0111\u0110\3\2\2\2\u0111\u0112\3\2\2\2\u0112"+
|
||||
"\u0113\3\2\2\2\u0113\u0115\7\4\2\2\u0114\u0116\5$\23\2\u0115\u0114\3\2"+
|
||||
"\2\2\u0116\u0117\3\2\2\2\u0117\u0115\3\2\2\2\u0117\u0118\3\2\2\2\u0118"+
|
||||
"\u0119\3\2\2\2\u0119\u011a\7\5\2\2\u011a#\3\2\2\2\u011b\u011c\5\16\b\2"+
|
||||
"\u011c\u011d\7\n\2\2\u011d%\3\2\2\2\u011e\u011f\7Q\2\2\u011f\u0120\7m"+
|
||||
"\2\2\u0120\'\3\2\2\2\u0121\u0123\7Q\2\2\u0122\u0124\7m\2\2\u0123\u0122"+
|
||||
"\3\2\2\2\u0123\u0124\3\2\2\2\u0124\u0125\3\2\2\2\u0125\u0126\7\4\2\2\u0126"+
|
||||
"\u0127\5*\26\2\u0127\u0128\7\5\2\2\u0128)\3\2\2\2\u0129\u012a\b\26\1\2"+
|
||||
"\u012a\u012b\5,\27\2\u012b\u0131\3\2\2\2\u012c\u012d\f\3\2\2\u012d\u012e"+
|
||||
"\7\f\2\2\u012e\u0130\5,\27\2\u012f\u012c\3\2\2\2\u0130\u0133\3\2\2\2\u0131"+
|
||||
"\u012f\3\2\2\2\u0131\u0132\3\2\2\2\u0132+\3\2\2\2\u0133\u0131\3\2\2\2"+
|
||||
"\u0134\u0137\7m\2\2\u0135\u0136\7&\2\2\u0136\u0138\5F$\2\u0137\u0135\3"+
|
||||
"\2\2\2\u0137\u0138\3\2\2\2\u0138-\3\2\2\2\u0139\u013d\5\26\f\2\u013a\u013c"+
|
||||
"\5\30\r\2\u013b\u013a\3\2\2\2\u013c\u013f\3\2\2\2\u013d\u013b\3\2\2\2"+
|
||||
"\u013d\u013e\3\2\2\2\u013e\u0140\3\2\2\2\u013f\u013d\3\2\2\2\u0140\u0141"+
|
||||
"\7m\2\2\u0141\u0143\7\b\2\2\u0142\u0144\5\60\31\2\u0143\u0142\3\2\2\2"+
|
||||
"\u0143\u0144\3\2\2\2\u0144\u0145\3\2\2\2\u0145\u0146\7\t\2\2\u0146\u0148"+
|
||||
"\7\4\2\2\u0147\u0149\58\35\2\u0148\u0147\3\2\2\2\u0148\u0149\3\2\2\2\u0149"+
|
||||
"\u014a\3\2\2\2\u014a\u014b\7\5\2\2\u014b/\3\2\2\2\u014c\u0151\5\62\32"+
|
||||
"\2\u014d\u014e\7\f\2\2\u014e\u0150\5\62\32\2\u014f\u014d\3\2\2\2\u0150"+
|
||||
"\u0153\3\2\2\2\u0151\u014f\3\2\2\2\u0151\u0152\3\2\2\2\u0152\61\3\2\2"+
|
||||
"\2\u0153\u0151\3\2\2\2\u0154\u0158\5\26\f\2\u0155\u0157\5\30\r\2\u0156"+
|
||||
"\u0155\3\2\2\2\u0157\u015a\3\2\2\2\u0158\u0156\3\2\2\2\u0158\u0159\3\2"+
|
||||
"\2\2\u0159\u015b\3\2\2\2\u015a\u0158\3\2\2\2\u015b\u015c\7m\2\2\u015c"+
|
||||
"\u015f\3\2\2\2\u015d\u015f\7\\\2\2\u015e\u0154\3\2\2\2\u015e\u015d\3\2"+
|
||||
"\2\2\u015f\63\3\2\2\2\u0160\u0161\7*\2\2\u0161\u0162\7+\2\2\u0162\u0163"+
|
||||
"\3\2\2\2\u0163\u0164\7\b\2\2\u0164\u0169\7d\2\2\u0165\u0166\7\f\2\2\u0166"+
|
||||
"\u0168\7d\2\2\u0167\u0165\3\2\2\2\u0168\u016b\3\2\2\2\u0169\u0167\3\2"+
|
||||
"\2\2\u0169\u016a\3\2\2\2\u016a\u016c\3\2\2\2\u016b\u0169\3\2\2\2\u016c"+
|
||||
"\u01ab\7\t\2\2\u016d\u016e\7*\2\2\u016e\u016f\7,\2\2\u016f\u0170\3\2\2"+
|
||||
"\2\u0170\u0171\7\b\2\2\u0171\u0172\7d\2\2\u0172\u01ab\7\t\2\2\u0173\u0174"+
|
||||
"\7*\2\2\u0174\u0175\7-\2\2\u0175\u0176\3\2\2\2\u0176\u0177\7\b\2\2\u0177"+
|
||||
"\u0178\7m\2\2\u0178\u01ab\7\t\2\2\u0179\u017a\7*\2\2\u017a\u017b\7/\2"+
|
||||
"\2\u017b\u017c\3\2\2\2\u017c\u017d\7\b\2\2\u017d\u017e\7m\2\2\u017e\u01ab"+
|
||||
"\7\t\2\2\u017f\u0180\7*\2\2\u0180\u0181\7.\2\2\u0181\u0182\3\2\2\2\u0182"+
|
||||
"\u0183\7\b\2\2\u0183\u0184\7_\2\2\u0184\u01ab\7\t\2\2\u0185\u0186\7*\2"+
|
||||
"\2\u0186\u0187\7\60\2\2\u0187\u0188\3\2\2\2\u0188\u0189\7\b\2\2\u0189"+
|
||||
"\u018a\7m\2\2\u018a\u01ab\7\t\2\2\u018b\u018c\7*\2\2\u018c\u018d\7\61"+
|
||||
"\2\2\u018d\u018e\3\2\2\2\u018e\u018f\7\b\2\2\u018f\u0190\7m\2\2\u0190"+
|
||||
"\35\3\2\23\25\3\2\21\22\3\2\36#\3\2\u0081\u0084\3\2\177\u0080\3\2\u0085"+
|
||||
"\u0086\3\2\u0081\u0082\2\u03e4\2^\3\2\2\2\4a\3\2\2\2\6g\3\2\2\2\bl\3\2"+
|
||||
"\2\2\nn\3\2\2\2\f\u0080\3\2\2\2\16\u0082\3\2\2\2\20\u0085\3\2\2\2\22\u009c"+
|
||||
"\3\2\2\2\24\u00c1\3\2\2\2\26\u00c6\3\2\2\2\30\u00d0\3\2\2\2\32\u00d7\3"+
|
||||
"\2\2\2\34\u00dd\3\2\2\2\36\u00fc\3\2\2\2 \u010c\3\2\2\2\"\u010f\3\2\2"+
|
||||
"\2$\u011b\3\2\2\2&\u011e\3\2\2\2(\u0121\3\2\2\2*\u0129\3\2\2\2,\u0134"+
|
||||
"\3\2\2\2.\u0139\3\2\2\2\60\u014c\3\2\2\2\62\u015e\3\2\2\2\64\u01aa\3\2"+
|
||||
"\2\2\66\u01d6\3\2\2\28\u01d9\3\2\2\2:\u0231\3\2\2\2<\u0234\3\2\2\2>\u023f"+
|
||||
"\3\2\2\2@\u025b\3\2\2\2B\u0261\3\2\2\2D\u0263\3\2\2\2F\u02a4\3\2\2\2H"+
|
||||
"\u02e5\3\2\2\2J\u02ed\3\2\2\2L\u02f3\3\2\2\2N\u030d\3\2\2\2P\u0312\3\2"+
|
||||
"\2\2R\u0318\3\2\2\2T\u031e\3\2\2\2V\u0320\3\2\2\2X\u0324\3\2\2\2Z\u0344"+
|
||||
"\3\2\2\2\\\u0354\3\2\2\2^_\5\6\4\2_`\7\2\2\3`\3\3\2\2\2ab\5P)\2bc\7\2"+
|
||||
"\2\3c\5\3\2\2\2df\5\b\5\2ed\3\2\2\2fi\3\2\2\2ge\3\2\2\2gh\3\2\2\2h\7\3"+
|
||||
"\2\2\2ig\3\2\2\2jm\5\f\7\2km\5\n\6\2lj\3\2\2\2lk\3\2\2\2m\t\3\2\2\2no"+
|
||||
"\7(\2\2op\7_\2\2p\13\3\2\2\2qr\5\16\b\2rs\7\n\2\2s\u0081\3\2\2\2tu\5\""+
|
||||
"\22\2uv\7\n\2\2v\u0081\3\2\2\2wx\5(\25\2xy\7\n\2\2y\u0081\3\2\2\2z\u0081"+
|
||||
"\5.\30\2{\u0081\5J&\2|\u0081\5\64\33\2}~\5\22\n\2~\177\7\n\2\2\177\u0081"+
|
||||
"\3\2\2\2\u0080q\3\2\2\2\u0080t\3\2\2\2\u0080w\3\2\2\2\u0080z\3\2\2\2\u0080"+
|
||||
"{\3\2\2\2\u0080|\3\2\2\2\u0080}\3\2\2\2\u0081\r\3\2\2\2\u0082\u0083\5"+
|
||||
"\26\f\2\u0083\u0084\5\20\t\2\u0084\17\3\2\2\2\u0085\u0089\b\t\1\2\u0086"+
|
||||
"\u0088\5\30\r\2\u0087\u0086\3\2\2\2\u0088\u008b\3\2\2\2\u0089\u0087\3"+
|
||||
"\2\2\2\u0089\u008a\3\2\2\2\u008a\u008c\3\2\2\2\u008b\u0089\3\2\2\2\u008c"+
|
||||
"\u008d\5\24\13\2\u008d\u0099\3\2\2\2\u008e\u008f\f\3\2\2\u008f\u0093\7"+
|
||||
"\f\2\2\u0090\u0092\5\30\r\2\u0091\u0090\3\2\2\2\u0092\u0095\3\2\2\2\u0093"+
|
||||
"\u0091\3\2\2\2\u0093\u0094\3\2\2\2\u0094\u0096\3\2\2\2\u0095\u0093\3\2"+
|
||||
"\2\2\u0096\u0098\5\24\13\2\u0097\u008e\3\2\2\2\u0098\u009b\3\2\2\2\u0099"+
|
||||
"\u0097\3\2\2\2\u0099\u009a\3\2\2\2\u009a\21\3\2\2\2\u009b\u0099\3\2\2"+
|
||||
"\2\u009c\u009d\7)\2\2\u009d\u00a1\5\26\f\2\u009e\u00a0\5\30\r\2\u009f"+
|
||||
"\u009e\3\2\2\2\u00a0\u00a3\3\2\2\2\u00a1\u009f\3\2\2\2\u00a1\u00a2\3\2"+
|
||||
"\2\2\u00a2\u00a4\3\2\2\2\u00a3\u00a1\3\2\2\2\u00a4\u00a8\7q\2\2\u00a5"+
|
||||
"\u00a7\5\32\16\2\u00a6\u00a5\3\2\2\2\u00a7\u00aa\3\2\2\2\u00a8\u00a6\3"+
|
||||
"\2\2\2\u00a8\u00a9\3\2\2\2\u00a9\u00ab\3\2\2\2\u00aa\u00a8\3\2\2\2\u00ab"+
|
||||
"\u00ac\b\n\1\2\u00ac\23\3\2\2\2\u00ad\u00b1\7q\2\2\u00ae\u00b0\5\32\16"+
|
||||
"\2\u00af\u00ae\3\2\2\2\u00b0\u00b3\3\2\2\2\u00b1\u00af\3\2\2\2\u00b1\u00b2"+
|
||||
"\3\2\2\2\u00b2\u00b6\3\2\2\2\u00b3\u00b1\3\2\2\2\u00b4\u00b5\7&\2\2\u00b5"+
|
||||
"\u00b7\5F$\2\u00b6\u00b4\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7\u00c2\3\2\2"+
|
||||
"\2\u00b8\u00bc\7q\2\2\u00b9\u00bb\5\32\16\2\u00ba\u00b9\3\2\2\2\u00bb"+
|
||||
"\u00be\3\2\2\2\u00bc\u00ba\3\2\2\2\u00bc\u00bd\3\2\2\2\u00bd\u00bf\3\2"+
|
||||
"\2\2\u00be\u00bc\3\2\2\2\u00bf\u00c0\7&\2\2\u00c0\u00c2\5J&\2\u00c1\u00ad"+
|
||||
"\3\2\2\2\u00c1\u00b8\3\2\2\2\u00c2\25\3\2\2\2\u00c3\u00c5\5\66\34\2\u00c4"+
|
||||
"\u00c3\3\2\2\2\u00c5\u00c8\3\2\2\2\u00c6\u00c4\3\2\2\2\u00c6\u00c7\3\2"+
|
||||
"\2\2\u00c7\u00c9\3\2\2\2\u00c8\u00c6\3\2\2\2\u00c9\u00cd\5\36\20\2\u00ca"+
|
||||
"\u00cc\5\66\34\2\u00cb\u00ca\3\2\2\2\u00cc\u00cf\3\2\2\2\u00cd\u00cb\3"+
|
||||
"\2\2\2\u00cd\u00ce\3\2\2\2\u00ce\27\3\2\2\2\u00cf\u00cd\3\2\2\2\u00d0"+
|
||||
"\u00d4\7\23\2\2\u00d1\u00d3\5\66\34\2\u00d2\u00d1\3\2\2\2\u00d3\u00d6"+
|
||||
"\3\2\2\2\u00d4\u00d2\3\2\2\2\u00d4\u00d5\3\2\2\2\u00d5\31\3\2\2\2\u00d6"+
|
||||
"\u00d4\3\2\2\2\u00d7\u00d9\7\6\2\2\u00d8\u00da\5F$\2\u00d9\u00d8\3\2\2"+
|
||||
"\2\u00d9\u00da\3\2\2\2\u00da\u00db\3\2\2\2\u00db\u00dc\7\7\2\2\u00dc\33"+
|
||||
"\3\2\2\2\u00dd\u00de\b\17\1\2\u00de\u00df\5\36\20\2\u00df\u00ea\3\2\2"+
|
||||
"\2\u00e0\u00e1\f\4\2\2\u00e1\u00e9\7\23\2\2\u00e2\u00e3\f\3\2\2\u00e3"+
|
||||
"\u00e5\7\6\2\2\u00e4\u00e6\5F$\2\u00e5\u00e4\3\2\2\2\u00e5\u00e6\3\2\2"+
|
||||
"\2\u00e6\u00e7\3\2\2\2\u00e7\u00e9\7\7\2\2\u00e8\u00e0\3\2\2\2\u00e8\u00e2"+
|
||||
"\3\2\2\2\u00e9\u00ec\3\2\2\2\u00ea\u00e8\3\2\2\2\u00ea\u00eb\3\2\2\2\u00eb"+
|
||||
"\35\3\2\2\2\u00ec\u00ea\3\2\2\2\u00ed\u00ee\b\20\1\2\u00ee\u00ef\7\b\2"+
|
||||
"\2\u00ef\u00f0\5\36\20\2\u00f0\u00f1\7\t\2\2\u00f1\u00fd\3\2\2\2\u00f2"+
|
||||
"\u00fd\7\\\2\2\u00f3\u00f5\7[\2\2\u00f4\u00f6\7\\\2\2\u00f5\u00f4\3\2"+
|
||||
"\2\2\u00f5\u00f6\3\2\2\2\u00f6\u00fd\3\2\2\2\u00f7\u00fd\5\"\22\2\u00f8"+
|
||||
"\u00fd\5 \21\2\u00f9\u00fd\5(\25\2\u00fa\u00fd\5&\24\2\u00fb\u00fd\7\3"+
|
||||
"\2\2\u00fc\u00ed\3\2\2\2\u00fc\u00f2\3\2\2\2\u00fc\u00f3\3\2\2\2\u00fc"+
|
||||
"\u00f7\3\2\2\2\u00fc\u00f8\3\2\2\2\u00fc\u00f9\3\2\2\2\u00fc\u00fa\3\2"+
|
||||
"\2\2\u00fc\u00fb\3\2\2\2\u00fd\u0109\3\2\2\2\u00fe\u00ff\f\t\2\2\u00ff"+
|
||||
"\u0101\7\6\2\2\u0100\u0102\5F$\2\u0101\u0100\3\2\2\2\u0101\u0102\3\2\2"+
|
||||
"\2\u0102\u0103\3\2\2\2\u0103\u0108\7\7\2\2\u0104\u0105\f\b\2\2\u0105\u0106"+
|
||||
"\7\b\2\2\u0106\u0108\7\t\2\2\u0107\u00fe\3\2\2\2\u0107\u0104\3\2\2\2\u0108"+
|
||||
"\u010b\3\2\2\2\u0109\u0107\3\2\2\2\u0109\u010a\3\2\2\2\u010a\37\3\2\2"+
|
||||
"\2\u010b\u0109\3\2\2\2\u010c\u010d\7P\2\2\u010d\u010e\7q\2\2\u010e!\3"+
|
||||
"\2\2\2\u010f\u0111\7P\2\2\u0110\u0112\7q\2\2\u0111\u0110\3\2\2\2\u0111"+
|
||||
"\u0112\3\2\2\2\u0112\u0113\3\2\2\2\u0113\u0115\7\4\2\2\u0114\u0116\5$"+
|
||||
"\23\2\u0115\u0114\3\2\2\2\u0116\u0117\3\2\2\2\u0117\u0115\3\2\2\2\u0117"+
|
||||
"\u0118\3\2\2\2\u0118\u0119\3\2\2\2\u0119\u011a\7\5\2\2\u011a#\3\2\2\2"+
|
||||
"\u011b\u011c\5\16\b\2\u011c\u011d\7\n\2\2\u011d%\3\2\2\2\u011e\u011f\7"+
|
||||
"Q\2\2\u011f\u0120\7q\2\2\u0120\'\3\2\2\2\u0121\u0123\7Q\2\2\u0122\u0124"+
|
||||
"\7q\2\2\u0123\u0122\3\2\2\2\u0123\u0124\3\2\2\2\u0124\u0125\3\2\2\2\u0125"+
|
||||
"\u0126\7\4\2\2\u0126\u0127\5*\26\2\u0127\u0128\7\5\2\2\u0128)\3\2\2\2"+
|
||||
"\u0129\u012a\b\26\1\2\u012a\u012b\5,\27\2\u012b\u0131\3\2\2\2\u012c\u012d"+
|
||||
"\f\3\2\2\u012d\u012e\7\f\2\2\u012e\u0130\5,\27\2\u012f\u012c\3\2\2\2\u0130"+
|
||||
"\u0133\3\2\2\2\u0131\u012f\3\2\2\2\u0131\u0132\3\2\2\2\u0132+\3\2\2\2"+
|
||||
"\u0133\u0131\3\2\2\2\u0134\u0137\7q\2\2\u0135\u0136\7&\2\2\u0136\u0138"+
|
||||
"\5F$\2\u0137\u0135\3\2\2\2\u0137\u0138\3\2\2\2\u0138-\3\2\2\2\u0139\u013d"+
|
||||
"\5\26\f\2\u013a\u013c\5\30\r\2\u013b\u013a\3\2\2\2\u013c\u013f\3\2\2\2"+
|
||||
"\u013d\u013b\3\2\2\2\u013d\u013e\3\2\2\2\u013e\u0140\3\2\2\2\u013f\u013d"+
|
||||
"\3\2\2\2\u0140\u0141\7q\2\2\u0141\u0143\7\b\2\2\u0142\u0144\5\60\31\2"+
|
||||
"\u0143\u0142\3\2\2\2\u0143\u0144\3\2\2\2\u0144\u0145\3\2\2\2\u0145\u0146"+
|
||||
"\7\t\2\2\u0146\u0148\7\4\2\2\u0147\u0149\58\35\2\u0148\u0147\3\2\2\2\u0148"+
|
||||
"\u0149\3\2\2\2\u0149\u014a\3\2\2\2\u014a\u014b\7\5\2\2\u014b/\3\2\2\2"+
|
||||
"\u014c\u0151\5\62\32\2\u014d\u014e\7\f\2\2\u014e\u0150\5\62\32\2\u014f"+
|
||||
"\u014d\3\2\2\2\u0150\u0153\3\2\2\2\u0151\u014f\3\2\2\2\u0151\u0152\3\2"+
|
||||
"\2\2\u0152\61\3\2\2\2\u0153\u0151\3\2\2\2\u0154\u0158\5\26\f\2\u0155\u0157"+
|
||||
"\5\30\r\2\u0156\u0155\3\2\2\2\u0157\u015a\3\2\2\2\u0158\u0156\3\2\2\2"+
|
||||
"\u0158\u0159\3\2\2\2\u0159\u015b\3\2\2\2\u015a\u0158\3\2\2\2\u015b\u015c"+
|
||||
"\7q\2\2\u015c\u015f\3\2\2\2\u015d\u015f\7\\\2\2\u015e\u0154\3\2\2\2\u015e"+
|
||||
"\u015d\3\2\2\2\u015f\63\3\2\2\2\u0160\u0161\7*\2\2\u0161\u0162\7+\2\2"+
|
||||
"\u0162\u0163\3\2\2\2\u0163\u0164\7\b\2\2\u0164\u0169\7h\2\2\u0165\u0166"+
|
||||
"\7\f\2\2\u0166\u0168\7h\2\2\u0167\u0165\3\2\2\2\u0168\u016b\3\2\2\2\u0169"+
|
||||
"\u0167\3\2\2\2\u0169\u016a\3\2\2\2\u016a\u016c\3\2\2\2\u016b\u0169\3\2"+
|
||||
"\2\2\u016c\u01ab\7\t\2\2\u016d\u016e\7*\2\2\u016e\u016f\7,\2\2\u016f\u0170"+
|
||||
"\3\2\2\2\u0170\u0171\7\b\2\2\u0171\u0172\7h\2\2\u0172\u01ab\7\t\2\2\u0173"+
|
||||
"\u0174\7*\2\2\u0174\u0175\7-\2\2\u0175\u0176\3\2\2\2\u0176\u0177\7\b\2"+
|
||||
"\2\u0177\u0178\7q\2\2\u0178\u01ab\7\t\2\2\u0179\u017a\7*\2\2\u017a\u017b"+
|
||||
"\7/\2\2\u017b\u017c\3\2\2\2\u017c\u017d\7\b\2\2\u017d\u017e\7q\2\2\u017e"+
|
||||
"\u01ab\7\t\2\2\u017f\u0180\7*\2\2\u0180\u0181\7.\2\2\u0181\u0182\3\2\2"+
|
||||
"\2\u0182\u0183\7\b\2\2\u0183\u0184\7_\2\2\u0184\u01ab\7\t\2\2\u0185\u0186"+
|
||||
"\7*\2\2\u0186\u0187\7\60\2\2\u0187\u0188\3\2\2\2\u0188\u0189\7\b\2\2\u0189"+
|
||||
"\u018a\7q\2\2\u018a\u01ab\7\t\2\2\u018b\u018c\7*\2\2\u018c\u018d\7\61"+
|
||||
"\2\2\u018d\u018e\3\2\2\2\u018e\u018f\7\b\2\2\u018f\u0190\7q\2\2\u0190"+
|
||||
"\u01ab\7\t\2\2\u0191\u0192\7*\2\2\u0192\u0193\7\62\2\2\u0193\u0194\3\2"+
|
||||
"\2\2\u0194\u0195\7\b\2\2\u0195\u0196\7m\2\2\u0196\u01ab\7\t\2\2\u0197"+
|
||||
"\2\2\u0194\u0195\7\b\2\2\u0195\u0196\7q\2\2\u0196\u01ab\7\t\2\2\u0197"+
|
||||
"\u0198\7*\2\2\u0198\u0199\7A\2\2\u0199\u019a\3\2\2\2\u019a\u019b\7\b\2"+
|
||||
"\2\u019b\u019c\7B\2\2\u019c\u01ab\7\t\2\2\u019d\u019e\7*\2\2\u019e\u019f"+
|
||||
"\7C\2\2\u019f\u01a0\3\2\2\2\u01a0\u01a1\7\b\2\2\u01a1\u01a6\7m\2\2\u01a2"+
|
||||
"\u01a3\7\f\2\2\u01a3\u01a5\7m\2\2\u01a4\u01a2\3\2\2\2\u01a5\u01a8\3\2"+
|
||||
"\7C\2\2\u019f\u01a0\3\2\2\2\u01a0\u01a1\7\b\2\2\u01a1\u01a6\7q\2\2\u01a2"+
|
||||
"\u01a3\7\f\2\2\u01a3\u01a5\7q\2\2\u01a4\u01a2\3\2\2\2\u01a5\u01a8\3\2"+
|
||||
"\2\2\u01a6\u01a4\3\2\2\2\u01a6\u01a7\3\2\2\2\u01a7\u01a9\3\2\2\2\u01a8"+
|
||||
"\u01a6\3\2\2\2\u01a9\u01ab\7\t\2\2\u01aa\u0160\3\2\2\2\u01aa\u016d\3\2"+
|
||||
"\2\2\u01aa\u0173\3\2\2\2\u01aa\u0179\3\2\2\2\u01aa\u017f\3\2\2\2\u01aa"+
|
||||
"\u0185\3\2\2\2\u01aa\u018b\3\2\2\2\u01aa\u0191\3\2\2\2\u01aa\u0197\3\2"+
|
||||
"\2\2\u01aa\u019d\3\2\2\2\u01ab\65\3\2\2\2\u01ac\u01d7\7\63\2\2\u01ad\u01ae"+
|
||||
"\7\66\2\2\u01ae\u01af\7\b\2\2\u01af\u01b0\7d\2\2\u01b0\u01d7\7\t\2\2\u01b1"+
|
||||
"\u01b5\7;\2\2\u01b2\u01b3\7\b\2\2\u01b3\u01b4\7m\2\2\u01b4\u01b6\7\t\2"+
|
||||
"\7\66\2\2\u01ae\u01af\7\b\2\2\u01af\u01b0\7h\2\2\u01b0\u01d7\7\t\2\2\u01b1"+
|
||||
"\u01b5\7;\2\2\u01b2\u01b3\7\b\2\2\u01b3\u01b4\7q\2\2\u01b4\u01b6\7\t\2"+
|
||||
"\2\u01b5\u01b2\3\2\2\2\u01b5\u01b6\3\2\2\2\u01b6\u01d7\3\2\2\2\u01b7\u01d7"+
|
||||
"\7=\2\2\u01b8\u01d7\7>\2\2\u01b9\u01ba\7<\2\2\u01ba\u01bb\7\b\2\2\u01bb"+
|
||||
"\u01bc\7d\2\2\u01bc\u01d7\7\t\2\2\u01bd\u01d7\78\2\2\u01be\u01d7\79\2"+
|
||||
"\u01bc\7h\2\2\u01bc\u01d7\7\t\2\2\u01bd\u01d7\78\2\2\u01be\u01d7\79\2"+
|
||||
"\2\u01bf\u01d7\7?\2\2\u01c0\u01d7\7@\2\2\u01c1\u01d7\7\64\2\2\u01c2\u01d7"+
|
||||
"\7\65\2\2\u01c3\u01d7\7\67\2\2\u01c4\u01c8\7:\2\2\u01c5\u01c6\7\b\2\2"+
|
||||
"\u01c6\u01c7\7m\2\2\u01c7\u01c9\7\t\2\2\u01c8\u01c5\3\2\2\2\u01c8\u01c9"+
|
||||
"\u01c6\u01c7\7q\2\2\u01c7\u01c9\7\t\2\2\u01c8\u01c5\3\2\2\2\u01c8\u01c9"+
|
||||
"\3\2\2\2\u01c9\u01d7\3\2\2\2\u01ca\u01cb\7+\2\2\u01cb\u01cc\7\b\2\2\u01cc"+
|
||||
"\u01d1\7d\2\2\u01cd\u01ce\7\f\2\2\u01ce\u01d0\7d\2\2\u01cf\u01cd\3\2\2"+
|
||||
"\u01d1\7h\2\2\u01cd\u01ce\7\f\2\2\u01ce\u01d0\7h\2\2\u01cf\u01cd\3\2\2"+
|
||||
"\2\u01d0\u01d3\3\2\2\2\u01d1\u01cf\3\2\2\2\u01d1\u01d2\3\2\2\2\u01d2\u01d4"+
|
||||
"\3\2\2\2\u01d3\u01d1\3\2\2\2\u01d4\u01d7\7\t\2\2\u01d5\u01d7\7B\2\2\u01d6"+
|
||||
"\u01ac\3\2\2\2\u01d6\u01ad\3\2\2\2\u01d6\u01b1\3\2\2\2\u01d6\u01b7\3\2"+
|
||||
@ -7444,7 +7445,7 @@ public class KickCParser extends Parser {
|
||||
"\7K\2\2\u0225\u0232\7\n\2\2\u0226\u0227\7L\2\2\u0227\u0232\7\n\2\2\u0228"+
|
||||
"\u022a\7M\2\2\u0229\u022b\5L\'\2\u022a\u0229\3\2\2\2\u022a\u022b\3\2\2"+
|
||||
"\2\u022b\u022c\3\2\2\2\u022c\u022d\7\4\2\2\u022d\u022e\5P)\2\u022e\u022f"+
|
||||
"\7\u0084\2\2\u022f\u0232\3\2\2\2\u0230\u0232\5J&\2\u0231\u01dd\3\2\2\2"+
|
||||
"\7\u0088\2\2\u022f\u0232\3\2\2\2\u0230\u0232\5J&\2\u0231\u01dd\3\2\2\2"+
|
||||
"\u0231\u01e0\3\2\2\2\u0231\u01e5\3\2\2\2\u0231\u01e8\3\2\2\2\u0231\u01f4"+
|
||||
"\3\2\2\2\u0231\u0200\3\2\2\2\u0231\u020e\3\2\2\2\u0231\u0217\3\2\2\2\u0231"+
|
||||
"\u021f\3\2\2\2\u0231\u0224\3\2\2\2\u0231\u0226\3\2\2\2\u0231\u0228\3\2"+
|
||||
@ -7460,7 +7461,7 @@ public class KickCParser extends Parser {
|
||||
"\f\2\u024d\u024f\5\30\r\2\u024e\u024d\3\2\2\2\u024f\u0252\3\2\2\2\u0250"+
|
||||
"\u024e\3\2\2\2\u0250\u0251\3\2\2\2\u0251\u0254\3\2\2\2\u0252\u0250\3\2"+
|
||||
"\2\2\u0253\u024c\3\2\2\2\u0253\u0254\3\2\2\2\u0254\u0255\3\2\2\2\u0255"+
|
||||
"\u0256\7m\2\2\u0256\u0257\7\13\2\2\u0257\u0258\5F$\2\u0258\u0259\7\r\2"+
|
||||
"\u0256\7q\2\2\u0256\u0257\7\13\2\2\u0257\u0258\5F$\2\u0258\u0259\7\r\2"+
|
||||
"\2\u0259\u025a\5F$\2\u025a\u025c\3\2\2\2\u025b\u0245\3\2\2\2\u025b\u0253"+
|
||||
"\3\2\2\2\u025cA\3\2\2\2\u025d\u025f\5\16\b\2\u025e\u025d\3\2\2\2\u025e"+
|
||||
"\u025f\3\2\2\2\u025f\u0262\3\2\2\2\u0260\u0262\5D#\2\u0261\u025e\3\2\2"+
|
||||
@ -7481,7 +7482,7 @@ public class KickCParser extends Parser {
|
||||
"\22\u0290\u0291\7\4\2\2\u0291\u0296\5F$\2\u0292\u0293\7\f\2\2\u0293\u0295"+
|
||||
"\5F$\2\u0294\u0292\3\2\2\2\u0295\u0298\3\2\2\2\u0296\u0294\3\2\2\2\u0296"+
|
||||
"\u0297\3\2\2\2\u0297\u0299\3\2\2\2\u0298\u0296\3\2\2\2\u0299\u029a\7\5"+
|
||||
"\2\2\u029a\u02a5\3\2\2\2\u029b\u02a5\7m\2\2\u029c\u02a5\7d\2\2\u029d\u029f"+
|
||||
"\2\2\u029a\u02a5\3\2\2\2\u029b\u02a5\7q\2\2\u029c\u02a5\7h\2\2\u029d\u029f"+
|
||||
"\7_\2\2\u029e\u029d\3\2\2\2\u029f\u02a0\3\2\2\2\u02a0\u029e\3\2\2\2\u02a0"+
|
||||
"\u02a1\3\2\2\2\u02a1\u02a5\3\2\2\2\u02a2\u02a5\7`\2\2\u02a3\u02a5\7]\2"+
|
||||
"\2\u02a4\u026e\3\2\2\2\u02a4\u0273\3\2\2\2\u02a4\u027b\3\2\2\2\u02a4\u0283"+
|
||||
@ -7499,8 +7500,8 @@ public class KickCParser extends Parser {
|
||||
"\f\13\2\2\u02c2\u02c3\7\16\2\2\u02c3\u02c4\5F$\2\u02c4\u02c5\7\13\2\2"+
|
||||
"\u02c5\u02c6\5F$\f\u02c6\u02e1\3\2\2\2\u02c7\u02c8\f\n\2\2\u02c8\u02c9"+
|
||||
"\7&\2\2\u02c9\u02e1\5F$\n\u02ca\u02cb\f\t\2\2\u02cb\u02cc\7\'\2\2\u02cc"+
|
||||
"\u02e1\5F$\t\u02cd\u02ce\f \2\2\u02ce\u02cf\7\17\2\2\u02cf\u02e1\7m\2"+
|
||||
"\2\u02d0\u02d1\f\37\2\2\u02d1\u02d2\7\20\2\2\u02d2\u02e1\7m\2\2\u02d3"+
|
||||
"\u02e1\5F$\t\u02cd\u02ce\f \2\2\u02ce\u02cf\7\17\2\2\u02cf\u02e1\7q\2"+
|
||||
"\2\u02d0\u02d1\f\37\2\2\u02d1\u02d2\7\20\2\2\u02d2\u02e1\7q\2\2\u02d3"+
|
||||
"\u02d4\f\36\2\2\u02d4\u02d6\7\b\2\2\u02d5\u02d7\5H%\2\u02d6\u02d5\3\2"+
|
||||
"\2\2\u02d6\u02d7\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u02e1\7\t\2\2\u02d9"+
|
||||
"\u02da\f\33\2\2\u02da\u02db\7\6\2\2\u02db\u02dc\5D#\2\u02dc\u02dd\7\7"+
|
||||
@ -7519,7 +7520,7 @@ public class KickCParser extends Parser {
|
||||
"\u02f6\7\f\2\2\u02f6\u02f8\5N(\2\u02f7\u02f5\3\2\2\2\u02f8\u02fb\3\2\2"+
|
||||
"\2\u02f9\u02f7\3\2\2\2\u02f9\u02fa\3\2\2\2\u02fa\u02fc\3\2\2\2\u02fb\u02f9"+
|
||||
"\3\2\2\2\u02fc\u02fd\7\t\2\2\u02fdM\3\2\2\2\u02fe\u02ff\7U\2\2\u02ff\u030e"+
|
||||
"\7_\2\2\u0300\u0301\7V\2\2\u0301\u030e\7m\2\2\u0302\u0303\7W\2\2\u0303"+
|
||||
"\7_\2\2\u0300\u0301\7V\2\2\u0301\u030e\7q\2\2\u0302\u0303\7W\2\2\u0303"+
|
||||
"\u030e\7_\2\2\u0304\u0305\7X\2\2\u0305\u030e\5F$\2\u0306\u0307\7Y\2\2"+
|
||||
"\u0307\u030e\5F$\2\u0308\u030b\7,\2\2\u0309\u030c\7\67\2\2\u030a\u030c"+
|
||||
"\5F$\2\u030b\u0309\3\2\2\2\u030b\u030a\3\2\2\2\u030c\u030e\3\2\2\2\u030d"+
|
||||
@ -7528,28 +7529,28 @@ public class KickCParser extends Parser {
|
||||
"\5R*\2\u0310\u030f\3\2\2\2\u0311\u0314\3\2\2\2\u0312\u0310\3\2\2\2\u0312"+
|
||||
"\u0313\3\2\2\2\u0313Q\3\2\2\2\u0314\u0312\3\2\2\2\u0315\u0319\5T+\2\u0316"+
|
||||
"\u0319\5V,\2\u0317\u0319\5X-\2\u0318\u0315\3\2\2\2\u0318\u0316\3\2\2\2"+
|
||||
"\u0318\u0317\3\2\2\2\u0319S\3\2\2\2\u031a\u031b\7\u0091\2\2\u031b\u031f"+
|
||||
"\7t\2\2\u031c\u031d\7\u0090\2\2\u031d\u031f\7t\2\2\u031e\u031a\3\2\2\2"+
|
||||
"\u031e\u031c\3\2\2\2\u031fU\3\2\2\2\u0320\u0322\7r\2\2\u0321\u0323\5Z"+
|
||||
"\u0318\u0317\3\2\2\2\u0319S\3\2\2\2\u031a\u031b\7\u0095\2\2\u031b\u031f"+
|
||||
"\7x\2\2\u031c\u031d\7\u0094\2\2\u031d\u031f\7x\2\2\u031e\u031a\3\2\2\2"+
|
||||
"\u031e\u031c\3\2\2\2\u031fU\3\2\2\2\u0320\u0322\7v\2\2\u0321\u0323\5Z"+
|
||||
".\2\u0322\u0321\3\2\2\2\u0322\u0323\3\2\2\2\u0323W\3\2\2\2\u0324\u0325"+
|
||||
"\7q\2\2\u0325\u032a\5\\/\2\u0326\u0327\7u\2\2\u0327\u0329\5\\/\2\u0328"+
|
||||
"\7u\2\2\u0325\u032a\5\\/\2\u0326\u0327\7y\2\2\u0327\u0329\5\\/\2\u0328"+
|
||||
"\u0326\3\2\2\2\u0329\u032c\3\2\2\2\u032a\u0328\3\2\2\2\u032a\u032b\3\2"+
|
||||
"\2\2\u032bY\3\2\2\2\u032c\u032a\3\2\2\2\u032d\u0345\5\\/\2\u032e\u032f"+
|
||||
"\7s\2\2\u032f\u0345\5\\/\2\u0330\u0331\5\\/\2\u0331\u0332\7u\2\2\u0332"+
|
||||
"\u0333\7\u0091\2\2\u0333\u0345\3\2\2\2\u0334\u0335\7v\2\2\u0335\u0336"+
|
||||
"\5\\/\2\u0336\u0337\7w\2\2\u0337\u0338\7u\2\2\u0338\u0339\7\u0091\2\2"+
|
||||
"\u0339\u0345\3\2\2\2\u033a\u033b\7v\2\2\u033b\u033c\5\\/\2\u033c\u033d"+
|
||||
"\7u\2\2\u033d\u033e\7\u0091\2\2\u033e\u033f\7w\2\2\u033f\u0345\3\2\2\2"+
|
||||
"\u0340\u0341\7v\2\2\u0341\u0342\5\\/\2\u0342\u0343\7w\2\2\u0343\u0345"+
|
||||
"\7w\2\2\u032f\u0345\5\\/\2\u0330\u0331\5\\/\2\u0331\u0332\7y\2\2\u0332"+
|
||||
"\u0333\7\u0095\2\2\u0333\u0345\3\2\2\2\u0334\u0335\7z\2\2\u0335\u0336"+
|
||||
"\5\\/\2\u0336\u0337\7{\2\2\u0337\u0338\7y\2\2\u0338\u0339\7\u0095\2\2"+
|
||||
"\u0339\u0345\3\2\2\2\u033a\u033b\7z\2\2\u033b\u033c\5\\/\2\u033c\u033d"+
|
||||
"\7y\2\2\u033d\u033e\7\u0095\2\2\u033e\u033f\7{\2\2\u033f\u0345\3\2\2\2"+
|
||||
"\u0340\u0341\7z\2\2\u0341\u0342\5\\/\2\u0342\u0343\7{\2\2\u0343\u0345"+
|
||||
"\3\2\2\2\u0344\u032d\3\2\2\2\u0344\u032e\3\2\2\2\u0344\u0330\3\2\2\2\u0344"+
|
||||
"\u0334\3\2\2\2\u0344\u033a\3\2\2\2\u0344\u0340\3\2\2\2\u0345[\3\2\2\2"+
|
||||
"\u0346\u0347\b/\1\2\u0347\u0348\7x\2\2\u0348\u0349\5\\/\2\u0349\u034a"+
|
||||
"\7y\2\2\u034a\u0355\3\2\2\2\u034b\u034c\t\t\2\2\u034c\u0355\5\\/\n\u034d"+
|
||||
"\u0355\7\u0091\2\2\u034e\u0355\7\u008f\2\2\u034f\u0350\7\u0083\2\2\u0350"+
|
||||
"\u0351\7\u0091\2\2\u0351\u0355\7\u0084\2\2\u0352\u0355\7\u0085\2\2\u0353"+
|
||||
"\u0355\7\u008e\2\2\u0354\u0346\3\2\2\2\u0354\u034b\3\2\2\2\u0354\u034d"+
|
||||
"\u0346\u0347\b/\1\2\u0347\u0348\7|\2\2\u0348\u0349\5\\/\2\u0349\u034a"+
|
||||
"\7}\2\2\u034a\u0355\3\2\2\2\u034b\u034c\t\t\2\2\u034c\u0355\5\\/\n\u034d"+
|
||||
"\u0355\7\u0095\2\2\u034e\u0355\7\u0093\2\2\u034f\u0350\7\u0087\2\2\u0350"+
|
||||
"\u0351\7\u0095\2\2\u0351\u0355\7\u0088\2\2\u0352\u0355\7\u0089\2\2\u0353"+
|
||||
"\u0355\7\u0092\2\2\u0354\u0346\3\2\2\2\u0354\u034b\3\2\2\2\u0354\u034d"+
|
||||
"\3\2\2\2\u0354\u034e\3\2\2\2\u0354\u034f\3\2\2\2\u0354\u0352\3\2\2\2\u0354"+
|
||||
"\u0353\3\2\2\2\u0355\u0364\3\2\2\2\u0356\u0357\f\f\2\2\u0357\u0358\7z"+
|
||||
"\u0353\3\2\2\2\u0355\u0364\3\2\2\2\u0356\u0357\f\f\2\2\u0357\u0358\7~"+
|
||||
"\2\2\u0358\u0363\5\\/\r\u0359\u035a\f\13\2\2\u035a\u035b\t\n\2\2\u035b"+
|
||||
"\u0363\5\\/\f\u035c\u035d\f\t\2\2\u035d\u035e\t\13\2\2\u035e\u0363\5\\"+
|
||||
"/\n\u035f\u0360\f\b\2\2\u0360\u0361\t\f\2\2\u0361\u0363\5\\/\t\u0362\u0356"+
|
||||
|
@ -95,55 +95,59 @@ CHAR=94
|
||||
DEFINE=95
|
||||
DEFINE_CONTINUE=96
|
||||
UNDEF=97
|
||||
NUMBER=98
|
||||
NUMFLOAT=99
|
||||
BINFLOAT=100
|
||||
DECFLOAT=101
|
||||
HEXFLOAT=102
|
||||
NUMINT=103
|
||||
BININTEGER=104
|
||||
DECINTEGER=105
|
||||
HEXINTEGER=106
|
||||
NAME=107
|
||||
WS=108
|
||||
COMMENT_LINE=109
|
||||
COMMENT_BLOCK=110
|
||||
ASM_BYTE=111
|
||||
ASM_MNEMONIC=112
|
||||
ASM_IMM=113
|
||||
ASM_COLON=114
|
||||
ASM_COMMA=115
|
||||
ASM_PAR_BEGIN=116
|
||||
ASM_PAR_END=117
|
||||
ASM_BRACKET_BEGIN=118
|
||||
ASM_BRACKET_END=119
|
||||
ASM_DOT=120
|
||||
ASM_SHIFT_LEFT=121
|
||||
ASM_SHIFT_RIGHT=122
|
||||
ASM_PLUS=123
|
||||
ASM_MINUS=124
|
||||
ASM_LESS_THAN=125
|
||||
ASM_GREATER_THAN=126
|
||||
ASM_MULTIPLY=127
|
||||
ASM_DIVIDE=128
|
||||
ASM_CURLY_BEGIN=129
|
||||
ASM_CURLY_END=130
|
||||
ASM_NUMBER=131
|
||||
ASM_NUMFLOAT=132
|
||||
ASM_BINFLOAT=133
|
||||
ASM_DECFLOAT=134
|
||||
ASM_HEXFLOAT=135
|
||||
ASM_NUMINT=136
|
||||
ASM_BININTEGER=137
|
||||
ASM_DECINTEGER=138
|
||||
ASM_HEXINTEGER=139
|
||||
ASM_CHAR=140
|
||||
ASM_MULTI_REL=141
|
||||
ASM_MULTI_NAME=142
|
||||
ASM_NAME=143
|
||||
ASM_WS=144
|
||||
ASM_COMMENT_LINE=145
|
||||
ASM_COMMENT_BLOCK=146
|
||||
IFDEF=98
|
||||
IFNDEF=99
|
||||
IFELSE=100
|
||||
ENDIF=101
|
||||
NUMBER=102
|
||||
NUMFLOAT=103
|
||||
BINFLOAT=104
|
||||
DECFLOAT=105
|
||||
HEXFLOAT=106
|
||||
NUMINT=107
|
||||
BININTEGER=108
|
||||
DECINTEGER=109
|
||||
HEXINTEGER=110
|
||||
NAME=111
|
||||
WS=112
|
||||
COMMENT_LINE=113
|
||||
COMMENT_BLOCK=114
|
||||
ASM_BYTE=115
|
||||
ASM_MNEMONIC=116
|
||||
ASM_IMM=117
|
||||
ASM_COLON=118
|
||||
ASM_COMMA=119
|
||||
ASM_PAR_BEGIN=120
|
||||
ASM_PAR_END=121
|
||||
ASM_BRACKET_BEGIN=122
|
||||
ASM_BRACKET_END=123
|
||||
ASM_DOT=124
|
||||
ASM_SHIFT_LEFT=125
|
||||
ASM_SHIFT_RIGHT=126
|
||||
ASM_PLUS=127
|
||||
ASM_MINUS=128
|
||||
ASM_LESS_THAN=129
|
||||
ASM_GREATER_THAN=130
|
||||
ASM_MULTIPLY=131
|
||||
ASM_DIVIDE=132
|
||||
ASM_CURLY_BEGIN=133
|
||||
ASM_CURLY_END=134
|
||||
ASM_NUMBER=135
|
||||
ASM_NUMFLOAT=136
|
||||
ASM_BINFLOAT=137
|
||||
ASM_DECFLOAT=138
|
||||
ASM_HEXFLOAT=139
|
||||
ASM_NUMINT=140
|
||||
ASM_BININTEGER=141
|
||||
ASM_DECINTEGER=142
|
||||
ASM_HEXINTEGER=143
|
||||
ASM_CHAR=144
|
||||
ASM_MULTI_REL=145
|
||||
ASM_MULTI_NAME=146
|
||||
ASM_NAME=147
|
||||
ASM_WS=148
|
||||
ASM_COMMENT_LINE=149
|
||||
ASM_COMMENT_BLOCK=150
|
||||
';'=8
|
||||
'..'=11
|
||||
'?'=12
|
||||
@ -215,5 +219,9 @@ ASM_COMMENT_BLOCK=146
|
||||
'#define'=95
|
||||
'\\\n'=96
|
||||
'#undef'=97
|
||||
'.byte'=111
|
||||
'#'=113
|
||||
'#ifdef'=98
|
||||
'#ifndef'=99
|
||||
'#else'=100
|
||||
'#endif'=101
|
||||
'.byte'=115
|
||||
'#'=117
|
||||
|
@ -87,10 +87,23 @@ public class CPreprocessor implements TokenSource {
|
||||
*/
|
||||
private boolean preprocess(Token inputToken, CTokenSource cTokenSource) {
|
||||
if(inputToken.getType() == tokenTypes.define) {
|
||||
defineMacro(cTokenSource);
|
||||
define(cTokenSource);
|
||||
return true;
|
||||
} else if(inputToken.getType() == tokenTypes.undef) {
|
||||
undefMacro(cTokenSource);
|
||||
undef(cTokenSource);
|
||||
return true;
|
||||
} else if(inputToken.getType() == tokenTypes.ifndef) {
|
||||
ifndef(cTokenSource);
|
||||
return true;
|
||||
} else if(inputToken.getType() == tokenTypes.ifdef) {
|
||||
ifdef(cTokenSource);
|
||||
return true;
|
||||
} else if(inputToken.getType() == tokenTypes.ifelse) {
|
||||
// #else means we must skip until #endif
|
||||
ifelse(cTokenSource);
|
||||
return true;
|
||||
} else if(inputToken.getType() == tokenTypes.endif) {
|
||||
// Skip #endif - they have already been handled by #if / #else
|
||||
return true;
|
||||
} else if(inputToken.getType() == tokenTypes.identifier) {
|
||||
final boolean expanded = expandMacro(inputToken, cTokenSource);
|
||||
@ -101,6 +114,7 @@ public class CPreprocessor implements TokenSource {
|
||||
|
||||
/**
|
||||
* Encountered an IDENTIFIER. Attempt to expand as a macro.
|
||||
*
|
||||
* @param inputToken The IDENTIFIER token
|
||||
* @param cTokenSource The token source usable for getting more tokens (eg. parameter values) - and for pushing the expanded body to the front for further processing.
|
||||
* @return true if a macro was expanded. False if not.
|
||||
@ -141,20 +155,98 @@ public class CPreprocessor implements TokenSource {
|
||||
|
||||
/**
|
||||
* Undefine a macro.
|
||||
*
|
||||
* @param cTokenSource The token source used to get the name
|
||||
*/
|
||||
private void undefMacro(CTokenSource cTokenSource) {
|
||||
// #define a new macro - find the name
|
||||
private void undef(CTokenSource cTokenSource) {
|
||||
// #undef a new macro - find the name
|
||||
skipWhitespace(cTokenSource);
|
||||
String macroName = nextToken(cTokenSource, tokenTypes.identifier).getText();
|
||||
this.defines.remove(macroName);
|
||||
}
|
||||
|
||||
/**
|
||||
* #ifdef checks if a macro is defined.
|
||||
*
|
||||
* @param cTokenSource The token source used to get the macro name
|
||||
*/
|
||||
private void ifdef(CTokenSource cTokenSource) {
|
||||
skipWhitespace(cTokenSource);
|
||||
String macroName = nextToken(cTokenSource, tokenTypes.identifier).getText();
|
||||
final boolean defined = this.defines.containsKey(macroName);
|
||||
if(!defined) {
|
||||
iffalse(cTokenSource);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* #ifdef checks if a macro is _NOT_ defined.
|
||||
*
|
||||
* @param cTokenSource The token source used to get the macro name
|
||||
*/
|
||||
private void ifndef(CTokenSource cTokenSource) {
|
||||
skipWhitespace(cTokenSource);
|
||||
String macroName = nextToken(cTokenSource, tokenTypes.identifier).getText();
|
||||
final boolean defined = this.defines.containsKey(macroName);
|
||||
if(defined) {
|
||||
iffalse(cTokenSource);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Skip tokens based in an #if that is false
|
||||
* @param cTokenSource The token source
|
||||
*/
|
||||
private void iffalse(CTokenSource cTokenSource) {
|
||||
// Skip tokens until finding a matching #endif - respect nesting
|
||||
int nesting = 1;
|
||||
while(true) {
|
||||
final Token token = cTokenSource.nextToken();
|
||||
final int tokenType = token.getType();
|
||||
if(tokenType == tokenTypes.ifdef || tokenType == tokenTypes.ifndef) {
|
||||
++nesting;
|
||||
} else if(tokenType == tokenTypes.ifelse) {
|
||||
if(nesting == 1) {
|
||||
// We are at the outer #if - #else means we must generate output from here!
|
||||
return;
|
||||
}
|
||||
} else if(tokenType == tokenTypes.endif) {
|
||||
if(--nesting == 0) {
|
||||
// We have passed the matching #endif - restart the output!
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* #else skips until a matching #endif
|
||||
*
|
||||
* @param cTokenSource The token source
|
||||
*/
|
||||
private void ifelse(CTokenSource cTokenSource) {
|
||||
int nesting = 1;
|
||||
while(true) {
|
||||
final Token token = cTokenSource.nextToken();
|
||||
final int tokenType = token.getType();
|
||||
if(tokenType == tokenTypes.ifdef || tokenType == tokenTypes.ifndef) {
|
||||
++nesting;
|
||||
} else if(tokenType == tokenTypes.endif) {
|
||||
if(--nesting == 0) {
|
||||
// We have passed the matching #endif
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Define a macro.
|
||||
*
|
||||
* @param cTokenSource The token source used to get the macro name and body.
|
||||
*/
|
||||
private void defineMacro(CTokenSource cTokenSource) {
|
||||
private void define(CTokenSource cTokenSource) {
|
||||
// #define a new macro - find the name
|
||||
skipWhitespace(cTokenSource);
|
||||
String macroName = nextToken(cTokenSource, tokenTypes.identifier).getText();
|
||||
@ -166,8 +258,7 @@ public class CPreprocessor implements TokenSource {
|
||||
}
|
||||
// Find body by gobbling tokens until the line ends
|
||||
final ArrayList<Token> macroBody = new ArrayList<>();
|
||||
boolean macroRead = true;
|
||||
while(macroRead) {
|
||||
while(true) {
|
||||
final Token bodyToken = cTokenSource.nextToken();
|
||||
if(bodyToken.getType() == tokenTypes.defineMultiline) {
|
||||
// Skip the multi-line token, add a newline token and continue reading body on the next line
|
||||
@ -179,7 +270,8 @@ public class CPreprocessor implements TokenSource {
|
||||
continue;
|
||||
}
|
||||
if(bodyToken.getChannel() == tokenTypes.channelWhitespace && bodyToken.getText().contains("\n")) {
|
||||
macroRead = false;
|
||||
// Done reading the body
|
||||
break;
|
||||
} else {
|
||||
macroBody.add(bodyToken);
|
||||
}
|
||||
@ -187,7 +279,6 @@ public class CPreprocessor implements TokenSource {
|
||||
defines.put(macroName, macroBody);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Pull first token from a source and check that it matches the expected type. Any other type will produce an error.
|
||||
*
|
||||
@ -203,13 +294,19 @@ public class CPreprocessor implements TokenSource {
|
||||
}
|
||||
|
||||
/**
|
||||
* Skip whitespace tokens, positioning iterator at the next non-whitespace
|
||||
* Skip whitespace tokens (except newlines), positioning iterator at the next non-whitespace
|
||||
*
|
||||
* @param cTokenSource The token iterator
|
||||
*/
|
||||
private void skipWhitespace(CTokenSource cTokenSource) {
|
||||
while(cTokenSource.peekToken().getChannel() == tokenTypes.channelWhitespace)
|
||||
while(true) {
|
||||
final Token token = cTokenSource.peekToken();
|
||||
if(token.getChannel() != tokenTypes.channelWhitespace)
|
||||
break;
|
||||
if(token.getText().contains("\n"))
|
||||
break;
|
||||
cTokenSource.nextToken();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -15,6 +15,14 @@ public class CPreprocessorTokens {
|
||||
final int defineMultiline;
|
||||
/** The token type for #undef. */
|
||||
final int undef;
|
||||
/** The token type for #ifdef. */
|
||||
final int ifdef;
|
||||
/** The token type for #ifndef. */
|
||||
final int ifndef;
|
||||
/** The token type for #else. */
|
||||
final int ifelse;
|
||||
/** The token type for #endif. */
|
||||
final int endif;
|
||||
/** The token type for identifiers. */
|
||||
final int identifier;
|
||||
/** The token type for parenthesis begin. */
|
||||
@ -24,13 +32,17 @@ public class CPreprocessorTokens {
|
||||
/** The token type for comma. */
|
||||
final int comma;
|
||||
|
||||
public CPreprocessorTokens(int channelWhitespace, int whitespace, int define, int identifier, int defineMultiline, int undef, int parBegin, int parEnd, int comma) {
|
||||
public CPreprocessorTokens(int channelWhitespace, int whitespace, int define, int identifier, int defineMultiline, int undef, int ifdef, int ifndef, int ifelse, int endif, int parBegin, int parEnd, int comma) {
|
||||
this.channelWhitespace = channelWhitespace;
|
||||
this.whitespace = whitespace;
|
||||
this.define = define;
|
||||
this.identifier = identifier;
|
||||
this.defineMultiline = defineMultiline;
|
||||
this.undef = undef;
|
||||
this.ifdef = ifdef;
|
||||
this.ifndef = ifndef;
|
||||
this.ifelse = ifelse;
|
||||
this.endif = endif;
|
||||
this.parBegin = parBegin;
|
||||
this.parEnd = parEnd;
|
||||
this.comma = comma;
|
||||
|
@ -37,9 +37,13 @@ PAR_BEGIN: '(' ;
|
||||
PAR_END: ')' ;
|
||||
COMMA : ',' ;
|
||||
SIMPLETYPE: 'char' | 'int' ;
|
||||
IDENTIFIER: [a-zA-Z_]+ ;
|
||||
IDENTIFIER: [a-zA-Z_][a-zA-Z_0-9]* ;
|
||||
NUMBER: [0-9]+ ;
|
||||
DEFINE: '#define' ;
|
||||
UNDEF: '#undef' ;
|
||||
IFDEF: '#ifdef' ;
|
||||
IFNDEF: '#ifndef' ;
|
||||
IFELSE: '#else' ;
|
||||
ENDIF: '#endif' ;
|
||||
DEFINE_CONTINUE: '\\\n' ;
|
||||
WHITESPACE: [ \t\r\n]+ -> channel(1) ; // Send whitespace to the hidden WS channel
|
||||
|
@ -13,6 +13,10 @@ null
|
||||
null
|
||||
'#define'
|
||||
'#undef'
|
||||
'#ifdef'
|
||||
'#ifndef'
|
||||
'#else'
|
||||
'#endif'
|
||||
'\\\n'
|
||||
null
|
||||
|
||||
@ -31,6 +35,10 @@ IDENTIFIER
|
||||
NUMBER
|
||||
DEFINE
|
||||
UNDEF
|
||||
IFDEF
|
||||
IFNDEF
|
||||
IFELSE
|
||||
ENDIF
|
||||
DEFINE_CONTINUE
|
||||
WHITESPACE
|
||||
|
||||
@ -41,4 +49,4 @@ expr
|
||||
|
||||
|
||||
atn:
|
||||
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 17, 51, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 3, 2, 7, 2, 10, 10, 2, 12, 2, 14, 2, 13, 11, 2, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 29, 10, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 7, 4, 46, 10, 4, 12, 4, 14, 4, 49, 11, 4, 3, 4, 2, 3, 6, 5, 2, 4, 6, 2, 2, 2, 56, 2, 11, 3, 2, 2, 2, 4, 14, 3, 2, 2, 2, 6, 28, 3, 2, 2, 2, 8, 10, 5, 4, 3, 2, 9, 8, 3, 2, 2, 2, 10, 13, 3, 2, 2, 2, 11, 9, 3, 2, 2, 2, 11, 12, 3, 2, 2, 2, 12, 3, 3, 2, 2, 2, 13, 11, 3, 2, 2, 2, 14, 15, 5, 6, 4, 2, 15, 16, 7, 3, 2, 2, 16, 5, 3, 2, 2, 2, 17, 18, 8, 4, 1, 2, 18, 19, 7, 8, 2, 2, 19, 20, 7, 11, 2, 2, 20, 21, 7, 9, 2, 2, 21, 29, 5, 6, 4, 11, 22, 29, 7, 12, 2, 2, 23, 29, 7, 13, 2, 2, 24, 25, 7, 8, 2, 2, 25, 26, 5, 6, 4, 2, 26, 27, 7, 9, 2, 2, 27, 29, 3, 2, 2, 2, 28, 17, 3, 2, 2, 2, 28, 22, 3, 2, 2, 2, 28, 23, 3, 2, 2, 2, 28, 24, 3, 2, 2, 2, 29, 47, 3, 2, 2, 2, 30, 31, 12, 7, 2, 2, 31, 32, 7, 4, 2, 2, 32, 46, 5, 6, 4, 8, 33, 34, 12, 6, 2, 2, 34, 35, 7, 5, 2, 2, 35, 46, 5, 6, 4, 7, 36, 37, 12, 5, 2, 2, 37, 38, 7, 6, 2, 2, 38, 46, 5, 6, 4, 6, 39, 40, 12, 4, 2, 2, 40, 41, 7, 7, 2, 2, 41, 46, 5, 6, 4, 5, 42, 43, 12, 3, 2, 2, 43, 44, 7, 10, 2, 2, 44, 46, 5, 6, 4, 4, 45, 30, 3, 2, 2, 2, 45, 33, 3, 2, 2, 2, 45, 36, 3, 2, 2, 2, 45, 39, 3, 2, 2, 2, 45, 42, 3, 2, 2, 2, 46, 49, 3, 2, 2, 2, 47, 45, 3, 2, 2, 2, 47, 48, 3, 2, 2, 2, 48, 7, 3, 2, 2, 2, 49, 47, 3, 2, 2, 2, 6, 11, 28, 45, 47]
|
||||
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 21, 51, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 3, 2, 7, 2, 10, 10, 2, 12, 2, 14, 2, 13, 11, 2, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 29, 10, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 7, 4, 46, 10, 4, 12, 4, 14, 4, 49, 11, 4, 3, 4, 2, 3, 6, 5, 2, 4, 6, 2, 2, 2, 56, 2, 11, 3, 2, 2, 2, 4, 14, 3, 2, 2, 2, 6, 28, 3, 2, 2, 2, 8, 10, 5, 4, 3, 2, 9, 8, 3, 2, 2, 2, 10, 13, 3, 2, 2, 2, 11, 9, 3, 2, 2, 2, 11, 12, 3, 2, 2, 2, 12, 3, 3, 2, 2, 2, 13, 11, 3, 2, 2, 2, 14, 15, 5, 6, 4, 2, 15, 16, 7, 3, 2, 2, 16, 5, 3, 2, 2, 2, 17, 18, 8, 4, 1, 2, 18, 19, 7, 8, 2, 2, 19, 20, 7, 11, 2, 2, 20, 21, 7, 9, 2, 2, 21, 29, 5, 6, 4, 11, 22, 29, 7, 12, 2, 2, 23, 29, 7, 13, 2, 2, 24, 25, 7, 8, 2, 2, 25, 26, 5, 6, 4, 2, 26, 27, 7, 9, 2, 2, 27, 29, 3, 2, 2, 2, 28, 17, 3, 2, 2, 2, 28, 22, 3, 2, 2, 2, 28, 23, 3, 2, 2, 2, 28, 24, 3, 2, 2, 2, 29, 47, 3, 2, 2, 2, 30, 31, 12, 7, 2, 2, 31, 32, 7, 4, 2, 2, 32, 46, 5, 6, 4, 8, 33, 34, 12, 6, 2, 2, 34, 35, 7, 5, 2, 2, 35, 46, 5, 6, 4, 7, 36, 37, 12, 5, 2, 2, 37, 38, 7, 6, 2, 2, 38, 46, 5, 6, 4, 6, 39, 40, 12, 4, 2, 2, 40, 41, 7, 7, 2, 2, 41, 46, 5, 6, 4, 5, 42, 43, 12, 3, 2, 2, 43, 44, 7, 10, 2, 2, 44, 46, 5, 6, 4, 4, 45, 30, 3, 2, 2, 2, 45, 33, 3, 2, 2, 2, 45, 36, 3, 2, 2, 2, 45, 39, 3, 2, 2, 2, 45, 42, 3, 2, 2, 2, 46, 49, 3, 2, 2, 2, 47, 45, 3, 2, 2, 2, 47, 48, 3, 2, 2, 2, 48, 7, 3, 2, 2, 2, 49, 47, 3, 2, 2, 2, 6, 11, 28, 45, 47]
|
@ -11,8 +11,12 @@ IDENTIFIER=10
|
||||
NUMBER=11
|
||||
DEFINE=12
|
||||
UNDEF=13
|
||||
DEFINE_CONTINUE=14
|
||||
WHITESPACE=15
|
||||
IFDEF=14
|
||||
IFNDEF=15
|
||||
IFELSE=16
|
||||
ENDIF=17
|
||||
DEFINE_CONTINUE=18
|
||||
WHITESPACE=19
|
||||
';'=1
|
||||
'*'=2
|
||||
'/'=3
|
||||
@ -23,4 +27,8 @@ WHITESPACE=15
|
||||
','=8
|
||||
'#define'=12
|
||||
'#undef'=13
|
||||
'\\\n'=14
|
||||
'#ifdef'=14
|
||||
'#ifndef'=15
|
||||
'#else'=16
|
||||
'#endif'=17
|
||||
'\\\n'=18
|
||||
|
@ -13,6 +13,10 @@ null
|
||||
null
|
||||
'#define'
|
||||
'#undef'
|
||||
'#ifdef'
|
||||
'#ifndef'
|
||||
'#else'
|
||||
'#endif'
|
||||
'\\\n'
|
||||
null
|
||||
|
||||
@ -31,6 +35,10 @@ IDENTIFIER
|
||||
NUMBER
|
||||
DEFINE
|
||||
UNDEF
|
||||
IFDEF
|
||||
IFNDEF
|
||||
IFELSE
|
||||
ENDIF
|
||||
DEFINE_CONTINUE
|
||||
WHITESPACE
|
||||
|
||||
@ -48,6 +56,10 @@ IDENTIFIER
|
||||
NUMBER
|
||||
DEFINE
|
||||
UNDEF
|
||||
IFDEF
|
||||
IFNDEF
|
||||
IFELSE
|
||||
ENDIF
|
||||
DEFINE_CONTINUE
|
||||
WHITESPACE
|
||||
|
||||
@ -59,4 +71,4 @@ mode names:
|
||||
DEFAULT_MODE
|
||||
|
||||
atn:
|
||||
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 17, 93, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 57, 10, 10, 3, 11, 6, 11, 60, 10, 11, 13, 11, 14, 11, 61, 3, 12, 6, 12, 65, 10, 12, 13, 12, 14, 12, 66, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 16, 6, 16, 88, 10, 16, 13, 16, 14, 16, 89, 3, 16, 3, 16, 2, 2, 17, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 3, 2, 5, 5, 2, 67, 92, 97, 97, 99, 124, 3, 2, 50, 59, 5, 2, 11, 12, 15, 15, 34, 34, 2, 96, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 3, 33, 3, 2, 2, 2, 5, 35, 3, 2, 2, 2, 7, 37, 3, 2, 2, 2, 9, 39, 3, 2, 2, 2, 11, 41, 3, 2, 2, 2, 13, 43, 3, 2, 2, 2, 15, 45, 3, 2, 2, 2, 17, 47, 3, 2, 2, 2, 19, 56, 3, 2, 2, 2, 21, 59, 3, 2, 2, 2, 23, 64, 3, 2, 2, 2, 25, 68, 3, 2, 2, 2, 27, 76, 3, 2, 2, 2, 29, 83, 3, 2, 2, 2, 31, 87, 3, 2, 2, 2, 33, 34, 7, 61, 2, 2, 34, 4, 3, 2, 2, 2, 35, 36, 7, 44, 2, 2, 36, 6, 3, 2, 2, 2, 37, 38, 7, 49, 2, 2, 38, 8, 3, 2, 2, 2, 39, 40, 7, 45, 2, 2, 40, 10, 3, 2, 2, 2, 41, 42, 7, 47, 2, 2, 42, 12, 3, 2, 2, 2, 43, 44, 7, 42, 2, 2, 44, 14, 3, 2, 2, 2, 45, 46, 7, 43, 2, 2, 46, 16, 3, 2, 2, 2, 47, 48, 7, 46, 2, 2, 48, 18, 3, 2, 2, 2, 49, 50, 7, 101, 2, 2, 50, 51, 7, 106, 2, 2, 51, 52, 7, 99, 2, 2, 52, 57, 7, 116, 2, 2, 53, 54, 7, 107, 2, 2, 54, 55, 7, 112, 2, 2, 55, 57, 7, 118, 2, 2, 56, 49, 3, 2, 2, 2, 56, 53, 3, 2, 2, 2, 57, 20, 3, 2, 2, 2, 58, 60, 9, 2, 2, 2, 59, 58, 3, 2, 2, 2, 60, 61, 3, 2, 2, 2, 61, 59, 3, 2, 2, 2, 61, 62, 3, 2, 2, 2, 62, 22, 3, 2, 2, 2, 63, 65, 9, 3, 2, 2, 64, 63, 3, 2, 2, 2, 65, 66, 3, 2, 2, 2, 66, 64, 3, 2, 2, 2, 66, 67, 3, 2, 2, 2, 67, 24, 3, 2, 2, 2, 68, 69, 7, 37, 2, 2, 69, 70, 7, 102, 2, 2, 70, 71, 7, 103, 2, 2, 71, 72, 7, 104, 2, 2, 72, 73, 7, 107, 2, 2, 73, 74, 7, 112, 2, 2, 74, 75, 7, 103, 2, 2, 75, 26, 3, 2, 2, 2, 76, 77, 7, 37, 2, 2, 77, 78, 7, 119, 2, 2, 78, 79, 7, 112, 2, 2, 79, 80, 7, 102, 2, 2, 80, 81, 7, 103, 2, 2, 81, 82, 7, 104, 2, 2, 82, 28, 3, 2, 2, 2, 83, 84, 7, 94, 2, 2, 84, 85, 7, 12, 2, 2, 85, 30, 3, 2, 2, 2, 86, 88, 9, 4, 2, 2, 87, 86, 3, 2, 2, 2, 88, 89, 3, 2, 2, 2, 89, 87, 3, 2, 2, 2, 89, 90, 3, 2, 2, 2, 90, 91, 3, 2, 2, 2, 91, 92, 8, 16, 2, 2, 92, 32, 3, 2, 2, 2, 7, 2, 56, 61, 66, 89, 3, 2, 3, 2]
|
||||
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 21, 131, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 65, 10, 10, 3, 11, 3, 11, 7, 11, 69, 10, 11, 12, 11, 14, 11, 72, 11, 11, 3, 12, 6, 12, 75, 10, 12, 13, 12, 14, 12, 76, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 20, 6, 20, 126, 10, 20, 13, 20, 14, 20, 127, 3, 20, 3, 20, 2, 2, 21, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 3, 2, 6, 5, 2, 67, 92, 97, 97, 99, 124, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 3, 2, 50, 59, 5, 2, 11, 12, 15, 15, 34, 34, 2, 134, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 3, 41, 3, 2, 2, 2, 5, 43, 3, 2, 2, 2, 7, 45, 3, 2, 2, 2, 9, 47, 3, 2, 2, 2, 11, 49, 3, 2, 2, 2, 13, 51, 3, 2, 2, 2, 15, 53, 3, 2, 2, 2, 17, 55, 3, 2, 2, 2, 19, 64, 3, 2, 2, 2, 21, 66, 3, 2, 2, 2, 23, 74, 3, 2, 2, 2, 25, 78, 3, 2, 2, 2, 27, 86, 3, 2, 2, 2, 29, 93, 3, 2, 2, 2, 31, 100, 3, 2, 2, 2, 33, 108, 3, 2, 2, 2, 35, 114, 3, 2, 2, 2, 37, 121, 3, 2, 2, 2, 39, 125, 3, 2, 2, 2, 41, 42, 7, 61, 2, 2, 42, 4, 3, 2, 2, 2, 43, 44, 7, 44, 2, 2, 44, 6, 3, 2, 2, 2, 45, 46, 7, 49, 2, 2, 46, 8, 3, 2, 2, 2, 47, 48, 7, 45, 2, 2, 48, 10, 3, 2, 2, 2, 49, 50, 7, 47, 2, 2, 50, 12, 3, 2, 2, 2, 51, 52, 7, 42, 2, 2, 52, 14, 3, 2, 2, 2, 53, 54, 7, 43, 2, 2, 54, 16, 3, 2, 2, 2, 55, 56, 7, 46, 2, 2, 56, 18, 3, 2, 2, 2, 57, 58, 7, 101, 2, 2, 58, 59, 7, 106, 2, 2, 59, 60, 7, 99, 2, 2, 60, 65, 7, 116, 2, 2, 61, 62, 7, 107, 2, 2, 62, 63, 7, 112, 2, 2, 63, 65, 7, 118, 2, 2, 64, 57, 3, 2, 2, 2, 64, 61, 3, 2, 2, 2, 65, 20, 3, 2, 2, 2, 66, 70, 9, 2, 2, 2, 67, 69, 9, 3, 2, 2, 68, 67, 3, 2, 2, 2, 69, 72, 3, 2, 2, 2, 70, 68, 3, 2, 2, 2, 70, 71, 3, 2, 2, 2, 71, 22, 3, 2, 2, 2, 72, 70, 3, 2, 2, 2, 73, 75, 9, 4, 2, 2, 74, 73, 3, 2, 2, 2, 75, 76, 3, 2, 2, 2, 76, 74, 3, 2, 2, 2, 76, 77, 3, 2, 2, 2, 77, 24, 3, 2, 2, 2, 78, 79, 7, 37, 2, 2, 79, 80, 7, 102, 2, 2, 80, 81, 7, 103, 2, 2, 81, 82, 7, 104, 2, 2, 82, 83, 7, 107, 2, 2, 83, 84, 7, 112, 2, 2, 84, 85, 7, 103, 2, 2, 85, 26, 3, 2, 2, 2, 86, 87, 7, 37, 2, 2, 87, 88, 7, 119, 2, 2, 88, 89, 7, 112, 2, 2, 89, 90, 7, 102, 2, 2, 90, 91, 7, 103, 2, 2, 91, 92, 7, 104, 2, 2, 92, 28, 3, 2, 2, 2, 93, 94, 7, 37, 2, 2, 94, 95, 7, 107, 2, 2, 95, 96, 7, 104, 2, 2, 96, 97, 7, 102, 2, 2, 97, 98, 7, 103, 2, 2, 98, 99, 7, 104, 2, 2, 99, 30, 3, 2, 2, 2, 100, 101, 7, 37, 2, 2, 101, 102, 7, 107, 2, 2, 102, 103, 7, 104, 2, 2, 103, 104, 7, 112, 2, 2, 104, 105, 7, 102, 2, 2, 105, 106, 7, 103, 2, 2, 106, 107, 7, 104, 2, 2, 107, 32, 3, 2, 2, 2, 108, 109, 7, 37, 2, 2, 109, 110, 7, 103, 2, 2, 110, 111, 7, 110, 2, 2, 111, 112, 7, 117, 2, 2, 112, 113, 7, 103, 2, 2, 113, 34, 3, 2, 2, 2, 114, 115, 7, 37, 2, 2, 115, 116, 7, 103, 2, 2, 116, 117, 7, 112, 2, 2, 117, 118, 7, 102, 2, 2, 118, 119, 7, 107, 2, 2, 119, 120, 7, 104, 2, 2, 120, 36, 3, 2, 2, 2, 121, 122, 7, 94, 2, 2, 122, 123, 7, 12, 2, 2, 123, 38, 3, 2, 2, 2, 124, 126, 9, 5, 2, 2, 125, 124, 3, 2, 2, 2, 126, 127, 3, 2, 2, 2, 127, 125, 3, 2, 2, 2, 127, 128, 3, 2, 2, 2, 128, 129, 3, 2, 2, 2, 129, 130, 8, 20, 2, 2, 130, 40, 3, 2, 2, 2, 7, 2, 64, 70, 76, 127, 3, 2, 3, 2]
|
@ -20,8 +20,8 @@ public class MacrosLexer extends Lexer {
|
||||
new PredictionContextCache();
|
||||
public static final int
|
||||
T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, PAR_BEGIN=6, PAR_END=7, COMMA=8,
|
||||
SIMPLETYPE=9, IDENTIFIER=10, NUMBER=11, DEFINE=12, UNDEF=13, DEFINE_CONTINUE=14,
|
||||
WHITESPACE=15;
|
||||
SIMPLETYPE=9, IDENTIFIER=10, NUMBER=11, DEFINE=12, UNDEF=13, IFDEF=14,
|
||||
IFNDEF=15, IFELSE=16, ENDIF=17, DEFINE_CONTINUE=18, WHITESPACE=19;
|
||||
public static String[] channelNames = {
|
||||
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
|
||||
};
|
||||
@ -33,8 +33,8 @@ public class MacrosLexer extends Lexer {
|
||||
private static String[] makeRuleNames() {
|
||||
return new String[] {
|
||||
"T__0", "T__1", "T__2", "T__3", "T__4", "PAR_BEGIN", "PAR_END", "COMMA",
|
||||
"SIMPLETYPE", "IDENTIFIER", "NUMBER", "DEFINE", "UNDEF", "DEFINE_CONTINUE",
|
||||
"WHITESPACE"
|
||||
"SIMPLETYPE", "IDENTIFIER", "NUMBER", "DEFINE", "UNDEF", "IFDEF", "IFNDEF",
|
||||
"IFELSE", "ENDIF", "DEFINE_CONTINUE", "WHITESPACE"
|
||||
};
|
||||
}
|
||||
public static final String[] ruleNames = makeRuleNames();
|
||||
@ -42,15 +42,16 @@ public class MacrosLexer extends Lexer {
|
||||
private static String[] makeLiteralNames() {
|
||||
return new String[] {
|
||||
null, "';'", "'*'", "'/'", "'+'", "'-'", "'('", "')'", "','", null, null,
|
||||
null, "'#define'", "'#undef'", "'\\\n'"
|
||||
null, "'#define'", "'#undef'", "'#ifdef'", "'#ifndef'", "'#else'", "'#endif'",
|
||||
"'\\\n'"
|
||||
};
|
||||
}
|
||||
private static final String[] _LITERAL_NAMES = makeLiteralNames();
|
||||
private static String[] makeSymbolicNames() {
|
||||
return new String[] {
|
||||
null, null, null, null, null, null, "PAR_BEGIN", "PAR_END", "COMMA",
|
||||
"SIMPLETYPE", "IDENTIFIER", "NUMBER", "DEFINE", "UNDEF", "DEFINE_CONTINUE",
|
||||
"WHITESPACE"
|
||||
"SIMPLETYPE", "IDENTIFIER", "NUMBER", "DEFINE", "UNDEF", "IFDEF", "IFNDEF",
|
||||
"IFELSE", "ENDIF", "DEFINE_CONTINUE", "WHITESPACE"
|
||||
};
|
||||
}
|
||||
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
|
||||
@ -114,30 +115,39 @@ public class MacrosLexer extends Lexer {
|
||||
public ATN getATN() { return _ATN; }
|
||||
|
||||
public static final String _serializedATN =
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\21]\b\1\4\2\t\2\4"+
|
||||
"\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+
|
||||
"\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\3\2\3\2\3\3\3\3\3\4"+
|
||||
"\3\4\3\5\3\5\3\6\3\6\3\7\3\7\3\b\3\b\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3"+
|
||||
"\n\5\n9\n\n\3\13\6\13<\n\13\r\13\16\13=\3\f\6\fA\n\f\r\f\16\fB\3\r\3\r"+
|
||||
"\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\17\3\17"+
|
||||
"\3\17\3\20\6\20X\n\20\r\20\16\20Y\3\20\3\20\2\2\21\3\3\5\4\7\5\t\6\13"+
|
||||
"\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21\3\2\5\5\2C\\"+
|
||||
"aac|\3\2\62;\5\2\13\f\17\17\"\"\2`\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2"+
|
||||
"\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3"+
|
||||
"\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2"+
|
||||
"\2\2\37\3\2\2\2\3!\3\2\2\2\5#\3\2\2\2\7%\3\2\2\2\t\'\3\2\2\2\13)\3\2\2"+
|
||||
"\2\r+\3\2\2\2\17-\3\2\2\2\21/\3\2\2\2\238\3\2\2\2\25;\3\2\2\2\27@\3\2"+
|
||||
"\2\2\31D\3\2\2\2\33L\3\2\2\2\35S\3\2\2\2\37W\3\2\2\2!\"\7=\2\2\"\4\3\2"+
|
||||
"\2\2#$\7,\2\2$\6\3\2\2\2%&\7\61\2\2&\b\3\2\2\2\'(\7-\2\2(\n\3\2\2\2)*"+
|
||||
"\7/\2\2*\f\3\2\2\2+,\7*\2\2,\16\3\2\2\2-.\7+\2\2.\20\3\2\2\2/\60\7.\2"+
|
||||
"\2\60\22\3\2\2\2\61\62\7e\2\2\62\63\7j\2\2\63\64\7c\2\2\649\7t\2\2\65"+
|
||||
"\66\7k\2\2\66\67\7p\2\2\679\7v\2\28\61\3\2\2\28\65\3\2\2\29\24\3\2\2\2"+
|
||||
":<\t\2\2\2;:\3\2\2\2<=\3\2\2\2=;\3\2\2\2=>\3\2\2\2>\26\3\2\2\2?A\t\3\2"+
|
||||
"\2@?\3\2\2\2AB\3\2\2\2B@\3\2\2\2BC\3\2\2\2C\30\3\2\2\2DE\7%\2\2EF\7f\2"+
|
||||
"\2FG\7g\2\2GH\7h\2\2HI\7k\2\2IJ\7p\2\2JK\7g\2\2K\32\3\2\2\2LM\7%\2\2M"+
|
||||
"N\7w\2\2NO\7p\2\2OP\7f\2\2PQ\7g\2\2QR\7h\2\2R\34\3\2\2\2ST\7^\2\2TU\7"+
|
||||
"\f\2\2U\36\3\2\2\2VX\t\4\2\2WV\3\2\2\2XY\3\2\2\2YW\3\2\2\2YZ\3\2\2\2Z"+
|
||||
"[\3\2\2\2[\\\b\20\2\2\\ \3\2\2\2\7\28=BY\3\2\3\2";
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\25\u0083\b\1\4\2"+
|
||||
"\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+
|
||||
"\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
|
||||
"\t\22\4\23\t\23\4\24\t\24\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\3\7"+
|
||||
"\3\7\3\b\3\b\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\5\nA\n\n\3\13\3\13\7"+
|
||||
"\13E\n\13\f\13\16\13H\13\13\3\f\6\fK\n\f\r\f\16\fL\3\r\3\r\3\r\3\r\3\r"+
|
||||
"\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3"+
|
||||
"\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3"+
|
||||
"\21\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\24\6"+
|
||||
"\24~\n\24\r\24\16\24\177\3\24\3\24\2\2\25\3\3\5\4\7\5\t\6\13\7\r\b\17"+
|
||||
"\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25\3\2\6"+
|
||||
"\5\2C\\aac|\6\2\62;C\\aac|\3\2\62;\5\2\13\f\17\17\"\"\2\u0086\2\3\3\2"+
|
||||
"\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17"+
|
||||
"\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2"+
|
||||
"\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3"+
|
||||
"\2\2\2\2\'\3\2\2\2\3)\3\2\2\2\5+\3\2\2\2\7-\3\2\2\2\t/\3\2\2\2\13\61\3"+
|
||||
"\2\2\2\r\63\3\2\2\2\17\65\3\2\2\2\21\67\3\2\2\2\23@\3\2\2\2\25B\3\2\2"+
|
||||
"\2\27J\3\2\2\2\31N\3\2\2\2\33V\3\2\2\2\35]\3\2\2\2\37d\3\2\2\2!l\3\2\2"+
|
||||
"\2#r\3\2\2\2%y\3\2\2\2\'}\3\2\2\2)*\7=\2\2*\4\3\2\2\2+,\7,\2\2,\6\3\2"+
|
||||
"\2\2-.\7\61\2\2.\b\3\2\2\2/\60\7-\2\2\60\n\3\2\2\2\61\62\7/\2\2\62\f\3"+
|
||||
"\2\2\2\63\64\7*\2\2\64\16\3\2\2\2\65\66\7+\2\2\66\20\3\2\2\2\678\7.\2"+
|
||||
"\28\22\3\2\2\29:\7e\2\2:;\7j\2\2;<\7c\2\2<A\7t\2\2=>\7k\2\2>?\7p\2\2?"+
|
||||
"A\7v\2\2@9\3\2\2\2@=\3\2\2\2A\24\3\2\2\2BF\t\2\2\2CE\t\3\2\2DC\3\2\2\2"+
|
||||
"EH\3\2\2\2FD\3\2\2\2FG\3\2\2\2G\26\3\2\2\2HF\3\2\2\2IK\t\4\2\2JI\3\2\2"+
|
||||
"\2KL\3\2\2\2LJ\3\2\2\2LM\3\2\2\2M\30\3\2\2\2NO\7%\2\2OP\7f\2\2PQ\7g\2"+
|
||||
"\2QR\7h\2\2RS\7k\2\2ST\7p\2\2TU\7g\2\2U\32\3\2\2\2VW\7%\2\2WX\7w\2\2X"+
|
||||
"Y\7p\2\2YZ\7f\2\2Z[\7g\2\2[\\\7h\2\2\\\34\3\2\2\2]^\7%\2\2^_\7k\2\2_`"+
|
||||
"\7h\2\2`a\7f\2\2ab\7g\2\2bc\7h\2\2c\36\3\2\2\2de\7%\2\2ef\7k\2\2fg\7h"+
|
||||
"\2\2gh\7p\2\2hi\7f\2\2ij\7g\2\2jk\7h\2\2k \3\2\2\2lm\7%\2\2mn\7g\2\2n"+
|
||||
"o\7n\2\2op\7u\2\2pq\7g\2\2q\"\3\2\2\2rs\7%\2\2st\7g\2\2tu\7p\2\2uv\7f"+
|
||||
"\2\2vw\7k\2\2wx\7h\2\2x$\3\2\2\2yz\7^\2\2z{\7\f\2\2{&\3\2\2\2|~\t\5\2"+
|
||||
"\2}|\3\2\2\2~\177\3\2\2\2\177}\3\2\2\2\177\u0080\3\2\2\2\u0080\u0081\3"+
|
||||
"\2\2\2\u0081\u0082\b\24\2\2\u0082(\3\2\2\2\7\2@FL\177\3\2\3\2";
|
||||
public static final ATN _ATN =
|
||||
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
|
||||
static {
|
||||
|
@ -11,8 +11,12 @@ IDENTIFIER=10
|
||||
NUMBER=11
|
||||
DEFINE=12
|
||||
UNDEF=13
|
||||
DEFINE_CONTINUE=14
|
||||
WHITESPACE=15
|
||||
IFDEF=14
|
||||
IFNDEF=15
|
||||
IFELSE=16
|
||||
ENDIF=17
|
||||
DEFINE_CONTINUE=18
|
||||
WHITESPACE=19
|
||||
';'=1
|
||||
'*'=2
|
||||
'/'=3
|
||||
@ -23,4 +27,8 @@ WHITESPACE=15
|
||||
','=8
|
||||
'#define'=12
|
||||
'#undef'=13
|
||||
'\\\n'=14
|
||||
'#ifdef'=14
|
||||
'#ifndef'=15
|
||||
'#else'=16
|
||||
'#endif'=17
|
||||
'\\\n'=18
|
||||
|
@ -20,8 +20,8 @@ public class MacrosParser extends Parser {
|
||||
new PredictionContextCache();
|
||||
public static final int
|
||||
T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, PAR_BEGIN=6, PAR_END=7, COMMA=8,
|
||||
SIMPLETYPE=9, IDENTIFIER=10, NUMBER=11, DEFINE=12, UNDEF=13, DEFINE_CONTINUE=14,
|
||||
WHITESPACE=15;
|
||||
SIMPLETYPE=9, IDENTIFIER=10, NUMBER=11, DEFINE=12, UNDEF=13, IFDEF=14,
|
||||
IFNDEF=15, IFELSE=16, ENDIF=17, DEFINE_CONTINUE=18, WHITESPACE=19;
|
||||
public static final int
|
||||
RULE_stmtSeq = 0, RULE_stmt = 1, RULE_expr = 2;
|
||||
private static String[] makeRuleNames() {
|
||||
@ -34,15 +34,16 @@ public class MacrosParser extends Parser {
|
||||
private static String[] makeLiteralNames() {
|
||||
return new String[] {
|
||||
null, "';'", "'*'", "'/'", "'+'", "'-'", "'('", "')'", "','", null, null,
|
||||
null, "'#define'", "'#undef'", "'\\\n'"
|
||||
null, "'#define'", "'#undef'", "'#ifdef'", "'#ifndef'", "'#else'", "'#endif'",
|
||||
"'\\\n'"
|
||||
};
|
||||
}
|
||||
private static final String[] _LITERAL_NAMES = makeLiteralNames();
|
||||
private static String[] makeSymbolicNames() {
|
||||
return new String[] {
|
||||
null, null, null, null, null, null, "PAR_BEGIN", "PAR_END", "COMMA",
|
||||
"SIMPLETYPE", "IDENTIFIER", "NUMBER", "DEFINE", "UNDEF", "DEFINE_CONTINUE",
|
||||
"WHITESPACE"
|
||||
"SIMPLETYPE", "IDENTIFIER", "NUMBER", "DEFINE", "UNDEF", "IFDEF", "IFNDEF",
|
||||
"IFELSE", "ENDIF", "DEFINE_CONTINUE", "WHITESPACE"
|
||||
};
|
||||
}
|
||||
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
|
||||
@ -507,7 +508,7 @@ public class MacrosParser extends Parser {
|
||||
}
|
||||
|
||||
public static final String _serializedATN =
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\21\63\4\2\t\2\4\3"+
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\25\63\4\2\t\2\4\3"+
|
||||
"\t\3\4\4\t\4\3\2\7\2\n\n\2\f\2\16\2\r\13\2\3\3\3\3\3\3\3\4\3\4\3\4\3\4"+
|
||||
"\3\4\3\4\3\4\3\4\3\4\3\4\3\4\5\4\35\n\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3"+
|
||||
"\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\7\4.\n\4\f\4\16\4\61\13\4\3\4\2\3\6\5\2"+
|
||||
|
@ -44,6 +44,15 @@ public class TestMacrosParser {
|
||||
assertEquals("+(name:a,num:1);", parse("#define A a+\nA 1;"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test empty define
|
||||
*/
|
||||
@Test
|
||||
public void testEmptyDefine() {
|
||||
// A define with empty body
|
||||
assertEquals("name:b;", parse("#define A\nb;"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test define where the body uses another define
|
||||
*/
|
||||
@ -75,14 +84,36 @@ public class TestMacrosParser {
|
||||
assertEquals("name:a;+(name:b,num:1);", parse("#define A a;\\\nb\nA+1;"));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test define and undef
|
||||
*/
|
||||
@Test
|
||||
public void testUndef() {
|
||||
// A simple unused define
|
||||
// An simple use of #undef
|
||||
assertEquals("name:a;name:A;", parse("#define A a\nA;\n#undef A\nA;"));
|
||||
// #undef a macro that has not been defined
|
||||
assertEquals("name:a;", parse("#undef A\na;"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test #ifdef, #ifndef, #else and #endif
|
||||
*/
|
||||
@Test
|
||||
public void testIfdef() {
|
||||
// Output generated by #ifdef
|
||||
assertEquals("name:x;name:y;", parse("#define A a\n#ifdef A\nx;\n#endif\ny;"));
|
||||
// Output not generated by #ifdef
|
||||
assertEquals("name:y;", parse("#ifdef A\nx;\n#endif\ny;"));
|
||||
// Output not generated by #ifdef and generated by #else
|
||||
assertEquals("name:x2;name:y;", parse("#ifdef A\nx1;\n#else\nx2;\n#endif\ny;"));
|
||||
// Output generated by #ifdef and not by #else
|
||||
assertEquals("name:x1;name:y;", parse("#define A a\n#ifdef A\nx1;\n#else\nx2;\n#endif\ny;"));
|
||||
// Nested #ifdefs with #else
|
||||
assertEquals("name:x3;name:y;", parse("#define B\n#ifdef A\n#ifdef B\nx1;\n#else\nx2;#endif\n#else\n#ifdef B\nx3;\n#else\nx4;#endif\n#endif\ny; "));
|
||||
// Output not generated by #ifndef and generated by #else
|
||||
assertEquals("name:x1;name:y;", parse("#ifndef A\nx1;\n#else\nx2;\n#endif\ny;"));
|
||||
// Output generated by #ifndef and not by #else
|
||||
assertEquals("name:x2;name:y;", parse("#define A a\n#ifndef A\nx1;\n#else\nx2;\n#endif\ny;"));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -117,7 +148,7 @@ public class TestMacrosParser {
|
||||
}
|
||||
});
|
||||
|
||||
final CPreprocessorTokens preprocessorTokens = new CPreprocessorTokens(CHANNEL_WHITESPACE, MacrosLexer.WHITESPACE, MacrosLexer.DEFINE, MacrosLexer.IDENTIFIER, MacrosLexer.DEFINE_CONTINUE, MacrosLexer.UNDEF, MacrosLexer.PAR_BEGIN, MacrosLexer.PAR_END, MacrosLexer.COMMA);
|
||||
final CPreprocessorTokens preprocessorTokens = new CPreprocessorTokens(CHANNEL_WHITESPACE, MacrosLexer.WHITESPACE, MacrosLexer.DEFINE, MacrosLexer.IDENTIFIER, MacrosLexer.DEFINE_CONTINUE, MacrosLexer.UNDEF, MacrosLexer.IFDEF, MacrosLexer.IFNDEF, MacrosLexer.IFELSE, MacrosLexer.ENDIF, MacrosLexer.PAR_BEGIN, MacrosLexer.PAR_END, MacrosLexer.COMMA);
|
||||
final CPreprocessor expandedTokenSource = new CPreprocessor(lexer, preprocessorTokens);
|
||||
MacrosParser parser = new MacrosParser(new CommonTokenStream(expandedTokenSource));
|
||||
parser.setBuildParseTree(true);
|
||||
|
@ -38,6 +38,11 @@ public class TestPrograms {
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testPreprocessor4() throws IOException, URISyntaxException {
|
||||
compileAndCompare("preprocessor-4", log());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPreprocessor3() throws IOException, URISyntaxException {
|
||||
compileAndCompare("preprocessor-3");
|
||||
|
18
src/test/kc/preprocessor-4.kc
Normal file
18
src/test/kc/preprocessor-4.kc
Normal file
@ -0,0 +1,18 @@
|
||||
// Test the preprocessor
|
||||
// Test #ifdef
|
||||
|
||||
#define A
|
||||
|
||||
char * SCREEN = 0x0400;
|
||||
char idx = 0;
|
||||
|
||||
void main() {
|
||||
SCREEN[idx++] = '-';
|
||||
#ifdef A
|
||||
SCREEN[idx++] = 'a';
|
||||
#else
|
||||
SCREEN[idx++] = 'b';
|
||||
#endif
|
||||
SCREEN[idx++] = '-';
|
||||
|
||||
}
|
19
src/test/ref/preprocessor-4.asm
Normal file
19
src/test/ref/preprocessor-4.asm
Normal file
@ -0,0 +1,19 @@
|
||||
// Test the preprocessor
|
||||
// Test #ifdef
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
.label SCREEN = $400
|
||||
main: {
|
||||
// SCREEN[idx++] = '-'
|
||||
lda #'-'
|
||||
sta SCREEN
|
||||
// SCREEN[idx++] = 'a'
|
||||
lda #'a'
|
||||
sta SCREEN+1
|
||||
// SCREEN[idx++] = '-'
|
||||
lda #'-'
|
||||
sta SCREEN+2
|
||||
// }
|
||||
rts
|
||||
}
|
19
src/test/ref/preprocessor-4.cfg
Normal file
19
src/test/ref/preprocessor-4.cfg
Normal file
@ -0,0 +1,19 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
|
||||
(void()) main()
|
||||
main: scope:[main] from @1
|
||||
[4] *((const byte*) SCREEN) ← (byte) '-'
|
||||
[5] *((const byte*) SCREEN+(byte) 1) ← (byte) 'a'
|
||||
[6] *((const byte*) SCREEN+(byte) 2) ← (byte) '-'
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main
|
||||
[7] return
|
||||
to:@return
|
300
src/test/ref/preprocessor-4.log
Normal file
300
src/test/ref/preprocessor-4.log
Normal file
@ -0,0 +1,300 @@
|
||||
Identified constant variable (byte*) SCREEN
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
(byte) idx#0 ← (byte) 0
|
||||
to:@1
|
||||
|
||||
(void()) main()
|
||||
main: scope:[main] from @1
|
||||
(byte) idx#6 ← phi( @1/(byte) idx#9 )
|
||||
*((const byte*) SCREEN + (byte) idx#6) ← (byte) '-'
|
||||
(byte) idx#1 ← ++ (byte) idx#6
|
||||
*((const byte*) SCREEN + (byte) idx#1) ← (byte) 'a'
|
||||
(byte) idx#2 ← ++ (byte) idx#1
|
||||
*((const byte*) SCREEN + (byte) idx#2) ← (byte) '-'
|
||||
(byte) idx#3 ← ++ (byte) idx#2
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main
|
||||
(byte) idx#7 ← phi( main/(byte) idx#3 )
|
||||
(byte) idx#4 ← (byte) idx#7
|
||||
return
|
||||
to:@return
|
||||
@1: scope:[] from @begin
|
||||
(byte) idx#9 ← phi( @begin/(byte) idx#0 )
|
||||
call main
|
||||
to:@2
|
||||
@2: scope:[] from @1
|
||||
(byte) idx#8 ← phi( @1/(byte) idx#4 )
|
||||
(byte) idx#5 ← (byte) idx#8
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
|
||||
SYMBOL TABLE SSA
|
||||
(label) @1
|
||||
(label) @2
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(const byte*) SCREEN = (byte*)(number) $400
|
||||
(byte) idx
|
||||
(byte) idx#0
|
||||
(byte) idx#1
|
||||
(byte) idx#2
|
||||
(byte) idx#3
|
||||
(byte) idx#4
|
||||
(byte) idx#5
|
||||
(byte) idx#6
|
||||
(byte) idx#7
|
||||
(byte) idx#8
|
||||
(byte) idx#9
|
||||
(void()) main()
|
||||
(label) main::@return
|
||||
|
||||
Simplifying constant pointer cast (byte*) 1024
|
||||
Successful SSA optimization PassNCastSimplification
|
||||
Alias idx#3 = idx#7 idx#4
|
||||
Alias idx#0 = idx#9
|
||||
Alias idx#5 = idx#8
|
||||
Successful SSA optimization Pass2AliasElimination
|
||||
Identical Phi Values (byte) idx#6 (byte) idx#0
|
||||
Identical Phi Values (byte) idx#5 (byte) idx#3
|
||||
Successful SSA optimization Pass2IdenticalPhiElimination
|
||||
Constant (const byte) idx#0 = 0
|
||||
Successful SSA optimization Pass2ConstantIdentification
|
||||
Simplifying expression containing zero SCREEN in [2] *((const byte*) SCREEN + (const byte) idx#0) ← (byte) '-'
|
||||
Successful SSA optimization PassNSimplifyExpressionWithZero
|
||||
Eliminating unused variable (byte) idx#3 and assignment [5] (byte) idx#3 ← ++ (byte) idx#2
|
||||
Successful SSA optimization PassNEliminateUnusedVars
|
||||
Constant right-side identified [1] (byte) idx#1 ← ++ (const byte) idx#0
|
||||
Successful SSA optimization Pass2ConstantRValueConsolidation
|
||||
Constant (const byte) idx#1 = ++idx#0
|
||||
Successful SSA optimization Pass2ConstantIdentification
|
||||
Constant right-side identified [2] (byte) idx#2 ← ++ (const byte) idx#1
|
||||
Successful SSA optimization Pass2ConstantRValueConsolidation
|
||||
Constant (const byte) idx#2 = ++idx#1
|
||||
Successful SSA optimization Pass2ConstantIdentification
|
||||
Inlining constant with different constant siblings (const byte) idx#0
|
||||
Inlining constant with different constant siblings (const byte) idx#1
|
||||
Inlining constant with different constant siblings (const byte) idx#2
|
||||
Constant inlined idx#2 = ++++(byte) 0
|
||||
Constant inlined idx#0 = (byte) 0
|
||||
Constant inlined idx#1 = ++(byte) 0
|
||||
Successful SSA optimization Pass2ConstantInlining
|
||||
Consolidated array index constant in *(SCREEN+++0)
|
||||
Consolidated array index constant in *(SCREEN+++++0)
|
||||
Successful SSA optimization Pass2ConstantAdditionElimination
|
||||
Simplifying constant integer increment ++0
|
||||
Simplifying constant integer increment ++0
|
||||
Successful SSA optimization Pass2ConstantSimplification
|
||||
Simplifying constant integer increment ++1
|
||||
Successful SSA optimization Pass2ConstantSimplification
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @2
|
||||
Adding NOP phi() at start of @end
|
||||
CALL GRAPH
|
||||
Calls in [] to main:2
|
||||
|
||||
Created 0 initial phi equivalence classes
|
||||
Coalesced down to 0 phi equivalence classes
|
||||
Culled Empty Block (label) @2
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
|
||||
(void()) main()
|
||||
main: scope:[main] from @1
|
||||
[4] *((const byte*) SCREEN) ← (byte) '-'
|
||||
[5] *((const byte*) SCREEN+(byte) 1) ← (byte) 'a'
|
||||
[6] *((const byte*) SCREEN+(byte) 2) ← (byte) '-'
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main
|
||||
[7] return
|
||||
to:@return
|
||||
|
||||
|
||||
VARIABLE REGISTER WEIGHTS
|
||||
(byte) idx
|
||||
(void()) main()
|
||||
|
||||
Initial phi equivalence classes
|
||||
Complete equivalence classes
|
||||
|
||||
INITIAL ASM
|
||||
Target platform is c64basic / MOS6502X
|
||||
// File Comments
|
||||
// Test the preprocessor
|
||||
// Test #ifdef
|
||||
// Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(__bbegin)
|
||||
.pc = $80d "Program"
|
||||
// Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
// @begin
|
||||
__bbegin:
|
||||
// [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
__b1_from___bbegin:
|
||||
jmp __b1
|
||||
// @1
|
||||
__b1:
|
||||
// [2] call main
|
||||
jsr main
|
||||
// [3] phi from @1 to @end [phi:@1->@end]
|
||||
__bend_from___b1:
|
||||
jmp __bend
|
||||
// @end
|
||||
__bend:
|
||||
// main
|
||||
main: {
|
||||
// [4] *((const byte*) SCREEN) ← (byte) '-' -- _deref_pbuc1=vbuc2
|
||||
lda #'-'
|
||||
sta SCREEN
|
||||
// [5] *((const byte*) SCREEN+(byte) 1) ← (byte) 'a' -- _deref_pbuc1=vbuc2
|
||||
lda #'a'
|
||||
sta SCREEN+1
|
||||
// [6] *((const byte*) SCREEN+(byte) 2) ← (byte) '-' -- _deref_pbuc1=vbuc2
|
||||
lda #'-'
|
||||
sta SCREEN+2
|
||||
jmp __breturn
|
||||
// main::@return
|
||||
__breturn:
|
||||
// [7] return
|
||||
rts
|
||||
}
|
||||
// File Data
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement [4] *((const byte*) SCREEN) ← (byte) '-' [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
||||
Statement [5] *((const byte*) SCREEN+(byte) 1) ← (byte) 'a' [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
||||
Statement [6] *((const byte*) SCREEN+(byte) 2) ← (byte) '-' [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
||||
|
||||
REGISTER UPLIFT SCOPES
|
||||
Uplift Scope [main]
|
||||
Uplift Scope []
|
||||
|
||||
Uplifting [main] best 39 combination
|
||||
Uplifting [] best 39 combination
|
||||
|
||||
ASSEMBLER BEFORE OPTIMIZATION
|
||||
// File Comments
|
||||
// Test the preprocessor
|
||||
// Test #ifdef
|
||||
// Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(__bbegin)
|
||||
.pc = $80d "Program"
|
||||
// Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
// @begin
|
||||
__bbegin:
|
||||
// [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
__b1_from___bbegin:
|
||||
jmp __b1
|
||||
// @1
|
||||
__b1:
|
||||
// [2] call main
|
||||
jsr main
|
||||
// [3] phi from @1 to @end [phi:@1->@end]
|
||||
__bend_from___b1:
|
||||
jmp __bend
|
||||
// @end
|
||||
__bend:
|
||||
// main
|
||||
main: {
|
||||
// [4] *((const byte*) SCREEN) ← (byte) '-' -- _deref_pbuc1=vbuc2
|
||||
lda #'-'
|
||||
sta SCREEN
|
||||
// [5] *((const byte*) SCREEN+(byte) 1) ← (byte) 'a' -- _deref_pbuc1=vbuc2
|
||||
lda #'a'
|
||||
sta SCREEN+1
|
||||
// [6] *((const byte*) SCREEN+(byte) 2) ← (byte) '-' -- _deref_pbuc1=vbuc2
|
||||
lda #'-'
|
||||
sta SCREEN+2
|
||||
jmp __breturn
|
||||
// main::@return
|
||||
__breturn:
|
||||
// [7] return
|
||||
rts
|
||||
}
|
||||
// File Data
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp __b1
|
||||
Removing instruction jmp __bend
|
||||
Removing instruction jmp __breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction __b1_from___bbegin:
|
||||
Removing instruction __b1:
|
||||
Removing instruction __bend_from___b1:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction __bend:
|
||||
Removing instruction __breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Removing instruction __bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(const byte*) SCREEN = (byte*) 1024
|
||||
(byte) idx
|
||||
(void()) main()
|
||||
(label) main::@return
|
||||
|
||||
|
||||
|
||||
FINAL ASSEMBLER
|
||||
Score: 24
|
||||
|
||||
// File Comments
|
||||
// Test the preprocessor
|
||||
// Test #ifdef
|
||||
// Upstart
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
// Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
// @begin
|
||||
// [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
// @1
|
||||
// [2] call main
|
||||
// [3] phi from @1 to @end [phi:@1->@end]
|
||||
// @end
|
||||
// main
|
||||
main: {
|
||||
// SCREEN[idx++] = '-'
|
||||
// [4] *((const byte*) SCREEN) ← (byte) '-' -- _deref_pbuc1=vbuc2
|
||||
lda #'-'
|
||||
sta SCREEN
|
||||
// SCREEN[idx++] = 'a'
|
||||
// [5] *((const byte*) SCREEN+(byte) 1) ← (byte) 'a' -- _deref_pbuc1=vbuc2
|
||||
lda #'a'
|
||||
sta SCREEN+1
|
||||
// SCREEN[idx++] = '-'
|
||||
// [6] *((const byte*) SCREEN+(byte) 2) ← (byte) '-' -- _deref_pbuc1=vbuc2
|
||||
lda #'-'
|
||||
sta SCREEN+2
|
||||
// main::@return
|
||||
// }
|
||||
// [7] return
|
||||
rts
|
||||
}
|
||||
// File Data
|
||||
|
8
src/test/ref/preprocessor-4.sym
Normal file
8
src/test/ref/preprocessor-4.sym
Normal file
@ -0,0 +1,8 @@
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(const byte*) SCREEN = (byte*) 1024
|
||||
(byte) idx
|
||||
(void()) main()
|
||||
(label) main::@return
|
||||
|
Loading…
x
Reference in New Issue
Block a user