/* A Bison parser, made from parser.y by GNU bison 1.35. */ #define YYBISON 1 /* Identify Bison output. */ # define ERROR 257 # define DOTNEW 258 # define ABSTRACT 259 # define BOOLEAN 260 # define BREAK 261 # define BYTE 262 # define CASE 263 # define CATCH 264 # define CHAR 265 # define CLASS 266 # define CONTINUE 267 # define DEFAULT 268 # define DO 269 # define DOUBLE 270 # define ELSE 271 # define EXTENDS 272 # define FALSE_TOKEN 273 # define FINAL 274 # define FINALLY 275 # define FLOAT 276 # define FOR 277 # define IF 278 # define IMPLEMENTS 279 # define IMPORT 280 # define INSTANCEOF 281 # define INT 282 # define INTERFACE 283 # define LONG 284 # define NATIVE 285 # define NULL_TOKEN 286 # define PACKAGE 287 # define PRIVATE 288 # define PROTECTED 289 # define PUBLIC 290 # define RETURN 291 # define SHORT 292 # define STATIC 293 # define SUPER 294 # define SWITCH 295 # define SYNCHRONIZED 296 # define THIS 297 # define THROW 298 # define THROWS 299 # define TRANSIENT 300 # define VOLATILE 301 # define TRUE_TOKEN 302 # define TRY 303 # define VOID 304 # define WHILE 305 # define SHIFT_RIGHT_EQUALS 306 # define FILL_SHIFT_RIGHT_EQUALS 307 # define SHIFT_LEFT_EQUALS 308 # define ADD_EQUALS 309 # define SUB_EQUALS 310 # define MUL_EQUALS 311 # define DIV_EQUALS 312 # define MOD_EQUALS 313 # define AND_EQUALS 314 # define XOR_EQUALS 315 # define OR_EQUALS 316 # define OR 317 # define AND 318 # define EQUAL_COMPARE 319 # define NOT_EQUAL 320 # define LTEQ 321 # define GTEQ 322 # define BITSHIFT_RIGHT 323 # define FILL_SHIFT_RIGHT 324 # define SHIFT_LEFT 325 # define INCR 326 # define DECR 327 # define NEW 328 # define INT_LITERAL 329 # define CHARACTER_LITERAL 330 # define LONG_LITERAL 331 # define FLOAT_LITERAL 332 # define DOUBLE_LITERAL 333 # define SYMBOL 334 # define STRING_LITERAL 335 #line 1 "parser.y" // Copyright (c) 1995 David Engberg All rights reserved // $Id: parser.y,v 1.21 1998/05/23 18:51:15 geppetto Exp $ #include #include #include #include #include "unicode_string.h" #include "Compiler.h" #include "parser_decls.h" #include "JavaAccessFlags.h" #include "JavaTypeSignature.h" #include "JavaFieldSignature.h" #include "Expression.h" #include "VariableDeclaration.h" #include "Statement.h" #include "IntermediateClass.h" #include "BinaryExpression.h" #include "LocalVariableRecord.h" CCompiler* gCurrentCompiler = 0; const unicode_char kSymbolDivider = (unicode_char)'/'; CExpression* InterpretSymbolExpression(const unicode_string& symbol); #ifndef NDEBUG #ifndef YYDEBUG #define YYDEBUG 1 #endif #endif #line 34 "parser.y" #ifndef YYSTYPE typedef union { unicode_string* text; deque* stringList; unsigned long longNumber; // also used for a single character, etc. unsigned long long doubleLong; float floatNumber; double doubleFloat; CJavaAccessFlags* modifiers; CJavaTypeSignature* typeSignature; CVariableDeclaration* fieldSignature; deque* fieldList; CExpression* expression; ExpressionList* expressionList; deque* variableList; CStatement* statement; CCompoundStatement* compoundStatement; StatementList* statementList; deque* catchList; CCatchClause* catchClause; } yystype; # define YYSTYPE yystype # define YYSTYPE_IS_TRIVIAL 1 #endif #ifndef YYDEBUG # define YYDEBUG 0 #endif #define YYFINAL 593 #define YYFLAG -32768 #define YYNTBASE 106 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ #define YYTRANSLATE(x) ((unsigned)(x) <= 335 ? yytranslate[x] : 271) /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 97, 2, 2, 2, 99, 102, 2, 91, 92, 86, 94, 87, 95, 84, 98, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 93, 85, 100, 90, 101, 105, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 82, 2, 83, 103, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 88, 104, 89, 96, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81 }; #if YYDEBUG static const short yyprhs[] = { 0, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 60, 64, 68, 70, 74, 76, 80, 81, 84, 85, 88, 89, 93, 95, 97, 101, 107, 109, 111, 112, 114, 116, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 140, 148, 149, 151, 154, 155, 157, 160, 162, 166, 170, 171, 174, 175, 179, 180, 184, 185, 189, 190, 192, 194, 196, 198, 200, 204, 206, 211, 217, 222, 228, 229, 232, 234, 236, 240, 242, 245, 247, 251, 252, 254, 257, 266, 275, 276, 278, 279, 281, 283, 287, 291, 296, 299, 301, 305, 307, 309, 312, 313, 314, 324, 328, 333, 339, 345, 346, 348, 349, 356, 357, 359, 362, 366, 370, 371, 373, 375, 378, 380, 382, 384, 387, 388, 393, 394, 396, 398, 401, 403, 405, 407, 410, 414, 416, 418, 420, 422, 424, 426, 428, 430, 432, 434, 436, 438, 440, 442, 444, 446, 448, 450, 452, 454, 456, 458, 460, 462, 464, 468, 472, 475, 477, 479, 481, 483, 485, 487, 489, 495, 503, 511, 517, 521, 522, 524, 526, 529, 531, 535, 538, 544, 550, 558, 569, 580, 581, 582, 584, 586, 588, 589, 591, 592, 594, 596, 598, 602, 605, 609, 612, 616, 619, 623, 627, 633, 637, 642, 643, 645, 647, 650, 651, 652, 660, 663, 665, 667, 669, 671, 675, 677, 679, 681, 683, 689, 690, 700, 707, 708, 719, 721, 725, 730, 735, 740, 742, 745, 749, 750, 752, 755, 759, 763, 767, 772, 779, 786, 791, 796, 798, 802, 806, 810, 812, 814, 816, 818, 820, 823, 826, 828, 830, 833, 836, 838, 841, 844, 846, 849, 852, 854, 860, 865, 871, 873, 877, 881, 885, 887, 891, 895, 897, 901, 905, 909, 911, 915, 919, 923, 927, 931, 933, 937, 941, 943, 947, 949, 953, 955, 959, 961, 965, 967, 971, 973, 979, 981, 983, 987, 989, 991, 993, 995, 997, 999, 1001, 1003, 1005, 1007, 1009, 1011, 1013, 1015, 1017, 1019 }; static const short yyrhs[] = { 120, 0, 75, 0, 81, 0, 76, 0, 77, 0, 78, 0, 79, 0, 48, 0, 19, 0, 32, 0, 109, 0, 113, 0, 6, 0, 110, 0, 111, 0, 112, 0, 8, 0, 38, 0, 28, 0, 30, 0, 11, 0, 22, 0, 16, 0, 114, 0, 117, 0, 118, 0, 114, 0, 114, 0, 109, 82, 83, 0, 118, 82, 83, 0, 117, 82, 83, 0, 119, 0, 118, 84, 119, 0, 80, 0, 123, 121, 122, 0, 0, 121, 124, 0, 0, 122, 127, 0, 0, 33, 118, 85, 0, 125, 0, 126, 0, 26, 118, 85, 0, 26, 118, 84, 86, 85, 0, 131, 0, 172, 0, 0, 129, 0, 130, 0, 129, 130, 0, 36, 0, 35, 0, 34, 0, 39, 0, 5, 0, 20, 0, 31, 0, 42, 0, 46, 0, 47, 0, 0, 128, 12, 119, 133, 135, 132, 138, 0, 0, 134, 0, 18, 115, 0, 0, 136, 0, 25, 137, 0, 116, 0, 137, 87, 116, 0, 88, 139, 89, 0, 0, 139, 140, 0, 0, 145, 141, 144, 0, 0, 165, 142, 144, 0, 0, 166, 143, 144, 0, 0, 85, 0, 146, 0, 156, 0, 131, 0, 172, 0, 128, 147, 85, 0, 148, 0, 108, 119, 239, 150, 0, 148, 87, 119, 239, 150, 0, 108, 119, 239, 150, 0, 149, 87, 119, 239, 150, 0, 0, 90, 151, 0, 269, 0, 152, 0, 88, 153, 89, 0, 155, 0, 154, 155, 0, 151, 0, 154, 87, 151, 0, 0, 87, 0, 157, 164, 0, 128, 108, 119, 91, 159, 92, 239, 158, 0, 128, 50, 119, 91, 159, 92, 239, 158, 0, 0, 162, 0, 0, 160, 0, 161, 0, 160, 87, 161, 0, 108, 119, 239, 0, 20, 108, 119, 239, 0, 45, 163, 0, 115, 0, 163, 87, 115, 0, 182, 0, 85, 0, 39, 182, 0, 0, 0, 128, 119, 167, 91, 159, 92, 158, 168, 169, 0, 88, 184, 89, 0, 88, 170, 184, 89, 0, 43, 91, 171, 92, 85, 0, 40, 91, 171, 92, 85, 0, 0, 235, 0, 0, 128, 29, 119, 174, 173, 176, 0, 0, 175, 0, 18, 116, 0, 175, 87, 116, 0, 88, 177, 89, 0, 0, 178, 0, 179, 0, 178, 179, 0, 180, 0, 181, 0, 146, 0, 157, 85, 0, 0, 88, 183, 184, 89, 0, 0, 185, 0, 186, 0, 185, 186, 0, 187, 0, 190, 0, 131, 0, 188, 85, 0, 20, 189, 85, 0, 147, 0, 149, 0, 192, 0, 194, 0, 198, 0, 199, 0, 206, 0, 209, 0, 192, 0, 195, 0, 200, 0, 207, 0, 210, 0, 182, 0, 193, 0, 196, 0, 201, 0, 208, 0, 218, 0, 219, 0, 220, 0, 222, 0, 221, 0, 223, 0, 85, 0, 119, 93, 190, 0, 119, 93, 191, 0, 197, 85, 0, 266, 0, 250, 0, 251, 0, 247, 0, 248, 0, 242, 0, 232, 0, 24, 91, 269, 92, 190, 0, 24, 91, 269, 92, 191, 17, 190, 0, 24, 91, 269, 92, 191, 17, 191, 0, 41, 91, 269, 92, 202, 0, 88, 203, 89, 0, 0, 204, 0, 205, 0, 204, 205, 0, 186, 0, 9, 270, 93, 0, 14, 93, 0, 51, 91, 269, 92, 190, 0, 51, 91, 269, 92, 191, 0, 15, 190, 51, 91, 269, 92, 85, 0, 23, 211, 91, 212, 85, 214, 85, 215, 92, 190, 0, 23, 211, 91, 212, 85, 214, 85, 215, 92, 191, 0, 0, 0, 213, 0, 217, 0, 188, 0, 0, 269, 0, 0, 216, 0, 217, 0, 197, 0, 217, 87, 197, 0, 7, 85, 0, 7, 119, 85, 0, 13, 85, 0, 13, 119, 85, 0, 37, 85, 0, 37, 269, 85, 0, 44, 269, 85, 0, 42, 91, 269, 92, 182, 0, 49, 182, 225, 0, 49, 182, 224, 229, 0, 0, 225, 0, 226, 0, 225, 226, 0, 0, 0, 10, 227, 91, 161, 92, 228, 182, 0, 21, 182, 0, 231, 0, 236, 0, 107, 0, 43, 0, 91, 269, 92, 0, 232, 0, 241, 0, 242, 0, 243, 0, 74, 115, 91, 171, 92, 0, 0, 74, 115, 91, 171, 92, 88, 233, 139, 89, 0, 230, 4, 115, 91, 171, 92, 0, 0, 230, 4, 115, 91, 171, 92, 88, 234, 139, 89, 0, 269, 0, 235, 87, 269, 0, 74, 109, 237, 239, 0, 74, 114, 237, 239, 0, 74, 109, 240, 152, 0, 238, 0, 237, 238, 0, 82, 269, 83, 0, 0, 240, 0, 82, 83, 0, 240, 82, 83, 0, 230, 84, 119, 0, 40, 84, 119, 0, 118, 91, 171, 92, 0, 230, 84, 119, 91, 171, 92, 0, 40, 84, 119, 91, 171, 92, 0, 118, 82, 269, 83, 0, 231, 82, 269, 83, 0, 118, 0, 118, 84, 43, 0, 118, 84, 12, 0, 109, 84, 12, 0, 230, 0, 244, 0, 246, 0, 247, 0, 248, 0, 245, 72, 0, 245, 73, 0, 250, 0, 251, 0, 94, 249, 0, 95, 249, 0, 252, 0, 72, 249, 0, 73, 249, 0, 245, 0, 96, 249, 0, 97, 249, 0, 253, 0, 91, 109, 239, 92, 249, 0, 91, 269, 92, 252, 0, 91, 118, 240, 92, 252, 0, 249, 0, 254, 86, 249, 0, 254, 98, 249, 0, 254, 99, 249, 0, 254, 0, 255, 94, 254, 0, 255, 95, 254, 0, 255, 0, 256, 71, 255, 0, 256, 69, 255, 0, 256, 70, 255, 0, 256, 0, 257, 100, 256, 0, 257, 101, 256, 0, 257, 67, 256, 0, 257, 68, 256, 0, 257, 27, 113, 0, 257, 0, 258, 65, 257, 0, 258, 66, 257, 0, 258, 0, 259, 102, 258, 0, 259, 0, 260, 103, 259, 0, 260, 0, 261, 104, 260, 0, 261, 0, 262, 64, 261, 0, 262, 0, 263, 63, 262, 0, 263, 0, 263, 105, 269, 93, 264, 0, 264, 0, 266, 0, 267, 268, 265, 0, 118, 0, 241, 0, 243, 0, 90, 0, 57, 0, 58, 0, 59, 0, 55, 0, 56, 0, 54, 0, 52, 0, 53, 0, 60, 0, 61, 0, 62, 0, 265, 0, 269, 0 }; #endif #if YYDEBUG /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { 0, 134, 137, 140, 145, 147, 149, 151, 153, 155, 157, 161, 163, 166, 169, 172, 174, 177, 180, 182, 184, 186, 190, 193, 197, 203, 206, 210, 214, 218, 224, 229, 236, 238, 247, 251, 255, 256, 259, 260, 264, 268, 275, 277, 280, 288, 296, 298, 301, 303, 306, 308, 316, 322, 327, 332, 337, 342, 347, 352, 357, 362, 369, 369, 388, 390, 393, 398, 400, 403, 408, 415, 423, 427, 428, 431, 431, 435, 435, 438, 438, 443, 444, 452, 454, 455, 456, 484, 512, 522, 567, 606, 655, 698, 700, 707, 709, 712, 717, 719, 723, 729, 736, 737, 740, 745, 775, 806, 808, 811, 813, 816, 822, 839, 851, 864, 869, 876, 884, 886, 890, 895, 895, 895, 934, 939, 946, 951, 957, 959, 962, 962, 980, 982, 985, 992, 1000, 1004, 1005, 1008, 1010, 1013, 1015, 1018, 1022, 1027, 1027, 1037, 1039, 1042, 1050, 1059, 1061, 1062, 1066, 1069, 1073, 1077, 1087, 1089, 1090, 1091, 1092, 1093, 1096, 1098, 1099, 1100, 1101, 1104, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1119, 1124, 1129, 1134, 1139, 1141, 1142, 1143, 1144, 1145, 1146, 1149, 1154, 1159, 1164, 1169, 1174, 1176, 1179, 1187, 1196, 1198, 1200, 1234, 1239, 1244, 1249, 1258, 1267, 1271, 1273, 1276, 1286, 1290, 1292, 1295, 1297, 1300, 1304, 1310, 1317, 1320, 1324, 1327, 1331, 1334, 1338, 1343, 1348, 1354, 1363, 1365, 1368, 1374, 1381, 1381, 1381, 1402, 1407, 1409, 1412, 1414, 1416, 1420, 1421, 1422, 1423, 1426, 1432, 1432, 1443, 1448, 1448, 1461, 1467, 1474, 1485, 1492, 1502, 1508, 1515, 1520, 1522, 1525, 1528, 1532, 1538, 1546, 1568, 1573, 1581, 1588, 1592, 1598, 1603, 1609, 1614, 1617, 1619, 1622, 1624, 1627, 1632, 1637, 1639, 1640, 1642, 1644, 1647, 1652, 1657, 1659, 1661, 1663, 1666, 1673, 1687, 1695, 1697, 1699, 1701, 1705, 1707, 1709, 1713, 1715, 1717, 1719, 1723, 1725, 1727, 1729, 1731, 1733, 1740, 1742, 1744, 1748, 1750, 1754, 1756, 1760, 1762, 1766, 1768, 1772, 1774, 1778, 1780, 1784, 1786, 1789, 1794, 1800, 1801, 1804, 1807, 1809, 1811, 1813, 1815, 1817, 1819, 1821, 1823, 1825, 1827, 1831, 1835 }; #endif #if (YYDEBUG) || defined YYERROR_VERBOSE /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ static const char *const yytname[] = { "$", "error", "$undefined.", "ERROR", "DOTNEW", "ABSTRACT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", "CHAR", "CLASS", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "EXTENDS", "FALSE_TOKEN", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "IMPLEMENTS", "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NULL_TOKEN", "PACKAGE", "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT", "VOLATILE", "TRUE_TOKEN", "TRY", "VOID", "WHILE", "SHIFT_RIGHT_EQUALS", "FILL_SHIFT_RIGHT_EQUALS", "SHIFT_LEFT_EQUALS", "ADD_EQUALS", "SUB_EQUALS", "MUL_EQUALS", "DIV_EQUALS", "MOD_EQUALS", "AND_EQUALS", "XOR_EQUALS", "OR_EQUALS", "OR", "AND", "EQUAL_COMPARE", "NOT_EQUAL", "LTEQ", "GTEQ", "BITSHIFT_RIGHT", "FILL_SHIFT_RIGHT", "SHIFT_LEFT", "INCR", "DECR", "NEW", "INT_LITERAL", "CHARACTER_LITERAL", "LONG_LITERAL", "FLOAT_LITERAL", "DOUBLE_LITERAL", "SYMBOL", "STRING_LITERAL", "'['", "']'", "'.'", "';'", "'*'", "','", "'{'", "'}'", "'='", "'('", "')'", "':'", "'+'", "'-'", "'~'", "'!'", "'/'", "'%'", "'<'", "'>'", "'&'", "'^'", "'|'", "'?'", "Goal", "Literal", "Type", "PrimitiveType", "NumericType", "IntegralType", "FloatingPointType", "ReferenceType", "ClassOrInterfaceType", "ClassType", "InterfaceType", "ArrayType", "Name", "Identifier", "CompilationUnit", "OptImportDeclarations", "OptTypeDeclarations", "OptPackageDeclaration", "ImportDeclaration", "SingleTypeImportDeclaration", "TypeImportOnDemandDeclaration", "TypeDeclaration", "OptModifiers", "Modifiers", "Modifier", "ClassDeclaration", "@1", "OptSuper", "Super", "OptInterfaces", "Interfaces", "InterfaceTypeList", "ClassBody", "OptClassBodyDeclarations", "ClassBodyDeclaration", "@2", "@3", "@4", "OptIllegalSemicolon", "ClassMemberDeclaration", "FieldDeclaration", "VariableDeclaration", "PartialVariable", "FinalPartialVariable", "OptVariableInitializer", "VariableInitializer", "ArrayInitializer", "OptVariableInitializers", "VariableInitializers", "OptComma", "MethodDeclaration", "MethodHeader", "OptThrows", "OptFormalParameterList", "FormalParameterList", "FormalParameter", "Throws", "ClassTypeList", "MethodBody", "StaticInitializer", "ConstructorDeclaration", "@5", "@6", "ConstructorBody", "ExplicitConstructorInvocation", "OptArgumentList", "InterfaceDeclaration", "@7", "OptExtendsInterfaces", "ExtendsInterfaces", "InterfaceBody", "OptInterfaceMemberDeclarations", "InterfaceMemberDeclarations", "InterfaceMemberDeclaration", "ConstantDeclaration", "AbstractMethodDeclaration", "Block", "@8", "OptBlockStatements", "BlockStatements", "BlockStatement", "LocalVariableDeclarationStatement", "LocalVariableDeclaration", "FinalVariableDeclaration", "Statement", "StatementNoShortIf", "StatementWithoutTrailingSubstatement", "EmptyStatement", "LabeledStatement", "LabeledStatementNoShortIf", "ExpressionStatement", "StatementExpression", "IfThenStatement", "IfThenElseStatement", "IfThenElseStatementNoShortIf", "SwitchStatement", "SwitchBlock", "OptSwitchBlockStatements", "SwitchBlockStatements", "SwitchBlockStatement", "WhileStatement", "WhileStatementNoShortIf", "DoStatement", "ForStatement", "ForStatementNoShortIf", "PushForStatementScope", "OptForInit", "ForInit", "OptExpression", "OptForUpdate", "ForUpdate", "StatementExpressionList", "BreakStatement", "ContinueStatement", "ReturnStatement", "ThrowStatement", "SynchronizedStatement", "TryStatement", "OptCatches", "Catches", "CatchClause", "@9", "@10", "Finally", "Primary", "PrimaryNoNewArray", "ClassInstanceCreationExpression", "@11", "@12", "ArgumentList", "ArrayCreationExpression", "DimExprs", "DimExpr", "OptDims", "Dims", "FieldAccess", "MethodInvocation", "ArrayAccess", "PrimaryExpression", "PostfixExpression", "PostIncrOrDecrExpression", "PostIncrementExpression", "PostDecrementExpression", "UnaryExpression", "PreIncrementExpression", "PreDecrementExpression", "UnaryExpressionNotPlusMinus", "CastExpression", "MultiplicativeExpression", "AdditiveExpression", "ShiftExpression", "RelationalExpression", "EqualityExpression", "AndExpression", "ExclusiveOrExpression", "InclusiveOrExpression", "ConditionalAndExpression", "ConditionalOrExpression", "ConditionalExpression", "AssignmentExpression", "Assignment", "LeftHandSide", "AssignmentOperator", "Expression", "ConstantExpression", 0 }; #endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const short yyr1[] = { 0, 106, 107, 107, 107, 107, 107, 107, 107, 107, 107, 108, 108, 109, 109, 110, 110, 111, 111, 111, 111, 111, 112, 112, 113, 113, 114, 115, 116, 117, 117, 117, 118, 118, 119, 120, 121, 121, 122, 122, 123, 123, 124, 124, 125, 126, 127, 127, 128, 128, 129, 129, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 132, 131, 133, 133, 134, 135, 135, 136, 137, 137, 138, 139, 139, 141, 140, 142, 140, 143, 140, 144, 144, 145, 145, 145, 145, 146, 147, 148, 148, 149, 149, 150, 150, 151, 151, 152, 153, 153, 154, 154, 155, 155, 156, 157, 157, 158, 158, 159, 159, 160, 160, 161, 161, 162, 163, 163, 164, 164, 165, 167, 168, 166, 169, 169, 170, 170, 171, 171, 173, 172, 174, 174, 175, 175, 176, 177, 177, 178, 178, 179, 179, 180, 181, 183, 182, 184, 184, 185, 185, 186, 186, 186, 187, 187, 188, 189, 190, 190, 190, 190, 190, 190, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 193, 194, 195, 196, 197, 197, 197, 197, 197, 197, 197, 198, 199, 200, 201, 202, 203, 203, 204, 204, 205, 205, 205, 206, 207, 208, 209, 210, 211, 212, 212, 213, 213, 214, 214, 215, 215, 216, 217, 217, 218, 218, 219, 219, 220, 220, 221, 222, 223, 223, 224, 224, 225, 225, 227, 228, 226, 229, 230, 230, 231, 231, 231, 231, 231, 231, 231, 232, 233, 232, 232, 234, 232, 235, 235, 236, 236, 236, 237, 237, 238, 239, 239, 240, 240, 241, 241, 242, 242, 242, 243, 243, 244, 244, 244, 244, 244, 245, 245, 246, 246, 247, 248, 249, 249, 249, 249, 249, 250, 251, 252, 252, 252, 252, 253, 253, 253, 254, 254, 254, 254, 255, 255, 255, 256, 256, 256, 256, 257, 257, 257, 257, 257, 257, 258, 258, 258, 259, 259, 260, 260, 261, 261, 262, 262, 263, 263, 264, 264, 265, 265, 266, 267, 267, 267, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 269, 270 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const short yyr2[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 1, 3, 0, 2, 0, 2, 0, 3, 1, 1, 3, 5, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 7, 0, 1, 2, 0, 1, 2, 1, 3, 3, 0, 2, 0, 3, 0, 3, 0, 3, 0, 1, 1, 1, 1, 1, 3, 1, 4, 5, 4, 5, 0, 2, 1, 1, 3, 1, 2, 1, 3, 0, 1, 2, 8, 8, 0, 1, 0, 1, 1, 3, 3, 4, 2, 1, 3, 1, 1, 2, 0, 0, 9, 3, 4, 5, 5, 0, 1, 0, 6, 0, 1, 2, 3, 3, 0, 1, 1, 2, 1, 1, 1, 2, 0, 4, 0, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 2, 1, 1, 1, 1, 1, 1, 1, 5, 7, 7, 5, 3, 0, 1, 1, 2, 1, 3, 2, 5, 5, 7, 10, 10, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 3, 2, 3, 2, 3, 2, 3, 3, 5, 3, 4, 0, 1, 1, 2, 0, 0, 7, 2, 1, 1, 1, 1, 3, 1, 1, 1, 1, 5, 0, 9, 6, 0, 10, 1, 3, 4, 4, 4, 1, 2, 3, 0, 1, 2, 3, 3, 3, 4, 6, 6, 4, 4, 1, 3, 3, 3, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 5, 4, 5, 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const short yydefact[] = { 40, 0, 1, 36, 34, 0, 32, 38, 0, 41, 0, 48, 37, 42, 43, 33, 0, 56, 57, 58, 54, 53, 52, 55, 59, 60, 61, 39, 0, 49, 50, 46, 47, 0, 44, 0, 0, 51, 0, 64, 132, 45, 0, 67, 65, 0, 130, 133, 27, 66, 26, 0, 62, 68, 28, 134, 0, 0, 70, 69, 0, 48, 131, 135, 0, 73, 63, 0, 143, 0, 0, 48, 139, 141, 142, 71, 48, 13, 17, 21, 23, 22, 19, 20, 18, 0, 0, 11, 14, 15, 16, 12, 24, 25, 26, 0, 88, 144, 136, 140, 55, 72, 0, 85, 74, 75, 83, 84, 0, 77, 79, 86, 0, 261, 0, 0, 0, 87, 0, 145, 120, 32, 81, 119, 104, 118, 81, 81, 109, 0, 109, 93, 262, 29, 31, 30, 261, 48, 0, 82, 76, 78, 80, 0, 0, 0, 110, 111, 263, 0, 0, 89, 0, 93, 0, 0, 0, 9, 57, 208, 0, 10, 0, 0, 0, 59, 241, 0, 8, 0, 0, 0, 0, 0, 2, 4, 5, 6, 7, 3, 180, 0, 240, 0, 11, 332, 32, 0, 153, 156, 169, 0, 48, 149, 151, 0, 152, 158, 170, 159, 171, 0, 160, 161, 172, 162, 173, 163, 174, 175, 176, 178, 177, 179, 276, 238, 243, 239, 244, 245, 246, 277, 0, 278, 187, 188, 185, 186, 184, 0, 109, 0, 261, 261, 0, 261, 102, 0, 0, 0, 0, 0, 0, 272, 94, 96, 243, 245, 290, 279, 280, 297, 283, 284, 287, 293, 301, 304, 308, 314, 317, 319, 321, 323, 325, 327, 329, 347, 330, 95, 264, 90, 220, 0, 222, 0, 0, 0, 0, 157, 0, 0, 0, 224, 0, 0, 0, 0, 0, 230, 0, 272, 244, 246, 288, 289, 0, 27, 0, 0, 261, 0, 0, 0, 128, 0, 146, 150, 154, 183, 0, 0, 0, 281, 282, 342, 343, 341, 339, 340, 336, 337, 338, 344, 345, 346, 335, 0, 0, 261, 113, 107, 112, 107, 103, 100, 0, 102, 98, 261, 272, 0, 285, 286, 291, 292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221, 223, 0, 261, 0, 155, 209, 0, 225, 266, 0, 0, 226, 234, 0, 228, 232, 0, 0, 261, 258, 0, 0, 261, 128, 242, 275, 0, 274, 273, 0, 129, 253, 181, 0, 265, 0, 331, 107, 114, 0, 106, 108, 105, 97, 103, 99, 0, 0, 0, 242, 298, 299, 300, 302, 303, 306, 307, 305, 0, 313, 311, 312, 309, 310, 315, 316, 318, 320, 322, 324, 326, 0, 0, 93, 261, 212, 218, 0, 210, 211, 0, 128, 0, 0, 0, 0, 229, 233, 0, 0, 259, 255, 257, 256, 0, 270, 267, 0, 128, 128, 271, 122, 116, 115, 101, 0, 0, 295, 0, 0, 91, 93, 213, 0, 208, 0, 0, 32, 191, 0, 158, 165, 166, 167, 168, 0, 48, 194, 227, 0, 237, 203, 260, 247, 254, 0, 0, 0, 0, 294, 296, 328, 0, 92, 0, 214, 219, 0, 0, 0, 0, 0, 269, 0, 0, 200, 0, 48, 198, 0, 248, 250, 268, 48, 123, 117, 205, 215, 209, 0, 0, 182, 192, 348, 0, 202, 195, 199, 235, 73, 251, 0, 241, 48, 0, 0, 216, 217, 0, 0, 0, 201, 0, 48, 73, 128, 128, 0, 124, 0, 213, 0, 204, 236, 249, 48, 0, 0, 125, 206, 0, 0, 252, 0, 0, 215, 193, 127, 126, 0, 0, 207, 0, 0, 0 }; static const short yydefgoto[] = { 591, 182, 183, 242, 88, 89, 90, 91, 92, 49, 55, 93, 243, 6, 2, 7, 11, 3, 12, 13, 14, 27, 187, 29, 30, 188, 60, 43, 44, 52, 53, 59, 66, 76, 104, 122, 126, 127, 140, 105, 106, 189, 96, 279, 151, 244, 245, 336, 337, 338, 107, 108, 409, 145, 146, 147, 410, 472, 124, 109, 110, 138, 506, 533, 552, 398, 111, 56, 46, 47, 62, 70, 71, 72, 73, 74, 190, 137, 191, 192, 193, 194, 195, 280, 196, 488, 197, 198, 199, 490, 200, 201, 202, 203, 491, 204, 496, 525, 526, 527, 205, 492, 206, 207, 493, 281, 446, 447, 513, 554, 555, 448, 208, 209, 210, 211, 212, 213, 382, 383, 384, 453, 561, 455, 214, 215, 246, 548, 563, 399, 217, 387, 388, 131, 132, 218, 247, 220, 221, 248, 223, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 229, 327, 400, 543 }; static const short yypact[] = { 121, 59,-32768,-32768,-32768, -40,-32768, 138, 59,-32768, 59, 423,-32768,-32768,-32768,-32768, 97,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 24, 447, -32768,-32768,-32768, 79,-32768, 59, 59,-32768, 89, 175, 180,-32768, 59, 178,-32768, 59,-32768, 125,-32768,-32768, 124, 59,-32768,-32768,-32768,-32768, 131, 59,-32768, 137, 148, 215,-32768,-32768, 59,-32768,-32768, 574,-32768, 157, 144, 645,-32768,-32768,-32768,-32768, 870,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 59, 59, 162,-32768,-32768, -32768,-32768,-32768, 163, 85, 170, 161,-32768,-32768,-32768, 168,-32768, 1296,-32768,-32768,-32768,-32768,-32768, 106,-32768, -32768,-32768, 172, -50, 176, 177, 181,-32768, 59,-32768, -32768, 174, 182,-32768,-32768,-32768, 182, 182, 493, 185, 493, 179, 189,-32768,-32768,-32768, 202, 1844, 194,-32768, -32768,-32768,-32768, 307, 59, 195, 199,-32768,-32768, 196, 1168,-32768, 206, 179, -45, 55, 2104,-32768, 307,-32768, 200,-32768, 1263, 208, 205, 207,-32768, 1509,-32768, 168, 209, 1509, 1509, 307,-32768,-32768,-32768,-32768,-32768,-32768, -32768, 1509,-32768, 59, 117, -26, 197, 287,-32768,-32768, -32768, 204, 1931,-32768,-32768, 216,-32768,-32768,-32768,-32768, -32768, 220,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768, 13, 228, 70,-32768, 1054, 81, 1342,-32768, 133,-32768, 145, 155,-32768,-32768,-32768, 1354, 493, 59, 202, 202, 493, 202, 992, 1509, 1509, 1509, 1509, 1509, 227, 2109,-32768,-32768,-32768,-32768, 133,-32768, -32768,-32768,-32768,-32768,-32768,-32768, 35, 135, 126, 12, 166, 210, 211, 212, 253, -32,-32768,-32768,-32768,-32768, -32768,-32768,-32768, 234,-32768, 235, 207, 270, 59, 237, 241, 231, 1509,-32768, 243, 59, 1509, 1509, 246, 323, 1509, 69,-32768,-32768,-32768,-32768, 252, 257, 250, 251, 202, 330, 1345, 25, 1509, 2104,-32768,-32768,-32768,-32768, 59, 59, 1509,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768, 1509, 254, 202, -32768, 299,-32768, 299,-32768,-32768, 258, 261,-32768, 120, 2268, 259,-32768,-32768,-32768,-32768, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 307, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509, 1509,-32768,-32768, 262, 202, 59,-32768, 2266, 266,-32768, 263, 267, 268, -32768,-32768, 328, 50,-32768, 271, 1427, 252,-32768, 104, 1509, 252, 1509,-32768,-32768, 282,-32768,-32768, 274, 280, -32768,-32768, 277, 278, 288,-32768, 299,-32768, 59,-32768, -32768,-32768,-32768, 1168,-32768, 283, 1427, -7, 1591,-32768, -32768,-32768, 35, 35, 135, 135, 135, 162,-32768, 126, 126, 126, 126, 12, 12, 166, 210, 211, 212, 253, 279, 1509, 179, 202,-32768,-32768, 265,-32768, 289, 2190, 1509, 286, 168, 291, 168,-32768,-32768, 2104, 294,-32768, -32768,-32768,-32768, 292,-32768,-32768, 1509, 1509, 1509,-32768, -32768,-32768, 293,-32768, 1509, 1591,-32768, 1509, 296,-32768, 179, 1509, 2266,-32768, 295, 318, 285,-32768, 353, 362, -32768,-32768,-32768,-32768, 319, 1670,-32768,-32768, 493,-32768, -32768,-32768, 297,-32768, 320, 321, 322, 59,-32768,-32768, -32768, 298,-32768, 329,-32768,-32768, 331, 1509, 1509, 2190, 2104,-32768, 1509, 326,-32768, 335, 1757,-32768, 334,-32768, 332,-32768, 2018,-32768,-32768,-32768, 2266, 2266, 337, 338, -32768,-32768,-32768, 339,-32768,-32768,-32768,-32768,-32768,-32768, 72, 336, 1844, 342, 341,-32768, 289, 349, 2190, 2190, -32768, 168, 934,-32768, 1509, 1509, 346,-32768, 2104, 1509, 419,-32768,-32768,-32768, 1016, 347, 350,-32768,-32768, 360, 2190,-32768, 361, 368, 2266,-32768,-32768,-32768, 355, 2190, -32768, 438, 455,-32768 }; static const short yypgoto[] = { -32768,-32768, -54, -47,-32768,-32768,-32768, 108, -35, -169, 86,-32768, 42, -8,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768, -10,-32768, 432, -9,-32768,-32768,-32768,-32768, -32768,-32768,-32768, -506,-32768,-32768,-32768,-32768, 111,-32768, 37, -43,-32768,-32768, -148, -224, 77,-32768,-32768, 134, -32768, 71, -314, -116,-32768, -225,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768, -343, 457,-32768,-32768,-32768, -32768,-32768,-32768, 404,-32768,-32768, -97,-32768, -502,-32768, -186,-32768, -366,-32768, 151, -428, -431,-32768,-32768,-32768, -32768, -359,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -46, -32768,-32768,-32768,-32768,-32768, 5, -42,-32768, -78, -92, -32768, -515,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 114,-32768,-32768,-32768,-32768,-32768, 51,-32768,-32768,-32768, -32768, 201, -305, -113, -270, 777, 110, 803,-32768, 169, -32768, 225, 281, -138, 284, 340, -380,-32768, -110, -290, -241, -108, 140, 143, 139, 142, 154,-32768, 33, 187, 399,-32768,-32768, 707,-32768 }; #define YYLAST 2359 static const short yytable[] = { 15, 28, 31, 120, 298, 271, 307, 48, 444, 332, 54, 125, 335, 86, 149, 445, 54, 310, 489, 411, 87, 556, 54, 153, 95, 15, 389, 39, 40, 54, 553, 366, 129, 294, 295, 4, 35, 396, 476, 355, 272, 130, 562, 5, 8, 9, -272, -272, 86, 463, 566, 67, 16, 36, -26, 87, 302, 574, 303, 95, 381, 67, 424, 425, 426, 304, 102, 103, 397, 556, 417, -231, 289, 367, 144, 152, 144, 112, 113, 356, 357, 87, 459, 87, 50, 475, 459, 50, 489, 231, 184, 540, 470, 50, 121, 509, 87, 311, 68, 50, 342, 343, 344, 345, 278, 4, 50, 494, 68, 94, 136, 87, 358, 359, 328, 429, 430, 431, 432, 330, 331, 347, 333, 515, 504, 505, 296, 489, 489, 186, 570, 571, 69, 348, 349, 4, 232, 58, 297, 4, 274, 402, 69, 63, 94, 184, 273, 275, 186, 489, 75, 346, 585, 303, 1, -190, 285, -190, 489, 4, 304, 590, -190, 564, 10, 38, -189, 116, -189, 8, 94, 444, 94, -189, 41, 300, 144, 445, 445, 185, 144, 33, 34, 87, 186, 94, 152, 87, 216, 473, 339, 123, 236, 42, 119, 352, 353, 354, 45, 114, 94, 301, 129, 51, 301, 313, 314, 216, 8, 419, 420, 421, 57, 291, 291, 50, 407, -279, -279, 61, 17, 575, 576, 329, 64, 445, 415, -280, -280, 350, 351, 360, 361, 98, 185, 18, 65, 141, 142, 471, 422, 423, 97, 216, 114, 115, 19, 219, 118, 20, 21, 22, 433, 434, 23, 117, 119, 24, 442, 133, 134, 25, 26, 128, 135, -121, 219, 139, 148, 150, 371, 152, 94, 528, 460, 48, 94, 377, 462, 340, 291, 291, 291, 291, 129, 230, 234, 233, 235, 270, 305, 282, 285, 306, 479, 15, 286, 186, 287, 35, 290, 308, 219, 403, -137, 309, 222, 277, 427, 524, 312, 301, 362, 77, 363, 78, 364, 365, 79, 368, 369, 370, 374, 80, 372, 222, 373, 184, 376, 81, 480, 380, 512, 381, 386, 82, 508, 83, 534, 390, 524, 392, 394, 393, 408, 84, 406, 412, 413, 454, 481, 418, 50, 441, 450, 497, 216, 499, 449, 451, 452, 222, 224, 457, 443, 464, 465, 466, 467, 468, 520, 469, 477, 48, 495, 474, 482, 501, 519, -164, 507, 224, 498, 535, 502, 529, 517, 4, 511, 291, 291, 291, 291, 291, 291, 291, 291, 94, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 518, 532, 521, 530, 531, 536, 219, 185, 224, 225, 544, 549, 226, 537, -35, 545, 216, 547, 565, 17, 558, 559, 567, 560, 568, 569, 577, 580, 225, 592, 582, 226, 486, 583, 18, 144, 584, 586, 589, 184, 186, 50, 87, 17, 587, 19, 593, 401, 20, 21, 22, 291, 37, 23, 428, 572, 24, 461, 18, 32, 25, 26, 414, 48, 225, 222, 99, 226, 227, 19, 184, 546, 20, 21, 22, 219, 184, 23, 186, 516, 24, 184, 579, 588, 25, 26, 557, 227, 456, 391, 77, 216, 78, 435, 437, 79, 184, 436, 438, 216, 80, 510, 486, 186, 143, 405, 81, 291, 291, 186, 291, 439, 82, 0, 83, 186, 0, 0, 0, 0, 0, 224, 84, 227, 216, 0, 0, 228, 185, 0, 0, 94, 0, 0, 222, 186, 0, 216, 0, 0, 50, 486, 486, 102, 103, 0, 228, 0, 0, 0, 219, 186, 0, 0, 0, 102, 103, 0, 219, 185, 0, 216, 216, 486, 4, 185, 0, 0, 216, 0, 185, 77, 486, 78, 216, 0, 79, 225, 216, 216, 226, 80, 228, 219, 0, 185, 0, 81, 0, 0, 224, 487, 0, 82, 216, 83, 219, 0, 0, 500, 216, 216, 0, 84, 0, 0, 0, 0, 0, 222, 216, 0, 0, 0, 0, 85, 0, 222, 0, 0, 219, 219, 216, 0, 0, 0, 216, 219, 0, 0, 0, 216, 0, 219, 0, 0, 227, 219, 219, 0, 0, 17, 222, 0, 0, 4, 225, 0, 0, 226, 0, 0, 0, 219, 0, 222, 18, 0, 0, 219, 219, 401, 541, 0, 0, 224, 0, 19, 0, 219, 20, 21, 22, 224, 0, 23, 0, 0, 24, 222, 222, 219, 25, 26, 0, 219, 222, 0, 0, 0, 219, 0, 222, 0, 0, 228, 222, 222, 224, 0, 487, 500, 0, 0, 0, 227, 0, 0, 0, 0, 578, 224, 222, 0, 0, 0, 0, 0, 222, 222, 0, 225, 541, 0, 226, -138, 0, 0, 222, 225, 0, 578, 226, 0, 0, 224, 224, 0, 0, 0, 222, 0, 224, 0, 222, 0, 0, 0, 224, 222, 0, 0, 224, 224, 225, 0, 0, 226, 0, 0, 0, 0, 0, 0, 228, 0, 0, 225, 224, 0, 226, 0, 0, 0, 224, 224, 0, 0, 0, 0, 227, 0, 0, 0, 224, 0, 0, 0, 227, 0, 0, 225, 225, 0, 226, 226, 224, 0, 225, 0, 224, 226, 0, 0, 225, 224, 0, 226, 225, 225, 0, 226, 226, 227, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 0, 227, 226, 0, 0, 225, 225, 0, 226, 226, 0, 0, 0, 0, 228, 225, 0, 0, 226, 0, 0, 0, 228, 269, 0, 227, 227, 225, 0, 0, 226, 225, 227, 0, 226, 284, 225, 0, 227, 226, 288, 17, 227, 227, 0, 0, 0, 228, 0, 0, 0, 0, 0, 0, 299, 0, 18, 0, 227, 0, 228, 0, 0, 0, 227, 227, 0, 19, 0, 0, 20, 21, 22, 0, 227, 100, 0, 0, 24, 0, 0, 0, 25, 26, 228, 228, 227, 0, 0, 0, 227, 228, 0, 0, 0, 227, 0, 228, 0, 0, 0, 228, 228, 0, 0, 17, 0, 0, 0, 269, 341, 0, 0, 0, 292, 292, 0, 228, 0, 0, 18, 0, 0, 228, 228, 101, 0, 0, 0, 0, 0, 19, 0, 228, 20, 21, 22, 0, 0, 100, 293, 293, 24, 0, 0, 228, 25, 26, 0, 228, 0, 0, 0, 0, 228, 375, 0, 0, 0, 378, 379, 0, 0, 385, 77, 0, 78, 0, 0, 79, 0, 0, 0, 0, 80, 395, 0, 157, 0, 0, 81, 292, 292, 292, 292, 404, 82, 17, 83, 573, 161, 0, 0, 0, 0, 0, 84, 0, 163, 0, 0, 166, 18, 0, 0, 0, 168, 293, 293, 293, 293, 0, 0, 19, 0, 0, 20, 21, 22, 395, 0, 100, 0, 0, 24, 0, 0, 0, 25, 26, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 440, 0, 0, 0, 0, 334, 236, 0, 0, 237, 0, 0, 238, 239, 240, 241, 0, 0, 0, 458, 0, 0, 0, 458, 0, 0, 0, 0, 0, 0, 0, 581, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, -333, 0, 0, 0, 269, 0, 0, 395, 292, 292, 292, 292, 292, 292, 292, 292, 0, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, -333, 0, 0, 0, 478, 0, 293, 293, 293, 293, 293, 293, 293, 293, 0, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 0, 0, 0, 503, 77, 0, 78, 0, 0, 79, 0, 0, 0, 0, 80, 0, 0, 157, 514, 0, 81, 0, 0, 0, 0, 292, 82, 0, 83, 0, 161, 0, 0, 0, 0, 0, 84, 0, 163, 0, 0, 166, 0, 0, 0, 0, 168, 0, 0, 0, 0, 293, 0, 0, 538, 539, 0, 0, 0, 542, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 0, 292, 292, 0, 292, 0, 236, 0, 0, 237, 0, 0, 238, 239, 240, 241, 0, 0, 0, 77, 0, 78, 0, 0, 79, 0, 514, 293, 293, 80, 293, 0, 157, 0, 0, 81, 0, 0, 0, 0, 0, 82, 0, 83, 0, 161, 0, 0, 0, 0, 0, 84, 77, 163, 78, 0, 166, 79, 35, 0, 0, 168, 80, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 82, 36, 83, 0, 0, 0, 0, 0, 0, 0, 84, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 0, 85, 0, 283, 0, 0, 77, 0, 78, 237, 0, 79, 238, 239, 240, 241, 80, 0, 0, 157, 0, 0, 81, 0, 0, 0, 0, 0, 82, 0, 83, 4, 161, 0, 0, 0, 0, 0, 84, 0, 163, 0, 0, 166, 0, 0, 0, 0, 168, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, 0, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 0, 135, 0, 0, 0, -334, 77, 0, 78, 237, 0, 79, 238, 239, 240, 241, 80, 326, 0, 157, 0, 0, 81, 0, 0, 0, 0, 0, 82, 0, 83, 0, 161, 0, 0, 0, 0, 0, 84, 0, 163, 0, 0, 166, 0, 0, 0, 0, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 0, 148, 0, 0, 0, 0, 77, 0, 78, 237, 0, 79, 238, 239, 240, 241, 80, 0, 0, 157, 0, 0, 81, 0, 0, 0, 0, 0, 82, 0, 83, 0, 161, 0, 0, 0, 0, 0, 84, 0, 163, 0, 0, 166, 0, 0, 0, 0, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 0, 0, 0, 0, 0, 0, 77, 0, 78, 237, 0, 79, 238, 239, 240, 241, 80, 0, 0, 157, 0, 0, 81, 0, 0, 0, 0, 0, 82, 0, 83, 0, 161, 0, 0, 0, 0, 0, 84, 0, 163, 0, 0, 166, 0, 0, 0, 0, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 175, 176, 177, 178, 4, 179, 0, 0, 17, 77, 154, 78, 522, 0, 79, 237, 155, 523, 156, 80, 240, 241, 157, 158, 0, 81, 159, 160, 0, 0, 0, 82, 0, 83, 19, 161, 0, 20, 21, 22, 162, 84, 23, 163, 164, 165, 166, 167, 0, 25, 26, 168, 169, 0, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 0, 0, 0, 180, 0, 0, 119, -196, 0, 181, 17, 77, 154, 78, 522, 0, 79, 0, 155, 523, 156, 80, 0, 0, 157, 158, 0, 81, 159, 160, 0, 0, 0, 82, 0, 83, 19, 161, 0, 20, 21, 22, 162, 84, 23, 163, 164, 165, 166, 167, 0, 25, 26, 168, 169, 0, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 0, 0, 0, 180, 0, 0, 119, -197, 0, 181, 17, 77, 154, 78, 0, 0, 79, 0, 155, 0, 156, 80, 0, 0, 157, 158, 0, 81, 159, 160, 0, 0, 0, 82, 0, 83, 19, 161, 0, 20, 21, 22, 162, 84, 23, 163, 164, 165, 166, 167, 0, 25, 26, 168, 169, 0, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 0, 0, 0, 180, 0, 0, 119, -147, 0, 181, 17, 77, 154, 78, 0, 0, 79, 0, 155, 0, 156, 80, 0, 0, 157, 158, 0, 81, 159, 160, 0, 0, 0, 82, 0, 83, 19, 161, 0, 20, 21, 22, 162, 84, 23, 163, 164, 165, 166, 167, 0, 25, 26, 168, 169, 0, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 0, 0, 0, 180, 0, 0, 119, -148, 0, 181, 17, 77, 154, 78, 0, 0, 79, 0, 155, 0, 156, 80, 0, 0, 157, 158, 0, 81, 159, 160, 0, 0, 0, 82, 0, 83, 19, 161, 0, 20, 21, 22, 162, 84, 23, 550, 164, 165, 551, 167, 0, 25, 26, 168, 169, 0, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 0, 0, 0, 180, 0, 0, 119, -147, 0, 181, 77, 154, 78, 0, 0, 79, 0, 155, 0, 156, 80, 0, 0, 157, 0, 0, 81, 159, 160, 0, 0, 0, 82, 0, 83, 0, 161, 0, 0, 0, 0, 162, 84, 0, 163, 164, 276, 166, 167, 0, 0, 0, 168, 169, 0, 170, 0, 0, 0, 0, 0, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, 0, 0, 0, 0, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 0, 0, 0, 180, 0, 346, 119, 303, 0, 181, 77, 154, 78, -332, 304, 79, 0, 155, 0, 156, 80, 0, 0, 157, 0, 0, 81, 483, 484, 0, 0, 0, 82, 0, 83, 0, 161, 0, 0, 0, 0, 162, 84, 0, 163, 164, 276, 166, 167, 0, 0, 0, 168, 169, 0, 485, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 77, 0, 78, 180, 0, 79, 119, 0, 0, 181, 80, 0, 0, 157, 0, 0, 81, 0, 0, 0, 0, 0, 82, 0, 83, 0, 161, 0, 0, 0, 0, 0, 84, 0, 163, 0, 0, 166, 0, 0, 0, 0, 168, 0, 0, 0, 0, 0, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, -332, 0, 0, 0, 0, 0, 0, 0, 171, 172, 173, 174, 175, 176, 177, 178, 4, 179, 0, 0, 416, 0, 303, 0, 0, 0, 0, 181, -332, 304 }; static const short yycheck[] = { 8, 11, 11, 100, 173, 153, 192, 42, 374, 234, 45, 108, 236, 67, 130, 374, 51, 4, 449, 333, 67, 536, 57, 136, 67, 33, 296, 35, 36, 64, 532, 63, 82, 171, 172, 80, 12, 12, 418, 27, 85, 91, 548, 1, 84, 85, 72, 73, 102, 392, 552, 61, 10, 29, 80, 102, 82, 563, 84, 102, 10, 71, 352, 353, 354, 91, 76, 76, 43, 584, 340, 21, 169, 105, 128, 82, 130, 85, 86, 67, 68, 128, 387, 130, 42, 92, 391, 45, 519, 143, 137, 519, 406, 51, 102, 475, 143, 84, 61, 57, 238, 239, 240, 241, 158, 80, 64, 450, 71, 67, 118, 158, 100, 101, 230, 356, 357, 358, 359, 232, 233, 86, 235, 482, 467, 468, 173, 558, 559, 137, 558, 559, 61, 98, 99, 80, 144, 51, 173, 80, 85, 310, 71, 57, 102, 192, 154, 155, 156, 580, 64, 82, 580, 84, 33, 85, 84, 87, 589, 80, 91, 589, 92, 91, 26, 86, 85, 82, 87, 84, 128, 537, 130, 92, 85, 183, 230, 536, 537, 137, 234, 84, 85, 230, 192, 143, 82, 234, 137, 413, 237, 85, 88, 18, 88, 69, 70, 71, 18, 82, 158, 84, 82, 25, 84, 72, 73, 156, 84, 347, 348, 349, 87, 171, 172, 173, 329, 72, 73, 88, 5, 564, 565, 231, 87, 584, 339, 72, 73, 94, 95, 65, 66, 89, 192, 20, 88, 126, 127, 408, 350, 351, 85, 192, 82, 82, 31, 137, 87, 34, 35, 36, 360, 361, 39, 85, 88, 42, 371, 83, 83, 46, 47, 91, 83, 91, 156, 85, 83, 90, 278, 82, 230, 498, 387, 310, 234, 285, 391, 237, 238, 239, 240, 241, 82, 91, 87, 92, 92, 83, 93, 91, 84, 89, 442, 303, 91, 305, 91, 12, 91, 85, 192, 311, 89, 85, 137, 156, 355, 495, 82, 84, 102, 6, 103, 8, 104, 64, 11, 85, 85, 51, 91, 16, 87, 156, 85, 374, 85, 22, 443, 85, 480, 10, 82, 28, 474, 30, 507, 82, 526, 91, 12, 92, 45, 38, 92, 89, 87, 21, 85, 92, 310, 91, 91, 452, 305, 454, 92, 92, 92, 192, 137, 92, 372, 83, 92, 87, 91, 91, 17, 83, 93, 408, 88, 92, 87, 83, 93, 17, 87, 156, 91, 85, 92, 88, 91, 80, 92, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 91, 88, 92, 92, 92, 85, 305, 374, 192, 137, 93, 88, 137, 91, 0, 89, 374, 92, 91, 5, 92, 92, 89, 93, 92, 85, 89, 17, 156, 0, 92, 156, 449, 92, 20, 498, 85, 85, 92, 495, 457, 408, 498, 5, 85, 31, 0, 305, 34, 35, 36, 418, 29, 39, 355, 561, 42, 389, 20, 11, 46, 47, 337, 507, 192, 305, 71, 192, 137, 31, 526, 526, 34, 35, 36, 374, 532, 39, 495, 483, 42, 537, 569, 584, 46, 47, 537, 156, 383, 297, 6, 449, 8, 362, 364, 11, 552, 363, 365, 457, 16, 477, 519, 520, 20, 327, 22, 474, 475, 526, 477, 366, 28, -1, 30, 532, -1, -1, -1, -1, -1, 305, 38, 192, 482, -1, -1, 137, 495, -1, -1, 498, -1, -1, 374, 552, -1, 495, -1, -1, 507, 558, 559, 562, 562, -1, 156, -1, -1, -1, 449, 568, -1, -1, -1, 574, 574, -1, 457, 526, -1, 519, 520, 580, 80, 532, -1, -1, 526, -1, 537, 6, 589, 8, 532, -1, 11, 305, 536, 537, 305, 16, 192, 482, -1, 552, -1, 22, -1, -1, 374, 449, -1, 28, 552, 30, 495, -1, -1, 457, 558, 559, -1, 38, -1, -1, -1, -1, -1, 449, 568, -1, -1, -1, -1, 50, -1, 457, -1, -1, 519, 520, 580, -1, -1, -1, 584, 526, -1, -1, -1, 589, -1, 532, -1, -1, 305, 536, 537, -1, -1, 5, 482, -1, -1, 80, 374, -1, -1, 374, -1, -1, -1, 552, -1, 495, 20, -1, -1, 558, 559, 519, 520, -1, -1, 449, -1, 31, -1, 568, 34, 35, 36, 457, -1, 39, -1, -1, 42, 519, 520, 580, 46, 47, -1, 584, 526, -1, -1, -1, 589, -1, 532, -1, -1, 305, 536, 537, 482, -1, 558, 559, -1, -1, -1, 374, -1, -1, -1, -1, 568, 495, 552, -1, -1, -1, -1, -1, 558, 559, -1, 449, 580, -1, 449, 89, -1, -1, 568, 457, -1, 589, 457, -1, -1, 519, 520, -1, -1, -1, 580, -1, 526, -1, 584, -1, -1, -1, 532, 589, -1, -1, 536, 537, 482, -1, -1, 482, -1, -1, -1, -1, -1, -1, 374, -1, -1, 495, 552, -1, 495, -1, -1, -1, 558, 559, -1, -1, -1, -1, 449, -1, -1, -1, 568, -1, -1, -1, 457, -1, -1, 519, 520, -1, 519, 520, 580, -1, 526, -1, 584, 526, -1, -1, 532, 589, -1, 532, 536, 537, -1, 536, 537, 482, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 552, -1, 495, 552, -1, -1, 558, 559, -1, 558, 559, -1, -1, -1, -1, 449, 568, -1, -1, 568, -1, -1, -1, 457, 150, -1, 519, 520, 580, -1, -1, 580, 584, 526, -1, 584, 162, 589, -1, 532, 589, 167, 5, 536, 537, -1, -1, -1, 482, -1, -1, -1, -1, -1, -1, 181, -1, 20, -1, 552, -1, 495, -1, -1, -1, 558, 559, -1, 31, -1, -1, 34, 35, 36, -1, 568, 39, -1, -1, 42, -1, -1, -1, 46, 47, 519, 520, 580, -1, -1, -1, 584, 526, -1, -1, -1, 589, -1, 532, -1, -1, -1, 536, 537, -1, -1, 5, -1, -1, -1, 236, 237, -1, -1, -1, 171, 172, -1, 552, -1, -1, 20, -1, -1, 558, 559, 89, -1, -1, -1, -1, -1, 31, -1, 568, 34, 35, 36, -1, -1, 39, 171, 172, 42, -1, -1, 580, 46, 47, -1, 584, -1, -1, -1, -1, 589, 282, -1, -1, -1, 286, 287, -1, -1, 290, 6, -1, 8, -1, -1, 11, -1, -1, -1, -1, 16, 302, -1, 19, -1, -1, 22, 238, 239, 240, 241, 312, 28, 5, 30, 89, 32, -1, -1, -1, -1, -1, 38, -1, 40, -1, -1, 43, 20, -1, -1, -1, 48, 238, 239, 240, 241, -1, -1, 31, -1, -1, 34, 35, 36, 346, -1, 39, -1, -1, 42, -1, -1, -1, 46, 47, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 367, -1, -1, -1, -1, 87, 88, -1, -1, 91, -1, -1, 94, 95, 96, 97, -1, -1, -1, 386, -1, -1, -1, 390, -1, -1, -1, -1, -1, -1, -1, 89, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, -1, -1, -1, 413, -1, -1, 416, 347, 348, 349, 350, 351, 352, 353, 354, -1, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 90, -1, -1, -1, 441, -1, 347, 348, 349, 350, 351, 352, 353, 354, -1, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, -1, -1, -1, 466, 6, -1, 8, -1, -1, 11, -1, -1, -1, -1, 16, -1, -1, 19, 481, -1, 22, -1, -1, -1, -1, 418, 28, -1, 30, -1, 32, -1, -1, -1, -1, -1, 38, -1, 40, -1, -1, 43, -1, -1, -1, -1, 48, -1, -1, -1, -1, 418, -1, -1, 517, 518, -1, -1, -1, 522, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, -1, 474, 475, -1, 477, -1, 88, -1, -1, 91, -1, -1, 94, 95, 96, 97, -1, -1, -1, 6, -1, 8, -1, -1, 11, -1, 569, 474, 475, 16, 477, -1, 19, -1, -1, 22, -1, -1, -1, -1, -1, 28, -1, 30, -1, 32, -1, -1, -1, -1, -1, 38, 6, 40, 8, -1, 43, 11, 12, -1, -1, 48, 16, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, 28, 29, 30, -1, -1, -1, -1, -1, -1, -1, 38, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, -1, 50, -1, 85, -1, -1, 6, -1, 8, 91, -1, 11, 94, 95, 96, 97, 16, -1, -1, 19, -1, -1, 22, -1, -1, -1, -1, -1, 28, -1, 30, 80, 32, -1, -1, -1, -1, -1, 38, -1, 40, -1, -1, 43, -1, -1, -1, -1, 48, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, -1, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, -1, 83, -1, -1, -1, 90, 6, -1, 8, 91, -1, 11, 94, 95, 96, 97, 16, 90, -1, 19, -1, -1, 22, -1, -1, -1, -1, -1, 28, -1, 30, -1, 32, -1, -1, -1, -1, -1, 38, -1, 40, -1, -1, 43, -1, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, -1, 83, -1, -1, -1, -1, 6, -1, 8, 91, -1, 11, 94, 95, 96, 97, 16, -1, -1, 19, -1, -1, 22, -1, -1, -1, -1, -1, 28, -1, 30, -1, 32, -1, -1, -1, -1, -1, 38, -1, 40, -1, -1, 43, -1, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, -1, -1, -1, -1, -1, -1, 6, -1, 8, 91, -1, 11, 94, 95, 96, 97, 16, -1, -1, 19, -1, -1, 22, -1, -1, -1, -1, -1, 28, -1, 30, -1, 32, -1, -1, -1, -1, -1, 38, -1, 40, -1, -1, 43, -1, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 74, 75, 76, 77, 78, 79, 80, 81, -1, -1, 5, 6, 7, 8, 9, -1, 11, 91, 13, 14, 15, 16, 96, 97, 19, 20, -1, 22, 23, 24, -1, -1, -1, 28, -1, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, -1, 46, 47, 48, 49, -1, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, -1, -1, -1, 85, -1, -1, 88, 89, -1, 91, 5, 6, 7, 8, 9, -1, 11, -1, 13, 14, 15, 16, -1, -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, 28, -1, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, -1, 46, 47, 48, 49, -1, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, -1, -1, -1, 85, -1, -1, 88, 89, -1, 91, 5, 6, 7, 8, -1, -1, 11, -1, 13, -1, 15, 16, -1, -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, 28, -1, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, -1, 46, 47, 48, 49, -1, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, -1, -1, -1, 85, -1, -1, 88, 89, -1, 91, 5, 6, 7, 8, -1, -1, 11, -1, 13, -1, 15, 16, -1, -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, 28, -1, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, -1, 46, 47, 48, 49, -1, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, -1, -1, -1, 85, -1, -1, 88, 89, -1, 91, 5, 6, 7, 8, -1, -1, 11, -1, 13, -1, 15, 16, -1, -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, 28, -1, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, -1, 46, 47, 48, 49, -1, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, -1, -1, -1, 85, -1, -1, 88, 89, -1, 91, 6, 7, 8, -1, -1, 11, -1, 13, -1, 15, 16, -1, -1, 19, -1, -1, 22, 23, 24, -1, -1, -1, 28, -1, 30, -1, 32, -1, -1, -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, -1, 48, 49, -1, 51, -1, -1, -1, -1, -1, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, -1, -1, -1, -1, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, -1, -1, -1, 85, -1, 82, 88, 84, -1, 91, 6, 7, 8, 90, 91, 11, -1, 13, -1, 15, 16, -1, -1, 19, -1, -1, 22, 23, 24, -1, -1, -1, 28, -1, 30, -1, 32, -1, -1, -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, -1, 48, 49, -1, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 6, -1, 8, 85, -1, 11, 88, -1, -1, 91, 16, -1, -1, 19, -1, -1, 22, -1, -1, -1, -1, -1, 28, -1, 30, -1, 32, -1, -1, -1, -1, -1, 38, -1, 40, -1, -1, 43, -1, -1, -1, -1, 48, -1, -1, -1, -1, -1, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, -1, -1, -1, -1, -1, -1, -1, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, -1, -1, 82, -1, 84, -1, -1, -1, -1, 91, 90, 91 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/local/share/bison/bison.simple" /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) /* The parser invokes alloca or malloc; define the necessary symbols. */ # if YYSTACK_USE_ALLOCA # define YYSTACK_ALLOC alloca # else # ifndef YYSTACK_USE_ALLOCA # if defined (alloca) || defined (_ALLOCA_H) # define YYSTACK_ALLOC alloca # else # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else # if defined (__STDC__) || defined (__cplusplus) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif # define YYSTACK_ALLOC malloc # define YYSTACK_FREE free # endif #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ #if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { short yyss; YYSTYPE yyvs; # if YYLSP_NEEDED YYLTYPE yyls; # endif }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # if YYLSP_NEEDED # define YYSTACK_BYTES(N) \ ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAX) # else # define YYSTACK_BYTES(N) \ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAX) # endif /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ register YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (0) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif #if ! defined (YYSIZE_T) && defined (size_t) # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) # if defined (__STDC__) || defined (__cplusplus) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif #endif #if ! defined (YYSIZE_T) # define YYSIZE_T unsigned int #endif #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ yyerror ("syntax error: cannot back up"); \ YYERROR; \ } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Compute the default location (before the actions are run). When YYLLOC_DEFAULT is run, CURRENT is set the location of the first token. By default, to implement support for ranges, extend its range to the last symbol. */ #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ Current.last_line = Rhs[N].last_line; \ Current.last_column = Rhs[N].last_column; #endif /* YYLEX -- calling `yylex' with the right arguments. */ #if YYPURE # if YYLSP_NEEDED # ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) # else # define YYLEX yylex (&yylval, &yylloc) # endif # else /* !YYLSP_NEEDED */ # ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) # else # define YYLEX yylex (&yylval) # endif # endif /* !YYLSP_NEEDED */ #else /* !YYPURE */ # define YYLEX yylex () #endif /* !YYPURE */ /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #if YYMAXDEPTH == 0 # undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #ifdef YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) # define yystrlen strlen # else /* Return the length of YYSTR. */ static YYSIZE_T # if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) # else yystrlen (yystr) const char *yystr; # endif { register const char *yys = yystr; while (*yys++ != '\0') continue; return yys - yystr - 1; } # endif # endif # ifndef yystpcpy # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * # if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) # else yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; # endif { register char *yyd = yydest; register const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif #endif #line 315 "/usr/local/share/bison/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM # define YYPARSE_PARAM_DECL # else # define YYPARSE_PARAM_ARG YYPARSE_PARAM # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; # endif #else /* !YYPARSE_PARAM */ # define YYPARSE_PARAM_ARG # define YYPARSE_PARAM_DECL #endif /* !YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ # ifdef YYPARSE_PARAM int yyparse (void *); # else int yyparse (void); # endif #endif /* YY_DECL_VARIABLES -- depending whether we use a pure parser, variables are global, or local to YYPARSE. */ #define YY_DECL_NON_LSP_VARIABLES \ /* The lookahead symbol. */ \ int yychar; \ \ /* The semantic value of the lookahead symbol. */ \ YYSTYPE yylval; \ \ /* Number of parse errors so far. */ \ int yynerrs; #if YYLSP_NEEDED # define YY_DECL_VARIABLES \ YY_DECL_NON_LSP_VARIABLES \ \ /* Location data for the lookahead symbol. */ \ YYLTYPE yylloc; #else # define YY_DECL_VARIABLES \ YY_DECL_NON_LSP_VARIABLES #endif /* If nonreentrant, generate the variables here. */ #if !YYPURE YY_DECL_VARIABLES #endif /* !YYPURE */ int yyparse (YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { /* If reentrant, generate the variables here. */ #if YYPURE YY_DECL_VARIABLES #endif /* !YYPURE */ register int yystate; register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ int yychar1 = 0; /* Three stacks and their tools: `yyss': related to states, `yyvs': related to semantic values, `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; #if YYLSP_NEEDED /* The location stack. */ YYLTYPE yylsa[YYINITDEPTH]; YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #endif #if YYLSP_NEEDED # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else # define YYPOPSTACK (yyvsp--, yyssp--) #endif YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYLSP_NEEDED YYLTYPE yyloc; #endif /* When reducing, the number of symbols on the RHS of the reduced rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; #if YYLSP_NEEDED yylsp = yyls; #endif goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ # if YYLSP_NEEDED YYLTYPE *yyls1 = yyls; /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); yyls = yyls1; # else yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); # endif yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyoverflowlab; # else /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; { short *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); # if YYLSP_NEEDED YYSTACK_RELOCATE (yyls); # endif # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; #if YYLSP_NEEDED yylsp = yyls + yysize - 1; #endif YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyssp >= yyss + yystacksize - 1) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yychar1 = YYTRANSLATE (yychar); #if YYDEBUG /* We have to keep this `#if YYDEBUG', since we use variables which are defined only if `YYDEBUG' is set. */ if (yydebug) { YYFPRINTF (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ # ifdef YYPRINT YYPRINT (stderr, yychar, yylval); # endif YYFPRINTF (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ YYDPRINTF ((stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #if YYLSP_NEEDED *++yylsp = yylloc; #endif /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to the semantic value of the lookahead token. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; #if YYLSP_NEEDED /* Similarly for the default location. Let the user run additional commands if for instance locations are ranges. */ yyloc = yylsp[1-yylen]; YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); #endif #if YYDEBUG /* We have to keep this `#if YYDEBUG', since we use variables which are defined only if `YYDEBUG' is set. */ if (yydebug) { int yyi; YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 2: #line 139 "parser.y" { yyval.expression = new COrdinalLiteral((unsigned long)yyvsp[0].longNumber); ; break;} case 3: #line 141 "parser.y" { yyval.expression = new CStringLiteral(*(yyvsp[0].text)); delete yyvsp[0].text; ; break;} case 4: #line 146 "parser.y" { yyval.expression = new COrdinalLiteral((unsigned short)yyvsp[0].longNumber); ; break;} case 5: #line 148 "parser.y" { yyval.expression = new COrdinalLiteral(yyvsp[0].doubleLong); ; break;} case 6: #line 150 "parser.y" { yyval.expression = new CFloatLiteral(yyvsp[0].floatNumber); ; break;} case 7: #line 152 "parser.y" { yyval.expression = new CFloatLiteral(yyvsp[0].doubleFloat); ; break;} case 8: #line 154 "parser.y" { yyval.expression = new COrdinalLiteral(true); ; break;} case 9: #line 156 "parser.y" { yyval.expression = new COrdinalLiteral(false); ; break;} case 10: #line 158 "parser.y" { yyval.expression = new CNull(); ; break;} case 13: #line 168 "parser.y" { yyval.typeSignature = new CJavaTypeSignature(CJavaTypeSignature::Boolean); ; break;} case 17: #line 179 "parser.y" { yyval.typeSignature = new CJavaTypeSignature(CJavaTypeSignature::Byte); ; break;} case 18: #line 181 "parser.y" { yyval.typeSignature = new CJavaTypeSignature(CJavaTypeSignature::Short); ; break;} case 19: #line 183 "parser.y" { yyval.typeSignature = new CJavaTypeSignature(CJavaTypeSignature::Integer); ; break;} case 20: #line 185 "parser.y" { yyval.typeSignature = new CJavaTypeSignature(CJavaTypeSignature::LongInteger); ; break;} case 21: #line 187 "parser.y" { yyval.typeSignature = new CJavaTypeSignature(CJavaTypeSignature::Character); ; break;} case 22: #line 192 "parser.y" { yyval.typeSignature = new CJavaTypeSignature(CJavaTypeSignature::Float); ; break;} case 23: #line 194 "parser.y" { yyval.typeSignature = new CJavaTypeSignature(CJavaTypeSignature::Double); ; break;} case 24: #line 199 "parser.y" { yyval.typeSignature = new CJavaTypeSignature(*(yyvsp[0].text)); delete yyvsp[0].text; ; break;} case 29: #line 220 "parser.y" { yyval.typeSignature = yyvsp[-2].typeSignature; yyval.typeSignature->SetArrayBounds(1); ; break;} case 30: #line 225 "parser.y" { yyval.typeSignature = new CJavaTypeSignature(*(yyvsp[-2].text), 1); delete yyvsp[-2].text; ; break;} case 31: #line 230 "parser.y" { yyval.typeSignature = yyvsp[-2].typeSignature; yyval.typeSignature->SetArrayBounds(yyval.typeSignature->GetArrayBounds() + 1); ; break;} case 33: #line 239 "parser.y" { yyval.text = yyvsp[-2].text; *(yyval.text) += kSymbolDivider; *(yyval.text) += *(yyvsp[0].text); delete yyvsp[0].text; ; break;} case 39: #line 261 "parser.y" { yydeprecated = false; ; break;} case 40: #line 265 "parser.y" { gCurrentCompiler->NoPackage(); ; break;} case 41: #line 269 "parser.y" { gCurrentCompiler->SetPackage(*(yyvsp[-1].text)); delete yyvsp[-1].text; ; break;} case 44: #line 282 "parser.y" { gCurrentCompiler->AddClassImport(*(yyvsp[-1].text)); delete yyvsp[-1].text; ; break;} case 45: #line 290 "parser.y" { gCurrentCompiler->AddPackageImport(*(yyvsp[-3].text)); delete yyvsp[-3].text; ; break;} case 48: #line 302 "parser.y" { yyval.modifiers = new CJavaAccessFlags(); ; break;} case 51: #line 309 "parser.y" { yyval.modifiers = yyvsp[-1].modifiers; yyval.modifiers->SetFlags(yyvsp[-1].modifiers->GetJavaFlags() | yyvsp[0].modifiers->GetJavaFlags()); delete yyvsp[0].modifiers; ; break;} case 52: #line 318 "parser.y" { yyval.modifiers = new CJavaAccessFlags(); yyval.modifiers->fPublic = 1; ; break;} case 53: #line 323 "parser.y" { yyval.modifiers = new CJavaAccessFlags(); yyval.modifiers->fProtected = 1; ; break;} case 54: #line 328 "parser.y" { yyval.modifiers = new CJavaAccessFlags(); yyval.modifiers->fPrivate = 1; ; break;} case 55: #line 333 "parser.y" { yyval.modifiers = new CJavaAccessFlags(); yyval.modifiers->fStatic = 1; ; break;} case 56: #line 338 "parser.y" { yyval.modifiers = new CJavaAccessFlags(); yyval.modifiers->fAbstract = 1; ; break;} case 57: #line 343 "parser.y" { yyval.modifiers = new CJavaAccessFlags(); yyval.modifiers->fFinal = 1; ; break;} case 58: #line 348 "parser.y" { yyval.modifiers = new CJavaAccessFlags(); yyval.modifiers->fNative = 1; ; break;} case 59: #line 353 "parser.y" { yyval.modifiers = new CJavaAccessFlags(); yyval.modifiers->fSynchronized = 1; ; break;} case 60: #line 358 "parser.y" { yyval.modifiers = new CJavaAccessFlags(); yyval.modifiers->fTransient = 1; ; break;} case 61: #line 363 "parser.y" { yyval.modifiers = new CJavaAccessFlags(); yyval.modifiers->fVolatile = 1; ; break;} case 62: #line 371 "parser.y" { CJavaAccessFlags usedFlags(*yyvsp[-4].modifiers); usedFlags.fPublic = usedFlags.fFinal = usedFlags.fAbstract = usedFlags.fStatic = 0; if (usedFlags.Count() > 0) { string errorMessage("Invalid modifier use in class declaration: "); errorMessage += usedFlags.FlagNames(); yyerror(errorMessage.c_str()); YYERROR; } gCurrentCompiler->StartClass(*(yyvsp[-2].text), yyvsp[-4].modifiers, yyvsp[-1].text, yyvsp[0].stringList, yydeprecated); delete yyvsp[-2].text; ; break;} case 63: #line 385 "parser.y" { gCurrentCompiler->EndClass(); ; break;} case 64: #line 389 "parser.y" { yyval.text = 0; ; break;} case 66: #line 395 "parser.y" { yyval.text = yyvsp[0].text; ; break;} case 67: #line 399 "parser.y" { yyval.stringList = 0; ; break;} case 69: #line 405 "parser.y" { yyval.stringList = yyvsp[0].stringList; ; break;} case 70: #line 410 "parser.y" { yyval.stringList = new deque; yyval.stringList->push_back(*(yyvsp[0].text)); delete yyvsp[0].text; ; break;} case 71: #line 416 "parser.y" { yyval.stringList = yyvsp[-2].stringList; yyval.stringList->push_back(*(yyvsp[0].text)); delete yyvsp[0].text; ; break;} case 75: #line 433 "parser.y" { yydeprecated = false; ; break;} case 77: #line 436 "parser.y" { yydeprecated = false; ; break;} case 79: #line 439 "parser.y" { yydeprecated = false; ; break;} case 82: #line 445 "parser.y" { assert(gCurrentCompiler != 0); gCurrentCompiler->ParseWarning(yylineno, "Warning: illegal use of semicolon in class body.", yytext); ; break;} case 87: #line 486 "parser.y" { CJavaAccessFlags usedFlags(*yyvsp[-2].modifiers); usedFlags.fPublic = usedFlags.fProtected = usedFlags.fPrivate = usedFlags.fStatic = usedFlags.fFinal = usedFlags.fTransient = usedFlags.fVolatile = 0; if (usedFlags.Count() > 0) { string errorMessage("Invalid modifier use in field declaration: "); errorMessage += usedFlags.FlagNames(); yyerror(errorMessage.c_str()); YYERROR; } for (deque::iterator field = (yyvsp[-1].variableList)->begin(); !(field == yyvsp[-1].variableList->end()); ++field) { unicode_string name = (*field)->GetSignature().GetFieldName(); if (gCurrentCompiler->FieldExists(name)) { string errorMessage("Duplicate field: "); errorMessage += ::UnicodeToUTF(name); yyerror(errorMessage.c_str()); YYERROR; } } gCurrentCompiler->AddField(new CDeclarationStatement(yyvsp[-1].variableList, yyvsp[-2].modifiers, yydeprecated)); ; break;} case 88: #line 514 "parser.y" { yyval.variableList = yyvsp[0].variableList; // take off the bogus entry added in PartialVariable delete yyval.variableList->front(); yyval.variableList->pop_front(); ; break;} case 89: #line 524 "parser.y" { if (yyvsp[-3].typeSignature->GetBaseType() == CJavaTypeSignature::Void) { yyerror("Invalid use of 'void' for a variable type."); YYERROR; } yyval.variableList = new deque; // push a bogus entry at the beginning, just to hold the base type of // this variable declaration sequence. yyval.variableList->push_front(new CVariableDeclaration(*(yyvsp[-3].typeSignature), unicode_string())); yyvsp[-3].typeSignature->SetArrayBounds(yyvsp[-3].typeSignature->GetArrayBounds() + yyvsp[-1].longNumber); CArrayInitializer* arrayInitializer= DYNAMIC_CAST(CArrayInitializer, yyvsp[0].expression); if (arrayInitializer != 0) { if (yyvsp[-3].typeSignature->GetArrayBounds() == 0) { string errorMessage("Cannot use array initializer with non-array "); errorMessage += ::UnicodeToUTF(*yyvsp[-2].text); yyerror(errorMessage.c_str()); YYERROR; } else { arrayInitializer->SetArrayType(*(yyvsp[-3].typeSignature)); } } CVariableDeclaration declaration(*(yyvsp[-3].typeSignature), *(yyvsp[-2].text)); if (gCurrentCompiler->InStatementBlock()) { if (gCurrentCompiler->LookupLocalVariable(*yyvsp[-2].text) != 0) { string errorMessage = ::UnicodeToUTF(*yyvsp[-2].text); errorMessage += " already declared in this scope."; yyerror(errorMessage.c_str()); YYERROR; } else { gCurrentCompiler->AddLocalVariable(declaration); } } CExpression* initializer = yyvsp[0].expression; if (initializer != 0) { initializer = new CBinaryExpression(::InterpretSymbolExpression(*(yyvsp[-2].text)), '=', initializer); } yyval.variableList->push_back(new CVariableDeclaration(*(yyvsp[-3].typeSignature), *(yyvsp[-2].text), initializer)); delete yyvsp[-3].typeSignature; delete yyvsp[-2].text; ; break;} case 90: #line 568 "parser.y" { yyval.variableList = yyvsp[-4].variableList; CJavaTypeSignature thisType = (yyval.variableList)->front()->GetType(); thisType.SetArrayBounds(thisType.GetArrayBounds() + yyvsp[-1].longNumber); CArrayInitializer* arrayInitializer= DYNAMIC_CAST(CArrayInitializer, yyvsp[0].expression); if (arrayInitializer != 0) { if (thisType.GetArrayBounds() == 0) { string errorMessage("Cannot use array initializer with non-array "); errorMessage += ::UnicodeToUTF(*yyvsp[-2].text); yyerror(errorMessage.c_str()); YYERROR; } else { arrayInitializer->SetArrayType(thisType); } } CVariableDeclaration declaration(thisType, *(yyvsp[-2].text)); if (gCurrentCompiler->InStatementBlock()) { if (gCurrentCompiler->LookupLocalVariable(*yyvsp[-2].text) != 0) { string errorMessage = ::UnicodeToUTF(*yyvsp[-2].text); errorMessage += " already declared in this scope."; yyerror(errorMessage.c_str()); YYERROR; } else { gCurrentCompiler->AddLocalVariable(declaration); } } CExpression* initializer = yyvsp[0].expression; if (initializer != 0) { initializer = new CBinaryExpression(::InterpretSymbolExpression(*(yyvsp[-2].text)), '=', initializer); } yyval.variableList->push_back(new CVariableDeclaration(thisType, *(yyvsp[-2].text), initializer)); delete yyvsp[-2].text; ; break;} case 91: #line 608 "parser.y" { if (yyvsp[-3].typeSignature->GetBaseType() == CJavaTypeSignature::Void) { yyerror("Invalid use of 'void' for a variable type."); YYERROR; } yyval.variableList = new deque; // push a bogus entry at the beginning, just to hold the base type of // this variable declaration sequence. yyval.variableList->push_front(new CVariableDeclaration(*(yyvsp[-3].typeSignature), unicode_string(), 0, true)); yyvsp[-3].typeSignature->SetArrayBounds(yyvsp[-3].typeSignature->GetArrayBounds() + yyvsp[-1].longNumber); CArrayInitializer* arrayInitializer= DYNAMIC_CAST(CArrayInitializer, yyvsp[0].expression); if (arrayInitializer != 0) { if (yyvsp[-3].typeSignature->GetArrayBounds() == 0) { string errorMessage("Cannot use array initializer with non-array "); errorMessage += ::UnicodeToUTF(*yyvsp[-2].text); yyerror(errorMessage.c_str()); YYERROR; } else { arrayInitializer->SetArrayType(*(yyvsp[-3].typeSignature)); } } if (gCurrentCompiler->InStatementBlock()) { if (gCurrentCompiler->LookupLocalVariable(*yyvsp[-2].text) != 0) { string errorMessage = ::UnicodeToUTF(*yyvsp[-2].text); errorMessage += " already declared in this scope."; yyerror(errorMessage.c_str()); YYERROR; } else { CVariableDeclaration declaration(*(yyvsp[-3].typeSignature), *(yyvsp[-2].text), 0, true); gCurrentCompiler->AddLocalVariable(declaration); } } CExpression* initializer = yyvsp[0].expression; if (initializer != 0) { CExpression* expression = ::InterpretSymbolExpression(*(yyvsp[-2].text)); expression->SetLValue(true); initializer = new CBinaryExpression(expression, '=', initializer); } else { gCurrentCompiler->ParseWarning(yylineno, "Warning: final variable without initializer.", yytext); } yyval.variableList->push_back(new CVariableDeclaration(*(yyvsp[-3].typeSignature), *(yyvsp[-2].text), initializer, true)); delete yyvsp[-3].typeSignature; delete yyvsp[-2].text; ; break;} case 92: #line 656 "parser.y" { yyval.variableList = yyvsp[-4].variableList; CJavaTypeSignature thisType = (yyval.variableList)->front()->GetType(); thisType.SetArrayBounds(thisType.GetArrayBounds() + yyvsp[-1].longNumber); CArrayInitializer* arrayInitializer= DYNAMIC_CAST(CArrayInitializer, yyvsp[0].expression); if (arrayInitializer != 0) { if (thisType.GetArrayBounds() == 0) { string errorMessage("Cannot use array initializer with non-array "); errorMessage += ::UnicodeToUTF(*yyvsp[-2].text); yyerror(errorMessage.c_str()); YYERROR; } else { arrayInitializer->SetArrayType(thisType); } } if (gCurrentCompiler->InStatementBlock()) { if (gCurrentCompiler->LookupLocalVariable(*yyvsp[-2].text) != 0) { string errorMessage = ::UnicodeToUTF(*yyvsp[-2].text); errorMessage += " already declared in this scope."; yyerror(errorMessage.c_str()); YYERROR; } else { CVariableDeclaration declaration(thisType, *(yyvsp[-2].text), 0, true); gCurrentCompiler->AddLocalVariable(declaration); } } CExpression* initializer = yyvsp[0].expression; if (initializer != 0) { CExpression* expression = ::InterpretSymbolExpression(*(yyvsp[-2].text)); expression->SetLValue(true); initializer = new CBinaryExpression(expression, '=', initializer); } else { gCurrentCompiler->ParseWarning(yylineno, "Warning: final variable without initializer.", yytext); } yyval.variableList->push_back(new CVariableDeclaration(thisType, *(yyvsp[-2].text), initializer, true)); delete yyvsp[-2].text; ; break;} case 93: #line 699 "parser.y" { yyval.expression = 0; ; break;} case 94: #line 701 "parser.y" { yyval.expression = yyvsp[0].expression; ; break;} case 97: #line 714 "parser.y" { yyval.expression = yyvsp[-1].expression; ; break;} case 98: #line 718 "parser.y" { yyval.expression = new CArrayInitializer(); ; break;} case 99: #line 720 "parser.y" { yyval.expression = new CArrayInitializer(yyvsp[-1].expressionList); ; break;} case 100: #line 725 "parser.y" { yyval.expressionList = new ExpressionList(); yyval.expressionList->push_back(yyvsp[0].expression); ; break;} case 101: #line 730 "parser.y" { yyval.expressionList = yyvsp[-2].expressionList; yyval.expressionList->push_back(yyvsp[0].expression); ; break;} case 104: #line 742 "parser.y" { gCurrentCompiler->EndFunction(yyvsp[0].compoundStatement); ; break;} case 105: #line 749 "parser.y" { const CIntermediateClass* currentClass = gCurrentCompiler->GetCurrentClass(); if (currentClass->GetShortName() == *(yyvsp[-5].text)) { string errorMessage("Invalid return value in constructor."); yyerror(errorMessage.c_str()); YYERROR; } yyvsp[-6].typeSignature->SetArrayBounds(yyvsp[-6].typeSignature->GetArrayBounds() + yyvsp[-1].longNumber); CJavaAccessFlags usedFlags = *(yyvsp[-7].modifiers); usedFlags.fPublic = usedFlags.fProtected = usedFlags.fPrivate = usedFlags.fStatic = usedFlags.fFinal = usedFlags.fAbstract = usedFlags.fNative = usedFlags.fSynchronized = 0; if (usedFlags.Count() > 0) { string errorMessage("Invalid modifier use in method declaration: "); errorMessage += usedFlags.FlagNames(); yyerror(errorMessage.c_str()); YYERROR; } gCurrentCompiler->StartFunction(*(yyvsp[-6].typeSignature), *(yyvsp[-5].text), *(yyvsp[-7].modifiers), yyvsp[-3].fieldList, yyvsp[0].stringList, yydeprecated); delete yyvsp[-7].modifiers; delete yyvsp[-6].typeSignature; delete yyvsp[-5].text; ; break;} case 106: #line 777 "parser.y" { const CIntermediateClass* currentClass = gCurrentCompiler->GetCurrentClass(); if (currentClass->GetName() == *(yyvsp[-5].text)) { string errorMessage("Invalid use of return value with constructor."); yyerror(errorMessage.c_str()); YYERROR; } if (yyvsp[-1].longNumber > 0) { yyerror("Invalid return value of void array."); YYERROR; } CJavaAccessFlags usedFlags = *(yyvsp[-7].modifiers); usedFlags.fPublic = usedFlags.fProtected = usedFlags.fPrivate = usedFlags.fStatic = usedFlags.fFinal = usedFlags.fAbstract = usedFlags.fNative = usedFlags.fSynchronized = 0; if (usedFlags.Count() > 0) { string errorMessage("Invalid modifier use in method declaration: "); errorMessage += usedFlags.FlagNames(); yyerror(errorMessage.c_str()); YYERROR; } gCurrentCompiler->StartFunction(CJavaTypeSignature::kVoid, *(yyvsp[-5].text), *(yyvsp[-7].modifiers), yyvsp[-3].fieldList, yyvsp[0].stringList, yydeprecated); delete yyvsp[-7].modifiers; delete yyvsp[-5].text; ; break;} case 107: #line 807 "parser.y" { yyval.stringList = 0; ; break;} case 109: #line 812 "parser.y" { yyval.fieldList = 0; ; break;} case 111: #line 818 "parser.y" { yyval.fieldList = new deque(1, *(yyvsp[0].fieldSignature)); delete yyvsp[0].fieldSignature; ; break;} case 112: #line 823 "parser.y" { yyval.fieldList = yyvsp[-2].fieldList; for (deque::iterator parameterIter = yyvsp[-2].fieldList->begin(); parameterIter != yyvsp[-2].fieldList->end(); ++parameterIter) { if ((*parameterIter).GetName() == (*(yyvsp[0].fieldSignature)).GetName()) { string errorString("Invalid re-use of parameter name: "); errorString += ::UnicodeToString((*(yyvsp[0].fieldSignature)).GetName()); yyerror(errorString.c_str()); YYERROR; } } yyval.fieldList->push_back(*(yyvsp[0].fieldSignature)); delete yyvsp[0].fieldSignature; ; break;} case 113: #line 841 "parser.y" { if (yyvsp[-2].typeSignature->GetBaseType() == CJavaTypeSignature::Void) { yyerror("Invalid use of 'void' for a parameter type."); YYERROR; } yyvsp[-2].typeSignature->SetArrayBounds(yyvsp[-2].typeSignature->GetArrayBounds() + yyvsp[0].longNumber); yyval.fieldSignature = new CVariableDeclaration(*(yyvsp[-2].typeSignature), *(yyvsp[-1].text)); delete yyvsp[-2].typeSignature; delete yyvsp[-1].text; ; break;} case 114: #line 852 "parser.y" { if (yyvsp[-2].typeSignature->GetBaseType() == CJavaTypeSignature::Void) { yyerror("Invalid use of 'void' for a parameter type."); YYERROR; } yyvsp[-2].typeSignature->SetArrayBounds(yyvsp[-2].typeSignature->GetArrayBounds() + yyvsp[0].longNumber); yyval.fieldSignature = new CVariableDeclaration(*(yyvsp[-2].typeSignature), *(yyvsp[-1].text), 0, true); delete yyvsp[-2].typeSignature; delete yyvsp[-1].text; ; break;} case 115: #line 866 "parser.y" { yyval.stringList = yyvsp[0].stringList; ; break;} case 116: #line 871 "parser.y" { yyval.stringList = new deque; yyval.stringList->push_back(*(yyvsp[0].text)); delete yyvsp[0].text; ; break;} case 117: #line 877 "parser.y" { yyval.stringList = yyvsp[-2].stringList; yyval.stringList->push_back(*(yyvsp[0].text)); delete yyvsp[0].text; ; break;} case 119: #line 887 "parser.y" { yyval.compoundStatement = 0; ; break;} case 120: #line 892 "parser.y" { gCurrentCompiler->AddStaticCode(yyvsp[0].compoundStatement); ; break;} case 121: #line 897 "parser.y" { const CIntermediateClass* currentClass = gCurrentCompiler->GetCurrentClass(); if (!(currentClass->GetShortName() == *(yyvsp[0].text))) { string errorMessage("No type given for function: "); errorMessage += ::UnicodeToString(*(yyvsp[0].text)); yyerror(errorMessage.c_str()); YYERROR; } delete yyvsp[0].text; ; break;} case 122: #line 909 "parser.y" { CJavaAccessFlags usedFlags(*yyvsp[-6].modifiers); usedFlags.fPublic = usedFlags.fProtected = usedFlags.fPrivate = 0; if (usedFlags.Count() > 0) { string errorMessage("Invalid modifier use in constructor: "); errorMessage += usedFlags.FlagNames(); yyerror(errorMessage.c_str()); YYERROR; } gCurrentCompiler->StartConstructor(*yyvsp[-6].modifiers, yyvsp[-2].fieldList, yyvsp[0].stringList, yydeprecated); delete yyvsp[-6].modifiers; ; break;} case 123: #line 922 "parser.y" { CCompoundStatement* statement = new CCompoundStatement(yyvsp[0].statementList); gCurrentCompiler->EndFunction(statement); ; break;} case 124: #line 936 "parser.y" { yyval.statementList = yyvsp[-1].statementList; ; break;} case 125: #line 940 "parser.y" { yyval.statementList = yyvsp[-1].statementList; yyval.statementList->push_front(yyvsp[-2].statement); ; break;} case 126: #line 948 "parser.y" { yyval.statement = new CExplicitConstructorCall(CExplicitConstructorCall::kThis, yyvsp[-2].expressionList); ; break;} case 127: #line 952 "parser.y" { yyval.statement = new CExplicitConstructorCall(CExplicitConstructorCall::kSuper, yyvsp[-2].expressionList); ; break;} case 128: #line 958 "parser.y" { yyval.expressionList = 0; ; break;} case 130: #line 964 "parser.y" { CJavaAccessFlags usedFlags(*(yyvsp[-3].modifiers)); usedFlags.fPublic = usedFlags.fAbstract = 0; yyvsp[-3].modifiers->fAbstract = yyvsp[-3].modifiers->fInterface = 1; if (usedFlags.Count() > 0) { string errorMessage("Invalid interface modifier use: "); errorMessage += usedFlags.FlagNames(); yyerror(errorMessage.c_str()); YYERROR; } gCurrentCompiler->StartInterface(*(yyvsp[-1].text), yyvsp[-3].modifiers, yyvsp[0].stringList, yydeprecated); ; break;} case 131: #line 977 "parser.y" { gCurrentCompiler->EndClass(); ; break;} case 132: #line 981 "parser.y" { yyval.stringList = 0; ; break;} case 134: #line 987 "parser.y" { yyval.stringList = new deque; yyval.stringList->push_back(*(yyvsp[0].text)); delete yyvsp[0].text; ; break;} case 135: #line 993 "parser.y" { yyval.stringList = yyvsp[-2].stringList; yyval.stringList->push_back(*(yyvsp[0].text)); delete yyvsp[0].text; ; break;} case 144: #line 1024 "parser.y" { gCurrentCompiler->EndFunction(0); ; break;} case 145: #line 1029 "parser.y" { gCurrentCompiler->PushLocalScope(); ; break;} case 146: #line 1031 "parser.y" { gCurrentCompiler->PopLocalScope(); yyval.compoundStatement = new CCompoundStatement(yyvsp[-1].statementList); ; break;} case 147: #line 1038 "parser.y" { yyval.statementList = new StatementList(); ; break;} case 149: #line 1044 "parser.y" { yyval.statementList = new StatementList(); if (yyvsp[0].statement != 0) { yyval.statementList->push_front(yyvsp[0].statement); } ; break;} case 150: #line 1051 "parser.y" { yyval.statementList = yyvsp[-1].statementList; if (yyvsp[0].statement != 0) { yyval.statementList->push_back(yyvsp[0].statement); } ; break;} case 153: #line 1063 "parser.y" { yyval.statement = 0; ; break;} case 154: #line 1068 "parser.y" { yyval.statement = new CDeclarationStatement(yyvsp[-1].variableList); ; break;} case 155: #line 1070 "parser.y" { yyval.statement = new CDeclarationStatement(yyvsp[-1].variableList); ; break;} case 157: #line 1079 "parser.y" { yyval.variableList = yyvsp[0].variableList; // take off the bogus entry added in PartialVariable delete yyval.variableList->front(); yyval.variableList->pop_front(); ; break;} case 169: #line 1106 "parser.y" { yyval.statement = yyvsp[0].compoundStatement; ; break;} case 180: #line 1121 "parser.y" { yyval.statement = 0; ; break;} case 181: #line 1126 "parser.y" { yyval.statement = new CLabelStatement(yyvsp[-2].text, yyvsp[0].statement); ; break;} case 182: #line 1131 "parser.y" { yyval.statement = new CLabelStatement(yyvsp[-2].text, yyvsp[0].statement); ; break;} case 183: #line 1136 "parser.y" { yyval.statement = new CExpressionStatement(yyvsp[-1].expression); ; break;} case 191: #line 1151 "parser.y" { yyval.statement = new CIfStatement(yyvsp[-2].expression, yyvsp[0].statement); ; break;} case 192: #line 1156 "parser.y" { yyval.statement = new CIfStatement(yyvsp[-4].expression, yyvsp[-2].statement, yyvsp[0].statement); ; break;} case 193: #line 1161 "parser.y" { yyval.statement = new CIfStatement(yyvsp[-4].expression, yyvsp[-2].statement, yyvsp[0].statement); ; break;} case 194: #line 1166 "parser.y" { yyval.statement = new CSwitch(yyvsp[-2].expression, yyvsp[0].compoundStatement); ; break;} case 195: #line 1171 "parser.y" { yyval.compoundStatement = new CCompoundStatement(yyvsp[-1].statementList); ; break;} case 196: #line 1175 "parser.y" { yyval.statementList = new StatementList(); ; break;} case 198: #line 1181 "parser.y" { yyval.statementList = new StatementList(); if (yyvsp[0].statement != 0) { yyval.statementList->push_back(yyvsp[0].statement); } ; break;} case 199: #line 1188 "parser.y" { yyval.statementList = yyvsp[-1].statementList; if (yyvsp[0].statement != 0) { yyval.statementList->push_back(yyvsp[0].statement); } ; break;} case 201: #line 1199 "parser.y" { yyval.statement = new CLabelStatement(yyvsp[-1].expression, 0); ; break;} case 202: #line 1201 "parser.y" { yyval.statement = new CLabelStatement(0); ; break;} case 203: #line 1236 "parser.y" { yyval.statement = new CWhileStatement(yyvsp[0].statement, yyvsp[-2].expression); ; break;} case 204: #line 1241 "parser.y" { yyval.statement = new CWhileStatement(yyvsp[0].statement, yyvsp[-2].expression); ; break;} case 205: #line 1246 "parser.y" { yyval.statement = new CDoStatement(yyvsp[-5].statement, yyvsp[-2].expression); ; break;} case 206: #line 1252 "parser.y" { yyval.statement = new CForStatement(yyvsp[-6].statement, yyvsp[-4].expression, yyvsp[-2].expressionList, yyvsp[0].statement); gCurrentCompiler->PopLocalScope(); ; break;} case 207: #line 1261 "parser.y" { yyval.statement = new CForStatement(yyvsp[-6].statement, yyvsp[-4].expression, yyvsp[-2].expressionList, yyvsp[0].statement); gCurrentCompiler->PopLocalScope(); ; break;} case 208: #line 1268 "parser.y" { gCurrentCompiler->PushLocalScope(); ; break;} case 209: #line 1272 "parser.y" { yyval.statement = 0; ; break;} case 211: #line 1278 "parser.y" { StatementList* statements = new StatementList; for (ExpressionList::iterator i = yyvsp[0].expressionList->begin(); i != yyvsp[0].expressionList->end(); ++i) { statements->push_back(new CExpressionStatement(*i)); } delete yyvsp[0].expressionList; yyval.statement = new CCompoundStatement(statements); ; break;} case 212: #line 1287 "parser.y" { yyval.statement = new CDeclarationStatement(yyvsp[0].variableList); ; break;} case 213: #line 1291 "parser.y" { yyval.expression = 0; ; break;} case 215: #line 1296 "parser.y" { yyval.expressionList = 0; ; break;} case 218: #line 1306 "parser.y" { yyval.expressionList = new ExpressionList; yyval.expressionList->push_front(yyvsp[0].expression); ; break;} case 219: #line 1311 "parser.y" { yyval.expressionList = yyvsp[-2].expressionList; yyval.expressionList->push_back(yyvsp[0].expression); ; break;} case 220: #line 1319 "parser.y" { yyval.statement = new CBranchStatement(CBranchStatement::kBreak); ; break;} case 221: #line 1321 "parser.y" { yyval.statement = new CBranchStatement(CBranchStatement::kBreak, yyvsp[-1].text); ; break;} case 222: #line 1326 "parser.y" { yyval.statement = new CBranchStatement(CBranchStatement::kContinue); ; break;} case 223: #line 1328 "parser.y" { yyval.statement = new CBranchStatement(CBranchStatement::kContinue, yyvsp[-1].text); ; break;} case 224: #line 1333 "parser.y" { yyval.statement = new CReturnStatement(); ; break;} case 225: #line 1335 "parser.y" { yyval.statement = new CReturnStatement(yyvsp[-1].expression); ; break;} case 226: #line 1340 "parser.y" { yyval.statement = new CThrowStatement(yyvsp[-1].expression); ; break;} case 227: #line 1345 "parser.y" { yyval.statement = new CSynchronized(yyvsp[-2].expression, yyvsp[0].compoundStatement, gCurrentCompiler->AddUnnamedVariable()); ; break;} case 228: #line 1350 "parser.y" { unsigned short handlerVariable, subroutineVariable; yyval.statement = new CTryStatement(yyvsp[-1].compoundStatement, yyvsp[0].catchList, 0); ; break;} case 229: #line 1355 "parser.y" { unsigned short handlerVariable, subroutineVariable; handlerVariable = gCurrentCompiler->AddUnnamedVariable(); subroutineVariable = gCurrentCompiler->AddUnnamedVariable(); yyval.statement = new CTryStatement(yyvsp[-2].compoundStatement, yyvsp[-1].catchList, yyvsp[0].compoundStatement, handlerVariable, subroutineVariable); ; break;} case 230: #line 1364 "parser.y" { yyval.catchList = 0; ; break;} case 232: #line 1370 "parser.y" { yyval.catchList = new deque; yyval.catchList->push_back(yyvsp[0].catchClause); ; break;} case 233: #line 1375 "parser.y" { yyval.catchList = yyvsp[-1].catchList; yyval.catchList->push_back(yyvsp[0].catchClause); ; break;} case 234: #line 1383 "parser.y" { gCurrentCompiler->PushLocalScope(); ; break;} case 235: #line 1385 "parser.y" { if (gCurrentCompiler->LookupLocalVariable(yyvsp[-1].fieldSignature->GetName()) != 0) { string errorMessage = ::UnicodeToUTF(yyvsp[-1].fieldSignature->GetName()); errorMessage += " already declared in this scope."; yyerror(errorMessage.c_str()); YYERROR; } else { yyval.longNumber = gCurrentCompiler->AddLocalVariable(*(yyvsp[-1].fieldSignature)); } ; break;} case 236: #line 1396 "parser.y" { gCurrentCompiler->PopLocalScope(); yyval.catchClause = new CCatchClause(yyvsp[-1].longNumber, yyvsp[-3].fieldSignature->GetType(), yyvsp[0].compoundStatement); ; break;} case 237: #line 1404 "parser.y" { yyval.compoundStatement = yyvsp[0].compoundStatement; ; break;} case 241: #line 1415 "parser.y" { yyval.expression = new CSpecialExpression(CSpecialExpression::kThis); ; break;} case 242: #line 1417 "parser.y" { yyval.expression = yyvsp[-1].expression; ; break;} case 247: #line 1428 "parser.y" { yyval.expression = new CNewObject(*(yyvsp[-3].text), yyvsp[-1].expressionList); delete yyvsp[-3].text; ; break;} case 248: #line 1433 "parser.y" { yyval.text = new unicode_string(gCurrentCompiler->StartAnonymousClass(yyvsp[-4].text)); ; break;} case 249: #line 1438 "parser.y" { gCurrentCompiler->EndClass(); yyval.expression = new CNewObject(*(yyvsp[-2].text), yyvsp[-5].expressionList); delete yyvsp[-2].text; ; break;} case 250: #line 1444 "parser.y" { yyval.expression = new CNewObject(*(yyvsp[-3].text), yyvsp[-1].expressionList, yyvsp[-5].expression); delete yyvsp[-3].text; ; break;} case 251: #line 1449 "parser.y" { yyval.text = new unicode_string(gCurrentCompiler->StartAnonymousClass(yyvsp[-4].text)); ; break;} case 252: #line 1454 "parser.y" { gCurrentCompiler->EndClass(); yyval.expression = new CNewObject(*(yyvsp[-2].text), yyvsp[-5].expressionList, yyvsp[-9].expression); delete yyvsp[-3].text; ; break;} case 253: #line 1463 "parser.y" { yyval.expressionList = new ExpressionList; yyval.expressionList->push_back(yyvsp[0].expression); ; break;} case 254: #line 1468 "parser.y" { yyval.expressionList = yyvsp[-2].expressionList; yyval.expressionList->push_back(yyvsp[0].expression); ; break;} case 255: #line 1476 "parser.y" { if (yyvsp[-2].typeSignature->GetBaseType() == CJavaTypeSignature::Void) { yyerror("Invalid array creation using 'void' type."); YYERROR; } yyvsp[-2].typeSignature->SetArrayBounds(yyvsp[-1].expressionList->size() + yyvsp[0].longNumber); yyval.expression = new CNewArray(*(yyvsp[-2].typeSignature), yyvsp[-1].expressionList); delete yyvsp[-2].typeSignature; ; break;} case 256: #line 1486 "parser.y" { int arrayDimensions = yyvsp[-1].expressionList->size() + yyvsp[0].longNumber; CJavaTypeSignature tempSignature(*(yyvsp[-2].text), arrayDimensions); yyval.expression = new CNewArray(tempSignature, yyvsp[-1].expressionList); delete yyvsp[-2].text; ; break;} case 257: #line 1493 "parser.y" { CArrayInitializer* arrayInitializer= DYNAMIC_CAST(CArrayInitializer, yyvsp[0].expression); yyvsp[-2].typeSignature->SetArrayBounds(yyvsp[-1].longNumber); arrayInitializer->SetArrayType(*yyvsp[-2].typeSignature); delete yyvsp[-2].typeSignature; yyval.expression = yyvsp[0].expression; ; break;} case 258: #line 1504 "parser.y" { yyval.expressionList = new ExpressionList(); yyval.expressionList->push_front(yyvsp[0].expression); ; break;} case 259: #line 1509 "parser.y" { yyval.expressionList = yyvsp[-1].expressionList; yyval.expressionList->push_back(yyvsp[0].expression); ; break;} case 260: #line 1517 "parser.y" { yyval.expression = yyvsp[-1].expression; ; break;} case 261: #line 1521 "parser.y" { yyval.longNumber = 0; ; break;} case 263: #line 1527 "parser.y" { yyval.longNumber = 1; ; break;} case 264: #line 1529 "parser.y" { yyval.longNumber = yyvsp[-2].longNumber + 1; ; break;} case 265: #line 1534 "parser.y" { yyval.expression = new CClassFieldExpression(yyvsp[-2].expression, *(yyvsp[0].text)); delete yyvsp[0].text; ; break;} case 266: #line 1539 "parser.y" { CExpression* super = new CSpecialExpression(CSpecialExpression::kSuper); yyval.expression = new CClassFieldExpression(super, *(yyvsp[0].text)); delete yyvsp[0].text; ; break;} case 267: #line 1548 "parser.y" { unicode_string::size_type slashPosition = yyvsp[-3].text->find(kSymbolDivider); if (slashPosition != unicode_string::npos) { unicode_string prefix(*(yyvsp[-3].text), 0, slashPosition); if (gCurrentCompiler->LookupLocalVariable(prefix) != 0 || gCurrentCompiler->LookupOuterLocalVariable(prefix) != 0) { unicode_string::size_type lastSlash = yyvsp[-3].text->find_last_of(kSymbolDivider); prefix.assign(*(yyvsp[-3].text), 0, lastSlash); CExpression* baseExpression = ::InterpretSymbolExpression(prefix); unicode_string methodName(*(yyvsp[-3].text), lastSlash + 1); yyval.expression = new CMethodCall(baseExpression, methodName, yyvsp[-1].expressionList); } else { yyval.expression = new CMethodCall(0, *(yyvsp[-3].text), yyvsp[-1].expressionList); } } else { yyval.expression = new CMethodCall(0, *(yyvsp[-3].text), yyvsp[-1].expressionList); } delete yyvsp[-3].text; ; break;} case 268: #line 1569 "parser.y" { yyval.expression = new CMethodCall(yyvsp[-5].expression, *(yyvsp[-3].text), yyvsp[-1].expressionList); delete yyvsp[-3].text; ; break;} case 269: #line 1574 "parser.y" { CExpression* super = new CSpecialExpression(CSpecialExpression::kSuper); yyval.expression = new CMethodCall(super, *(yyvsp[-3].text), yyvsp[-1].expressionList); delete yyvsp[-3].text; ; break;} case 270: #line 1583 "parser.y" { CExpression* baseExpression = ::InterpretSymbolExpression(*(yyvsp[-3].text)); delete yyvsp[-3].text; yyval.expression = new CArrayIndex(baseExpression, yyvsp[-1].expression); ; break;} case 271: #line 1589 "parser.y" { yyval.expression = new CArrayIndex(yyvsp[-3].expression, yyvsp[-1].expression); ; break;} case 272: #line 1594 "parser.y" { yyval.expression = ::InterpretSymbolExpression(*(yyvsp[0].text)); delete yyvsp[0].text; ; break;} case 273: #line 1599 "parser.y" { yyval.expression = new COuterThis(CJavaTypeSignature(*(yyvsp[-2].text))); delete yyvsp[-2].text; ; break;} case 274: #line 1604 "parser.y" { yyval.expression = new CClassInstance(CJavaTypeSignature(*(yyvsp[-2].text))); gCurrentCompiler->AddStaticClassMethod(); delete yyvsp[-2].text; ; break;} case 275: #line 1610 "parser.y" { yyval.expression = new CClassInstance(CJavaTypeSignature(*(yyvsp[-2].typeSignature))); delete yyvsp[-2].typeSignature; ; break;} case 281: #line 1629 "parser.y" { yyval.expression = new CUnaryExpression(yyvsp[-1].expression, INCR, CUnaryExpression::kPostfix, true); ; break;} case 282: #line 1634 "parser.y" { yyval.expression = new CUnaryExpression(yyvsp[-1].expression, DECR, CUnaryExpression::kPostfix, true); ; break;} case 285: #line 1641 "parser.y" { yyval.expression = new CUnaryExpression(yyvsp[0].expression, '+', CUnaryExpression::kPrefix, false); ; break;} case 286: #line 1643 "parser.y" { yyval.expression = new CUnaryExpression(yyvsp[0].expression, '-', CUnaryExpression::kPrefix, false); ; break;} case 288: #line 1649 "parser.y" { yyval.expression = new CUnaryExpression(yyvsp[0].expression, INCR, CUnaryExpression::kPrefix, true); ; break;} case 289: #line 1654 "parser.y" { yyval.expression = new CUnaryExpression(yyvsp[0].expression, DECR, CUnaryExpression::kPrefix, true); ; break;} case 291: #line 1660 "parser.y" { yyval.expression = new CUnaryExpression(yyvsp[0].expression, '~', CUnaryExpression::kPrefix, false); ; break;} case 292: #line 1662 "parser.y" { yyval.expression = new CUnaryExpression(yyvsp[0].expression, '!', CUnaryExpression::kPrefix, false); ; break;} case 294: #line 1668 "parser.y" { yyvsp[-3].typeSignature->SetArrayBounds(yyvsp[-2].longNumber); yyval.expression = new CCastExpression(*(yyvsp[-3].typeSignature), yyvsp[0].expression); delete yyvsp[-3].typeSignature; ; break;} case 295: #line 1674 "parser.y" { CClassFieldExpression* castTo = DYNAMIC_CAST(CClassFieldExpression, yyvsp[-2].expression); if (castTo == 0) { delete yyvsp[-2].expression; delete yyvsp[0].expression; yyerror("Invalid cast expression."); YYERROR; } else { CJavaTypeSignature type(castTo->GetFieldString()); yyval.expression = new CCastExpression(type, yyvsp[0].expression); delete yyvsp[-2].expression; } ; break;} case 296: #line 1688 "parser.y" { CJavaTypeSignature type(*(yyvsp[-3].text), yyvsp[-2].longNumber); yyval.expression = new CCastExpression(type, yyvsp[0].expression); delete yyvsp[-3].text; ; break;} case 298: #line 1698 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, '*', yyvsp[0].expression); ; break;} case 299: #line 1700 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, '/', yyvsp[0].expression); ; break;} case 300: #line 1702 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, '%', yyvsp[0].expression); ; break;} case 302: #line 1708 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, '+', yyvsp[0].expression); ; break;} case 303: #line 1710 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, '-', yyvsp[0].expression); ; break;} case 305: #line 1716 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, SHIFT_LEFT, yyvsp[0].expression); ; break;} case 306: #line 1718 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, BITSHIFT_RIGHT, yyvsp[0].expression); ; break;} case 307: #line 1720 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, FILL_SHIFT_RIGHT, yyvsp[0].expression); ; break;} case 309: #line 1726 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, '<', yyvsp[0].expression); ; break;} case 310: #line 1728 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, '>', yyvsp[0].expression); ; break;} case 311: #line 1730 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, LTEQ, yyvsp[0].expression); ; break;} case 312: #line 1732 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, GTEQ, yyvsp[0].expression); ; break;} case 313: #line 1734 "parser.y" { yyval.expression = new CInstanceof(yyvsp[-2].expression, *(yyvsp[0].typeSignature)); delete yyvsp[0].typeSignature; ; break;} case 315: #line 1743 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, EQUAL_COMPARE, yyvsp[0].expression); ; break;} case 316: #line 1745 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, NOT_EQUAL, yyvsp[0].expression); ; break;} case 318: #line 1751 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, '&', yyvsp[0].expression); ; break;} case 320: #line 1757 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, '^', yyvsp[0].expression); ; break;} case 322: #line 1763 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, '|', yyvsp[0].expression); ; break;} case 324: #line 1769 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, AND, yyvsp[0].expression); ; break;} case 326: #line 1775 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, OR, yyvsp[0].expression); ; break;} case 328: #line 1781 "parser.y" { yyval.expression = new CTrinaryExpression(yyvsp[-4].expression, yyvsp[-2].expression, yyvsp[0].expression); ; break;} case 331: #line 1791 "parser.y" { yyval.expression = new CBinaryExpression(yyvsp[-2].expression, yyvsp[-1].longNumber, yyvsp[0].expression); ; break;} case 332: #line 1796 "parser.y" { yyval.expression = ::InterpretSymbolExpression(*(yyvsp[0].text)); delete yyvsp[0].text; ; break;} case 335: #line 1806 "parser.y" { yyval.longNumber = '='; ; break;} case 336: #line 1808 "parser.y" { yyval.longNumber = MUL_EQUALS; ; break;} case 337: #line 1810 "parser.y" { yyval.longNumber = DIV_EQUALS; ; break;} case 338: #line 1812 "parser.y" { yyval.longNumber = MOD_EQUALS; ; break;} case 339: #line 1814 "parser.y" { yyval.longNumber = ADD_EQUALS; ; break;} case 340: #line 1816 "parser.y" { yyval.longNumber = SUB_EQUALS; ; break;} case 341: #line 1818 "parser.y" { yyval.longNumber = SHIFT_LEFT_EQUALS; ; break;} case 342: #line 1820 "parser.y" { yyval.longNumber = SHIFT_RIGHT_EQUALS; ; break;} case 343: #line 1822 "parser.y" { yyval.longNumber = FILL_SHIFT_RIGHT_EQUALS; ; break;} case 344: #line 1824 "parser.y" { yyval.longNumber = AND_EQUALS; ; break;} case 345: #line 1826 "parser.y" { yyval.longNumber = XOR_EQUALS; ; break;} case 346: #line 1828 "parser.y" { yyval.longNumber = OR_EQUALS; ; break;} } #line 705 "/usr/local/share/bison/bison.simple" yyvsp -= yylen; yyssp -= yylen; #if YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG if (yydebug) { short *yyssp1 = yyss - 1; YYFPRINTF (stderr, "state stack now"); while (yyssp1 != yyssp) YYFPRINTF (stderr, " %d", *++yyssp1); YYFPRINTF (stderr, "\n"); } #endif *++yyvsp = yyval; #if YYLSP_NEEDED *++yylsp = yyloc; #endif /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { YYSIZE_T yysize = 0; char *yymsg; int yyx, yycount; yycount = 0; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx) yysize += yystrlen (yytname[yyx]) + 15, yycount++; yysize += yystrlen ("parse error, unexpected ") + 1; yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { char *yyp = yystpcpy (yymsg, "parse error, unexpected "); yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); if (yycount < 5) { yycount = 0; for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); yyp = yystpcpy (yyp, yytname[yyx]); yycount++; } } yyerror (yymsg); YYSTACK_FREE (yymsg); } else yyerror ("parse error; also virtual memory exhausted"); } else #endif /* defined (YYERROR_VERBOSE) */ yyerror ("parse error"); } goto yyerrlab1; /*--------------------------------------------------. | yyerrlab1 -- error raised explicitly by an action | `--------------------------------------------------*/ yyerrlab1: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; YYDPRINTF ((stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1])); yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; /*-------------------------------------------------------------------. | yyerrdefault -- current state does not do anything special for the | | error token. | `-------------------------------------------------------------------*/ yyerrdefault: #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ /* If its default is to accept any token, ok. Otherwise pop it. */ yyn = yydefact[yystate]; if (yyn) goto yydefault; #endif /*---------------------------------------------------------------. | yyerrpop -- pop the current state because it cannot handle the | | error token | `---------------------------------------------------------------*/ yyerrpop: if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #if YYLSP_NEEDED yylsp--; #endif #if YYDEBUG if (yydebug) { short *yyssp1 = yyss - 1; YYFPRINTF (stderr, "Error: state stack now"); while (yyssp1 != yyssp) YYFPRINTF (stderr, " %d", *++yyssp1); YYFPRINTF (stderr, "\n"); } #endif /*--------------. | yyerrhandle. | `--------------*/ yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; #if YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; /*---------------------------------------------. | yyoverflowab -- parser overflow comes here. | `---------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ yyreturn: #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif return yyresult; } #line 1839 "parser.y" void yyerror(const char* errorMessage) { assert(gCurrentCompiler != 0); gCurrentCompiler->ParseError(yylineno, errorMessage, yytext); } void InitializeParser(const string& parseString, CCompiler* compilerAlias) { #ifndef NDEBUG if (::getenv("YYDEBUG") != 0) { yydebug = 1; } #endif gCurrentCompiler = compilerAlias; assert(gCurrentCompiler != 0); InitializeLexer(parseString); } void FinishParser() { FinishLexer(); gCurrentCompiler = 0; #ifndef NDEBUG yydebug = 0; #endif } // // Function name : InterpretSymbolExpression // Description : Used to parse a qualified symbol into a base variable and // some sequence of field accesses. So "x" is parsed as the expression // representing the variable 'x' but "x.y.z" is parsed as the variable // x dereferenced to get field y, dereferenced to get field z. // CExpression* InterpretSymbolExpression(const unicode_string& symbol) { unicode_string::size_type slashPosition = symbol.find(kSymbolDivider); unicode_string baseVariable = symbol; CExpression* baseExpression = 0; if (slashPosition < symbol.size()) { baseVariable.assign(symbol, 0, slashPosition); } const CLocalVariableRecord* match = gCurrentCompiler->LookupLocalVariable(baseVariable); if (match != 0) { CVariableDeclaration declaration = match->GetDeclaration(); baseExpression = new CLocalVariableExpression(declaration.GetSignature(), match->GetVariableIndex(), declaration.IsFinal()); } else { const COuterLocalExpression* outerLocal = gCurrentCompiler->LookupOuterLocalVariable(baseVariable); if (outerLocal != 0) { baseExpression = new COuterLocalExpression(*outerLocal); } } if (baseExpression != 0) { if (slashPosition < symbol.size()) { do { unicode_string::size_type previousPosition = slashPosition + 1; slashPosition = symbol.find(kSymbolDivider, previousPosition); if (slashPosition >= symbol.size()) { slashPosition = symbol.size(); } unicode_string nextField(symbol, previousPosition, slashPosition - previousPosition); baseExpression = new CClassFieldExpression(baseExpression, nextField); } while (slashPosition < symbol.size()); } } else { baseExpression = new CClassFieldExpression(symbol); } return baseExpression; }