/* A Bison parser, made from ./c-parse.y */ #define YYBISON 1 /* Identify Bison output. */ #define IDENTIFIER 258 #define TYPENAME 259 #define SCSPEC 260 #define TYPESPEC 261 #define TYPE_QUAL 262 #define CONSTANT 263 #define STRING 264 #define ELLIPSIS 265 #define SIZEOF 266 #define ENUM 267 #define STRUCT 268 #define UNION 269 #define IF 270 #define ELSE 271 #define WHILE 272 #define DO 273 #define FOR 274 #define SWITCH 275 #define CASE 276 #define DEFAULT 277 #define BREAK 278 #define CONTINUE 279 #define RETURN 280 #define GOTO 281 #define ASM 282 #define TYPEOF 283 #define ALIGNOF 284 #define ATTRIBUTE 285 #define ASSIGN 286 #define OROR 287 #define ANDAND 288 #define EQCOMPARE 289 #define ARITHCOMPARE 290 #define LSHIFT 291 #define RSHIFT 292 #define UNARY 293 #define PLUSPLUS 294 #define MINUSMINUS 295 #define HYPERUNARY 296 #define POINTSAT 297 #line 122 "./c-parse.y" #include "config.h" #include "tree.h" #include "input.h" #include "c-parse.h" #include "c-tree.h" #include #include /* GCT */ #include "gct-const.h" /* GCT */ #include "gct-util.h" /* GCT */ #include "gct-contro.h" /* GCT */ #include /* GCT */ #include "gct-tutil.h" /* GCT */ #include "gct-assert.h" /* GCT */ /* There are occasional "shift-reduce conflicts" in which the last node on the list may be an OTHER (unprocessed) node that stops the parse, but it may also be a processed node. An example of this is "(unsigned) sizeof(int)". The handling of such problems is special-casey, quick-and-dirty, kludgy, and ought to be rethought. */ #define GCT_LAST_MAYBE_SHIFT(list) \ ((GCT_LAST(list)->type == GCT_OTHER)? \ (GCT_LAST(list)->prev) : \ (GCT_LAST(list))) /* * Each function is hashed and that hash value is placed in the mapfile. * This hashval is calculated on all the tokens of a function. */ long Gct_function_hashval = 0; /* The code that does the hashing used to be here. It had to be moved down below because AIX is confused. */ #ifdef USG #define R_OK 4 /* From gcc.c */ #define W_OK 2 #define X_OK 1 #define vfork fork #endif /* USG */ #include #include #ifndef errno extern int errno; #endif void yyerror (); /* Cause the `yydebug' variable to be defined. */ #define YYDEBUG 1 #line 183 "./c-parse.y" typedef union {long itype; tree ttype; enum tree_code code; } YYSTYPE; #line 275 "./c-parse.y" /* the declaration found for the last IDENTIFIER token read in. yylex must look this up to detect typedefs, which get token type TYPENAME, so it is left around in case the identifier is not a typedef but is used in a context which makes it a reference to a variable. */ static tree lastiddecl; static tree make_pointer_declarator (); static tree combine_strings (); static void reinit_parse_for_function (); /* List of types and structure classes of the current declaration. */ tree current_declspecs; /* Stack of saved values of current_declspecs. */ tree declspec_stack; int undeclared_variable_notice; /* 1 if we explained undeclared var errors. */ static int yylex (); #ifndef YYLTYPE typedef struct yyltype { int timestamp; int first_line; int first_column; int last_line; int last_column; char *text; } yyltype; #define YYLTYPE yyltype #endif #include #ifndef __STDC__ #define const #endif #define YYFINAL 518 #define YYFLAG -32768 #define YYNTBASE 65 #define YYTRANSLATE(x) ((unsigned)(x) <= 297 ? yytranslate[x] : 173) 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, 61, 2, 2, 2, 48, 39, 2, 55, 57, 46, 44, 62, 45, 54, 47, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 34, 58, 2, 32, 2, 33, 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, 56, 2, 64, 38, 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, 63, 37, 59, 60, 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, 2, 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, 35, 36, 40, 41, 42, 43, 49, 50, 51, 52, 53 }; static const short yyprhs[] = { 0, 0, 1, 3, 4, 7, 8, 12, 14, 16, 22, 26, 31, 36, 39, 42, 45, 48, 50, 51, 52, 60, 65, 66, 67, 75, 80, 81, 82, 89, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 114, 116, 118, 122, 124, 127, 130, 133, 138, 141, 146, 148, 153, 161, 163, 167, 171, 175, 179, 183, 187, 191, 195, 199, 203, 207, 211, 215, 219, 225, 229, 233, 235, 237, 239, 243, 247, 248, 253, 258, 263, 267, 271, 274, 277, 279, 282, 283, 285, 288, 290, 292, 295, 298, 299, 304, 309, 312, 315, 318, 322, 323, 326, 329, 331, 333, 336, 339, 342, 346, 347, 350, 352, 354, 356, 361, 366, 368, 370, 372, 374, 378, 380, 384, 385, 390, 391, 398, 402, 403, 410, 414, 415, 422, 424, 428, 430, 435, 440, 442, 445, 449, 454, 456, 458, 462, 464, 466, 470, 474, 479, 483, 487, 489, 493, 498, 502, 506, 508, 512, 516, 520, 525, 529, 531, 532, 539, 540, 546, 549, 550, 557, 558, 564, 567, 568, 576, 577, 584, 587, 588, 590, 591, 593, 594, 598, 601, 605, 609, 611, 612, 614, 618, 621, 626, 629, 631, 635, 637, 641, 644, 647, 648, 650, 652, 655, 656, 659, 663, 667, 670, 674, 679, 683, 686, 690, 693, 695, 698, 701, 702, 704, 707, 708, 710, 713, 716, 722, 727, 732, 733, 740, 742, 745, 746, 751, 753, 754, 755, 763, 764, 765, 775, 776, 777, 778, 791, 792, 799, 800, 806, 807, 812, 815, 818, 821, 825, 832, 841, 852, 865, 869, 870, 875, 877, 878, 880, 881, 883, 884, 886, 888, 892, 897, 899, 903, 904, 907, 908, 911, 914, 917, 920, 923, 926, 927, 929, 931, 935, 937, 941, 944, 947, 950, 953, 956, 958 }; static const short yyrhs[] = { -1, 66, 0, 0, 67, 69, 0, 0, 66, 68, 69, 0, 71, 0, 70, 0, 27, 55, 88, 57, 58, 0, 91, 101, 58, 0, 95, 91, 101, 58, 0, 93, 91, 100, 58, 0, 95, 58, 0, 93, 58, 0, 1, 58, 0, 1, 59, 0, 58, 0, 0, 0, 93, 91, 112, 72, 89, 73, 140, 0, 93, 91, 112, 1, 0, 0, 0, 95, 91, 115, 74, 89, 75, 140, 0, 95, 91, 115, 1, 0, 0, 0, 91, 115, 76, 89, 77, 140, 0, 91, 115, 1, 0, 3, 0, 4, 0, 39, 0, 45, 0, 44, 0, 50, 0, 51, 0, 60, 0, 61, 0, 82, 0, 0, 82, 0, 85, 0, 82, 62, 85, 0, 86, 0, 46, 84, 0, 79, 84, 0, 11, 83, 0, 11, 55, 131, 57, 0, 29, 83, 0, 29, 55, 131, 57, 0, 83, 0, 55, 131, 57, 84, 0, 55, 131, 57, 63, 111, 123, 59, 0, 84, 0, 85, 44, 85, 0, 85, 45, 85, 0, 85, 46, 85, 0, 85, 47, 85, 0, 85, 48, 85, 0, 85, 42, 85, 0, 85, 43, 85, 0, 85, 41, 85, 0, 85, 40, 85, 0, 85, 39, 85, 0, 85, 37, 85, 0, 85, 38, 85, 0, 85, 36, 85, 0, 85, 35, 85, 0, 85, 33, 158, 34, 85, 0, 85, 32, 85, 0, 85, 31, 85, 0, 3, 0, 8, 0, 88, 0, 55, 80, 57, 0, 55, 1, 57, 0, 0, 55, 87, 141, 57, 0, 86, 55, 81, 57, 0, 86, 56, 80, 64, 0, 86, 54, 78, 0, 86, 53, 78, 0, 86, 50, 0, 86, 51, 0, 9, 0, 88, 9, 0, 0, 90, 0, 90, 10, 0, 92, 0, 138, 0, 90, 92, 0, 92, 138, 0, 0, 93, 91, 100, 58, 0, 95, 91, 101, 58, 0, 93, 58, 0, 95, 58, 0, 98, 94, 0, 95, 98, 94, 0, 0, 94, 99, 0, 94, 5, 0, 7, 0, 5, 0, 95, 7, 0, 95, 5, 0, 98, 97, 0, 133, 98, 97, 0, 0, 97, 99, 0, 6, 0, 116, 0, 4, 0, 28, 55, 80, 57, 0, 28, 55, 131, 57, 0, 6, 0, 7, 0, 116, 0, 103, 0, 100, 62, 103, 0, 105, 0, 101, 62, 103, 0, 0, 27, 55, 88, 57, 0, 0, 112, 102, 107, 32, 104, 110, 0, 112, 102, 107, 0, 0, 115, 102, 107, 32, 106, 110, 0, 115, 102, 107, 0, 0, 30, 55, 55, 108, 57, 57, 0, 109, 0, 108, 62, 109, 0, 3, 0, 3, 55, 8, 57, 0, 3, 55, 172, 57, 0, 85, 0, 63, 59, 0, 63, 111, 59, 0, 63, 111, 62, 59, 0, 1, 0, 110, 0, 111, 62, 110, 0, 113, 0, 115, 0, 55, 113, 57, 0, 113, 55, 165, 0, 113, 56, 80, 64, 0, 113, 56, 64, 0, 46, 134, 113, 0, 4, 0, 114, 55, 165, 0, 114, 56, 80, 64, 0, 114, 56, 64, 0, 46, 134, 114, 0, 4, 0, 115, 55, 165, 0, 55, 115, 57, 0, 46, 134, 115, 0, 115, 56, 80, 64, 0, 115, 56, 64, 0, 3, 0, 0, 13, 78, 63, 117, 125, 59, 0, 0, 13, 63, 118, 125, 59, 0, 13, 78, 0, 0, 14, 78, 63, 119, 125, 59, 0, 0, 14, 63, 120, 125, 59, 0, 14, 78, 0, 0, 12, 78, 63, 121, 129, 124, 59, 0, 0, 12, 63, 122, 129, 124, 59, 0, 12, 78, 0, 0, 62, 0, 0, 62, 0, 0, 125, 126, 58, 0, 125, 58, 0, 96, 91, 127, 0, 133, 91, 127, 0, 1, 0, 0, 128, 0, 127, 62, 128, 0, 112, 107, 0, 112, 34, 85, 107, 0, 34, 85, 0, 130, 0, 129, 62, 130, 0, 78, 0, 78, 32, 85, 0, 96, 132, 0, 133, 132, 0, 0, 135, 0, 7, 0, 133, 7, 0, 0, 134, 7, 0, 55, 135, 57, 0, 46, 134, 135, 0, 46, 134, 0, 135, 55, 163, 0, 135, 56, 80, 64, 0, 135, 56, 64, 0, 55, 163, 0, 56, 80, 64, 0, 56, 64, 0, 144, 0, 136, 144, 0, 136, 138, 0, 0, 136, 0, 1, 58, 0, 0, 141, 0, 1, 141, 0, 63, 59, 0, 63, 139, 90, 137, 59, 0, 63, 139, 1, 59, 0, 63, 139, 136, 59, 0, 0, 15, 55, 80, 57, 143, 144, 0, 141, 0, 80, 58, 0, 0, 142, 16, 145, 144, 0, 142, 0, 0, 0, 17, 146, 55, 80, 57, 147, 144, 0, 0, 0, 18, 148, 144, 17, 149, 55, 80, 57, 58, 0, 0, 0, 0, 19, 55, 158, 58, 150, 158, 58, 151, 158, 57, 152, 144, 0, 0, 20, 55, 80, 57, 153, 144, 0, 0, 21, 80, 34, 154, 144, 0, 0, 22, 34, 155, 144, 0, 23, 58, 0, 24, 58, 0, 25, 58, 0, 25, 80, 58, 0, 27, 157, 55, 88, 57, 58, 0, 27, 157, 55, 88, 34, 159, 57, 58, 0, 27, 157, 55, 88, 34, 159, 34, 159, 57, 58, 0, 27, 157, 55, 88, 34, 159, 34, 159, 34, 162, 57, 58, 0, 26, 78, 58, 0, 0, 78, 34, 156, 144, 0, 58, 0, 0, 7, 0, 0, 80, 0, 0, 160, 0, 161, 0, 160, 62, 161, 0, 9, 55, 80, 57, 0, 88, 0, 162, 62, 88, 0, 0, 164, 168, 0, 0, 166, 167, 0, 169, 57, 0, 172, 57, 0, 1, 57, 0, 169, 57, 0, 1, 57, 0, 0, 10, 0, 170, 0, 170, 62, 10, 0, 171, 0, 170, 62, 171, 0, 93, 114, 0, 93, 115, 0, 93, 132, 0, 95, 115, 0, 95, 132, 0, 3, 0, 172, 62, 3, 0 }; #if YYDEBUG != 0 static const short yyrline[] = { 0, 298, 299, 306, 308, 308, 309, 311, 313, 314, 321, 327, 329, 331, 333, 335, 336, 337, 342, 349, 354, 360, 362, 368, 373, 379, 381, 387, 392, 398, 402, 404, 407, 409, 411, 413, 415, 417, 419, 423, 433, 436, 439, 442, 448, 450, 455, 460, 476, 481, 516, 524, 526, 531, 552, 554, 560, 566, 572, 578, 584, 590, 596, 601, 606, 612, 618, 624, 630, 636, 642, 648, 655, 708, 713, 718, 723, 725, 733, 749, 760, 766, 772, 778, 784, 793, 795, 806, 808, 809, 816, 818, 819, 820, 827, 834, 845, 855, 863, 877, 880, 884, 886, 888, 896, 899, 901, 903, 912, 915, 919, 921, 929, 930, 931, 932, 936, 944, 945, 946, 949, 951, 954, 956, 959, 962, 970, 975, 976, 981, 986, 987, 993, 996, 1001, 1002, 1006, 1010, 1018, 1024, 1026, 1030, 1032, 1034, 1040, 1043, 1050, 1052, 1057, 1060, 1065, 1067, 1069, 1071, 1079, 1085, 1087, 1089, 1091, 1097, 1103, 1105, 1107, 1109, 1111, 1117, 1122, 1133, 1141, 1145, 1147, 1149, 1157, 1165, 1167, 1169, 1172, 1184, 1193, 1196, 1200, 1202, 1205, 1207, 1211, 1213, 1215, 1229, 1235, 1240, 1244, 1249, 1250, 1254, 1257, 1259, 1268, 1270, 1275, 1278, 1282, 1285, 1289, 1292, 1295, 1298, 1302, 1305, 1309, 1313, 1315, 1317, 1319, 1321, 1323, 1325, 1327, 1336, 1338, 1339, 1342, 1344, 1347, 1350, 1359, 1362, 1365, 1370, 1377, 1382, 1394, 1399, 1401, 1403, 1415, 1419, 1423, 1427, 1431, 1435, 1438, 1442, 1444, 1451, 1457, 1461, 1467, 1475, 1482, 1486, 1518, 1522, 1533, 1537, 1543, 1550, 1555, 1560, 1567, 1576, 1585, 1594, 1602, 1609, 1613, 1621, 1626, 1632, 1635, 1640, 1642, 1645, 1647, 1651, 1656, 1659, 1665, 1669, 1676, 1680, 1685, 1687, 1689, 1693, 1695, 1701, 1707, 1713, 1715, 1719, 1722, 1728, 1731, 1733, 1735, 1737, 1742, 1745 }; static const char * const yytname[] = { "$","error","$illegal.","IDENTIFIER", "TYPENAME","SCSPEC","TYPESPEC","TYPE_QUAL","CONSTANT","STRING","ELLIPSIS","SIZEOF", "ENUM","STRUCT","UNION","IF","ELSE","WHILE","DO","FOR","SWITCH","CASE","DEFAULT", "BREAK","CONTINUE","RETURN","GOTO","ASM","TYPEOF","ALIGNOF","ATTRIBUTE","ASSIGN", "'='","'?'","':'","OROR","ANDAND","'|'","'^'","'&'","EQCOMPARE","ARITHCOMPARE", "LSHIFT","RSHIFT","'+'","'-'","'*'","'/'","'%'","UNARY","PLUSPLUS","MINUSMINUS", "HYPERUNARY","POINTSAT","'.'","'('","'['","')'","';'","'}'","'~'","'!'","','", "'{'","']'","program","extdefs","@1","@2","extdef","datadef","fndef","@3","@4", "@5","@6","@7","@8","identifier","unop","expr","exprlist","nonnull_exprlist", "unary_expr","cast_expr","expr_no_commas","primary","@9","string","xdecls","decls", "setspecs","decl","typed_declspecs","reserved_declspecs","declmods","typed_typespecs", "reserved_typespecquals","typespec","typespecqual_reserved","initdecls","notype_initdecls", "maybeasm","initdcl","@10","notype_initdcl","@11","maybe_attribute","attribute_list", "attrib","init","initlist","declarator","after_type_declarator","parm_declarator", "notype_declarator","structsp","@12","@13","@14","@15","@16","@17","maybecomma", "maybecomma_warn","component_decl_list","component_decl","components","component_declarator", "enumlist","enumerator","typename","absdcl","nonempty_type_quals","type_quals", "absdcl1","stmts","xstmts","errstmt","pushlevel","compstmt_or_error","compstmt", "simple_if","@18","stmt","@19","@20","@21","@22","@23","@24","@25","@26","@27", "@28","@29","@30","maybe_type_qual","xexpr","asm_operands","nonnull_asm_operands", "asm_operand","asm_clobbers","parmlist","@31","parmlist_or_identifiers","@32", "parmlist_or_identifiers_1","parmlist_1","parmlist_2","parms","parm","identifiers", "" }; #endif static const short yyr1[] = { 0, 65, 65, 67, 66, 68, 66, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70, 70, 72, 73, 71, 71, 74, 75, 71, 71, 76, 77, 71, 71, 78, 78, 79, 79, 79, 79, 79, 79, 79, 80, 81, 81, 82, 82, 83, 83, 83, 83, 83, 83, 83, 84, 84, 84, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 86, 86, 86, 86, 86, 87, 86, 86, 86, 86, 86, 86, 86, 88, 88, 89, 89, 89, 90, 90, 90, 90, 91, 92, 92, 92, 92, 93, 93, 94, 94, 94, 95, 95, 95, 95, 96, 96, 97, 97, 98, 98, 98, 98, 98, 99, 99, 99, 100, 100, 101, 101, 102, 102, 104, 103, 103, 106, 105, 105, 107, 107, 108, 108, 109, 109, 109, 110, 110, 110, 110, 110, 111, 111, 112, 112, 113, 113, 113, 113, 113, 113, 114, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 117, 116, 118, 116, 116, 119, 116, 120, 116, 116, 121, 116, 122, 116, 116, 123, 123, 124, 124, 125, 125, 125, 126, 126, 126, 127, 127, 127, 128, 128, 128, 129, 129, 130, 130, 131, 131, 132, 132, 133, 133, 134, 134, 135, 135, 135, 135, 135, 135, 135, 135, 135, 136, 136, 136, 137, 137, 138, 139, 140, 140, 141, 141, 141, 141, 143, 142, 144, 144, 145, 144, 144, 146, 147, 144, 148, 149, 144, 150, 151, 152, 144, 153, 144, 154, 144, 155, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 156, 144, 144, 157, 157, 158, 158, 159, 159, 160, 160, 161, 162, 162, 164, 163, 166, 165, 167, 167, 167, 168, 168, 169, 169, 169, 169, 170, 170, 171, 171, 171, 171, 171, 172, 172 }; static const short yyr2[] = { 0, 0, 1, 0, 2, 0, 3, 1, 1, 5, 3, 4, 4, 2, 2, 2, 2, 1, 0, 0, 7, 4, 0, 0, 7, 4, 0, 0, 6, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 3, 1, 2, 2, 2, 4, 2, 4, 1, 4, 7, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 1, 1, 1, 3, 3, 0, 4, 4, 4, 3, 3, 2, 2, 1, 2, 0, 1, 2, 1, 1, 2, 2, 0, 4, 4, 2, 2, 2, 3, 0, 2, 2, 1, 1, 2, 2, 2, 3, 0, 2, 1, 1, 1, 4, 4, 1, 1, 1, 1, 3, 1, 3, 0, 4, 0, 6, 3, 0, 6, 3, 0, 6, 1, 3, 1, 4, 4, 1, 2, 3, 4, 1, 1, 3, 1, 1, 3, 3, 4, 3, 3, 1, 3, 4, 3, 3, 1, 3, 3, 3, 4, 3, 1, 0, 6, 0, 5, 2, 0, 6, 0, 5, 2, 0, 7, 0, 6, 2, 0, 1, 0, 1, 0, 3, 2, 3, 3, 1, 0, 1, 3, 2, 4, 2, 1, 3, 1, 3, 2, 2, 0, 1, 1, 2, 0, 2, 3, 3, 2, 3, 4, 3, 2, 3, 2, 1, 2, 2, 0, 1, 2, 0, 1, 2, 2, 5, 4, 4, 0, 6, 1, 2, 0, 4, 1, 0, 0, 7, 0, 0, 9, 0, 0, 0, 12, 0, 6, 0, 5, 0, 4, 2, 2, 2, 3, 6, 8, 10, 12, 3, 0, 4, 1, 0, 1, 0, 1, 0, 1, 1, 3, 4, 1, 3, 0, 2, 0, 2, 2, 2, 2, 2, 2, 0, 1, 1, 3, 1, 3, 2, 2, 2, 2, 2, 1, 3 }; static const short yydefact[] = { 3, 5, 0, 0, 0, 114, 105, 112, 104, 0, 0, 0, 0, 0, 17, 4, 8, 7, 0, 94, 94, 101, 113, 6, 15, 16, 30, 31, 177, 179, 167, 169, 172, 174, 0, 0, 164, 206, 0, 0, 122, 0, 14, 0, 107, 106, 13, 0, 101, 99, 0, 175, 184, 165, 184, 170, 85, 0, 72, 204, 73, 0, 0, 32, 34, 33, 0, 35, 36, 0, 37, 38, 0, 0, 39, 51, 54, 42, 44, 74, 202, 110, 0, 202, 0, 0, 10, 0, 29, 0, 278, 0, 0, 132, 153, 206, 0, 0, 120, 0, 146, 147, 0, 0, 100, 103, 117, 118, 102, 119, 198, 182, 196, 0, 0, 184, 0, 184, 86, 0, 0, 47, 0, 49, 45, 0, 0, 0, 0, 46, 115, 0, 0, 0, 267, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 84, 0, 0, 40, 0, 206, 276, 0, 200, 203, 108, 116, 205, 110, 201, 207, 161, 160, 123, 124, 0, 159, 0, 163, 0, 0, 27, 88, 0, 94, 94, 91, 0, 131, 0, 0, 12, 0, 21, 0, 132, 278, 0, 11, 25, 0, 0, 183, 0, 182, 189, 186, 168, 94, 0, 94, 0, 173, 0, 9, 0, 0, 76, 75, 223, 0, 0, 43, 71, 70, 268, 0, 68, 67, 65, 66, 64, 63, 62, 60, 61, 55, 56, 57, 58, 59, 82, 81, 0, 41, 0, 210, 0, 214, 0, 216, 0, 276, 0, 111, 109, 0, 0, 296, 286, 202, 202, 279, 0, 287, 289, 0, 162, 222, 0, 89, 92, 93, 97, 0, 98, 0, 0, 129, 152, 148, 121, 19, 128, 149, 151, 0, 23, 199, 197, 178, 0, 190, 185, 190, 166, 171, 48, 50, 226, 0, 78, 0, 52, 0, 79, 80, 209, 208, 0, 277, 0, 215, 211, 213, 0, 125, 282, 158, 206, 276, 291, 292, 293, 206, 294, 295, 280, 0, 281, 0, 0, 28, 224, 0, 0, 124, 0, 0, 0, 126, 150, 0, 176, 0, 132, 187, 191, 188, 0, 72, 114, 0, 237, 240, 0, 0, 0, 0, 0, 0, 0, 0, 265, 264, 0, 0, 220, 0, 232, 236, 217, 143, 0, 139, 144, 180, 69, 284, 283, 212, 210, 278, 0, 210, 288, 290, 297, 225, 95, 96, 136, 0, 134, 130, 20, 0, 24, 195, 0, 193, 0, 228, 0, 0, 0, 267, 0, 0, 251, 253, 254, 255, 0, 0, 266, 0, 262, 233, 0, 0, 229, 219, 218, 234, 140, 0, 0, 0, 157, 154, 156, 0, 0, 0, 0, 127, 132, 192, 0, 0, 0, 0, 0, 249, 0, 256, 261, 0, 0, 227, 0, 141, 0, 145, 53, 155, 0, 0, 133, 135, 194, 230, 0, 241, 243, 247, 0, 252, 0, 263, 235, 142, 137, 138, 0, 238, 0, 267, 0, 250, 269, 0, 231, 0, 0, 0, 248, 0, 0, 270, 271, 257, 239, 0, 244, 0, 269, 0, 0, 0, 267, 0, 0, 258, 272, 242, 0, 273, 0, 0, 245, 274, 0, 259, 0, 0, 0, 246, 260, 275, 0, 0, 0 }; static const short yydefgoto[] = { 516, 1, 2, 3, 15, 16, 17, 189, 334, 195, 337, 92, 264, 360, 72, 361, 238, 74, 75, 76, 77, 78, 127, 79, 176, 177, 18, 178, 179, 49, 180, 80, 160, 21, 108, 97, 39, 93, 98, 391, 40, 333, 183, 387, 388, 370, 371, 169, 100, 316, 101, 22, 115, 52, 117, 54, 113, 50, 423, 198, 114, 204, 341, 342, 111, 112, 82, 158, 83, 84, 159, 363, 415, 181, 295, 327, 364, 365, 470, 366, 446, 399, 479, 400, 472, 473, 496, 510, 474, 462, 440, 444, 411, 221, 484, 485, 486, 508, 243, 244, 171, 172, 257, 305, 258, 259, 260, 261 }; static const short yypact[] = { 35, 37, 1439, 1439, 127,-32768,-32768,-32768,-32768, 39, 46, 52, 15, 59,-32768,-32768,-32768,-32768, 141, 26, 637, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 85,-32768, 167,-32768, 169, 151, 1292,-32768,-32768, 141, 10,-32768, 670,-32768, 261,-32768,-32768,-32768, 141,-32768, 680, 317, -32768,-32768,-32768,-32768,-32768,-32768, 84,-32768,-32768,-32768, 1359, 1372,-32768,-32768,-32768, 1426,-32768,-32768, 378,-32768, -32768, 1426, 118, 144,-32768,-32768, 1512, 381, 236, 18, -32768, 194, 633, 97, 143,-32768, 261,-32768, 206,-32768, 947, 47, 64,-32768,-32768, 261, 92,-32768, 932, 295, 302, 110, 707, 680,-32768,-32768,-32768,-32768,-32768, 235, 207,-32768, 317, 296,-32768, 335,-32768,-32768, 225, 378, -32768, 378,-32768,-32768, 242, 244, 241, 269,-32768,-32768, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426,-32768,-32768, 317, 317, 1426, 1426,-32768, 18, 970,-32768, 315, 467, -32768,-32768,-32768,-32768,-32768, 302,-32768,-32768, 305, 151, -32768, 805,-32768, 271, 285,-32768, 455, 487, 288, 1103, -32768, 298, 328, 409, 320,-32768, 261,-32768, 47, 64, -32768, 1015,-32768,-32768, 47, 1426, 317, 324, 207,-32768, -32768,-32768,-32768, 340, 703, 360,-32768, 744,-32768, 351, 353,-32768,-32768, 352, 358, 1231, 1512, 1512, 1512,-32768, 387, 1541, 1553, 1564, 1574, 477, 869, 923, 212, 212, 349, 349,-32768,-32768,-32768,-32768,-32768, 373, 144, 384, 133, 370,-32768, 892,-32768, 386,-32768, 1038,-32768, 467, 119, 388,-32768,-32768, 135, 1486,-32768, 389, 391,-32768, 34,-32768,-32768, 32,-32768,-32768,-32768,-32768, 261,-32768, 141, 399,-32768, 295,-32768,-32768,-32768, 424,-32768,-32768, 393,-32768, 1512,-32768,-32768, 407, 103,-32768, 103,-32768, -32768,-32768,-32768,-32768, 267,-32768, 880,-32768, 1426,-32768, -32768, 315,-32768, 414,-32768, 419,-32768,-32768,-32768, 413, -32768,-32768,-32768,-32768, 109, 345, 302,-32768,-32768, 302, -32768,-32768, 576,-32768, 479, 241,-32768,-32768, 275, 276, 155, 481, 880, 32,-32768,-32768, 32,-32768, 1426, 310, 423,-32768, 423, 346, 452, 453, 434,-32768,-32768, 472, 473, 1426, 496, 476, 478, 1305, 317, 528,-32768, 505, 482, 1145, 548,-32768, 525,-32768,-32768, 735, 1512,-32768, 491, 1528,-32768,-32768,-32768, 259,-32768, 1083, 396,-32768, -32768,-32768,-32768,-32768,-32768, 488, 94,-32768,-32768,-32768, 880,-32768, 1512, 1426,-32768, 103,-32768, 1426, 489, 1206, 1426, 1426, 520,-32768,-32768,-32768,-32768, 497, 500,-32768, 506,-32768,-32768, 609, 501,-32768,-32768,-32768,-32768,-32768, 19, 796, 503, 345,-32768,-32768, 512, 158, 507, 481, -32768, 1480,-32768, 521, 1426, 562, 526, 534,-32768, 1206, -32768,-32768, 151, 1206,-32768, 1206,-32768, 819,-32768,-32768, -32768, 538, 112,-32768,-32768,-32768,-32768, 539,-32768,-32768, -32768, 1206,-32768, 48,-32768,-32768,-32768,-32768,-32768, 1206, -32768, 530, 1426, 1206,-32768, 588, 542,-32768, 1206, 1426, 543,-32768, 547, 29, 552,-32768,-32768,-32768, 558,-32768, 1426, 588, 561, 588, 563, 1426, 559, 31,-32768,-32768, -32768, 565,-32768, 151, 567,-32768, 236, 174,-32768, 1206, 594, 151,-32768,-32768, 236, 605, 623,-32768 }; static const short yypgoto[] = {-32768, -32768,-32768,-32768, 653,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768, -5,-32768, -33,-32768, 504, 382, -46, 81, -32768,-32768, -34, -118, 363, 4, -158, 6, 614, 8, -76, 510, -3, -116, 394, -29, -71, -62,-32768,-32768, -32768, -177,-32768, 248, -306, 312, -40, -49, 290, -17, -42,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 492, -25, -32768, 392, 294, 583, 502, 0, -61, -75, -79, -142, 339,-32768, -166,-32768, -91, -93,-32768,-32768, -317,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768, -370, 211,-32768, 210,-32768, 458,-32768, -176, -32768,-32768,-32768, 462,-32768, 395, 299 }; #define YYLAST 1622 static const short yytable[] = { 57, 41, 73, 99, 29, 31, 33, 109, 19, 19, 20, 20, 267, 278, 242, 279, 184, 48, 102, 266, 124, 85, 164, 43, 47, 168, 129, 389, 190, 116, 103, 437, 81, 326, 215, -1, 126, -2, 203, 205, 203, 205, 26, 27, 249, 110, 418, 185, 175, 26, 27, 5, 6, 7, 8, 26, 27, 118, 174, 9, 10, 11, 109, 492, 155, 504, 81, 166, 86, 128, 34, 277, 87, 156, 157, 13, 241, 282, 447, 85, 163, 448, 476, 436, 42, 431, 493, 126, 505, 126, 206, 324, 208, 118, 182, 214, 325, 418, 190, 302, 36, 220, 28, 481, 165, 477, 36, 94, 110, 30, -87, 81, 36, 81, 35, 32, 449, 81, 109, 81, 210, 240, 211, 463, 246, 276, 502, 465, 118, 466, 203, 205, 203, 205, 249, 274, 251, 339, 36, 313, 165, 119, 449, 37, 36, 475, 236, 237, 51, 95, 186, 429, 38, 478, 187, 319, 430, 482, 96, 281, 56, 253, 488, 395, 315, 157, 452, 166, 193, 469, 298, 328, 87, 242, 325, 130, 311, 48, 255, 155, 256, 314, 89, 269, 271, 24, 25, 37, 156, 157, 315, 157, 110, 513, 318, 321, 38, 417, 90, 91, 167, 425, 163, 81, 266, 81, 131, 287, 109, 289, 90, 91, 217, 218, 219, 310, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 53, 511, 55, 383, 302, 376, 512, 302, 317, 320, 379, 328, 330, 390, 328, 118, 392, 340, 417, 340, 255, 161, 256, 48, 331, 456, 144, 145, 146, 147, 148, 170, 36, 313, 36, 94, 165, 196, 344, 197, 345, 346, 6, 7, 8, 60, 56, 283, 61, 9, 10, 11, 347, 209, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 13, 62, 200, 85, 212, 5, 213, 7, 59, 214, 314, 63, 95, 9, 10, 11, 64, 65, 66, 315, 157, 96, 67, 68, 403, 26, 27, 69, 408, 13, 359, 216, 70, 71, 255, 214, 256, 89, 384, 385, 262, 200, 187, 87, 5, 182, 7, 59, 263, 394, 427, 268, 9, 10, 11, 191, 192, 409, 272, 201, 202, 340, 90, 91, 166, 273, 200, 166, 13, 5, 434, 7, 59, 220, 438, 247, 248, 9, 10, 11, 191, 192, 275, 369, 125, 372, 58, 5, 285, 7, 59, 60, 56, 13, 61, 9, 10, 11, 201, 207, 146, 147, 148, 288, 36, 377, 378, 458, 165, 263, 397, 13, 62, 292, 464, 293, 294, 36, 94, 369, 296, 165, 63, 201, 290, 393, 299, 64, 65, 66, 247, 248, 303, 67, 68, 300, 149, 150, 69, 151, 152, 153, 154, 70, 71, 220, -77, 319, 121, 123, 312, 322, 489, 301, 369, 307, 315, 157, 323, 332, 95, 335, 336, 497, 5, 6, 7, 8, 220, 96, 265, 338, 9, 10, 11, 507, 373, 369, 106, 107, 432, 374, 375, 515, 9, 10, 11, 382, 13, 386, 396, -30, -31, 175, 398, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, 369, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, 140, 141, 142, 143, 144, 145, 146, 147, 148, -90, 401, 402, 369, 404, -90, -90, -90, 405, 410, 406, -90, -90, 412, 413, 419, -90, 428, 435, -90, -90, -90, -90, 175, -90, 345, 27, 422, 439, 441, 60, 56, 442, 61, 445, 443, 450, 347, 454, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 451, 62, 457, 459, 5, 6, 7, 8, 460, 480, 380, 63, 9, 10, 11, 461, 64, 65, 66, 468, 471, 483, 67, 68, 487, 490, 491, 69, 13, 517, 359, 416, 70, 71, 175, 214, 345, 27, 494, 495, 503, 60, 56, 499, 61, 501, 506, 518, 347, 509, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 5, 62, 7, 162, 5, 44, 7, 45, 9, 10, 11, 63, 9, 10, 11, 514, 64, 65, 66, 23, 239, 362, 67, 68, 13, 104, 329, 69, 13, 424, 359, -221, 70, 71, 88, 214, 250, -26, -26, -26, -26, 455, 155, 421, 343, -26, -26, -26, 105, 106, 107, 156, 157, 433, 286, 9, 10, 11, 46, 199, 89, -26, 284, -124, 414, -124, 498, 500, 308, 306, 5, 194, 7, 162, -22, -22, -22, -22, 9, 10, 11, 381, -22, -22, -22, 0, 0, 0, 90, 91, 453, -124, 0, 0, 13, -124, -26, 89, -22, 367, -124, 58, -124, 0, 0, 0, 60, 56, 200, 61, 0, 5, 0, 7, 59, 0, 0, 0, 0, 9, 10, 11, 0, 0, 0, 90, 91, 62, -124, 0, 0, 0, -124, -22, 0, 13, 0, 63, 0, 0, 0, 0, 64, 65, 66, 0, 0, 0, 67, 68, 0, 0, 0, 69, 0, 0, 0, 420, 70, 71, 367, 368, 58, 0, 0, 201, 291, 60, 56, 252, 61, 253, 5, 6, 7, 8, 0, 0, 254, 0, 9, 10, 11, 367, 0, 58, 0, 0, 62, 0, 60, 56, 0, 61, 0, 0, 13, 0, 63, 0, 0, 0, 0, 64, 65, 66, 0, 0, 0, 67, 68, 62, 0, 0, 69, 0, 0, 0, -181, 70, 71, 63, 368, 0, 0, -285, 64, 65, 66, 0, 0, 0, 67, 68, 0, 0, 0, 69, 0, 0, 0, 467, 70, 71, 367, 368, 58, 0, 0, 0, 0, 60, 56, 0, 61, 0, 304, 0, 0, 5, 6, 7, 8, 0, 0, 254, 0, 9, 10, 11, 0, 0, 62, 141, 142, 143, 144, 145, 146, 147, 148, 0, 63, 13, 0, 0, 0, 64, 65, 66, 0, 0, 0, 67, 68, 0, 188, 0, 69, -18, -18, -18, -18, 70, 71, 0, 368, -18, -18, -18, 0, 0, -285, 58, 0, 0, 0, 0, 60, 56, 0, 61, 89, -18, 0, -124, 0, -124, 142, 143, 144, 145, 146, 147, 148, 0, 58, 0, 0, 62, 0, 60, 56, 0, 61, 0, 0, 0, 0, 63, 0, 0, 0, -124, 64, 65, 66, -124, -18, 0, 67, 68, 62, 0, 0, 69, 0, 0, 0, 0, 70, 71, 63, 0, 173, 0, 0, 64, 65, 66, 0, 58, 0, 67, 68, 0, 60, 56, 69, 61, 0, 0, 0, 70, 71, 0, 0, 245, 0, 0, 0, 0, 0, 0, 58, 0, 0, 62, 0, 60, 56, 0, 61, 0, 0, 0, 0, 63, 0, 0, 0, 0, 64, 65, 66, 0, 0, 0, 67, 68, 62, 0, 0, 69, 0, 0, 0, 0, 70, 71, 63, 0, 280, 0, 0, 64, 65, 66, 0, 58, 0, 67, 68, 0, 60, 56, 69, 61, 0, 0, 0, 70, 71, 0, 0, 309, 0, 0, 0, 0, 5, 44, 7, 45, 0, 62, 0, 0, 9, 10, 11, 0, 0, 0, 0, 63, 0, 0, 0, 0, 64, 65, 66, 0, 13, 0, 67, 68, 0, 0, 0, 69, 0, 0, 0, 0, 70, 71, 0, 0, 426, 345, 346, 6, 7, 8, 60, 56, 0, 61, 9, 10, 11, 347, 270, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 13, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 64, 65, 66, 0, 0, 0, 67, 68, 0, 0, 0, 69, 0, 0, 359, 0, 70, 71, 0, 214, 345, 27, 0, 0, 0, 60, 56, 0, 61, 0, 0, 0, 347, 0, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 58, 62, 0, 0, 0, 60, 56, 0, 61, 0, 0, 63, 0, 0, 0, 0, 64, 65, 66, 0, 0, 0, 67, 68, 0, 0, 62, 69, 0, 0, 359, 0, 70, 71, 0, 214, 63, 0, 0, 0, 0, 64, 65, 66, 0, 0, 0, 67, 68, 0, 0, 0, 69, 0, 0, 0, 0, 70, 71, 0, 297, 58, 5, 0, 7, 59, 60, 56, 0, 61, 9, 10, 11, 0, 58, 0, 0, 0, 0, 60, 56, 0, 61, 0, 0, 0, 13, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 62, 0, 64, 65, 66, 0, 0, 0, 67, 68, 63, 0, 0, 69, 0, 64, 65, 66, 70, 71, 0, 67, 68, 0, 0, 0, 69, 0, 58, 407, 0, 70, 71, 60, 56, 0, 61, 0, 0, 0, 0, 58, 0, 0, 0, 0, 60, 56, 0, 61, 0, 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 62, 0, 64, 65, 66, 0, 0, 0, 67, 68, 63, 0, 0, 120, 0, 64, 65, 66, 70, 71, 0, 67, 68, 0, 0, 0, 122, 0, 58, 0, 0, 70, 71, 60, 56, 0, 61, 0, 0, 4, 0, -94, 5, 6, 7, 8, 0, 0, 0, 0, 9, 10, 11, 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 12, 13, 0, 0, 64, 65, 66, 0, 0, 0, 67, 68, 0, 0, 0, 69, 0, 0, 0, -94, 70, 71, 0, 36, 5, 44, 7, 45, -94, 0, 0, 14, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 182, 132, 133, 134, 13, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, 319, 0, 0, 0, 0, 0, 0, 0, 0, 315, 157, 132, 133, 134, 0, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 134, 0, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148 }; static const short yycheck[] = { 34, 18, 35, 43, 9, 10, 11, 49, 2, 3, 2, 3, 178, 190, 156, 191, 95, 20, 47, 177, 66, 38, 83, 19, 20, 87, 72, 333, 99, 54, 47, 401, 35, 1, 127, 0, 69, 0, 114, 114, 116, 116, 3, 4, 160, 50, 363, 96, 1, 3, 4, 4, 5, 6, 7, 3, 4, 9, 91, 12, 13, 14, 104, 34, 46, 34, 69, 84, 58, 69, 55, 189, 62, 55, 56, 28, 155, 195, 59, 96, 83, 62, 34, 400, 58, 391, 57, 120, 57, 122, 115, 57, 117, 9, 30, 63, 62, 414, 169, 241, 3, 134, 63, 473, 7, 57, 3, 4, 113, 63, 63, 114, 3, 116, 55, 63, 422, 120, 160, 122, 120, 154, 122, 440, 157, 187, 496, 444, 9, 446, 206, 206, 208, 208, 250, 184, 170, 34, 3, 4, 7, 57, 448, 46, 3, 462, 151, 152, 63, 46, 58, 57, 55, 470, 62, 46, 62, 474, 55, 192, 9, 3, 479, 340, 55, 56, 8, 184, 58, 57, 216, 264, 62, 315, 62, 57, 57, 180, 172, 46, 172, 46, 27, 179, 180, 58, 59, 46, 55, 56, 55, 56, 197, 510, 255, 256, 55, 363, 55, 56, 57, 377, 205, 206, 362, 208, 62, 203, 250, 205, 55, 56, 131, 132, 133, 248, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 63, 57, 63, 326, 376, 314, 62, 379, 255, 256, 319, 334, 271, 334, 337, 9, 337, 287, 414, 289, 244, 57, 244, 256, 271, 432, 44, 45, 46, 47, 48, 55, 3, 4, 3, 4, 7, 32, 1, 62, 3, 4, 5, 6, 7, 8, 9, 196, 11, 12, 13, 14, 15, 58, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1, 315, 57, 4, 57, 6, 7, 63, 46, 39, 46, 12, 13, 14, 44, 45, 46, 55, 56, 55, 50, 51, 352, 3, 4, 55, 356, 28, 58, 57, 60, 61, 323, 63, 323, 27, 58, 58, 64, 1, 62, 62, 4, 30, 6, 7, 58, 34, 378, 58, 12, 13, 14, 55, 56, 357, 55, 58, 59, 396, 55, 56, 376, 32, 1, 379, 28, 4, 398, 6, 7, 401, 402, 55, 56, 12, 13, 14, 55, 56, 57, 297, 1, 299, 3, 4, 59, 6, 7, 8, 9, 28, 11, 12, 13, 14, 58, 59, 46, 47, 48, 58, 3, 55, 56, 435, 7, 58, 59, 28, 29, 57, 443, 57, 59, 3, 4, 333, 57, 7, 39, 58, 59, 339, 34, 44, 45, 46, 55, 56, 57, 50, 51, 57, 50, 51, 55, 53, 54, 55, 56, 60, 61, 473, 63, 46, 61, 62, 57, 57, 480, 64, 368, 64, 55, 56, 62, 55, 46, 32, 64, 491, 4, 5, 6, 7, 496, 55, 10, 59, 12, 13, 14, 504, 57, 391, 6, 7, 394, 57, 64, 512, 12, 13, 14, 3, 28, 3, 62, 34, 34, 1, 55, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 422, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 40, 41, 42, 43, 44, 45, 46, 47, 48, 39, 55, 55, 448, 34, 44, 45, 46, 58, 7, 58, 50, 51, 34, 58, 16, 55, 55, 55, 58, 59, 60, 61, 1, 63, 3, 4, 62, 34, 58, 8, 9, 58, 11, 59, 55, 59, 15, 57, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 64, 29, 57, 17, 4, 5, 6, 7, 58, 55, 10, 39, 12, 13, 14, 57, 44, 45, 46, 57, 57, 9, 50, 51, 58, 58, 55, 55, 28, 0, 58, 59, 60, 61, 1, 63, 3, 4, 62, 57, 57, 8, 9, 58, 11, 58, 57, 0, 15, 58, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 4, 29, 6, 7, 4, 5, 6, 7, 12, 13, 14, 39, 12, 13, 14, 58, 44, 45, 46, 3, 153, 295, 50, 51, 28, 48, 269, 55, 28, 376, 58, 59, 60, 61, 1, 63, 163, 4, 5, 6, 7, 430, 46, 368, 289, 12, 13, 14, 5, 6, 7, 55, 56, 396, 199, 12, 13, 14, 58, 113, 27, 28, 197, 30, 362, 32, 492, 494, 247, 244, 4, 1, 6, 7, 4, 5, 6, 7, 12, 13, 14, 323, 12, 13, 14, -1, -1, -1, 55, 56, 428, 58, -1, -1, 28, 62, 63, 27, 28, 1, 30, 3, 32, -1, -1, -1, 8, 9, 1, 11, -1, 4, -1, 6, 7, -1, -1, -1, -1, 12, 13, 14, -1, -1, -1, 55, 56, 29, 58, -1, -1, -1, 62, 63, -1, 28, -1, 39, -1, -1, -1, -1, 44, 45, 46, -1, -1, -1, 50, 51, -1, -1, -1, 55, -1, -1, -1, 59, 60, 61, 1, 63, 3, -1, -1, 58, 59, 8, 9, 1, 11, 3, 4, 5, 6, 7, -1, -1, 10, -1, 12, 13, 14, 1, -1, 3, -1, -1, 29, -1, 8, 9, -1, 11, -1, -1, 28, -1, 39, -1, -1, -1, -1, 44, 45, 46, -1, -1, -1, 50, 51, 29, -1, -1, 55, -1, -1, -1, 59, 60, 61, 39, 63, -1, -1, 57, 44, 45, 46, -1, -1, -1, 50, 51, -1, -1, -1, 55, -1, -1, -1, 59, 60, 61, 1, 63, 3, -1, -1, -1, -1, 8, 9, -1, 11, -1, 1, -1, -1, 4, 5, 6, 7, -1, -1, 10, -1, 12, 13, 14, -1, -1, 29, 41, 42, 43, 44, 45, 46, 47, 48, -1, 39, 28, -1, -1, -1, 44, 45, 46, -1, -1, -1, 50, 51, -1, 1, -1, 55, 4, 5, 6, 7, 60, 61, -1, 63, 12, 13, 14, -1, -1, 57, 3, -1, -1, -1, -1, 8, 9, -1, 11, 27, 28, -1, 30, -1, 32, 42, 43, 44, 45, 46, 47, 48, -1, 3, -1, -1, 29, -1, 8, 9, -1, 11, -1, -1, -1, -1, 39, -1, -1, -1, 58, 44, 45, 46, 62, 63, -1, 50, 51, 29, -1, -1, 55, -1, -1, -1, -1, 60, 61, 39, -1, 64, -1, -1, 44, 45, 46, -1, 3, -1, 50, 51, -1, 8, 9, 55, 11, -1, -1, -1, 60, 61, -1, -1, 64, -1, -1, -1, -1, -1, -1, 3, -1, -1, 29, -1, 8, 9, -1, 11, -1, -1, -1, -1, 39, -1, -1, -1, -1, 44, 45, 46, -1, -1, -1, 50, 51, 29, -1, -1, 55, -1, -1, -1, -1, 60, 61, 39, -1, 64, -1, -1, 44, 45, 46, -1, 3, -1, 50, 51, -1, 8, 9, 55, 11, -1, -1, -1, 60, 61, -1, -1, 64, -1, -1, -1, -1, 4, 5, 6, 7, -1, 29, -1, -1, 12, 13, 14, -1, -1, -1, -1, 39, -1, -1, -1, -1, 44, 45, 46, -1, 28, -1, 50, 51, -1, -1, -1, 55, -1, -1, -1, -1, 60, 61, -1, -1, 64, 3, 4, 5, 6, 7, 8, 9, -1, 11, 12, 13, 14, 15, 58, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, 44, 45, 46, -1, -1, -1, 50, 51, -1, -1, -1, 55, -1, -1, 58, -1, 60, 61, -1, 63, 3, 4, -1, -1, -1, 8, 9, -1, 11, -1, -1, -1, 15, -1, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 3, 29, -1, -1, -1, 8, 9, -1, 11, -1, -1, 39, -1, -1, -1, -1, 44, 45, 46, -1, -1, -1, 50, 51, -1, -1, 29, 55, -1, -1, 58, -1, 60, 61, -1, 63, 39, -1, -1, -1, -1, 44, 45, 46, -1, -1, -1, 50, 51, -1, -1, -1, 55, -1, -1, -1, -1, 60, 61, -1, 63, 3, 4, -1, 6, 7, 8, 9, -1, 11, 12, 13, 14, -1, 3, -1, -1, -1, -1, 8, 9, -1, 11, -1, -1, -1, 28, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, 29, -1, 44, 45, 46, -1, -1, -1, 50, 51, 39, -1, -1, 55, -1, 44, 45, 46, 60, 61, -1, 50, 51, -1, -1, -1, 55, -1, 3, 58, -1, 60, 61, 8, 9, -1, 11, -1, -1, -1, -1, 3, -1, -1, -1, -1, 8, 9, -1, 11, -1, -1, -1, -1, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, 29, -1, 44, 45, 46, -1, -1, -1, 50, 51, 39, -1, -1, 55, -1, 44, 45, 46, 60, 61, -1, 50, 51, -1, -1, -1, 55, -1, 3, -1, -1, 60, 61, 8, 9, -1, 11, -1, -1, 1, -1, 3, 4, 5, 6, 7, -1, -1, -1, -1, 12, 13, 14, -1, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, 39, 27, 28, -1, -1, 44, 45, 46, -1, -1, -1, 50, 51, -1, -1, -1, 55, -1, -1, -1, 46, 60, 61, -1, 3, 4, 5, 6, 7, 55, -1, -1, 58, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, 31, 32, 33, 28, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, -1, -1, -1, 46, -1, -1, -1, -1, -1, -1, -1, -1, 55, 56, 31, 32, 33, -1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 33, -1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/x/lib/bison.simple" /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman 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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef alloca #ifdef __GNUC__ #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) #include #else /* not sparc */ #if defined (MSDOS) && !defined (__TURBOC__) #include #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) #include #pragma alloca #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc. */ #endif /* not GNU C. */ #endif /* alloca not defined. */ /* 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. */ /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT return(0) #define YYABORT return(1) #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 #ifndef YYPURE #define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #define YYLEX yylex(&yylval, &yylloc) #else #define YYLEX yylex(&yylval) #endif #endif /* If nonreentrant, generate the variables here */ #ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ #endif int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif /* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_bcopy (from, to, count) char *from; char *to; int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_bcopy (char *from, char *to, int count) { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif #line 169 "/x/lib/bison.simple" int yyparse() { register int yystate; register int yyn; register short *yyssp; register YYSTYPE *yyvsp; int yyerrstatus; /* number of tokens to shift before error messages enabled */ int yychar1; /* lookahead token as an internal (translated) token number */ short yyssa[YYINITDEPTH]; /* the state stack */ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ short *yyss = yyssa; /* refer to the stacks thru separate pointers */ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yysp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yysp--) #endif int yystacksize = YYINITDEPTH; #ifdef YYPURE int yychar; YYSTYPE yylval; int yynerrs; #ifdef YYLSP_NEEDED YYLTYPE yylloc; #endif #endif YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ int yylen; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Starting parse\n"); #endif 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. */ yyssp = yyss - 1; yyvsp = yyvs; #ifdef YYLSP_NEEDED yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yynewstate: *++yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* 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; #ifdef YYLSP_NEEDED YYLTYPE *yyls1 = yyls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), #ifdef YYLSP_NEEDED &yyls1, size * sizeof (*yylsp), #endif &yystacksize); yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED yyls = yyls1; #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp)); #endif #endif /* no yyoverflow */ yyssp = yyss + size - 1; yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif if (yyssp >= yyss + yystacksize - 1) YYABORT; } #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Entering state %d\n", yystate); #endif 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) { #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Reading a token: "); #endif 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 */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Now at end of input.\n"); #endif } else { yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 if (yydebug) { fprintf (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 fprintf (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. */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); #endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /* Do the default action for the current state. */ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symboles being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) fprintf (stderr, "%s ", yytname[yyrhs[i]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 3: #line 307 "./c-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 5: #line 308 "./c-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 9: #line 315 "./c-parse.y" { if (pedantic) warning ("ANSI C forbids use of `asm' keyword"); if (TREE_CHAIN (yyvsp[-2].ttype)) yyvsp[-2].ttype = combine_strings (yyvsp[-2].ttype); assemble_asm (yyvsp[-2].ttype); ; break;} case 10: #line 323 "./c-parse.y" { if (pedantic) error ("ANSI C forbids data definition lacking type or storage class"); else if (!flag_traditional) warning ("data definition lacks type or storage class"); ; break;} case 11: #line 328 "./c-parse.y" {; break;} case 12: #line 330 "./c-parse.y" {; break;} case 13: #line 332 "./c-parse.y" { error ("empty declaration"); ; break;} case 14: #line 334 "./c-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} case 17: #line 338 "./c-parse.y" { if (pedantic) warning ("ANSI C does not allow extra `;' outside of a function"); ; break;} case 18: #line 344 "./c-parse.y" { if (! start_function (yyvsp[-2].ttype, yyvsp[0].ttype)) YYERROR; Gct_function_hashval = 0; /* GCT */ reinit_parse_for_function (); ; break;} case 19: #line 349 "./c-parse.y" { store_parm_decls (); gct_parse_decls(); ; break;} case 20: #line 354 "./c-parse.y" { /* debug_dump_tree(current_function_decl); */ gct_ignore_decls(); gct_transform_function(GCT_LAST(Gct_all_nodes)); finish_function (lineno); ; break;} case 21: #line 361 "./c-parse.y" { ; break;} case 22: #line 363 "./c-parse.y" { if (! start_function (yyvsp[-2].ttype, yyvsp[0].ttype)) YYERROR; Gct_function_hashval = 0; /* GCT */ reinit_parse_for_function (); ; break;} case 23: #line 368 "./c-parse.y" { store_parm_decls (); gct_parse_decls(); ; break;} case 24: #line 373 "./c-parse.y" { /* debug_dump_tree(current_function_decl); */ gct_transform_function(GCT_LAST(Gct_all_nodes)); gct_ignore_decls(); finish_function (lineno); ; break;} case 25: #line 380 "./c-parse.y" { ; break;} case 26: #line 382 "./c-parse.y" { if (! start_function (0, yyvsp[0].ttype)) YYERROR; Gct_function_hashval = 0; /* GCT */ reinit_parse_for_function (); ; break;} case 27: #line 387 "./c-parse.y" { store_parm_decls (); gct_parse_decls(); ; break;} case 28: #line 392 "./c-parse.y" { /* debug_dump_tree(current_function_decl); */ gct_transform_function(GCT_LAST(Gct_all_nodes)); gct_ignore_decls(); finish_function (lineno); ; break;} case 29: #line 399 "./c-parse.y" { ; break;} case 32: #line 408 "./c-parse.y" { yyval.code = ADDR_EXPR; ; break;} case 33: #line 410 "./c-parse.y" { yyval.code = NEGATE_EXPR; ; break;} case 34: #line 412 "./c-parse.y" { yyval.code = CONVERT_EXPR; ; break;} case 35: #line 414 "./c-parse.y" { yyval.code = PREINCREMENT_EXPR; ; break;} case 36: #line 416 "./c-parse.y" { yyval.code = PREDECREMENT_EXPR; ; break;} case 37: #line 418 "./c-parse.y" { yyval.code = BIT_NOT_EXPR; ; break;} case 38: #line 420 "./c-parse.y" { yyval.code = TRUTH_NOT_EXPR; ; break;} case 39: #line 424 "./c-parse.y" { if (GCT_COMMA == GCT_LAST(Gct_all_nodes)->prev->type) { gct_guard_comma(GCT_LAST(Gct_all_nodes)->prev); } yyval.ttype = build_compound_expr (yyvsp[0].ttype); ; break;} case 40: #line 435 "./c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 42: #line 441 "./c-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 43: #line 443 "./c-parse.y" { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); gct_build_comma_list(GCT_LAST(Gct_all_nodes)->prev->prev,yyvsp[-2].ttype); ; break;} case 45: #line 451 "./c-parse.y" { yyval.ttype = build_indirect_ref (yyvsp[0].ttype, "unary *"); gct_build_unary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_DEREFERENCE, yyval.ttype); ; break;} case 46: #line 456 "./c-parse.y" { yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); gct_build_unary_by_gcctype(GCT_LAST_MAYBE_SHIFT(Gct_all_nodes)->prev, yyvsp[-1].code, yyval.ttype); ; break;} case 47: #line 461 "./c-parse.y" { if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF && TREE_PACKED (TREE_OPERAND (yyvsp[0].ttype, 1))) error ("`sizeof' applied to a bit-field"); /* ANSI says arrays and functions are converted inside comma. But we can't really convert them in build_compound_expr because that would break commas in lvalues. So do the conversion here if operand was a comma. */ if (TREE_CODE (yyvsp[0].ttype) == COMPOUND_EXPR && (TREE_CODE (TREE_TYPE (yyvsp[0].ttype)) == ARRAY_TYPE || TREE_CODE (TREE_TYPE (yyvsp[0].ttype)) == FUNCTION_TYPE)) yyvsp[0].ttype = default_conversion (yyvsp[0].ttype); yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); gct_build_unary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_SIZEOF, yyval.ttype); ; break;} case 48: #line 477 "./c-parse.y" { yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); gct_build_of(GCT_LAST(Gct_all_nodes), GCT_SIZEOF, yyval.ttype); ; break;} case 49: #line 482 "./c-parse.y" { if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF && TREE_PACKED (TREE_OPERAND (yyvsp[0].ttype, 1))) error ("`__alignof' applied to a bit-field"); if (TREE_CODE (yyvsp[0].ttype) == INDIRECT_REF) { tree t = TREE_OPERAND (yyvsp[0].ttype, 0); tree best = t; int bestalign = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (t))); while (TREE_CODE (t) == NOP_EXPR && TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 0))) == POINTER_TYPE) { int thisalign; t = TREE_OPERAND (t, 0); thisalign = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (t))); if (thisalign > bestalign) best = t, bestalign = thisalign; } yyval.ttype = c_alignof (TREE_TYPE (TREE_TYPE (best))); } else { /* ANSI says arrays and fns are converted inside comma. But we can't convert them in build_compound_expr because that would break commas in lvalues. So do the conversion here if operand was a comma. */ if (TREE_CODE (yyvsp[0].ttype) == COMPOUND_EXPR && (TREE_CODE (TREE_TYPE (yyvsp[0].ttype)) == ARRAY_TYPE || TREE_CODE (TREE_TYPE (yyvsp[0].ttype)) == FUNCTION_TYPE)) yyvsp[0].ttype = default_conversion (yyvsp[0].ttype); yyval.ttype = c_alignof (TREE_TYPE (yyvsp[0].ttype)); } gct_build_unary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_ALIGNOF, yyval.ttype); ; break;} case 50: #line 517 "./c-parse.y" { yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); gct_build_of(GCT_LAST(Gct_all_nodes), GCT_ALIGNOF, yyval.ttype); ; break;} case 52: #line 527 "./c-parse.y" { tree type = groktypename (yyvsp[-2].ttype); yyval.ttype = build_c_cast (type, yyvsp[0].ttype); gct_build_cast(GCT_LAST_MAYBE_SHIFT(Gct_all_nodes), yyval.ttype); ; break;} case 53: #line 532 "./c-parse.y" { tree type = groktypename (yyvsp[-5].ttype); /* GCT: Don't mess with this yet. if (pedantic) warning ("ANSI C forbids constructor expressions"); */ error("GCT doesn't handle constructor expressions."); YYERROR; /*NOTREACHED*/ #if 0 yyval.ttype = digest_init (type, build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-2].ttype)), 0); if (TREE_CODE (type) == ARRAY_TYPE && TYPE_SIZE (type) == 0) { int failure = complete_array_type (type, yyval.ttype, 1); if (failure) abort (); } #endif ; break;} case 55: #line 555 "./c-parse.y" { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_binary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_PLUS, yyval.ttype); ; break;} case 56: #line 561 "./c-parse.y" { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_binary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_MINUS, yyval.ttype); ; break;} case 57: #line 567 "./c-parse.y" { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_binary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_TIMES, yyval.ttype); ; break;} case 58: #line 573 "./c-parse.y" { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_binary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_DIV, yyval.ttype); ; break;} case 59: #line 579 "./c-parse.y" { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_binary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_MOD, yyval.ttype); ; break;} case 60: #line 585 "./c-parse.y" { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_binary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_LSHIFT, yyval.ttype); ; break;} case 61: #line 591 "./c-parse.y" { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_binary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_RSHIFT, yyval.ttype); ; break;} case 62: #line 597 "./c-parse.y" { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_arithcompare(GCT_LAST(Gct_all_nodes)->prev->prev, yyval.ttype); ; break;} case 63: #line 602 "./c-parse.y" { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_eqcompare(GCT_LAST(Gct_all_nodes)->prev->prev, yyval.ttype); ; break;} case 64: #line 607 "./c-parse.y" { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_binary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_BITAND, yyval.ttype); ; break;} case 65: #line 613 "./c-parse.y" { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_binary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_BITOR, yyval.ttype); ; break;} case 66: #line 619 "./c-parse.y" { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_binary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_BITXOR, yyval.ttype); ; break;} case 67: #line 625 "./c-parse.y" { yyval.ttype = build_binary_op (TRUTH_ANDIF_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_binary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_ANDAND, yyval.ttype); ; break;} case 68: #line 631 "./c-parse.y" { yyval.ttype = build_binary_op (TRUTH_ORIF_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_binary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_OROR, yyval.ttype); ; break;} case 69: #line 637 "./c-parse.y" { yyval.ttype = build_conditional_expr (yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_quest(GCT_LAST(Gct_all_nodes)->prev->prev->prev->prev, yyval.ttype); ; break;} case 70: #line 643 "./c-parse.y" { yyval.ttype = build_modify_expr (yyvsp[-2].ttype, NOP_EXPR, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_binary(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_SIMPLE_ASSIGN, yyval.ttype); ; break;} case 71: #line 649 "./c-parse.y" { yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); /* There's a lookahead token on the tokenlist. */ gct_build_nonsimple_assign(GCT_LAST(Gct_all_nodes)->prev->prev, yyval.ttype); ; break;} case 72: #line 657 "./c-parse.y" { yyval.ttype = lastiddecl; if (!yyval.ttype || yyval.ttype == error_mark_node) { if (yychar == YYEMPTY) yychar = YYLEX; if (yychar == '(') { yyval.ttype = implicitly_declare (yyvsp[0].ttype); assemble_external (yyval.ttype); TREE_USED (yyval.ttype) = 1; } else if (current_function_decl == 0) { error ("`%s' undeclared, outside of functions", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = error_mark_node; } else { if (IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype) != error_mark_node || IDENTIFIER_ERROR_LOCUS (yyvsp[0].ttype) != current_function_decl) { error ("`%s' undeclared (first use this function)", IDENTIFIER_POINTER (yyvsp[0].ttype)); if (! undeclared_variable_notice) { error ("(Each undeclared identifier is reported only once"); error ("for each function it appears in.)"); undeclared_variable_notice = 1; } } yyval.ttype = error_mark_node; /* Prevent repeated error messages. */ IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype) = error_mark_node; IDENTIFIER_ERROR_LOCUS (yyvsp[0].ttype) = current_function_decl; } } else if (! TREE_USED (yyval.ttype)) { if (TREE_EXTERNAL (yyval.ttype)) assemble_external (yyval.ttype); TREE_USED (yyval.ttype) = 1; } if (TREE_CODE (yyval.ttype) == CONST_DECL) yyval.ttype = DECL_INITIAL (yyval.ttype); /* Note that constants are NOT replaced with their values. */ gct_build_item(GCT_LAST(Gct_all_nodes), GCT_IDENTIFIER, yyval.ttype); ; break;} case 73: #line 709 "./c-parse.y" { gct_build_item(GCT_LAST(Gct_all_nodes), GCT_CONSTANT, yyval.ttype); ; break;} case 74: #line 714 "./c-parse.y" { gct_build_item(GCT_LAST(Gct_all_nodes)->prev, GCT_CONSTANT, yyval.ttype); yyval.ttype = combine_strings (yyvsp[0].ttype); ; break;} case 75: #line 719 "./c-parse.y" { gct_flush_parens(GCT_LAST(Gct_all_nodes)->prev->prev); yyval.ttype = yyvsp[-1].ttype; ; break;} case 76: #line 724 "./c-parse.y" { yyval.ttype = error_mark_node; ; break;} case 77: #line 726 "./c-parse.y" { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); YYERROR; } keep_next_level (); yyval.ttype = expand_start_stmt_expr (); ; break;} case 78: #line 734 "./c-parse.y" { tree rtl_exp; if (pedantic) warning ("ANSI C forbids braced-groups within expressions"); rtl_exp = expand_end_stmt_expr (yyvsp[-2].ttype); yyval.ttype = yyvsp[-1].ttype; TREE_USED (yyval.ttype) = 0; /* Since the statements have side effects, consider this volatile. */ TREE_VOLATILE (yyval.ttype) = 1; TREE_TYPE (yyval.ttype) = TREE_TYPE (rtl_exp); STMT_BODY (yyval.ttype) = rtl_exp; gct_build_compound_expr(GCT_LAST(Gct_all_nodes)->prev, yyval.ttype); ; break;} case 79: #line 750 "./c-parse.y" { gct_node primary, exprlist; yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); primary = yyvsp[-1].ttype ? GCT_LAST(Gct_all_nodes)->prev->prev->prev : GCT_LAST(Gct_all_nodes)->prev->prev; exprlist = yyvsp[-1].ttype ? primary->next->next : GCT_NULL_NODE; gct_build_function_call(primary, exprlist, yyval.ttype); ; break;} case 80: #line 761 "./c-parse.y" { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); gct_build_ref(GCT_LAST(Gct_all_nodes)->prev->prev, GCT_ARRAYREF, yyval.ttype); ; break;} case 81: #line 767 "./c-parse.y" { yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); gct_build_ref(GCT_LAST(Gct_all_nodes)->prev, GCT_DOTREF, yyval.ttype); ; break;} case 82: #line 773 "./c-parse.y" { yyval.ttype = build_component_ref (build_indirect_ref (yyvsp[-2].ttype, "->"), yyvsp[0].ttype); gct_build_ref(GCT_LAST(Gct_all_nodes)->prev, GCT_ARROWREF, yyval.ttype); ; break;} case 83: #line 779 "./c-parse.y" { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); gct_build_post(GCT_LAST(Gct_all_nodes), GCT_POSTINCREMENT, yyval.ttype); ; break;} case 84: #line 785 "./c-parse.y" { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); gct_build_post(GCT_LAST(Gct_all_nodes), GCT_POSTDECREMENT, yyval.ttype); ; break;} case 86: #line 796 "./c-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); /* Concatenate the strings. Done here, instead of in expr action, so that I don't have to worry about shift-reduce conflicts - whether the last element on the node list is really a string. */ gct_combine_strings(GCT_LAST(Gct_all_nodes)); ; break;} case 94: #line 828 "./c-parse.y" { yyval.itype = suspend_momentary (); declspec_stack = tree_cons (0, current_declspecs, declspec_stack); current_declspecs = yyvsp[0].ttype; ; break;} case 95: #line 836 "./c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary (yyvsp[-2].itype); if (NULL == current_function_decl) { fatal("Decl production outside function."); } gct_build_decl(GCT_LAST(Gct_all_nodes)); ; break;} case 96: #line 846 "./c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary (yyvsp[-2].itype); if (NULL == current_function_decl) { fatal("Decl production outside function."); } gct_build_decl(GCT_LAST(Gct_all_nodes)); ; break;} case 97: #line 856 "./c-parse.y" { shadow_tag (yyvsp[-1].ttype); if (NULL == current_function_decl) { fatal("Decl production outside function."); } gct_build_decl(GCT_LAST(Gct_all_nodes)); ; break;} case 98: #line 864 "./c-parse.y" { warning ("empty declaration"); if (NULL == current_function_decl) { fatal("Decl production outside function."); } gct_build_decl(GCT_LAST(Gct_all_nodes)); ; break;} case 99: #line 879 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 100: #line 881 "./c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 101: #line 885 "./c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 102: #line 887 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 103: #line 889 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 104: #line 898 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 105: #line 900 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 106: #line 902 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 107: #line 904 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 108: #line 914 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 109: #line 916 "./c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 110: #line 920 "./c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 111: #line 922 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 115: #line 933 "./c-parse.y" { yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); if (pedantic) warning ("ANSI C forbids `typeof'"); ; break;} case 116: #line 937 "./c-parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); if (pedantic) warning ("ANSI C forbids `typeof'"); ; break;} case 124: #line 961 "./c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 125: #line 963 "./c-parse.y" { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); yyval.ttype = yyvsp[-1].ttype; if (pedantic) warning ("ANSI C forbids use of `asm' keyword"); ; break;} case 126: #line 972 "./c-parse.y" { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1); ; break;} case 127: #line 975 "./c-parse.y" { finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} case 128: #line 977 "./c-parse.y" { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0); finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ; break;} case 129: #line 983 "./c-parse.y" { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1); ; break;} case 130: #line 986 "./c-parse.y" { finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} case 131: #line 988 "./c-parse.y" { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0); finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ; break;} case 132: #line 995 "./c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 133: #line 997 "./c-parse.y" { yyval.ttype = yyvsp[-2].ttype; ; break;} case 136: #line 1007 "./c-parse.y" { warning ("`%s' attribute directive ignored", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = yyvsp[0].ttype; ; break;} case 137: #line 1011 "./c-parse.y" { /* if not "aligned(1)", then issue warning */ if (strcmp (IDENTIFIER_POINTER (yyvsp[-3].ttype), "aligned") != 0 || TREE_CODE (yyvsp[-1].ttype) != INTEGER_CST || TREE_INT_CST_LOW (yyvsp[-1].ttype) != 1) warning ("`%s' attribute directive ignored", IDENTIFIER_POINTER (yyvsp[-3].ttype)); yyval.ttype = yyvsp[-3].ttype; ; break;} case 138: #line 1019 "./c-parse.y" { warning ("`%s' attribute directive ignored", IDENTIFIER_POINTER (yyvsp[-3].ttype)); yyval.ttype = yyvsp[-3].ttype; ; break;} case 140: #line 1027 "./c-parse.y" { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, NULL_TREE); if (pedantic) warning ("ANSI C forbids empty initializer braces"); ; break;} case 141: #line 1031 "./c-parse.y" { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-1].ttype)); ; break;} case 142: #line 1033 "./c-parse.y" { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-2].ttype)); ; break;} case 143: #line 1035 "./c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 144: #line 1042 "./c-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 145: #line 1044 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-2].ttype); ; break;} case 148: #line 1059 "./c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 149: #line 1061 "./c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 150: #line 1066 "./c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 151: #line 1068 "./c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 152: #line 1070 "./c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 154: #line 1081 "./c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 155: #line 1086 "./c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 156: #line 1088 "./c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 157: #line 1090 "./c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 159: #line 1099 "./c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 160: #line 1104 "./c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 161: #line 1106 "./c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 162: #line 1108 "./c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 163: #line 1110 "./c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 164: #line 1112 "./c-parse.y" { /* GCT */ GCT_LAST(Gct_all_nodes)->type = GCT_IDENTIFIER; ; break;} case 165: #line 1119 "./c-parse.y" { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); /* Start scope of tag before parsing components. */ ; break;} case 166: #line 1123 "./c-parse.y" { yyval.ttype = finish_struct (yyvsp[-2].ttype, yyvsp[-1].ttype); /* Really define the structure. */ ; break;} case 167: #line 1134 "./c-parse.y" { gct_node dummy = gct_tempnode("_GCT_DUMMY_"); gct_add_before(&Gct_all_nodes, GCT_LAST(Gct_all_nodes), dummy); yyval.ttype = start_struct (RECORD_TYPE, get_identifier(dummy->text)); /* Start scope of tag before parsing components. */ ; break;} case 168: #line 1142 "./c-parse.y" { yyval.ttype = finish_struct (yyvsp[-2].ttype, yyvsp[-1].ttype); /* Really define the structure. */ ; break;} case 169: #line 1146 "./c-parse.y" { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; break;} case 170: #line 1148 "./c-parse.y" { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; break;} case 171: #line 1150 "./c-parse.y" { yyval.ttype = finish_struct (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 172: #line 1158 "./c-parse.y" { gct_node dummy = gct_tempnode("_GCT_DUMMY_"); gct_add_before(&Gct_all_nodes, GCT_LAST(Gct_all_nodes), dummy); yyval.ttype = start_struct (UNION_TYPE, get_identifier(dummy->text)); /* Start scope of tag before parsing components. */ ; break;} case 173: #line 1166 "./c-parse.y" { yyval.ttype = finish_struct (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 174: #line 1168 "./c-parse.y" { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; break;} case 175: #line 1170 "./c-parse.y" { yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} case 176: #line 1173 "./c-parse.y" { yyval.ttype = finish_enum (yyvsp[-3].ttype, nreverse (yyvsp[-2].ttype)); resume_momentary (yyvsp[-4].itype); ; break;} case 177: #line 1185 "./c-parse.y" { gct_node dummy = gct_tempnode("_GCT_DUMMY_"); yyvsp[0].itype = suspend_momentary (); gct_add_before(&Gct_all_nodes, GCT_LAST(Gct_all_nodes), dummy); yyval.ttype = start_enum (get_identifier(dummy->text)); ; break;} case 178: #line 1194 "./c-parse.y" { yyval.ttype = finish_enum (yyvsp[-3].ttype, nreverse (yyvsp[-2].ttype)); resume_momentary (yyvsp[-4].itype); ; break;} case 179: #line 1197 "./c-parse.y" { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); ; break;} case 183: #line 1208 "./c-parse.y" { if (pedantic) warning ("comma at end of enumerator list"); ; break;} case 184: #line 1212 "./c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 185: #line 1214 "./c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 186: #line 1216 "./c-parse.y" { if (pedantic) warning ("extra semicolon in struct or union specified"); ; break;} case 187: #line 1231 "./c-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary (yyvsp[-1].itype); ; break;} case 188: #line 1236 "./c-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary (yyvsp[-1].itype); ; break;} case 189: #line 1241 "./c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 190: #line 1246 "./c-parse.y" { if (pedantic) warning ("ANSI C forbids member declarations with no members"); yyval.ttype = NULL_TREE; ; break;} case 192: #line 1251 "./c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 193: #line 1256 "./c-parse.y" { yyval.ttype = grokfield (input_filename, lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); ; break;} case 194: #line 1258 "./c-parse.y" { yyval.ttype = grokfield (input_filename, lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); ; break;} case 195: #line 1260 "./c-parse.y" { yyval.ttype = grokfield (input_filename, lineno, NULL_TREE, current_declspecs, yyvsp[0].ttype); ; break;} case 197: #line 1271 "./c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-2].ttype); ; break;} case 198: #line 1277 "./c-parse.y" { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; break;} case 199: #line 1279 "./c-parse.y" { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 200: #line 1284 "./c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 201: #line 1286 "./c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 202: #line 1291 "./c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 204: #line 1297 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 205: #line 1299 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 206: #line 1304 "./c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 207: #line 1306 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 208: #line 1311 "./c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 209: #line 1314 "./c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 210: #line 1316 "./c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} case 211: #line 1318 "./c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 212: #line 1320 "./c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 213: #line 1322 "./c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 214: #line 1324 "./c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 215: #line 1326 "./c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} case 216: #line 1328 "./c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); ; break;} case 223: #line 1351 "./c-parse.y" { pushlevel (0); clear_last_expr (); push_momentary (); expand_start_bindings (0); ; break;} case 224: #line 1361 "./c-parse.y" {; break;} case 226: #line 1366 "./c-parse.y" { yyval.ttype = 0; gct_build_compound_stmt(GCT_LAST(Gct_all_nodes)); ; break;} case 227: #line 1371 "./c-parse.y" { expand_end_bindings (getdecls (), 1, 0); /* print_lexical_environment(Gct_textout); */ yyval.ttype = poplevel (1, 1, 0); gct_build_compound_stmt(GCT_LAST(Gct_all_nodes)); pop_momentary (); ; break;} case 228: #line 1378 "./c-parse.y" { expand_end_bindings (getdecls (), kept_level_p (), 0); yyval.ttype = poplevel (kept_level_p (), 0, 0); gct_build_compound_stmt(GCT_LAST(Gct_all_nodes)); pop_momentary (); ; break;} case 229: #line 1383 "./c-parse.y" { expand_end_bindings (getdecls (), kept_level_p (), 0); /* GCT: We keep all levels of compound statements. $$ = poplevel (kept_level_p (), 0, 0); */ yyval.ttype = poplevel (1, 0, 0); gct_build_compound_stmt(GCT_LAST(Gct_all_nodes)); pop_momentary (); ; break;} case 230: #line 1396 "./c-parse.y" { emit_line_note (input_filename, lineno); expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), 0); ; break;} case 232: #line 1402 "./c-parse.y" {; break;} case 233: #line 1404 "./c-parse.y" { emit_line_note (input_filename, lineno); /* Do default conversion if safe and possibly important, in case within ({...}). */ if ((TREE_CODE (TREE_TYPE (yyvsp[-1].ttype)) == ARRAY_TYPE && lvalue_p (yyvsp[-1].ttype)) || TREE_CODE (TREE_TYPE (yyvsp[-1].ttype)) == FUNCTION_TYPE) yyvsp[-1].ttype = default_conversion (yyvsp[-1].ttype); expand_expr_stmt (yyvsp[-1].ttype); gct_build_simple_stmt(GCT_LAST(Gct_all_nodes)); clear_momentary (); ; break;} case 234: #line 1416 "./c-parse.y" { expand_start_else (); ; break;} case 235: #line 1419 "./c-parse.y" { expand_end_else (); gct_build_if_else(GCT_LAST(Gct_all_nodes)); ; break;} case 236: #line 1424 "./c-parse.y" { expand_end_cond (); gct_build_simple_if(GCT_LAST(Gct_all_nodes)->prev); ; break;} case 237: #line 1428 "./c-parse.y" { emit_nop (); emit_line_note (input_filename, lineno); expand_start_loop (1); ; break;} case 238: #line 1432 "./c-parse.y" { emit_line_note (input_filename, lineno); expand_exit_loop_if_false (truthvalue_conversion (yyvsp[-1].ttype)); ; break;} case 239: #line 1435 "./c-parse.y" { expand_end_loop (); gct_build_while_stmt(GCT_LAST(Gct_all_nodes)); ; break;} case 240: #line 1439 "./c-parse.y" { emit_nop (); emit_line_note (input_filename, lineno); expand_start_loop_continue_elsewhere (1); ; break;} case 241: #line 1443 "./c-parse.y" { expand_loop_continue_here (); ; break;} case 242: #line 1445 "./c-parse.y" { emit_line_note (input_filename, lineno); expand_exit_loop_if_false (truthvalue_conversion (yyvsp[-2].ttype)); expand_end_loop (); clear_momentary (); gct_build_do_stmt(GCT_LAST(Gct_all_nodes)); ; break;} case 243: #line 1453 "./c-parse.y" { emit_nop (); emit_line_note (input_filename, lineno); if (yyvsp[-1].ttype) expand_expr_stmt (yyvsp[-1].ttype); expand_start_loop_continue_elsewhere (1); ; break;} case 244: #line 1458 "./c-parse.y" { emit_line_note (input_filename, lineno); if (yyvsp[-1].ttype) expand_exit_loop_if_false (truthvalue_conversion (yyvsp[-1].ttype)); ; break;} case 245: #line 1464 "./c-parse.y" { push_momentary (); yyvsp[0].itype = lineno; ; break;} case 246: #line 1467 "./c-parse.y" { emit_line_note (input_filename, yyvsp[-2].itype); expand_loop_continue_here (); if (yyvsp[-3].ttype) expand_expr_stmt (yyvsp[-3].ttype); pop_momentary (); expand_end_loop (); gct_build_for_stmt(GCT_LAST(Gct_all_nodes)); ; break;} case 247: #line 1476 "./c-parse.y" { emit_line_note (input_filename, lineno); c_expand_start_case (yyvsp[-1].ttype); /* Don't let the tree nodes for $3 be discarded by clear_momentary during the parsing of the next stmt. */ push_momentary (); ; break;} case 248: #line 1482 "./c-parse.y" { expand_end_case (yyvsp[-3].ttype); pop_momentary (); gct_build_switch(GCT_LAST(Gct_all_nodes)); ; break;} case 249: #line 1487 "./c-parse.y" { register tree value = fold (yyvsp[-1].ttype); register tree label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); /* build_c_cast puts on a NOP_EXPR to make a non-lvalue. Strip such NOP_EXPRs. */ if (TREE_CODE (value) == NOP_EXPR && TREE_TYPE (value) == TREE_TYPE (TREE_OPERAND (value, 0))) value = TREE_OPERAND (value, 0); if (TREE_CODE (value) != INTEGER_CST && value != error_mark_node) { error ("case label does not reduce to an integer constant"); value = error_mark_node; } else /* Promote char or short to int. */ value = default_conversion (value); if (value != error_mark_node) { int success = pushcase (value, label); if (success == 1) error ("case label not within a switch statement"); else if (success == 2) error ("duplicate case value"); else if (success == 3) warning ("case value out of range"); } ; break;} case 250: #line 1518 "./c-parse.y" { gct_build_case(GCT_LAST(Gct_all_nodes)); ; break;} case 251: #line 1523 "./c-parse.y" { register tree label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); int success = pushcase (NULL_TREE, label); if (success == 1) error ("default label not within a switch statement"); else if (success == 2) error ("multiple default labels in one switch"); ; break;} case 252: #line 1533 "./c-parse.y" { gct_build_default(GCT_LAST(Gct_all_nodes)); ; break;} case 253: #line 1538 "./c-parse.y" { emit_line_note (input_filename, lineno); if ( ! expand_exit_something ()) error ("break statement not within loop or switch"); gct_build_break(GCT_LAST(Gct_all_nodes)); ; break;} case 254: #line 1544 "./c-parse.y" { emit_line_note (input_filename, lineno); if (! expand_continue_loop ()) error ("continue statement not within a loop"); gct_build_continue(GCT_LAST(Gct_all_nodes)); ; break;} case 255: #line 1551 "./c-parse.y" { emit_line_note (input_filename, lineno); c_expand_return (NULL_TREE); gct_build_return(GCT_LAST(Gct_all_nodes)); ; break;} case 256: #line 1556 "./c-parse.y" { emit_line_note (input_filename, lineno); c_expand_return (yyvsp[-1].ttype); gct_build_return(GCT_LAST(Gct_all_nodes)); ; break;} case 257: #line 1561 "./c-parse.y" { if (TREE_CHAIN (yyvsp[-2].ttype)) yyvsp[-2].ttype = combine_strings (yyvsp[-2].ttype); emit_line_note (input_filename, lineno); expand_asm (yyvsp[-2].ttype); gct_build_asm(GCT_LAST(Gct_all_nodes)); ; break;} case 258: #line 1568 "./c-parse.y" { if (TREE_CHAIN (yyvsp[-4].ttype)) yyvsp[-4].ttype = combine_strings (yyvsp[-4].ttype); emit_line_note (input_filename, lineno); c_expand_asm_operands (yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE, yyvsp[-6].ttype == ridpointers[(int)RID_VOLATILE], input_filename, lineno); gct_build_asm(GCT_LAST(Gct_all_nodes)); ; break;} case 259: #line 1577 "./c-parse.y" { if (TREE_CHAIN (yyvsp[-6].ttype)) yyvsp[-6].ttype = combine_strings (yyvsp[-6].ttype); emit_line_note (input_filename, lineno); c_expand_asm_operands (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, yyvsp[-8].ttype == ridpointers[(int)RID_VOLATILE], input_filename, lineno); gct_build_asm(GCT_LAST(Gct_all_nodes)); ; break;} case 260: #line 1587 "./c-parse.y" { if (TREE_CHAIN (yyvsp[-8].ttype)) yyvsp[-8].ttype = combine_strings (yyvsp[-8].ttype); emit_line_note (input_filename, lineno); c_expand_asm_operands (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[-10].ttype == ridpointers[(int)RID_VOLATILE], input_filename, lineno); gct_build_asm(GCT_LAST(Gct_all_nodes)); ; break;} case 261: #line 1595 "./c-parse.y" { tree decl; emit_line_note (input_filename, lineno); decl = lookup_label (yyvsp[-1].ttype); TREE_USED (decl) = 1; expand_goto (decl); gct_build_goto(GCT_LAST(Gct_all_nodes)); ; break;} case 262: #line 1603 "./c-parse.y" { tree label = define_label (input_filename, lineno, yyvsp[-1].ttype); emit_nop (); if (label) expand_label (label); ; break;} case 263: #line 1609 "./c-parse.y" { gct_build_label(GCT_LAST(Gct_all_nodes)); ; break;} case 264: #line 1614 "./c-parse.y" { gct_build_null_stmt(GCT_LAST(Gct_all_nodes)); ; break;} case 265: #line 1623 "./c-parse.y" { if (pedantic) warning ("ANSI C forbids use of `asm' keyword"); emit_line_note (input_filename, lineno); ; break;} case 266: #line 1627 "./c-parse.y" { if (pedantic) warning ("ANSI C forbids use of `asm' keyword"); emit_line_note (input_filename, lineno); ; break;} case 267: #line 1634 "./c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 269: #line 1641 "./c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 272: #line 1648 "./c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 273: #line 1653 "./c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 274: #line 1658 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ; break;} case 275: #line 1660 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ; break;} case 276: #line 1666 "./c-parse.y" { pushlevel (0); declare_parm_level (); ; break;} case 277: #line 1669 "./c-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 278: #line 1677 "./c-parse.y" { pushlevel (0); declare_parm_level (); ; break;} case 279: #line 1680 "./c-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 281: #line 1688 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, yyvsp[-1].ttype); ; break;} case 282: #line 1690 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; break;} case 284: #line 1696 "./c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; break;} case 285: #line 1702 "./c-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 286: #line 1708 "./c-parse.y" { yyval.ttype = get_parm_info (0); if (pedantic) warning ("ANSI C requires a named argument before `...'"); ; break;} case 287: #line 1714 "./c-parse.y" { yyval.ttype = get_parm_info (1); ; break;} case 288: #line 1716 "./c-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 289: #line 1721 "./c-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 290: #line 1723 "./c-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 291: #line 1730 "./c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype) ; ; break;} case 292: #line 1732 "./c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype) ; ; break;} case 293: #line 1734 "./c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 294: #line 1736 "./c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype) ; ; break;} case 295: #line 1738 "./c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 296: #line 1744 "./c-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 297: #line 1746 "./c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} } /* the action file gets copied in in place of this dollarsign */ #line 440 "/x/lib/bison.simple" yyvsp -= yylen; yyssp -= yylen; #ifdef YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yyvsp = yyval; #ifdef YYLSP_NEEDED yylsp++; if (yylen == 0) { yylsp->first_line = yylloc.first_line; yylsp->first_column = yylloc.first_column; yylsp->last_line = (yylsp-1)->last_line; yylsp->last_column = (yylsp-1)->last_column; yylsp->text = 0; } else { yylsp->last_line = (yylsp+yylen-1)->last_line; yylsp->last_column = (yylsp+yylen-1)->last_column; } #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 */ if (! yyerrstatus) /* If not already recovering from an error, report this error. */ { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { int size = 0; char *msg; int x, count; count = 0; for (x = 0; x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) size += strlen(yytname[x]) + 15, count++; msg = (char *) xmalloc(size + 15); strcpy(msg, "parse error"); if (count < 5) { count = 0; for (x = 0; x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) { strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yytname[x]); strcat(msg, "'"); count++; } } yyerror(msg); free(msg); } else #endif /* YYERROR_VERBOSE */ yyerror("parse error"); } yyerrlab1: /* here on error raised explicitly by an action */ 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; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); #endif 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. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yyn) goto yydefault; #endif yyerrpop: /* pop the current state because it cannot handle the error token */ if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #ifdef YYLSP_NEEDED yylsp--; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif 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; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting error token, "); #endif *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; } #line 1748 "./c-parse.y" /* Return something to represent absolute declarators containing a *. TARGET is the absolute declarator that the * contains. TYPE_QUALS is a list of modifiers such as const or volatile to apply to the pointer type, represented as identifiers. We return an INDIRECT_REF whose "contents" are TARGET and whose type is the modifier list. */ static tree make_pointer_declarator (type_quals, target) tree type_quals, target; { return build (INDIRECT_REF, type_quals, target); } /* Given a chain of STRING_CST nodes, concatenate them into one STRING_CST and give it a suitable array-of-chars data type. */ static tree combine_strings (strings) tree strings; { register tree value, t; register int length = 1; int wide_length = 0; int wide_flag = 0; if (TREE_CHAIN (strings)) { /* More than one in the chain, so concatenate. */ register char *p, *q; /* Don't include the \0 at the end of each substring, except for the last one. Count wide strings and ordinary strings separately. */ for (t = strings; t; t = TREE_CHAIN (t)) { if (TREE_TYPE (t) == int_array_type_node) { wide_length += (TREE_STRING_LENGTH (t) - 1); wide_flag = 1; } else length += (TREE_STRING_LENGTH (t) - 1); } /* If anything is wide, the non-wides will be converted, which makes them take more space. */ if (wide_flag) length = length * UNITS_PER_WORD + wide_length; p = (char *) savealloc (length); /* Copy the individual strings into the new combined string. If the combined string is wide, convert the chars to ints for any individual strings that are not wide. */ q = p; for (t = strings; t; t = TREE_CHAIN (t)) { int len = TREE_STRING_LENGTH (t) - 1; if ((TREE_TYPE (t) == int_array_type_node) == wide_flag) { bcopy (TREE_STRING_POINTER (t), q, len); q += len; } else { int i; for (i = 0; i < len; i++) ((int *) q)[i] = TREE_STRING_POINTER (t)[i]; q += len * UNITS_PER_WORD; } } *q = 0; value = make_node (STRING_CST); TREE_STRING_POINTER (value) = p; TREE_STRING_LENGTH (value) = length; TREE_LITERAL (value) = 1; } else { value = strings; length = TREE_STRING_LENGTH (value); if (TREE_TYPE (value) == int_array_type_node) wide_flag = 1; } /* Create the array type for the string constant. -Wwrite-strings says make the string constant an array of const char so that copying it to a non-const pointer will get a warning. */ if (warn_write_strings) { tree elements = build_type_variant (wide_flag ? integer_type_node : char_type_node, 1, 0); TREE_TYPE (value) = build_array_type (elements, build_index_type (build_int_2 (length - 1, 0))); } else TREE_TYPE (value) = build_array_type (wide_flag ? integer_type_node : char_type_node, build_index_type (build_int_2 (length - 1, 0))); TREE_LITERAL (value) = 1; TREE_STATIC (value) = 1; return value; } int lineno; /* current line number in file being read */ FILE *finput; /* input file. Normally a pipe from the preprocessor. */ /* GCT: We wish to count character position on line as well as lineno. */ /* * Charno is the number of the character in the current file. (This will * be convenient if we ever use emacs to mark characters. It will be * inconvenient if line-oriented tools are used. Take your pick.) */ int charno = 0; int Gct_initialized = 0; /* The name of the temporary file we put rewritten output into. */ char *Gct_tempname = "GCT-TEMP"; /* Normally overwritten, except when debugging. */ /* check_newline calls yylex to pull in tokens. Such calls shouldn't add to the parse tree. Neither should the initial call to check_newline made in toplev.c. */ int Gct_ignore_tokens = 0; #define gct_getc(filep) (charno++, getc(filep)) #define gct_ungetc(c, filep) (charno--, ungetc((c), (filep))) /* Note: because getc is a macro, can't use #define getc gct_getc hack to rename uses of getc below. Have to do it by hand. */ /* Functions for use outside this file */ int gct_fgetc(filep) FILE *filep; { return gct_getc(filep); } int gct_fungetc(c, filep) int c; FILE *filep; { return gct_ungetc(c, filep); } /* * Initialize GCT. The Gct_textout file is passed in as -o argument. * * The instrumented file contains a header that * - marks it as instrumented * - includes gct-ps-defs.h and gct-defs.h * - declares the local pointers into Gct_table and Gct_group_table * * This routine requires that main_input_filename be known. That means * it can't be called until the source file has been opened and the * filename discovered. * * This function also calls other initialization routines for other * modules. See file STATE for more about what initialization is needed * and why. */ gct_init() { extern char *Gct_full_defs_file; extern char *Gct_full_per_session_file; extern char *Gct_full_map_file_name; assert(!Gct_initialized); Gct_initialized = 1; init_instrumentation(); /* Retrieve per-session instrumentation */ gct_initialize_groups(); /* Set up utility tables, vars. */ init_mapfile(Gct_full_map_file_name); fprintf(Gct_textout, "/* __GCT_INSTRUMENTATION_TAG */\n"); fprintf(Gct_textout, "#define GCT_TABLE_POINTER_FOR_THIS_FILE Gct_per_file_table_pointer_%d\n", Gct_num_files); fprintf(Gct_textout, "#define GCT_RACE_TABLE_POINTER_FOR_THIS_FILE Gct_per_file_race_table_pointer_%d\n", Gct_num_files); fprintf(Gct_textout, "#include \"%s\"\n", Gct_full_per_session_file); fprintf(Gct_textout, "#include \"%s\"\n", Gct_full_defs_file); fprintf(Gct_textout, "extern GCT_CONDITION_TYPE *Gct_per_file_table_pointer_%d;\n", Gct_num_files); fprintf(Gct_textout, "extern long *Gct_per_file_race_table_pointer_%d;\n", Gct_num_files); fprintf(Gct_textout, "#line 1\n"); } /* * Finish processing of the instrumented file. This depends on the style * of instrumentation: * * In the new style of instrumentation (where GCT calls the compiler), * this routine does nothing. The driver program (gcc) is responsible * for the next step. * * In the old style of instrumentation, the temporary file must be placed * in the source file's directory. Normally, it replaces the original * source. If OPT_REPLACE is turned off, the instrumented file has the * name of the original file, prefixed with 'T'. * * There's more to finishing a GCT invocation than just mucking with the * instrumented file. Handling of the instrumentation state is done by * finish_instrumentation(). See file STATE for more. */ gct_finish() { extern int errorcount; if (Gct_initialized) { Gct_initialized = 0; gct_write_list(Gct_all_nodes); /* GCT */ gct_recursive_free_node(Gct_all_nodes); fputc('\n', Gct_textout); fflush(Gct_textout); /* About to copy contents - make sure all in file */ /* Probably should close the file, but I'm letting original GCC code do it. */ finish_instrumentation(); if (OFF == gct_option_value(OPT_PRODUCE_OBJECT)) { /* * Replace the original source with the temp file. If * OPT_PRODUCE_OBJECT, the compiler driver will immediately * compile the temp file and the source file is untouched. */ char *system_buffer; /* Sloppy size calculation. */ system_buffer = (char *)xmalloc(1000+strlen(Gct_tempname)+2*strlen(main_input_filename)); if (errorcount > 0) { /* Would rather use a "note" function, but there isn't one. Using warning would be misleading. */ error("The original file is unchanged."); } else if (OFF == gct_option_value(OPT_REPLACE)) { /* Of course, on SysV, this will run into filename limits. But this is not for general user's use. */ sprintf(system_buffer, "cp %s T%s", Gct_tempname, main_input_filename); if (0 != system(system_buffer)) { error("Couldn't create 'T' file."); fatal("Failed: %s\n", system_buffer); } } else { extern char *Gct_full_restore_log_file; char *main_directory; char *main_file; char *full_backup; /* Full name of backup directory. */ struct stat backup_statbuf; /* Stat of backup directory */ struct stat orig_statbuf; /* Stat of original file. */ /* Find current modes of file. */ if (-1==stat(main_input_filename, &orig_statbuf)) { fatal ("Can't find current modes for %s.", main_input_filename); } split_file(main_input_filename, &main_directory, &main_file); full_backup = (char *)xmalloc(strlen(main_directory)+1+strlen(GCT_BACKUP_DIR)+1); sprintf(full_backup, "%s/%s", main_directory, GCT_BACKUP_DIR); /* Make the backup directory if needed. */ if (-1==stat(full_backup, &backup_statbuf)) { if (-1==mkdir (full_backup,00777)) fatal ("Can't create backup directory %s.", full_backup); } /* Backup the file. */ sprintf (system_buffer,"/bin/rm -f %s/%s \n", full_backup, main_file); /* printf (system_buffer); */ if (0!=system (system_buffer)) fatal ("Already an unremovable backup file for %s", main_input_filename); sprintf (system_buffer,"/bin/mv %s %s \n", main_input_filename, full_backup); if (0!=system (system_buffer)) fatal ("Can't backup source file %s", main_input_filename); /* * Make the replaced file. Note: I don't know what's portable for * the mode bits, so I'll only preserve the bottom part, which * has been other-group-owner rwx since time immemorial. * * Copy is used so that the .c file is newer than the .o file. * I might delete the backup copy now, but in case something * goes wrong, having a copy of the original file in the backup * directory might save the day. */ sprintf(system_buffer, "echo \"cd `pwd`;\" 'cp %s/%s %s/%s; chmod %o %s/%s' >> %s\n", full_backup, main_file, main_directory, main_file, orig_statbuf.st_mode & 0777, main_directory, main_file, Gct_full_restore_log_file); /* printf(system_buffer); */ if (0!=system (system_buffer)) fatal ("Can't update %s", Gct_full_restore_log_file); /* Replace the file. */ sprintf(system_buffer, "cp %s %s", Gct_tempname, main_input_filename); if (0 != system(system_buffer)) { error("Couldn't replace original source with instrumented source."); fatal("Failed: %s\n", system_buffer); } free(main_directory); free(main_file); } free(system_buffer); } } } /* End GCT */ /* lexical analyzer */ static int maxtoken; /* Current nominal length of token buffer. */ static char *token_buffer; /* Pointer to token buffer. Actual allocated length is maxtoken + 2. */ static int max_wide; /* Current nominal length of wide_buffer. */ static int *wide_buffer; /* Pointer to wide-string buffer. Actual allocated length is max_wide + 1. */ /* Nonzero if end-of-file has been seen on input. */ static int end_of_file; /* Data type that represents the GNU C reserved words. */ struct resword { char *name; short token; enum rid rid; }; #define MIN_WORD_LENGTH 2 /* minimum size for C keyword */ #define MAX_WORD_LENGTH 13 /* maximum size for C keyword */ #define MIN_HASH_VALUE 7 /* range of the hash keys values */ #define MAX_HASH_VALUE 91 /* for the perfect hash generator */ #define NORID RID_UNUSED /* This function performs the minimum-perfect hash mapping from input string to reswords table index. It only looks at the first and last characters in the string, thus assuring the O(1) lookup time (this keeps our constant down to an insignificant amount!). Compiling the following 2 functions as inline removes all overhead of the function calls. */ #ifdef __GNUC__ __inline #endif static int hash (str, len) register char *str; register int len; { /* This table is used to build the hash table index that recognizes reserved words in 0(1) steps. It is larger than strictly necessary, but I'm trading off the space for the time-saving luxury of avoiding subtraction of an offset. All those ``91's'' (actually just a short-hand for MAX_HASH_VALUE #defined above) are used to speed up the search when the string found on the input stream doesn't have a first or last character that is part of the set of alphabetic characters that comprise the first or last characters in C reserved words. */ static int hash_table[] = { 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 1, 91, 2, 1, 32, 7, 5, 18, 20, 1, 17, 91, 1, 18, 1, 28, 1, 23, 91, 12, 20, 1, 41, 7, 15, 91, 91, 10, 91, 91, 91, 91, 91, }; register int hval = len ; switch (hval) { default: case 3: hval += hash_table[str[2]]; case 2: case 1: return hval + hash_table[str[0]] + hash_table[str[len - 1]]; } } /* This routine attempts to match the string found in the reswords table with the one from the input stream. If all the relevant details match then an actual strcmp comparison is performed and the address of correct struct resword entry is returned. Otherwise, a NULL pointer is returned. */ #ifdef __GNUC__ __inline #endif struct resword * is_reserved_word (str, len) register char *str; register int len; { /* This is the hash table of keywords. The order of keywords has been chosen for perfect hashing. Therefore, this table cannot be updated by hand. Use the program ``gperf,'' available with the latest libg++ distribution, to generate an updated table. A file called c-parse.gperf, distributed with GNU C, contains the keyword file. */ static struct resword reswords[] = { { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, {"asm", ASM, NORID }, {"auto", SCSPEC, RID_AUTO }, {"__asm", ASM, NORID }, {"do", DO, NORID }, {"__asm__", ASM, NORID }, {"break", BREAK, NORID }, {"__typeof__", TYPEOF, NORID }, { "", }, {"__alignof__", ALIGNOF, NORID }, { "", }, {"__attribute__", ATTRIBUTE, NORID }, { "", }, {"__attribute", ATTRIBUTE, NORID }, { "", }, {"__volatile__", TYPE_QUAL, RID_VOLATILE }, {"int", TYPESPEC, RID_INT }, {"__volatile", TYPE_QUAL, RID_VOLATILE }, { "", }, {"float", TYPESPEC, RID_FLOAT }, {"goto", GOTO, NORID }, {"short", TYPESPEC, RID_SHORT }, {"__typeof", TYPEOF, NORID }, {"__inline__", SCSPEC, RID_INLINE }, {"__alignof", ALIGNOF, NORID }, {"__inline", SCSPEC, RID_INLINE }, {"__signed__", TYPESPEC, RID_SIGNED }, {"default", DEFAULT, NORID }, {"else", ELSE, NORID }, {"void", TYPESPEC, RID_VOID }, {"__signed", TYPESPEC, RID_SIGNED }, {"if", IF, NORID }, {"volatile", TYPE_QUAL, RID_VOLATILE }, {"struct", STRUCT, NORID }, {"extern", SCSPEC, RID_EXTERN }, {"__const", TYPE_QUAL, RID_CONST }, {"while", WHILE, NORID }, {"__const__", TYPE_QUAL, RID_CONST }, {"switch", SWITCH, NORID }, {"for", FOR, NORID }, {"inline", SCSPEC, RID_INLINE }, {"return", RETURN, NORID }, {"typeof", TYPEOF, NORID }, {"typedef", SCSPEC, RID_TYPEDEF }, {"char", TYPESPEC, RID_CHAR }, {"enum", ENUM, NORID }, {"register", SCSPEC, RID_REGISTER }, {"signed", TYPESPEC, RID_SIGNED }, {"sizeof", SIZEOF, NORID }, { "", }, { "", }, { "", }, { "", }, {"double", TYPESPEC, RID_DOUBLE }, {"static", SCSPEC, RID_STATIC }, {"case", CASE, NORID }, { "", }, { "", }, { "", }, { "", }, {"const", TYPE_QUAL, RID_CONST }, { "", }, { "", }, { "", }, {"long", TYPESPEC, RID_LONG }, { "", }, { "", }, {"continue", CONTINUE, NORID }, { "", }, { "", }, {"unsigned", TYPESPEC, RID_UNSIGNED }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, { "", }, {"union", UNION, NORID }, }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { register int key = hash (str, len); if (key <= MAX_HASH_VALUE) { register char *s = reswords[key].name; if (*s == *str && !strcmp (str + 1, s + 1)) return &reswords[key]; } } return 0; } /* The elements of `ridpointers' are identifier nodes for the reserved type names and storage classes. It is indexed by a RID_... value. */ tree ridpointers[(int) RID_MAX]; int check_newline (); void init_lex () { /* Start it at 0, because check_newline is called at the very beginning and will increment it to 1. */ lineno = 0; maxtoken = 40; token_buffer = (char *) xmalloc (maxtoken + 2); max_wide = 40; /* GCT: allocation was in terms of bytes, not ints */ wide_buffer = (int *) xmalloc (sizeof(int) * (max_wide + 1)); ridpointers[(int) RID_INT] = get_identifier ("int"); ridpointers[(int) RID_CHAR] = get_identifier ("char"); ridpointers[(int) RID_VOID] = get_identifier ("void"); ridpointers[(int) RID_FLOAT] = get_identifier ("float"); ridpointers[(int) RID_DOUBLE] = get_identifier ("double"); ridpointers[(int) RID_SHORT] = get_identifier ("short"); ridpointers[(int) RID_LONG] = get_identifier ("long"); ridpointers[(int) RID_UNSIGNED] = get_identifier ("unsigned"); ridpointers[(int) RID_SIGNED] = get_identifier ("signed"); ridpointers[(int) RID_INLINE] = get_identifier ("inline"); ridpointers[(int) RID_CONST] = get_identifier ("const"); ridpointers[(int) RID_VOLATILE] = get_identifier ("volatile"); ridpointers[(int) RID_AUTO] = get_identifier ("auto"); ridpointers[(int) RID_STATIC] = get_identifier ("static"); ridpointers[(int) RID_EXTERN] = get_identifier ("extern"); ridpointers[(int) RID_TYPEDEF] = get_identifier ("typedef"); ridpointers[(int) RID_REGISTER] = get_identifier ("register"); } static void reinit_parse_for_function () { } /* If C is not whitespace, return C. Otherwise skip whitespace and return first nonwhite char read. */ static int skip_white_space (c) register int c; { #if 0 register int inside; #endif for (;;) { switch (c) { /* Don't recognize comments in cc1: all comments are removed by cpp, and cpp output can include / and * consecutively as operators. */ #if 0 case '/': c = gct_getc (finput); if (c != '*') { gct_ungetc (c, finput); return '/'; } c = gct_getc (finput); inside = 1; while (inside) { if (c == '*') { while (c == '*') c = gct_getc (finput); if (c == '/') { inside = 0; c = gct_getc (finput); } } else if (c == '\n') { lineno++; c = gct_getc (finput); } else if (c == EOF) { error ("unterminated comment"); break; } else c = gct_getc (finput); } break; #endif case '\n': c = check_newline (); break; case ' ': case '\t': case '\f': case '\r': case '\v': case '\b': c = gct_getc (finput); break; case '\\': c = gct_getc (finput); if (c == '\n') lineno++; else error ("stray '\\' in program"); c = gct_getc (finput); break; default: return (c); } } } /* Make the token buffer longer, preserving the data in it. P should point to just beyond the last valid character in the old buffer. The value we return is a pointer to the new buffer at a place corresponding to P. */ static char * extend_token_buffer (p) char *p; { int offset = p - token_buffer; maxtoken = maxtoken * 2 + 10; token_buffer = (char *) xrealloc (token_buffer, maxtoken + 2); return token_buffer + offset; } /* At the beginning of a line, increment the line number and process any #-directive on this line. If the line is a #-directive, read the entire line and return a newline. Otherwise, return the line's first non-whitespace character. */ int check_newline () { register int c; register int token; lineno++; /* Read first nonwhite char on the line. */ c = gct_getc (finput); while (c == ' ' || c == '\t') c = gct_getc (finput); if (c != '#') { /* If not #, return it so caller will use it. */ return c; } /* Read first nonwhite char after the `#'. */ c = gct_getc (finput); while (c == ' ' || c == '\t') c = gct_getc (finput); /* If a letter follows, then if the word here is `line', skip it and ignore it; otherwise, ignore the line, with an error if the word isn't `pragma'. */ if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) { if (c == 'p') { if (gct_getc (finput) == 'r' && gct_getc (finput) == 'a' && gct_getc (finput) == 'g' && gct_getc (finput) == 'm' && gct_getc (finput) == 'a' && ((c = gct_getc (finput)) == ' ' || c == '\t' || c == '\n')) { /* GCT */ gct_make_end_note(gct_build_pragma(finput), Gct_all_nodes); c = '\n'; goto skipline; } } else if (c == 'l') { if (gct_getc (finput) == 'i' && gct_getc (finput) == 'n' && gct_getc (finput) == 'e' && ((c = gct_getc (finput)) == ' ' || c == '\t')) goto linenum; } else if (c == 'i') { if (gct_getc (finput) == 'd' && gct_getc (finput) == 'e' && gct_getc (finput) == 'n' && gct_getc (finput) == 't' && ((c = gct_getc (finput)) == ' ' || c == '\t')) { extern FILE *asm_out_file; if (pedantic) error ("ANSI C does not allow #ident"); /* Here we have just seen `#ident '. A string constant should follow. */ while (c == ' ' || c == '\t') c = gct_getc (finput); /* If no argument, ignore the line. */ if (c == '\n') return c; gct_ungetc (c, finput); token = yylex (); if (token != STRING || TREE_CODE (yylval.ttype) != STRING_CST) { error ("invalid #ident"); goto skipline; } #ifdef ASM_OUTPUT_IDENT ASM_OUTPUT_IDENT (asm_out_file, TREE_STRING_POINTER (yylval.ttype)); #endif /* Skip the rest of this line. */ goto skipline; } } error ("undefined or invalid # directive"); goto skipline; } linenum: /* Here we have either `#line' or `# '. In either case, it should be a line number; a digit should follow. */ while (c == ' ' || c == '\t') c = gct_getc (finput); /* If the # is the only nonwhite char on the line, just ignore it. Check the new newline. */ if (c == '\n') return c; /* Something follows the #; read a token. */ gct_ungetc (c, finput); token = yylex (); if (token == CONSTANT && TREE_CODE (yylval.ttype) == INTEGER_CST) { int old_lineno = lineno; /* subtract one, because it is the following line that gets the specified number */ int l = TREE_INT_CST_LOW (yylval.ttype) - 1; /* Is this the last nonwhite stuff on the line? */ c = gct_getc (finput); while (c == ' ' || c == '\t') c = gct_getc (finput); if (c == '\n') { /* No more: store the line number and check following line. */ lineno = l; return c; } gct_ungetc (c, finput); /* More follows: it must be a string constant (filename). */ token = yylex (); if (token != STRING || TREE_CODE (yylval.ttype) != STRING_CST) { error ("invalid #line"); goto skipline; } input_filename = (char *) permalloc (TREE_STRING_LENGTH (yylval.ttype) + 1); strcpy (input_filename, TREE_STRING_POINTER (yylval.ttype)); lineno = l; if (main_input_filename == 0) { /* GCT */ extern char* Gct_test_dir; main_input_filename = input_filename; /* Old Code */ gct_set_file_context(main_input_filename, Gct_test_dir); gct_init(); } /* GCT */ gct_make_end_note(gct_build_line_note(input_filename, lineno+1), Gct_all_nodes); /* Is this the last nonwhite stuff on the line? */ c = gct_getc (finput); while (c == ' ' || c == '\t') c = gct_getc (finput); if (c == '\n') return c; gct_ungetc (c, finput); token = yylex (); /* `1' after file name means entering new file. `2' after file name means just left a file. */ if (token == CONSTANT && TREE_CODE (yylval.ttype) == INTEGER_CST) { if (TREE_INT_CST_LOW (yylval.ttype) == 1) { struct file_stack *p = (struct file_stack *) xmalloc (sizeof (struct file_stack)); input_file_stack->line = old_lineno; p->next = input_file_stack; p->name = input_filename; input_file_stack = p; input_file_stack_tick++; } else if (input_file_stack->next) { struct file_stack *p = input_file_stack; input_file_stack = p->next; free (p); input_file_stack_tick++; } else error ("#-lines for entering and leaving files don't match"); } } else error ("invalid #-line"); /* skip the rest of this line. */ skipline: if (c == '\n') return c; while ((c = gct_getc (finput)) != EOF && c != '\n'); return c; } #define isalnum(char) ((char >= 'a' && char <= 'z') || (char >= 'A' && char <= 'Z') || (char >= '0' && char <= '9')) #define isdigit(char) (char >= '0' && char <= '9') #define ENDFILE -1 /* token that represents end-of-file */ /* GCT */ #define isprint(char) ((char >= ' ') && (char <= '~')) static int readescape () { register int c = gct_getc (finput); register int count, code; int firstdig; switch (c) { case 'x': code = 0; count = 0; while (1) { c = gct_getc (finput); if (!(c >= 'a' && c <= 'f') && !(c >= 'A' && c <= 'F') && !(c >= '0' && c <= '9')) { gct_ungetc (c, finput); break; } code *= 16; if (c >= 'a' && c <= 'f') code += c - 'a' + 10; if (c >= 'A' && c <= 'F') code += c - 'A' + 10; if (c >= '0' && c <= '9') code += c - '0'; if (count == 0) firstdig = code; count++; } if (count == 0) error ("\\x used with no following hex digits"); else if ((count - 1) * 4 >= TYPE_PRECISION (integer_type_node) || ((1 << (TYPE_PRECISION (integer_type_node) - (count - 1) * 4)) <= firstdig)) warning ("hex escape out of range"); return code; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': code = 0; count = 0; while ((c <= '7') && (c >= '0') && (count++ < 3)) { code = (code * 8) + (c - '0'); c = gct_getc (finput); } gct_ungetc (c, finput); return code; case '\\': case '\'': case '"': return c; case '\n': lineno++; return -1; case 'n': return TARGET_NEWLINE; case 't': return TARGET_TAB; case 'r': return TARGET_CR; case 'f': return TARGET_FF; case 'b': return TARGET_BS; case 'a': return TARGET_BELL; case 'v': return TARGET_VT; case 'E': return 033; case '?': /* `\(', etc, are used at beginning of line to avoid confusing Emacs. */ case '(': case '{': case '[': return c; } if (c >= 040 && c <= 0177) warning ("unknown escape sequence `\\%c'", c); else warning ("unknown escape sequence: `\\' followed by char code 0x%x", c); return c; } void yyerror (string) char *string; { char buf[200]; strcpy (buf, string); /* We can't print string and character constants well because the token_buffer contains the result of processing escapes. */ if (end_of_file) strcat (buf, " at end of input"); else if (token_buffer[0] == 0) strcat (buf, " at null character"); else if (token_buffer[0] == '"') strcat (buf, " before string constant"); else if (token_buffer[0] == '\'') strcat (buf, " before character constant"); else if (token_buffer[0] < 040 || token_buffer[0] >= 0177) sprintf (buf + strlen (buf), " before character 0%o", token_buffer[0]); else strcat (buf, " before `%s'"); error (buf, token_buffer); } static int nextchar = -1; /* * This hashes a node. I include the node type in the hash to avoid * pathological equalities like the old "a =- 5 vs. a = -5". Note that * the node type in this case is always GCT_OTHER. That doesn't matter * because the hashing is order-dependent. That is, a hash of * * GCT-OTHER a GCT-OTHER = - GCT-OTHER 5 * * will be different from * * GCT-OTHER a GCT-OTHER = GCT-OTHER - 5 */ static void gct_hash_node(node) gct_node node; { int i; GCT_HASH(Gct_function_hashval, (int) node->type); if (node->text) { for (i = 0 ; i < node->textlen ; i++) GCT_HASH(Gct_function_hashval, (int) (node->text[i])); } else { warning("Node passed to gct_hash_node has no text.\n"); } } /* * GCT Note: EVERY token that's read has a TEXT field attached. This is * redundant -- for many tokens, TEXT is redundant with the TYPE field * (consider WHILE). However, this saves having to write special case * code here in yylex and also in the printing code. */ static int yylex () { register int c; register char *p; register int value; int wide_flag = 0; int starting_char; /* GCT: First character of token */ int gct_nulls_in_string; /* GCT: How many nulls in current string. */ /* NOTE: Nulls in character constants are */ /* handled differently. */ Gct_ignore_tokens++; /* GCT: Ignore on recursive calls. */ yylval.code = LAST_AND_UNUSED_TREE_CODE; /* GCT: Don't retain previous value into tests at end of routine. */ if (nextchar >= 0) c = nextchar, nextchar = -1; else c = gct_getc (finput); /* Effectively do c = skip_white_space (c) but do it faster in the usual cases. */ while (1) switch (c) { case ' ': case '\t': case '\f': case '\r': case '\v': case '\b': c = gct_getc (finput); break; case '\n': case '/': case '\\': c = skip_white_space (c); default: goto found_nonwhite; } found_nonwhite: starting_char = charno; /* GCT */ gct_nulls_in_string = 0; /* GCT */ token_buffer[0] = c; token_buffer[1] = 0; /* yylloc.first_line = lineno; */ switch (c) { case EOF: end_of_file = 1; token_buffer[0] = 0; value = ENDFILE; break; case '$': if (dollars_in_ident) goto letter; return '$'; /* GCT: Causes error -- no need to save node. */ case 'L': /* Capital L may start a wide-string or wide-character constant. */ { register int c = gct_getc (finput); if (c == '\'') { error("GCT does not accept wide character constants (L'c').\n"); wide_flag = 1; goto char_constant; } if (c == '"') { error("GCT does not accept wide strings (L\"string\").\n"); wide_flag = 1; goto string_constant; } gct_ungetc (c, finput); } case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '_': letter: p = token_buffer; while (isalnum (c) || c == '_' || c == '$') { if (p >= token_buffer + maxtoken) p = extend_token_buffer (p); if (c == '$' && ! dollars_in_ident) break; *p++ = c; c = gct_getc (finput); } *p = 0; nextchar = c; value = IDENTIFIER; yylval.itype = 0; /* Try to recognize a keyword. Uses minimum-perfect hash function */ { register struct resword *ptr; if (ptr = is_reserved_word (token_buffer, p - token_buffer)) { if (ptr->rid) yylval.ttype = ridpointers[(int) ptr->rid]; if ((! flag_no_asm /* -fno-asm means don't recognize the non-ANSI keywords. */ || ((int) ptr->token != ASM && (int) ptr->token != TYPEOF && ptr->rid != RID_INLINE) /* Recognize __asm and __inline despite -fno-asm. */ || token_buffer[0] == '_') /* -ftraditional means don't recognize nontraditional keywords typeof, const, volatile, signed or inline. */ && (! flag_traditional || ((int) ptr->token != TYPE_QUAL && (int) ptr->token != TYPEOF && ptr->rid != RID_SIGNED && ptr->rid != RID_INLINE) /* Recognize __inline, etc. despite -ftraditional. */ || token_buffer[0] == '_')) value = (int) ptr->token; } } /* If we did not find a keyword, look for an identifier (or a typename). */ if (value == IDENTIFIER) { yylval.ttype = get_identifier (token_buffer); lastiddecl = lookup_name (yylval.ttype); if (lastiddecl != 0 && TREE_CODE (lastiddecl) == TYPE_DECL) value = TYPENAME; } break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '.': { int base = 10; int count = 0; int largest_digit = 0; int numdigits = 0; /* for multi-precision arithmetic, we store only 8 live bits in each short, giving us 64 bits of reliable precision */ short shorts[8]; int overflow = 0; enum anon1 { NOT_FLOAT, AFTER_POINT, TOO_MANY_POINTS} floatflag = NOT_FLOAT; for (count = 0; count < 8; count++) shorts[count] = 0; p = token_buffer; *p++ = c; if (c == '0') { *p++ = (c = gct_getc (finput)); if ((c == 'x') || (c == 'X')) { base = 16; *p++ = (c = gct_getc (finput)); } else { base = 8; numdigits++; } } /* Read all the digits-and-decimal-points. */ while (c == '.' || (isalnum (c) && (c != 'l') && (c != 'L') && (c != 'u') && (c != 'U') && (floatflag == NOT_FLOAT || ((c != 'f') && (c != 'F'))))) { if (c == '.') { if (base == 16) error ("floating constant may not be in radix 16"); if (floatflag == AFTER_POINT) { error ("malformed floating constant"); floatflag = TOO_MANY_POINTS; } else floatflag = AFTER_POINT; base = 10; *p++ = c = gct_getc (finput); /* Accept '.' as the start of a floating-point number only when it is followed by a digit. Otherwise, unread the following non-digit and use the '.' as a structural token. */ if (p == token_buffer + 2 && !isdigit (c)) { if (c == '.') { c = gct_getc (finput); if (c == '.') { *p++ = c; *p = 0; /* return ELLIPSIS; */ /* GCT: Send to DONE so that gct_node is built. */ value = ELLIPSIS; goto done; } error ("parse error at `..'"); } gct_ungetc (c, finput); token_buffer[1] = 0; value = '.'; goto done; } } else { /* It is not a decimal point. It should be a digit (perhaps a hex digit). */ if (isdigit (c)) { c = c - '0'; } else if (base <= 10) { if ((c&~040) == 'E') { base = 10; floatflag = AFTER_POINT; break; /* start of exponent */ } error ("nondigits in number and not hexadecimal"); c = 0; } else if (c >= 'a') { c = c - 'a' + 10; } else { c = c - 'A' + 10; } if (c >= largest_digit) largest_digit = c; numdigits++; for (count = 0; count < 8; count++) { shorts[count] *= base; if (count) { shorts[count] += (shorts[count-1] >> 8); shorts[count-1] &= (1<<8)-1; } else shorts[0] += c; } if (shorts[7] >= 1<<8 || shorts[7] < - (1 << 8)) overflow = TRUE; if (p >= token_buffer + maxtoken - 3) p = extend_token_buffer (p); *p++ = (c = gct_getc (finput)); } } if (numdigits == 0) error ("numeric constant with no digits"); if (largest_digit >= base) error ("numeric constant contains digits beyond the radix"); /* Remove terminating char from the token buffer and delimit the string */ *--p = 0; if (floatflag != NOT_FLOAT) { tree type = double_type_node; char f_seen = 0; char l_seen = 0; REAL_VALUE_TYPE value; /* Read explicit exponent if any, and put it in tokenbuf. */ if ((c == 'e') || (c == 'E')) { if (p >= token_buffer + maxtoken - 3) p = extend_token_buffer (p); *p++ = c; c = gct_getc (finput); if ((c == '+') || (c == '-')) { *p++ = c; c = gct_getc (finput); } if (! isdigit (c)) error ("floating constant exponent has no digits"); while (isdigit (c)) { if (p >= token_buffer + maxtoken - 3) p = extend_token_buffer (p); *p++ = c; c = gct_getc (finput); } } *p = 0; errno = 0; value = REAL_VALUE_ATOF (token_buffer); #ifdef ERANGE if (errno == ERANGE && !flag_traditional) { char *p1 = token_buffer; /* Check for "0.0" and variants; Sunos 4 spuriously returns ERANGE for them. */ while (*p1 == '0') p1++; if (*p1 == '.') { p1++; while (*p1 == '0') p1++; } if (*p1 == 'e' || *p1 == 'E') { /* with significand==0, ignore the exponent */ p1++; while (*p1 != 0) p1++; } /* ERANGE is also reported for underflow, so test the value to distinguish overflow from that. */ if (*p1 != 0 && (value > 1.0 || value < 1.0)) warning ("floating point number exceeds range of `double'"); } #endif /* Read the suffixes to choose a data type. */ while (1) { if (c == 'f' || c == 'F') { float floater; if (f_seen) error ("two `f's in floating constant"); f_seen = 1; type = float_type_node; floater = value; value = floater; } else if (c == 'l' || c == 'L') { if (l_seen) error ("two `l's in floating constant"); l_seen = 1; type = long_double_type_node; } else { if (isalnum (c)) { error ("garbage at end of number"); while (isalnum (c)) { if (p >= token_buffer + maxtoken - 3) p = extend_token_buffer (p); *p++ = c; c = gct_getc (finput); } } break; } if (p >= token_buffer + maxtoken - 3) p = extend_token_buffer (p); *p++ = c; c = gct_getc (finput); } /* Create a node with determined type and value. */ yylval.ttype = build_real (type, value); gct_ungetc (c, finput); *p = 0; } else { tree type; int spec_unsigned = 0; int spec_long = 0; int spec_long_long = 0; while (1) { if (c == 'u' || c == 'U') { if (spec_unsigned) error ("two `u's in integer constant"); spec_unsigned = 1; } else if (c == 'l' || c == 'L') { if (spec_long) { if (spec_long_long) error ("three `l's in integer constant"); else if (pedantic) warning ("ANSI C forbids long long integer constants"); spec_long_long = 1; } spec_long = 1; } else { if (isalnum (c)) { error ("garbage at end of number"); while (isalnum (c)) { if (p >= token_buffer + maxtoken - 3) p = extend_token_buffer (p); *p++ = c; c = gct_getc (finput); } } break; } if (p >= token_buffer + maxtoken - 3) p = extend_token_buffer (p); *p++ = c; c = gct_getc (finput); } gct_ungetc (c, finput); *p = 0; if ((overflow || shorts[7] || shorts[6] || shorts[5] || shorts[4]) && !spec_long_long) warning ("integer constant out of range"); /* If it won't fit in a signed long long, make it unsigned. We can't distinguish based on the tree node because any integer constant fits any long long type. */ if (shorts[7] >= (1<<8)) spec_unsigned = 1; /* This is simplified by the fact that our constant is always positive. */ yylval.ttype = (build_int_2 ((shorts[3]<<24) + (shorts[2]<<16) + (shorts[1]<<8) + shorts[0], (spec_long_long ? (shorts[7]<<24) + (shorts[6]<<16) + (shorts[5]<<8) + shorts[4] : 0))); if (!spec_long && !spec_unsigned && int_fits_type_p (yylval.ttype, integer_type_node)) type = integer_type_node; else if (!spec_long && base != 10 && int_fits_type_p (yylval.ttype, unsigned_type_node)) type = unsigned_type_node; else if (!spec_unsigned && !spec_long_long && int_fits_type_p (yylval.ttype, long_integer_type_node)) type = long_integer_type_node; else if (! spec_long_long && int_fits_type_p (yylval.ttype, long_unsigned_type_node)) type = long_unsigned_type_node; else if (! spec_unsigned && int_fits_type_p (yylval.ttype, long_long_integer_type_node)) type = long_long_integer_type_node; else if (int_fits_type_p (yylval.ttype, long_long_unsigned_type_node)) type = long_long_unsigned_type_node; else { type = long_long_integer_type_node; warning ("integer constant out of range"); } TREE_TYPE (yylval.ttype) = type; } value = CONSTANT; break; } case '\'': char_constant: { register int result = 0; register num_chars = 0; int width = TYPE_PRECISION (char_type_node); int max_chars; if (wide_flag) width = TYPE_PRECISION (integer_type_node); max_chars = TYPE_PRECISION (integer_type_node) / width; while (1) { tryagain: c = gct_getc (finput); if (c == '\'' || c == EOF) break; if (c == '\\') { c = readescape (); if (c < 0) goto tryagain; if (width < HOST_BITS_PER_INT && (unsigned) c >= (1 << width)) warning ("escape sequence out of range for character"); } else if (c == '\n') { if (pedantic) warning ("ANSI C forbids newline in character constant"); warning("GCT: Newline in character constant means line number off by one."); lineno++; } num_chars++; if (num_chars > maxtoken - 4) extend_token_buffer (token_buffer); token_buffer[num_chars] = c; /* Merge character into result; ignore excess chars. */ if (num_chars < max_chars + 1) { if (width < HOST_BITS_PER_INT) result = (result << width) | (c & ((1 << width) - 1)); else result = c; } } token_buffer[num_chars + 1] = '\''; token_buffer[num_chars + 2] = 0; if (c != '\'') error ("malformatted character constant"); else if (num_chars == 0) error ("empty character constant"); else if (num_chars > max_chars) { num_chars = max_chars; error ("character constant too long"); } else if (num_chars != 1 && ! flag_traditional) warning ("multi-character character constant"); /* If char type is signed, sign-extend the constant. */ if (! wide_flag) { int num_bits = num_chars * width; if (TREE_UNSIGNED (char_type_node) || ((result >> (num_bits - 1)) & 1) == 0) yylval.ttype = build_int_2 (result & ((unsigned) ~0 >> (HOST_BITS_PER_INT - num_bits)), 0); else yylval.ttype = build_int_2 (result | ~((unsigned) ~0 >> (HOST_BITS_PER_INT - num_bits)), -1); } else yylval.ttype = build_int_2 (result, 0); TREE_TYPE (yylval.ttype) = integer_type_node; /* * GCT: put full character constant in token_buffer. This is a * problem, in that the value returned here and stored forever * more is a character constant -- something that's clumsy to * manipulate. A possible solution is to let the first character * (') be a CHARACTER tag and have the second character be the * actual value. The printer would print it correctly. * * Note that we can't use the node's TYPE field for the tag, * because the lexer must not set that field to anything other * than GCT_OTHER. The parser assigns all other values, and * there is code that depends on this (scanning for GCT_OTHER to * find an unparsed statement). It might be better to just burn * a bit to denote "parsed" and let the lexer set the type in * some cases. * * Note that the current handling of characters avoids the * "null in string" problems that strings have. Change this code, * and you'll have to deal with that problem. (character tests * include null characters.) */ if (maxtoken < 10) /* This will doubtless never happen. */ extend_token_buffer(token_buffer); if ('\\' == result) { sprintf(token_buffer, "'\\\\'", result); } else if ('\'' == result) { sprintf(token_buffer, "'\\''", result); } else if ('\t' == result) { strcpy(token_buffer, "'\\t'"); } else if ('\n' == result) { strcpy(token_buffer, "'\\n'"); } else if (isprint(result)) { sprintf(token_buffer, "'%c'", result); } else { sprintf(token_buffer, "'\\%o'", result); } value = CONSTANT; break; } case '"': string_constant: { int *widep; c = gct_getc (finput); p = token_buffer + 1; if (wide_flag) widep = wide_buffer; while (c != '"' && c >= 0) { if (c == '\\') { c = readescape (); if ('\0' == c) /* GCT */ gct_nulls_in_string++; if (c < 0) goto skipnewline; if (!wide_flag && c >= (1 << TYPE_PRECISION (char_type_node))) warning ("escape sequence out of range for character"); } else if (c == '\n') { if (pedantic) warning ("ANSI C forbids newline in string constant"); warning("GCT: Newline in string means line number off by one."); lineno++; } /* Store the char in C into the appropriate buffer. */ if (wide_flag) { if (widep == wide_buffer + max_wide) { int n = widep - wide_buffer; max_wide *= 2; wide_buffer = (int *) xrealloc (wide_buffer, max_wide + 1); widep = wide_buffer + n; } *widep++ = c; } else { if (p == token_buffer + maxtoken) p = extend_token_buffer (p); *p++ = c; } skipnewline: c = gct_getc (finput); } /* We have read the entire constant. Construct a STRING_CST for the result. */ if (wide_flag) { /* If this is a L"..." wide-string, make a vector of the ints in wide_buffer. */ *widep = 0; /* We have not implemented the case where `int' on the target and on the execution machine differ in size. */ if (TYPE_PRECISION (integer_type_node) != sizeof (int) * BITS_PER_UNIT) abort (); yylval.ttype = build_string ((widep - wide_buffer + 1) * sizeof (int), wide_buffer); TREE_TYPE (yylval.ttype) = int_array_type_node; } else { *p = 0; yylval.ttype = build_string (p - token_buffer, token_buffer + 1); TREE_TYPE (yylval.ttype) = char_array_type_node; } *p++ = '"'; *p = 0; value = STRING; break; } case '+': case '-': case '&': case '|': case '<': case '>': case '*': case '/': case '%': case '^': case '!': case '=': { register int c1; combine: switch (c) { case '+': yylval.code = PLUS_EXPR; break; case '-': yylval.code = MINUS_EXPR; break; case '&': yylval.code = BIT_AND_EXPR; break; case '|': yylval.code = BIT_IOR_EXPR; break; case '*': yylval.code = MULT_EXPR; break; case '/': yylval.code = TRUNC_DIV_EXPR; break; case '%': yylval.code = TRUNC_MOD_EXPR; break; case '^': yylval.code = BIT_XOR_EXPR; break; case LSHIFT: yylval.code = LSHIFT_EXPR; break; case RSHIFT: yylval.code = RSHIFT_EXPR; break; case '<': yylval.code = LT_EXPR; break; case '>': yylval.code = GT_EXPR; break; } token_buffer[1] = c1 = gct_getc (finput); token_buffer[2] = 0; if (c1 == '=') { switch (c) { case '<': value = ARITHCOMPARE; yylval.code = LE_EXPR; goto done; case '>': value = ARITHCOMPARE; yylval.code = GE_EXPR; goto done; case '!': value = EQCOMPARE; yylval.code = NE_EXPR; goto done; case '=': value = EQCOMPARE; yylval.code = EQ_EXPR; goto done; } value = ASSIGN; goto done; } else if (c == c1) switch (c) { case '+': value = PLUSPLUS; goto done; case '-': value = MINUSMINUS; goto done; case '&': value = ANDAND; goto done; case '|': value = OROR; goto done; case '<': c = LSHIFT; goto combine; case '>': c = RSHIFT; goto combine; } else if ((c == '-') && (c1 == '>')) { value = POINTSAT; goto done; } gct_ungetc (c1, finput); token_buffer[1] = 0; if ((c == '<') || (c == '>')) value = ARITHCOMPARE; else value = c; goto done; } case 0: /* Don't make yyparse think this is eof. */ value = 1; break; default: value = c; } done: /* yylloc.last_line = lineno; */ Gct_ignore_tokens--; /* GCT */ if (0 == Gct_ignore_tokens) { if (! end_of_file) { /* Have to handle shift-type operators specially, since token_buffer doesn't contain all the characters. */ char * string_to_save = token_buffer; gct_node new_node; if (LSHIFT_EXPR == yylval.code && ASSIGN == value) string_to_save = "<<="; else if (LSHIFT_EXPR == yylval.code) string_to_save = "<<"; else if (RSHIFT_EXPR == yylval.code && ASSIGN == value) string_to_save = ">>="; else if (RSHIFT_EXPR == yylval.code) string_to_save = ">>"; new_node = gct_node_from_string(string_to_save, gct_nulls_in_string, input_filename, lineno, starting_char); gct_hash_node(new_node); gct_add_last(&Gct_all_nodes, new_node); } } return value; }