/* A Bison parser, made from ./parse.y by GNU bison 1.35. */ #define YYBISON 1 /* Identify Bison output. */ # define IDENTIFIER 257 # define TYPE_NAME 258 # define LITERAL 259 # define STRING_LITERAL 260 # define ELLIPSES 261 # define MUL_ASSIGN 262 # define DIV_ASSIGN 263 # define MOD_ASSIGN 264 # define ADD_ASSIGN 265 # define SUB_ASSIGN 266 # define LEFT_ASSIGN 267 # define RIGHT_ASSIGN 268 # define AND_ASSIGN 269 # define XOR_ASSIGN 270 # define OR_ASSIGN 271 # define EQ_OP 272 # define NE_OP 273 # define PTR_OP 274 # define AND_OP 275 # define OR_OP 276 # define DEC_OP 277 # define INC_OP 278 # define LE_OP 279 # define GE_OP 280 # define LEFT_SHIFT 281 # define RIGHT_SHIFT 282 # define SIZEOF 283 # define TYPEDEF 284 # define EXTERN 285 # define STATIC 286 # define AUTO 287 # define REGISTER 288 # define CONST 289 # define VOLATILE 290 # define VOID 291 # define INLINE 292 # define CHAR 293 # define SHORT 294 # define INT 295 # define LONG 296 # define SIGNED 297 # define UNSIGNED 298 # define FLOAT 299 # define DOUBLE 300 # define BOOL 301 # define STRUCT 302 # define UNION 303 # define ENUM 304 # define CASE 305 # define DEFAULT 306 # define IF 307 # define ELSE 308 # define SWITCH 309 # define WHILE 310 # define DO 311 # define FOR 312 # define GOTO 313 # define CONTINUE 314 # define BREAK 315 # define RETURN 316 # define ASM 317 #line 1 "./parse.y" /*************************************** $Header: /home/amb/cxref/src/RCS/parse.y 1.55 2006/10/15 19:14:01 amb Exp $ C Cross Referencing & Documentation tool. Version 1.6b. C parser. ******************/ /****************** Written by Andrew M. Bishop This file Copyright 1995,96,97,98,99,2000,01,02,03,04,05 Andrew M. Bishop It may be distributed under the GNU Public License, version 2, or any higher version. See section COPYING of the GNU Public license for conditions under which this file may be redistributed. ***************************************/ #include #include "parse-yy.h" #include "cxref.h" #include "memory.h" /*+ A structure to hold the information about an object. +*/ typedef struct _stack { char *name; /*+ The name of the object. +*/ char *type; /*+ The type of the object. +*/ char *qual; /*+ The type qualifier of the object. +*/ } stack; #define yylex cxref_yylex static int cxref_yylex(void); static void yyerror(char *s); /*+ When in a header file, some stuff can be skipped over quickly. +*/ extern int in_header; /*+ A flag that is set to true when typedef is seen in a statement. +*/ int in_typedef=0; /*+ The scope of the function / variable that is being examined. +*/ static int scope; /*+ The variable must be LOCAL or EXTERNAL or GLOBAL, so this checks and sets that. +*/ #define SCOPE ( scope&(LOCAL|EXTERNAL|EXTERN_H|EXTERN_F) ? scope : scope|GLOBAL ) /*+ When in a function or a function definition, the behaviour is different. +*/ static int in_function=0,in_funcdef=0,in_funcbody=0; /*+ The parsing stack +*/ static stack first={NULL,NULL,NULL}, /*+ first value. +*/ *list=NULL, /*+ list of all values. +*/ *current=&first; /*+ current values. +*/ /*+ The depth of the stack +*/ static int depth=0, /*+ currently in use. +*/ maxdepth=0; /*+ total malloced. +*/ /*+ Declarations that are in the same statement share this comment. +*/ static char* common_comment=NULL; /*+ When inside a struct / union / enum definition, this is the depth. +*/ static int in_structunion=0; /*+ When inside a struct / union definition, this is the component type. +*/ static char *comp_type=NULL; /*+ To solve the problem where a type name is used as an identifier. +*/ static int in_type_spec=0; /*++++++++++++++++++++++++++++++++++++++ Reset the current level on the stack. ++++++++++++++++++++++++++++++++++++++*/ static void reset(void) { current->name=NULL; current->type=NULL; current->qual=NULL; } /*++++++++++++++++++++++++++++++++++++++ Push a level onto the stack. ++++++++++++++++++++++++++++++++++++++*/ static void push(void) { if(list==NULL) { list=(stack*)Malloc(8*sizeof(struct _stack)); list[0]=first; maxdepth=8; } else if(depth==(maxdepth-1)) { list=Realloc(list,(maxdepth+8)*sizeof(struct _stack)); maxdepth+=8; } depth++; current=&list[depth]; reset(); } /*++++++++++++++++++++++++++++++++++++++ Pop a level from the stack. ++++++++++++++++++++++++++++++++++++++*/ static void pop(void) { reset(); depth--; current=&list[depth]; } /*++++++++++++++++++++++++++++++++++++++ Reset the Parser, ready for the next file. ++++++++++++++++++++++++++++++++++++++*/ void ResetParser(void) { in_typedef=0; scope=0; in_function=0; in_funcdef=0; in_funcbody=0; depth=0; maxdepth=0; if(list) Free(list); list=NULL; current=&first; reset(); common_comment=NULL; in_structunion=0; comp_type=NULL; in_type_spec=0; } #ifndef YYSTYPE # define YYSTYPE int # define YYSTYPE_IS_TRIVIAL 1 #endif #ifndef YYDEBUG # define YYDEBUG 0 #endif #define YYFINAL 563 #define YYFLAG -32768 #define YYNTBASE 88 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ #define YYTRANSLATE(x) ((unsigned)(x) <= 317 ? yytranslate[x] : 257) /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 87, 2, 2, 2, 85, 79, 2, 73, 74, 75, 82, 65, 83, 70, 84, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 69, 64, 80, 66, 81, 76, 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, 71, 2, 72, 78, 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, 67, 77, 68, 86, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 }; #if YYDEBUG static const short yyprhs[] = { 0, 0, 1, 3, 5, 8, 10, 12, 14, 16, 18, 21, 25, 28, 30, 32, 35, 37, 40, 42, 45, 47, 48, 53, 55, 57, 60, 63, 67, 70, 72, 76, 77, 79, 83, 86, 88, 92, 97, 102, 108, 116, 118, 122, 124, 127, 129, 133, 136, 140, 144, 149, 152, 156, 160, 165, 167, 170, 172, 175, 178, 182, 184, 188, 190, 192, 194, 198, 199, 200, 207, 209, 211, 213, 215, 217, 219, 221, 223, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 255, 258, 260, 263, 266, 268, 270, 272, 274, 276, 278, 280, 282, 284, 286, 289, 291, 293, 294, 300, 301, 308, 310, 313, 315, 319, 321, 325, 327, 330, 332, 334, 336, 338, 339, 345, 346, 353, 356, 358, 360, 362, 364, 365, 371, 372, 379, 382, 384, 386, 387, 389, 391, 394, 396, 399, 402, 404, 405, 410, 411, 417, 418, 424, 426, 430, 432, 434, 436, 439, 443, 445, 447, 449, 450, 454, 456, 458, 461, 464, 468, 470, 472, 476, 479, 484, 485, 491, 493, 494, 496, 498, 500, 504, 506, 510, 512, 516, 519, 521, 524, 526, 528, 530, 532, 534, 536, 538, 540, 542, 544, 546, 548, 549, 550, 556, 557, 559, 561, 564, 566, 568, 570, 572, 580, 586, 588, 590, 592, 600, 601, 608, 611, 615, 619, 623, 628, 633, 638, 644, 646, 649, 651, 657, 660, 663, 666, 669, 674, 676, 678, 680, 686, 689, 692, 695, 699, 701, 704, 708, 710, 712, 716, 718, 720, 724, 730, 732, 734, 736, 738, 740, 742, 744, 746, 748, 750, 752, 754, 760, 765, 767, 771, 773, 777, 779, 783, 785, 789, 791, 795, 797, 801, 803, 805, 807, 811, 813, 815, 817, 819, 821, 825, 827, 829, 831, 835, 837, 839, 841, 845, 847, 849, 851, 853, 855, 857, 859, 861, 863, 865, 867, 869, 871, 873, 876, 879, 884, 891, 894, 897, 900, 903, 908, 911, 914, 917, 919, 921, 923, 925, 927, 929, 931, 933, 935, 939, 943, 947, 952, 956, 961, 964, 967, 972, 974, 976, 978, 980, 982, 985, 989, 990, 991, 997, 999, 1001, 1005, 1011, 1019, 1029, 1041, 1043, 1046, 1049, 1050, 1052, 1056, 1061, 1062, 1064, 1068, 1073 }; static const short yyrhs[] = { -1, 89, 0, 90, 0, 89, 90, 0, 92, 0, 161, 0, 250, 0, 201, 0, 92, 0, 91, 92, 0, 93, 95, 64, 0, 93, 64, 0, 94, 0, 114, 0, 114, 94, 0, 117, 0, 117, 94, 0, 116, 0, 116, 94, 0, 97, 0, 0, 95, 65, 96, 97, 0, 98, 0, 106, 0, 106, 255, 0, 106, 99, 0, 106, 255, 99, 0, 66, 100, 0, 205, 0, 67, 101, 68, 0, 0, 102, 0, 101, 65, 102, 0, 101, 65, 0, 100, 0, 160, 69, 100, 0, 70, 160, 66, 100, 0, 71, 103, 72, 100, 0, 71, 103, 72, 66, 100, 0, 71, 103, 72, 70, 160, 66, 100, 0, 248, 0, 248, 7, 248, 0, 107, 0, 107, 105, 0, 105, 0, 73, 104, 74, 0, 71, 72, 0, 105, 71, 72, 0, 71, 248, 72, 0, 105, 71, 248, 72, 0, 73, 74, 0, 105, 73, 74, 0, 73, 172, 74, 0, 105, 73, 172, 74, 0, 108, 0, 107, 108, 0, 75, 0, 75, 115, 0, 75, 107, 0, 75, 115, 107, 0, 109, 0, 73, 106, 74, 0, 110, 0, 167, 0, 3, 0, 108, 71, 72, 0, 0, 0, 108, 71, 111, 248, 112, 72, 0, 3, 0, 33, 0, 31, 0, 34, 0, 32, 0, 30, 0, 38, 0, 116, 0, 115, 116, 0, 35, 0, 36, 0, 118, 0, 126, 0, 119, 0, 120, 0, 122, 0, 136, 0, 123, 0, 142, 0, 124, 0, 45, 0, 46, 0, 46, 42, 0, 42, 46, 0, 121, 0, 121, 116, 0, 120, 121, 0, 43, 0, 44, 0, 39, 0, 40, 0, 41, 0, 42, 0, 47, 0, 4, 0, 37, 0, 93, 0, 93, 104, 0, 127, 0, 134, 0, 0, 50, 67, 128, 130, 68, 0, 0, 50, 135, 67, 129, 130, 68, 0, 131, 0, 131, 65, 0, 132, 0, 131, 65, 132, 0, 133, 0, 133, 66, 205, 0, 3, 0, 50, 135, 0, 3, 0, 4, 0, 137, 0, 140, 0, 0, 48, 67, 138, 148, 68, 0, 0, 48, 141, 67, 139, 148, 68, 0, 48, 141, 0, 3, 0, 4, 0, 143, 0, 146, 0, 0, 49, 67, 144, 148, 68, 0, 0, 49, 147, 67, 145, 148, 68, 0, 49, 147, 0, 3, 0, 4, 0, 0, 149, 0, 150, 0, 149, 150, 0, 64, 0, 137, 64, 0, 143, 64, 0, 151, 0, 0, 117, 152, 155, 64, 0, 0, 115, 117, 153, 155, 64, 0, 0, 117, 115, 154, 155, 64, 0, 156, 0, 155, 65, 156, 0, 157, 0, 158, 0, 106, 0, 69, 159, 0, 106, 69, 159, 0, 205, 0, 3, 0, 4, 0, 0, 163, 162, 176, 0, 164, 0, 165, 0, 93, 165, 0, 165, 91, 0, 93, 165, 91, 0, 166, 0, 167, 0, 73, 167, 74, 0, 107, 167, 0, 107, 73, 167, 74, 0, 0, 169, 73, 168, 170, 74, 0, 108, 0, 0, 172, 0, 171, 0, 3, 0, 171, 65, 3, 0, 173, 0, 173, 65, 7, 0, 174, 0, 173, 65, 174, 0, 93, 106, 0, 93, 0, 93, 104, 0, 250, 0, 176, 0, 182, 0, 185, 0, 192, 0, 196, 0, 197, 0, 198, 0, 199, 0, 200, 0, 201, 0, 202, 0, 0, 0, 67, 177, 179, 178, 68, 0, 0, 180, 0, 181, 0, 180, 181, 0, 175, 0, 92, 0, 184, 0, 183, 0, 53, 73, 203, 74, 175, 54, 175, 0, 53, 73, 203, 74, 175, 0, 186, 0, 187, 0, 191, 0, 57, 175, 56, 73, 203, 74, 64, 0, 0, 58, 188, 73, 189, 74, 175, 0, 64, 64, 0, 190, 64, 64, 0, 64, 203, 64, 0, 64, 64, 203, 0, 64, 203, 64, 203, 0, 190, 64, 64, 203, 0, 190, 64, 203, 64, 0, 190, 64, 203, 64, 203, 0, 203, 0, 93, 95, 0, 93, 0, 56, 73, 203, 74, 175, 0, 193, 69, 0, 195, 69, 0, 194, 69, 0, 51, 248, 0, 51, 248, 7, 248, 0, 52, 0, 3, 0, 4, 0, 55, 73, 203, 74, 175, 0, 61, 64, 0, 60, 64, 0, 203, 64, 0, 59, 3, 64, 0, 64, 0, 62, 64, 0, 62, 203, 64, 0, 204, 0, 205, 0, 204, 65, 205, 0, 207, 0, 256, 0, 223, 206, 205, 0, 223, 206, 67, 101, 68, 0, 66, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 208, 0, 208, 76, 203, 69, 207, 0, 208, 76, 69, 207, 0, 209, 0, 208, 22, 209, 0, 210, 0, 209, 21, 210, 0, 211, 0, 210, 77, 211, 0, 212, 0, 211, 78, 212, 0, 213, 0, 212, 79, 213, 0, 215, 0, 213, 214, 215, 0, 18, 0, 19, 0, 217, 0, 215, 216, 217, 0, 80, 0, 25, 0, 81, 0, 26, 0, 219, 0, 217, 218, 219, 0, 27, 0, 28, 0, 221, 0, 219, 220, 221, 0, 82, 0, 83, 0, 223, 0, 221, 222, 223, 0, 75, 0, 84, 0, 85, 0, 224, 0, 225, 0, 226, 0, 227, 0, 228, 0, 229, 0, 230, 0, 231, 0, 232, 0, 233, 0, 234, 0, 79, 223, 0, 86, 223, 0, 73, 125, 74, 223, 0, 73, 125, 74, 67, 101, 68, 0, 75, 223, 0, 87, 223, 0, 23, 223, 0, 24, 223, 0, 29, 73, 125, 74, 0, 29, 223, 0, 83, 223, 0, 82, 223, 0, 235, 0, 238, 0, 239, 0, 240, 0, 241, 0, 242, 0, 243, 0, 236, 0, 237, 0, 234, 70, 160, 0, 234, 20, 160, 0, 234, 73, 74, 0, 234, 73, 249, 74, 0, 113, 73, 74, 0, 113, 73, 249, 74, 0, 234, 23, 0, 234, 24, 0, 234, 71, 203, 72, 0, 113, 0, 5, 0, 244, 0, 245, 0, 6, 0, 244, 6, 0, 73, 203, 74, 0, 0, 0, 73, 246, 176, 247, 74, 0, 203, 0, 205, 0, 249, 65, 205, 0, 251, 73, 244, 74, 64, 0, 251, 73, 244, 69, 252, 74, 64, 0, 251, 73, 244, 69, 252, 69, 252, 74, 64, 0, 251, 73, 244, 69, 252, 69, 252, 69, 254, 74, 64, 0, 63, 0, 63, 36, 0, 36, 63, 0, 0, 253, 0, 252, 65, 253, 0, 244, 73, 203, 74, 0, 0, 244, 0, 254, 65, 244, 0, 63, 73, 244, 74, 0, 21, 195, 0 }; #endif #if YYDEBUG /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { 0, 169, 170, 174, 175, 179, 181, 183, 184, 190, 192, 198, 200, 205, 211, 212, 214, 216, 219, 220, 227, 228, 228, 232, 276, 277, 278, 279, 283, 287, 288, 292, 293, 294, 295, 299, 300, 301, 302, 303, 304, 308, 309, 315, 316, 318, 322, 325, 327, 329, 331, 333, 335, 337, 339, 346, 348, 353, 354, 356, 358, 363, 364, 368, 369, 373, 380, 382, 382, 382, 389, 393, 395, 400, 402, 404, 408, 413, 414, 419, 421, 428, 433, 434, 435, 436, 437, 438, 439, 440, 444, 445, 446, 448, 453, 454, 456, 461, 462, 463, 464, 465, 466, 470, 474, 478, 482, 484, 491, 492, 496, 496, 509, 509, 525, 526, 530, 531, 536, 538, 543, 547, 552, 553, 559, 560, 564, 564, 577, 577, 593, 598, 599, 605, 606, 610, 610, 623, 623, 639, 644, 645, 651, 652, 656, 657, 662, 663, 666, 669, 673, 673, 677, 677, 681, 681, 688, 690, 696, 697, 701, 706, 708, 713, 717, 718, 726, 726, 733, 756, 757, 759, 760, 767, 772, 773, 774, 776, 781, 781, 792, 800, 803, 804, 808, 810, 816, 817, 823, 826, 832, 834, 836, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 860, 860, 860, 868, 869, 873, 874, 878, 879, 886, 887, 891, 895, 901, 902, 903, 907, 911, 911, 918, 919, 920, 921, 922, 923, 924, 925, 929, 930, 932, 937, 943, 944, 945, 949, 950, 954, 958, 959, 965, 971, 975, 979, 983, 987, 991, 992, 998, 1004, 1005, 1012, 1013, 1014, 1015, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1035, 1036, 1038, 1045, 1046, 1053, 1054, 1061, 1062, 1069, 1070, 1077, 1078, 1085, 1086, 1091, 1092, 1098, 1099, 1104, 1105, 1106, 1107, 1113, 1114, 1119, 1120, 1126, 1127, 1132, 1133, 1139, 1140, 1145, 1146, 1147, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1167, 1171, 1176, 1178, 1182, 1186, 1191, 1195, 1199, 1201, 1206, 1211, 1218, 1219, 1220, 1222, 1223, 1224, 1225, 1229, 1230, 1234, 1238, 1242, 1243, 1247, 1248, 1252, 1256, 1260, 1264, 1266, 1267, 1268, 1272, 1273, 1277, 1279, 1279, 1279, 1285, 1289, 1290, 1298, 1299, 1300, 1301, 1305, 1306, 1307, 1311, 1312, 1313, 1317, 1321, 1322, 1323, 1327, 1333 }; #endif #if (YYDEBUG) || defined YYERROR_VERBOSE /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ static const char *const yytname[] = { "$", "error", "$undefined.", "IDENTIFIER", "TYPE_NAME", "LITERAL", "STRING_LITERAL", "ELLIPSES", "MUL_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", "ADD_ASSIGN", "SUB_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "EQ_OP", "NE_OP", "PTR_OP", "AND_OP", "OR_OP", "DEC_OP", "INC_OP", "LE_OP", "GE_OP", "LEFT_SHIFT", "RIGHT_SHIFT", "SIZEOF", "TYPEDEF", "EXTERN", "STATIC", "AUTO", "REGISTER", "CONST", "VOLATILE", "VOID", "INLINE", "CHAR", "SHORT", "INT", "LONG", "SIGNED", "UNSIGNED", "FLOAT", "DOUBLE", "BOOL", "STRUCT", "UNION", "ENUM", "CASE", "DEFAULT", "IF", "ELSE", "SWITCH", "WHILE", "DO", "FOR", "GOTO", "CONTINUE", "BREAK", "RETURN", "ASM", "';'", "','", "'='", "'{'", "'}'", "':'", "'.'", "'['", "']'", "'('", "')'", "'*'", "'?'", "'|'", "'^'", "'&'", "'<'", "'>'", "'+'", "'-'", "'/'", "'%'", "'~'", "'!'", "file", "program", "top_level_declaration", "declaration_list", "declaration", "declaration_specifiers", "declaration_specifiers1", "initialized_declarator_list", "@1", "initialized_declarator", "initialized_declarator1", "initializer_part", "initializer", "struct_initializer_list", "named_initializer", "named_initializer_index", "abstract_declarator", "direct_abstract_declarator", "declarator", "pointer", "direct_declarator", "simple_declarator", "array_declarator", "@2", "@3", "name", "storage_class_specifier", "type_qualifier_list", "type_qualifier", "type_specifier", "type_specifier1", "floating_type_specifier", "integer_type_specifier", "integer_type_specifier_part", "boolean_type_specifier", "typedef_name", "void_type_specifier", "type_name", "enumeration_type_specifier", "enumeration_type_definition", "@4", "@5", "enumeration_definition_list", "enumeration_definition_list1", "enumeration_constant_definition", "enumeration_constant", "enumeration_type_reference", "enumeration_tag", "structure_type_specifier", "structure_type_definition", "@6", "@7", "structure_type_reference", "structure_tag", "union_type_specifier", "union_type_definition", "@8", "@9", "union_type_reference", "union_tag", "field_list", "field_list1", "field_list2", "component_declaration", "@10", "@11", "@12", "component_declarator_list", "component_declarator", "simple_component", "bit_field", "width", "component_name", "function_definition", "@13", "function_specifier", "function_specifier1", "function_declarator", "function_declarator0", "function_direct_declarator", "@14", "function_declarator1", "function_declarator2", "identifier_list", "parameter_type_list", "parameter_list", "parameter_declaration", "statement", "compound_statement", "@15", "@16", "compound_statement_body", "block_item_list", "block_item", "conditional_statement", "if_else_statement", "if_statement", "iterative_statement", "do_statement", "for_statement", "@17", "for_expressions", "for_expression_or_declaration", "while_statement", "labeled_statement", "case_label", "default_label", "named_label", "switch_statement", "break_statement", "continue_statement", "expression_statement", "goto_statement", "null_statement", "return_statement", "expression", "comma_expression", "assignment_expression", "assignment_op", "conditional_expression", "logical_or_expression", "logical_and_expression", "bitwise_or_expression", "bitwise_xor_expression", "bitwise_and_expression", "equality_expression", "equality_op", "relational_expression", "relational_op", "shift_expression", "shift_op", "additive_expression", "add_op", "multiplicative_expression", "mult_op", "unary_expression", "address_expression", "bitwise_negation_expression", "cast_expression", "indirection_expression", "logical_negation_expression", "predecrement_expression", "preincrement_expression", "sizeof_expression", "unary_minus_expression", "unary_plus_expression", "postfix_expression", "component_selection_expression", "direct_component_selection", "indirect_component_selection", "function_call", "function_call_direct", "postdecrement_expression", "postincrement_expression", "subscript_expression", "primary_expression", "string_literal", "parenthesized_expression", "@18", "@19", "constant_expression", "expression_list", "asm_statement", "asm_type", "asm_inout_list", "asm_inout", "asm_clobber_list", "asm_label", "named_label_address", 0 }; #endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const short yyr1[] = { 0, 88, 88, 89, 89, 90, 90, 90, 90, 91, 91, 92, 92, 93, 94, 94, 94, 94, 94, 94, 95, 96, 95, 97, 98, 98, 98, 98, 99, 100, 100, 101, 101, 101, 101, 102, 102, 102, 102, 102, 102, 103, 103, 104, 104, 104, 105, 105, 105, 105, 105, 105, 105, 105, 105, 106, 106, 107, 107, 107, 107, 108, 108, 108, 108, 109, 110, 111, 112, 110, 113, 114, 114, 114, 114, 114, 114, 115, 115, 116, 116, 117, 118, 118, 118, 118, 118, 118, 118, 118, 119, 119, 119, 119, 120, 120, 120, 121, 121, 121, 121, 121, 121, 122, 123, 124, 125, 125, 126, 126, 128, 127, 129, 127, 130, 130, 131, 131, 132, 132, 133, 134, 135, 135, 136, 136, 138, 137, 139, 137, 140, 141, 141, 142, 142, 144, 143, 145, 143, 146, 147, 147, 148, 148, 149, 149, 150, 150, 150, 150, 152, 151, 153, 151, 154, 151, 155, 155, 156, 156, 157, 158, 158, 159, 160, 160, 162, 161, 163, 164, 164, 164, 164, 165, 166, 166, 166, 166, 168, 167, 169, 170, 170, 170, 171, 171, 172, 172, 173, 173, 174, 174, 174, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 177, 178, 176, 179, 179, 180, 180, 181, 181, 182, 182, 183, 184, 185, 185, 185, 186, 188, 187, 189, 189, 189, 189, 189, 189, 189, 189, 190, 190, 190, 191, 192, 192, 192, 193, 193, 194, 195, 195, 196, 197, 198, 199, 200, 201, 202, 202, 203, 204, 204, 205, 205, 205, 205, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 207, 207, 207, 208, 208, 209, 209, 210, 210, 211, 211, 212, 212, 213, 213, 214, 214, 215, 215, 216, 216, 216, 216, 217, 217, 218, 218, 219, 219, 220, 220, 221, 221, 222, 222, 222, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 224, 225, 226, 226, 227, 228, 229, 230, 231, 231, 232, 233, 234, 234, 234, 234, 234, 234, 234, 235, 235, 236, 237, 238, 238, 239, 239, 240, 241, 242, 243, 243, 243, 243, 244, 244, 245, 246, 247, 245, 248, 249, 249, 250, 250, 250, 250, 251, 251, 251, 252, 252, 252, 253, 254, 254, 254, 255, 256 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const short yyr2[] = { 0, 0, 1, 1, 2, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 2, 1, 2, 1, 2, 1, 0, 4, 1, 1, 2, 2, 3, 2, 1, 3, 0, 1, 3, 2, 1, 3, 4, 4, 5, 7, 1, 3, 1, 2, 1, 3, 2, 3, 3, 4, 2, 3, 3, 4, 1, 2, 1, 2, 2, 3, 1, 3, 1, 1, 1, 3, 0, 0, 6, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 0, 5, 0, 6, 1, 2, 1, 3, 1, 3, 1, 2, 1, 1, 1, 1, 0, 5, 0, 6, 2, 1, 1, 1, 1, 0, 5, 0, 6, 2, 1, 1, 0, 1, 1, 2, 1, 2, 2, 1, 0, 4, 0, 5, 0, 5, 1, 3, 1, 1, 1, 2, 3, 1, 1, 1, 0, 3, 1, 1, 2, 2, 3, 1, 1, 3, 2, 4, 0, 5, 1, 0, 1, 1, 1, 3, 1, 3, 1, 3, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 5, 0, 1, 1, 2, 1, 1, 1, 1, 7, 5, 1, 1, 1, 7, 0, 6, 2, 3, 3, 3, 4, 4, 4, 5, 1, 2, 1, 5, 2, 2, 2, 2, 4, 1, 1, 1, 5, 2, 2, 2, 3, 1, 2, 3, 1, 1, 3, 1, 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 4, 6, 2, 2, 2, 2, 4, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 4, 3, 4, 2, 2, 4, 1, 1, 1, 1, 1, 2, 3, 0, 0, 5, 1, 1, 3, 5, 7, 9, 11, 1, 2, 2, 0, 1, 3, 4, 0, 1, 3, 4, 2 }; /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const short yydefact[] = { 1, 65, 104, 75, 72, 74, 71, 73, 79, 80, 105, 76, 99, 100, 101, 102, 97, 98, 90, 91, 103, 0, 0, 0, 364, 249, 0, 57, 2, 3, 5, 0, 13, 0, 180, 61, 63, 14, 18, 16, 81, 83, 84, 94, 85, 87, 89, 82, 108, 109, 86, 124, 125, 88, 133, 134, 6, 166, 168, 169, 173, 174, 0, 8, 7, 0, 366, 93, 92, 131, 132, 126, 130, 140, 141, 135, 139, 122, 123, 110, 121, 365, 0, 0, 0, 55, 64, 80, 59, 58, 77, 4, 12, 0, 20, 23, 24, 0, 170, 0, 176, 67, 15, 19, 17, 102, 96, 95, 0, 171, 9, 0, 178, 0, 142, 128, 142, 137, 0, 112, 64, 62, 56, 175, 60, 78, 11, 21, 0, 0, 26, 25, 172, 64, 66, 0, 205, 167, 10, 181, 351, 0, 146, 0, 150, 124, 133, 0, 143, 144, 149, 142, 0, 142, 120, 0, 114, 116, 118, 0, 0, 0, 70, 348, 0, 0, 0, 0, 31, 354, 0, 0, 0, 0, 0, 0, 28, 347, 29, 255, 270, 273, 275, 277, 279, 281, 283, 287, 293, 297, 301, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 329, 336, 337, 330, 331, 332, 333, 334, 335, 349, 350, 256, 27, 177, 357, 252, 253, 68, 208, 184, 191, 0, 183, 182, 186, 188, 352, 367, 0, 152, 154, 0, 147, 148, 127, 145, 0, 136, 0, 111, 115, 0, 0, 22, 0, 242, 243, 375, 323, 324, 354, 326, 70, 165, 0, 0, 35, 0, 32, 0, 106, 0, 0, 0, 321, 317, 328, 327, 318, 322, 0, 0, 0, 0, 0, 0, 0, 285, 286, 0, 290, 292, 289, 291, 0, 295, 296, 0, 299, 300, 0, 303, 304, 305, 0, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 259, 0, 0, 344, 345, 0, 0, 0, 0, 0, 70, 104, 0, 241, 0, 0, 0, 0, 222, 0, 0, 0, 0, 213, 212, 194, 206, 209, 210, 195, 215, 214, 196, 218, 219, 220, 197, 0, 0, 0, 198, 199, 200, 201, 202, 203, 204, 0, 193, 0, 0, 192, 45, 190, 43, 179, 0, 0, 0, 0, 368, 360, 0, 0, 0, 160, 0, 156, 158, 159, 129, 138, 117, 119, 113, 374, 0, 164, 0, 0, 41, 34, 30, 0, 0, 107, 43, 0, 353, 355, 342, 358, 0, 274, 301, 0, 0, 276, 278, 280, 282, 284, 288, 294, 298, 302, 31, 257, 339, 338, 0, 340, 0, 254, 69, 239, 0, 0, 0, 0, 0, 0, 0, 246, 245, 250, 0, 0, 211, 236, 238, 237, 247, 47, 0, 51, 0, 0, 0, 0, 44, 185, 187, 189, 0, 0, 367, 0, 0, 0, 161, 163, 0, 151, 0, 325, 0, 0, 0, 33, 36, 31, 319, 0, 0, 343, 272, 0, 0, 346, 341, 0, 0, 0, 0, 0, 0, 248, 251, 207, 49, 46, 53, 48, 0, 52, 0, 0, 369, 0, 361, 153, 155, 162, 157, 37, 0, 0, 38, 42, 0, 356, 359, 271, 258, 240, 0, 0, 0, 0, 0, 234, 0, 0, 232, 50, 54, 370, 371, 0, 39, 0, 320, 217, 244, 235, 0, 224, 0, 233, 0, 0, 372, 0, 362, 0, 0, 0, 227, 226, 223, 225, 0, 0, 0, 40, 216, 221, 228, 229, 230, 373, 363, 231, 0, 0, 0 }; static const short yydefgoto[] = { 561, 28, 29, 109, 30, 111, 32, 93, 160, 94, 95, 130, 258, 259, 260, 386, 443, 359, 83, 84, 85, 35, 36, 135, 316, 177, 37, 143, 38, 39, 40, 41, 42, 43, 44, 45, 46, 263, 47, 48, 118, 159, 155, 156, 157, 158, 49, 80, 50, 51, 114, 151, 52, 72, 53, 54, 116, 153, 55, 76, 147, 148, 149, 150, 233, 369, 370, 373, 374, 375, 376, 457, 261, 56, 108, 57, 58, 59, 60, 120, 139, 62, 223, 224, 444, 226, 227, 331, 332, 220, 434, 333, 334, 335, 336, 337, 338, 339, 340, 341, 428, 519, 520, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 217, 218, 308, 179, 180, 181, 182, 183, 184, 185, 281, 186, 286, 187, 289, 188, 292, 189, 296, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 265, 470, 219, 399, 355, 65, 366, 367, 540, 131, 213 }; static const short yypact[] = { 1252,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -50, -32768,-32768,-32768,-32768,-32768, 2,-32768,-32768,-32768, 82, -32768, 66, 71, 75, 103,-32768, 37, 80, 1252,-32768, -32768, 9,-32768, 22, 90,-32768,-32768, 1510, 1510, 1510, -32768,-32768, 338, 173,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 1510, -32768, 148, 99,-32768,-32768, 105,-32768,-32768,-32768,-32768, -32768,-32768, 86,-32768,-32768,-32768, 119,-32768,-32768,-32768, 149,-32768, 37, 180, 38, -29, 189,-32768,-32768, 80, -32768,-32768,-32768, 222,-32768,-32768, 43, 22, 1510, 37, 148, 150,-32768,-32768,-32768,-32768,-32768,-32768, 165, 1510, -32768, 24,-32768, 270, 1000,-32768, 1000,-32768, 269,-32768, -32768,-32768, -29,-32768,-32768,-32768,-32768,-32768, 205, 748, -32768, 214, 1510, 223,-32768, 1102,-32768,-32768,-32768, 1442, -32768, 56,-32768, 1183, 173, 224, 238, 240, 1000,-32768, -32768, 1000, 253, 1000,-32768, 258, 263,-32768, 271, 269, 37, 270,-32768,-32768, 287, 1167, 1167, 1192, 236, 629, 1167, 1167, 1167, 1167, 1167, 1167,-32768, 262,-32768,-32768, -4, 315, 268, 265, 261, 277, 51, 272, 230, 110, 235,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768, 153,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768, 340,-32768,-32768,-32768,-32768,-32768, 289,-32768,-32768, 459,-32768, 25, 281, 292,-32768, 294,-32768,-32768, 270, 296,-32768, 173, 32,-32768,-32768,-32768,-32768, 295,-32768, 300,-32768, 269, 1102, 302,-32768, 39,-32768,-32768,-32768, -32768,-32768, 629,-32768, 303,-32768, 301, 1102,-32768, 142, -32768, 305, 158, 297, 309, 165,-32768,-32768,-32768,-32768, -32768,-32768, 62, 1167, 770, 1167, 1167, 1167, 1167,-32768, -32768, 1167,-32768,-32768,-32768,-32768, 1167,-32768,-32768, 1167, -32768,-32768, 1167,-32768,-32768,-32768, 1167,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 795, 301, -32768,-32768, 301, 1102, 866, 1102, 312, 320, 328, 1102, -32768, 325, 327, 329, 677,-32768, 366, 337, 341, 891, -32768,-32768,-32768,-32768, 459,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768, 335, 339, 342,-32768,-32768,-32768, -32768,-32768,-32768,-32768, 345,-32768, 913, 1300,-32768, -12, -32768, 16,-32768, 403, 1463, 31, -43,-32768,-32768, 32, 32, 1102, 343, 252,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768, 336,-32768, 347, 344, 411, 236,-32768, 748, 1347,-32768, 191, 1127,-32768,-32768,-32768,-32768, -22, 315,-32768, 1167, 350, 268, 265, 261, 277, 51, 272, 230, 110,-32768, 236,-32768,-32768,-32768, 348,-32768, 49, -32768,-32768, 414, 1102, 1102, 1102, -50, 367, 349, 360, -32768,-32768,-32768, 361, 363,-32768,-32768,-32768,-32768,-32768, -32768, 356,-32768, 358, 359, 984, 1394, -12,-32768,-32768, -32768, 1102, 270, 270, 371, 260, 266,-32768,-32768, 1102, -32768, 32, 1127, 748, 370, 1102,-32768,-32768, 236,-32768, 364, 1102,-32768,-32768, 1167, 193,-32768,-32768, 1102, 368, 372, 374, 377, 544,-32768,-32768,-32768,-32768,-32768,-32768, -32768, 362,-32768, 380, 384,-32768, 127,-32768,-32768,-32768, -32768,-32768,-32768, 748, 301,-32768,-32768, 216,-32768,-32768, -32768,-32768,-32768, 677, 677, 677, 1102, 1009, 37, 385, 387,-32768,-32768,-32768,-32768, 270, 396,-32768, 375,-32768, 390,-32768,-32768, 392, 1102, 397, 404, 677, 1080, 340, 106,-32768, 748, 677, 406,-32768, 1102,-32768, 1102, 407, 270, 408,-32768,-32768,-32768,-32768,-32768, 1102, 340,-32768, -32768, 468, 473,-32768 }; static const short yypgoto[] = { -32768,-32768, 446, 378, -51, 1, 199, -41,-32768, 318, -32768, 354, -113, -402, 87,-32768, -198, -259, -31, 5, 6,-32768,-32768,-32768,-32768,-32768,-32768, -17, 3, 36, -32768,-32768,-32768, 437,-32768,-32768,-32768, 229,-32768,-32768, -32768,-32768, 365,-32768, 244,-32768,-32768,-32768,-32768, 67, -32768,-32768,-32768,-32768,-32768, 213,-32768,-32768,-32768,-32768, -96,-32768, 379,-32768,-32768,-32768,-32768, -37, 52,-32768, -32768, 69, -249,-32768,-32768,-32768,-32768, 494,-32768, 23, -32768,-32768,-32768,-32768, -136,-32768, 166, -309, -91,-32768, -32768,-32768,-32768, 195,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768, 369,-32768,-32768, -32768,-32768,-32768, 162,-32768, -131,-32768, -115,-32768, -381, -32768, 264, 256, 259, 267, 273,-32768, 255,-32768, 254, -32768, 250,-32768, 251,-32768, -7,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768, -111,-32768,-32768,-32768, -248, 239, 175,-32768, 101, 100,-32768,-32768,-32768 }; #define YYLAST 1560 static const short yytable[] = { 96, 31, 141, 225, 216, 33, 34, 385, 110, 387, 89, 475, 1, 66, 178, 427, 176, 137, 273, 1, 152, 473, 452, 61, 358, 1, 453, 1, 1, 31, 90, 454, 88, 33, 34, 1, 97, 228, 264, 34, 1, 1, 101, 471, -180, 228, 107, 110, 67, 86, 246, 61, 472, 178, 61, 238, 100, 240, 138, 445, 415, 446, 228, 416, 392, 162, 507, 163, 140, 69, 70, 422, 274, 92, 73, 74, 282, 283, 77, 78, 96, 138, 26, 164, 27, 165, 166, 356, 92, 357, 122, 167, 125, 510, 124, 99, 356, 82, 357, 27, 27, 371, 447, 122, 451, 82, 128, 27, 441, 129, 82, 82, 27, 382, 471, 8, 87, 90, 365, 90, 100, 264, 133, 477, 68, 229, 216, 232, 380, 96, 230, 284, 285, 71, 447, 169, 397, 170, 75, 81, 222, 171, 79, 403, 172, 173, 125, 90, 174, 175, 144, 90, 144, 115, 90, 27, 90, 398, 250, 251, 253, 101, 63, 266, 267, 268, 269, 270, 271, 330, 262, 550, 112, 309, 396, 64, 310, 311, 113, 231, 551, 145, 417, 145, 144, 293, 117, 144, 216, 144, 63, 360, 452, 414, 294, 295, 525, 491, 433, 398, 420, 526, 372, 64, 530, 531, 532, 388, 8, 87, 389, -64, -64, -64, -64, 145, 119, 506, 145, -64, 145, -64, 134, 312, 313, 216, 314, 361, 547, 356, 512, 391, 136, 27, 553, 125, 102, 103, 104, 254, 255, 163, 140, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 262, 121, 528, 458, 164, 388, 165, 166, 511, 356, 123, 391, 167, 401, 393, 401, 401, 401, 401, 154, 178, 401, 178, 140, 467, 161, 401, 129, 388, 401, 330, 529, 401, 126, 127, 234, 412, 247, 248, 479, 480, 481, 279, 280, 215, 178, 287, 288, 307, 235, 168, 384, 255, 256, 257, 236, 169, 493, 170, 290, 291, 216, 171, 460, 461, 172, 173, 494, 239, 174, 175, 498, 461, 241, 146, 242, 146, 499, 461, 455, 456, 216, 272, 275, 243, 372, 372, 278, 365, 365, 277, 458, 276, 228, 216, 178, 178, 502, 505, 521, 178, 315, 362, 509, 363, 222, 364, 368, 146, 361, 377, 146, 222, 146, 122, 378, 429, 381, 394, -164, 162, 390, 163, 140, 12, 13, 14, 105, 16, 17, 395, 421, 533, 535, 469, 178, -242, 527, 164, 222, 165, 166, 401, 393, -243, 423, 167, 424, 430, 425, 545, 436, 431, 448, 549, 437, 439, 462, 438, 459, 463, 539, 555, 464, 556, 465, 474, 476, 478, 483, 482, 484, 485, 560, 178, 487, 552, 372, 486, 488, 489, 522, 497, 503, 168, 508, 558, 504, 542, 513, 169, 543, 170, 514, 222, 515, 171, 516, 538, 172, 173, 523, 469, 174, 175, 524, 537, 541, 546, 317, 318, 163, 140, 544, 401, 562, 127, 554, 557, 559, 563, 91, 466, 132, 536, 245, 106, 164, 383, 165, 166, 518, 214, 379, 96, 167, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 319, 320, 321, 501, 322, 323, 324, 325, 326, 327, 328, 329, 24, 25, 244, 98, 136, 237, 500, 435, 450, 404, 169, 249, 170, 405, 408, 400, 171, 410, 409, 172, 173, 411, 406, 174, 175, 162, 2, 163, 140, 407, 495, 419, 496, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, 165, 166, 0, 0, 0, 0, 167, 3, 4, 5, 6, 7, 8, 87, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 517, 0, 0, 0, 0, 0, 0, 0, 0, 169, 0, 170, 0, 0, 0, 171, 0, 0, 172, 173, 0, 0, 174, 175, 162, 2, 163, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, 165, 166, 0, 0, 0, 0, 167, 3, 4, 5, 6, 7, 8, 87, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 317, 248, 163, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, 165, 166, 169, 0, 170, 0, 167, 0, 171, 0, 0, 172, 173, 426, 0, 174, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319, 320, 321, 0, 322, 323, 324, 325, 326, 327, 328, 329, 24, 25, 0, 0, 136, 0, 0, 0, 0, 0, 169, 162, 170, 163, 140, 0, 171, 0, 0, 172, 173, 0, 0, 174, 175, 0, 0, 0, 0, 164, 0, 165, 166, 162, 0, 163, 140, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, 165, 166, 0, 0, 0, 162, 167, 163, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 164, 0, 165, 166, 0, 169, 0, 170, 167, 0, 0, 171, 0, 0, 172, 173, 0, 0, 174, 175, 0, 0, 0, 402, 0, 0, 0, 169, 0, 170, 0, 0, 0, 171, 0, 0, 172, 173, 0, 0, 174, 175, 0, 0, 0, 0, 413, 0, 0, 0, 0, 0, 169, 162, 170, 163, 140, 0, 171, 0, 0, 172, 173, 0, 0, 174, 175, 0, 0, 0, 0, 164, 0, 165, 166, 0, 0, 0, 162, 167, 163, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, 165, 166, 162, 0, 163, 140, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, 165, 166, 0, 169, 418, 170, 167, 0, 0, 171, 0, 0, 172, 173, 0, 0, 174, 175, 0, 432, 0, 0, 0, 0, 0, 0, 0, 0, 169, 0, 170, 0, 0, 0, 171, 0, 0, 172, 173, 0, 0, 174, 175, 0, 0, 0, 0, 0, 0, 440, 169, 162, 170, 163, 140, 0, 171, 0, 0, 172, 173, 0, 0, 174, 175, 0, 0, 0, 2, 164, 0, 165, 166, 0, 0, 0, 162, 167, 163, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, 165, 166, 0, 8, 87, 10, 167, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 0, 0, 0, 490, 169, 0, 170, 0, 0, 0, 171, 142, 0, 172, 173, 0, 0, 174, 175, 0, 534, 0, 0, 0, 0, 0, 0, 0, 0, 169, 162, 170, 163, 140, 0, 171, 0, 0, 172, 173, 0, 0, 174, 175, 0, 0, 0, 0, 164, 0, 165, 166, 162, 0, 163, 140, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, 165, 166, 0, 0, 0, 162, 167, 163, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 548, 0, 0, 0, 0, 0, 165, 166, 0, 169, 0, 170, 167, 0, 0, 171, 0, 0, 172, 173, 0, 0, 174, 175, 0, 0, 162, 0, 163, 140, 0, 169, 0, 170, 0, 0, 0, 171, 0, 0, 172, 173, 0, 2, 174, 175, 165, 166, 0, 0, 468, 162, 167, 163, 140, 0, 169, 0, 170, 0, 0, 0, 171, 0, 0, 172, 173, 0, 0, 174, 175, 165, 166, 0, 8, 87, 10, 167, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 0, 0, 0, 0, 0, 169, 0, 170, 0, 0, 0, 171, 0, 0, 172, 173, 0, 0, 174, 175, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 252, 0, 170, 0, 0, 0, 171, 0, 0, 172, 173, 0, 0, 174, 175, 0, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 25, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 27, 0, 0, 3, 4, 5, 6, 7, 8, 87, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 356, 0, 357, 442, 27, 0, 3, 4, 5, 6, 7, 8, 87, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 356, 0, 391, 442, 27, 0, 3, 4, 5, 6, 7, 8, 87, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 221, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 492, 0, 449, 0, 3, 4, 5, 6, 7, 8, 87, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 3, 4, 5, 6, 7, 8, 87, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 6, 7, 8, 87, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 }; static const short yycheck[] = { 31, 0, 113, 139, 135, 0, 0, 256, 59, 257, 27, 413, 3, 63, 129, 324, 129, 108, 22, 3, 116, 402, 65, 0, 222, 3, 69, 3, 3, 28, 27, 74, 27, 28, 28, 3, 31, 6, 169, 33, 3, 3, 71, 65, 73, 6, 43, 98, 46, 26, 161, 28, 74, 168, 31, 151, 33, 153, 109, 71, 309, 73, 6, 312, 262, 3, 468, 5, 6, 3, 4, 319, 76, 64, 3, 4, 25, 26, 3, 4, 111, 132, 73, 21, 75, 23, 24, 71, 64, 73, 84, 29, 89, 474, 89, 73, 71, 73, 73, 75, 75, 69, 361, 97, 73, 73, 63, 75, 356, 66, 73, 73, 75, 74, 65, 35, 36, 114, 229, 116, 97, 252, 99, 74, 42, 69, 257, 144, 243, 160, 74, 80, 81, 67, 393, 73, 74, 75, 67, 36, 139, 79, 67, 274, 82, 83, 143, 144, 86, 87, 114, 148, 116, 67, 151, 75, 153, 272, 165, 166, 167, 71, 0, 170, 171, 172, 173, 174, 175, 220, 169, 65, 73, 20, 265, 0, 23, 24, 73, 143, 74, 114, 313, 116, 148, 75, 67, 151, 319, 153, 28, 222, 65, 308, 84, 85, 69, 445, 329, 314, 315, 74, 233, 28, 513, 514, 515, 65, 35, 36, 68, 63, 64, 65, 66, 148, 67, 465, 151, 71, 153, 73, 72, 70, 71, 356, 73, 222, 537, 71, 478, 73, 67, 75, 543, 232, 37, 38, 39, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 252, 74, 504, 371, 21, 65, 23, 24, 68, 71, 74, 73, 29, 273, 262, 275, 276, 277, 278, 3, 388, 281, 390, 6, 390, 73, 286, 66, 65, 289, 334, 68, 292, 64, 65, 64, 296, 3, 4, 423, 424, 425, 18, 19, 74, 413, 27, 28, 66, 64, 67, 3, 4, 70, 71, 68, 73, 446, 75, 82, 83, 445, 79, 64, 65, 82, 83, 451, 68, 86, 87, 64, 65, 68, 114, 65, 116, 64, 65, 369, 370, 465, 73, 21, 66, 369, 370, 79, 452, 453, 78, 459, 77, 6, 478, 463, 464, 463, 464, 483, 468, 65, 74, 471, 65, 357, 65, 64, 148, 357, 68, 151, 364, 153, 361, 68, 3, 68, 74, 69, 3, 69, 5, 6, 39, 40, 41, 42, 43, 44, 74, 72, 516, 517, 394, 503, 69, 503, 21, 391, 23, 24, 402, 391, 69, 73, 29, 73, 64, 73, 534, 69, 64, 3, 538, 69, 64, 74, 69, 69, 66, 525, 546, 72, 548, 7, 69, 72, 7, 73, 56, 64, 64, 557, 542, 72, 542, 461, 68, 74, 74, 72, 64, 66, 67, 74, 550, 70, 66, 74, 73, 54, 75, 74, 446, 74, 79, 73, 64, 82, 83, 74, 462, 86, 87, 74, 74, 64, 64, 3, 4, 5, 6, 74, 474, 0, 65, 64, 64, 64, 0, 28, 388, 98, 518, 160, 42, 21, 252, 23, 24, 483, 131, 242, 518, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 461, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 159, 31, 67, 148, 459, 334, 364, 275, 73, 164, 75, 276, 281, 273, 79, 289, 286, 82, 83, 292, 277, 86, 87, 3, 4, 5, 6, 278, 452, 314, 453, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, 23, 24, -1, -1, -1, -1, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, 73, -1, 75, -1, -1, -1, 79, -1, -1, 82, 83, -1, -1, 86, 87, 3, 4, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, 23, 24, -1, -1, -1, -1, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 3, 4, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, 23, 24, 73, -1, 75, -1, 29, -1, 79, -1, -1, 82, 83, 36, -1, 86, 87, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 51, 52, 53, -1, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, -1, -1, 67, -1, -1, -1, -1, -1, 73, 3, 75, 5, 6, -1, 79, -1, -1, 82, 83, -1, -1, 86, 87, -1, -1, -1, -1, 21, -1, 23, 24, 3, -1, 5, 6, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, 23, 24, -1, -1, -1, 3, 29, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 21, -1, 23, 24, -1, 73, -1, 75, 29, -1, -1, 79, -1, -1, 82, 83, -1, -1, 86, 87, -1, -1, -1, 69, -1, -1, -1, 73, -1, 75, -1, -1, -1, 79, -1, -1, 82, 83, -1, -1, 86, 87, -1, -1, -1, -1, 67, -1, -1, -1, -1, -1, 73, 3, 75, 5, 6, -1, 79, -1, -1, 82, 83, -1, -1, 86, 87, -1, -1, -1, -1, 21, -1, 23, 24, -1, -1, -1, 3, 29, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, 23, 24, 3, -1, 5, 6, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, 23, 24, -1, 73, 74, 75, 29, -1, -1, 79, -1, -1, 82, 83, -1, -1, 86, 87, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, 73, -1, 75, -1, -1, -1, 79, -1, -1, 82, 83, -1, -1, 86, 87, -1, -1, -1, -1, -1, -1, 72, 73, 3, 75, 5, 6, -1, 79, -1, -1, 82, 83, -1, -1, 86, 87, -1, -1, -1, 4, 21, -1, 23, 24, -1, -1, -1, 3, 29, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, 23, 24, -1, 35, 36, 37, 29, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, -1, -1, -1, -1, -1, 72, 73, -1, 75, -1, -1, -1, 79, 64, -1, 82, 83, -1, -1, 86, 87, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, 73, 3, 75, 5, 6, -1, 79, -1, -1, 82, 83, -1, -1, 86, 87, -1, -1, -1, -1, 21, -1, 23, 24, 3, -1, 5, 6, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, 23, 24, -1, -1, -1, 3, 29, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, 23, 24, -1, 73, -1, 75, 29, -1, -1, 79, -1, -1, 82, 83, -1, -1, 86, 87, -1, -1, 3, -1, 5, 6, -1, 73, -1, 75, -1, -1, -1, 79, -1, -1, 82, 83, -1, 4, 86, 87, 23, 24, -1, -1, 67, 3, 29, 5, 6, -1, 73, -1, 75, -1, -1, -1, 79, -1, -1, 82, 83, -1, -1, 86, 87, 23, 24, -1, 35, 36, 37, 29, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, -1, -1, -1, -1, -1, -1, 73, -1, 75, -1, -1, -1, 79, -1, -1, 82, 83, -1, -1, 86, 87, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, 73, -1, 75, -1, -1, -1, 79, -1, -1, 82, 83, -1, -1, 86, 87, -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 63, 64, -1, -1, -1, -1, -1, -1, -1, -1, 73, -1, 75, -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 71, -1, 73, 74, 75, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 71, -1, 73, 74, 75, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 74, -1, 7, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/local/share/bison/bison.simple" /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) /* The parser invokes alloca or malloc; define the necessary symbols. */ # if YYSTACK_USE_ALLOCA # define YYSTACK_ALLOC alloca # else # ifndef YYSTACK_USE_ALLOCA # if defined (alloca) || defined (_ALLOCA_H) # define YYSTACK_ALLOC alloca # else # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # else # if defined (__STDC__) || defined (__cplusplus) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif # define YYSTACK_ALLOC malloc # define YYSTACK_FREE free # endif #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ #if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { short yyss; YYSTYPE yyvs; # if YYLSP_NEEDED YYLTYPE yyls; # endif }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # if YYLSP_NEEDED # define YYSTACK_BYTES(N) \ ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAX) # else # define YYSTACK_BYTES(N) \ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAX) # endif /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ register YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (0) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif #if ! defined (YYSIZE_T) && defined (size_t) # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) # if defined (__STDC__) || defined (__cplusplus) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # endif #endif #if ! defined (YYSIZE_T) # define YYSIZE_T unsigned int #endif #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ yyerror ("syntax error: cannot back up"); \ YYERROR; \ } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Compute the default location (before the actions are run). When YYLLOC_DEFAULT is run, CURRENT is set the location of the first token. By default, to implement support for ranges, extend its range to the last symbol. */ #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ Current.last_line = Rhs[N].last_line; \ Current.last_column = Rhs[N].last_column; #endif /* YYLEX -- calling `yylex' with the right arguments. */ #if YYPURE # if YYLSP_NEEDED # ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) # else # define YYLEX yylex (&yylval, &yylloc) # endif # else /* !YYLSP_NEEDED */ # ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) # else # define YYLEX yylex (&yylval) # endif # endif /* !YYLSP_NEEDED */ #else /* !YYPURE */ # define YYLEX yylex () #endif /* !YYPURE */ /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #if YYMAXDEPTH == 0 # undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #ifdef YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) # define yystrlen strlen # else /* Return the length of YYSTR. */ static YYSIZE_T # if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) # else yystrlen (yystr) const char *yystr; # endif { register const char *yys = yystr; while (*yys++ != '\0') continue; return yys - yystr - 1; } # endif # endif # ifndef yystpcpy # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * # if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) # else yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; # endif { register char *yyd = yydest; register const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif #endif #line 315 "/usr/local/share/bison/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM # define YYPARSE_PARAM_DECL # else # define YYPARSE_PARAM_ARG YYPARSE_PARAM # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; # endif #else /* !YYPARSE_PARAM */ # define YYPARSE_PARAM_ARG # define YYPARSE_PARAM_DECL #endif /* !YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ # ifdef YYPARSE_PARAM int yyparse (void *); # else int yyparse (void); # endif #endif /* YY_DECL_VARIABLES -- depending whether we use a pure parser, variables are global, or local to YYPARSE. */ #define YY_DECL_NON_LSP_VARIABLES \ /* The lookahead symbol. */ \ int yychar; \ \ /* The semantic value of the lookahead symbol. */ \ YYSTYPE yylval; \ \ /* Number of parse errors so far. */ \ int yynerrs; #if YYLSP_NEEDED # define YY_DECL_VARIABLES \ YY_DECL_NON_LSP_VARIABLES \ \ /* Location data for the lookahead symbol. */ \ YYLTYPE yylloc; #else # define YY_DECL_VARIABLES \ YY_DECL_NON_LSP_VARIABLES #endif /* If nonreentrant, generate the variables here. */ #if !YYPURE YY_DECL_VARIABLES #endif /* !YYPURE */ int yyparse (YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { /* If reentrant, generate the variables here. */ #if YYPURE YY_DECL_VARIABLES #endif /* !YYPURE */ register int yystate; register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ int yychar1 = 0; /* Three stacks and their tools: `yyss': related to states, `yyvs': related to semantic values, `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; #if YYLSP_NEEDED /* The location stack. */ YYLTYPE yylsa[YYINITDEPTH]; YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #endif #if YYLSP_NEEDED # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else # define YYPOPSTACK (yyvsp--, yyssp--) #endif YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYLSP_NEEDED YYLTYPE yyloc; #endif /* When reducing, the number of symbols on the RHS of the reduced rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; #if YYLSP_NEEDED yylsp = yyls; #endif goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyssp >= yyss + yystacksize - 1) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ # if YYLSP_NEEDED YYLTYPE *yyls1 = yyls; /* This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); yyls = yyls1; # else yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); # endif yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyoverflowlab; # else /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; { short *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); # if YYLSP_NEEDED YYSTACK_RELOCATE (yyls); # endif # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; #if YYLSP_NEEDED yylsp = yyls + yysize - 1; #endif YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyssp >= yyss + yystacksize - 1) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yychar1 = YYTRANSLATE (yychar); #if YYDEBUG /* We have to keep this `#if YYDEBUG', since we use variables which are defined only if `YYDEBUG' is set. */ if (yydebug) { YYFPRINTF (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ # ifdef YYPRINT YYPRINT (stderr, yychar, yylval); # endif YYFPRINTF (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ YYDPRINTF ((stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #if YYLSP_NEEDED *++yylsp = yylloc; #endif /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to the semantic value of the lookahead token. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; #if YYLSP_NEEDED /* Similarly for the default location. Let the user run additional commands if for instance locations are ranges. */ yyloc = yylsp[1-yylen]; YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); #endif #if YYDEBUG /* We have to keep this `#if YYDEBUG', since we use variables which are defined only if `YYDEBUG' is set. */ if (yydebug) { int yyi; YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 5: #line 180 "./parse.y" { scope=0; reset(); common_comment=NULL; in_typedef=0; GetCurrentComment(); } break; case 6: #line 182 "./parse.y" { scope=0; reset(); common_comment=NULL; in_typedef=0; GetCurrentComment(); } break; case 9: #line 191 "./parse.y" { scope=0; reset(); common_comment=NULL; in_typedef=0; } break; case 10: #line 193 "./parse.y" { scope=0; reset(); common_comment=NULL; in_typedef=0; yyval=yyvsp[0]; } break; case 11: #line 199 "./parse.y" { in_type_spec=0; } break; case 12: #line 201 "./parse.y" { in_type_spec=0; } break; case 13: #line 206 "./parse.y" { if(!in_structunion && !in_typedef && !in_function && !common_comment) {common_comment=CopyString(GetCurrentComment()); SetCurrentComment(common_comment);} } break; case 15: #line 213 "./parse.y" { if(yyvsp[-1]) yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); else yyval=yyvsp[0]; } break; case 16: #line 215 "./parse.y" { if(!current->type) current->type=yyvsp[0]; } break; case 17: #line 217 "./parse.y" { if(!current->type) current->type=yyvsp[-1]; yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); } break; case 19: #line 221 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); } break; case 21: #line 228 "./parse.y" { in_type_spec=1; } break; case 23: #line 233 "./parse.y" { if((in_function==0 || in_function==3) && !in_funcdef && !in_structunion) { char* specific_comment=GetCurrentComment(); if(!common_comment) SetCurrentComment(specific_comment); else if(!specific_comment) SetCurrentComment(common_comment); else if(strcmp(common_comment,specific_comment)) SetCurrentComment(ConcatStrings(3,common_comment," ",specific_comment)); else SetCurrentComment(common_comment); } if(in_typedef) { char* vname=strstr(yyvsp[0],current->name); SeenTypedefName(current->name,vname[strlen(current->name)]=='('?-1:1); if(!in_header) SeenTypedef(current->name,ConcatStrings(3,current->qual,current->type,yyvsp[0])); if(in_function==3) DownScope(); } else if(in_function==2) SeenFunctionArg(current->name,ConcatStrings(3,current->qual,current->type,yyvsp[0])); else { char* vname=strstr(yyvsp[0],current->name); if(vname[strlen(current->name)]!='(' && IsATypeName(current->type)!='f') { if((in_funcbody==0 || scope&EXTERN_F) && !in_structunion && !(in_header==GLOBAL && scope&EXTERN_H)) SeenVariableDefinition(current->name,ConcatStrings(3,current->qual,current->type,yyvsp[0]),SCOPE); else if(in_funcbody) SeenScopeVariable(current->name); } else SeenFunctionProto(current->name,in_funcbody); if(in_function==3) DownScope(); } if(in_function==3 && !in_structunion) in_function=0; } break; case 44: #line 317 "./parse.y" { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 46: #line 323 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); { int i=0; while(yyvsp[-1][i] && yyvsp[-1][i]=='*') i++; if(!yyvsp[-1][i]) in_type_spec=0; } } break; case 47: #line 326 "./parse.y" { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 48: #line 328 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 49: #line 330 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 50: #line 332 "./parse.y" { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 51: #line 334 "./parse.y" { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 52: #line 336 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 53: #line 338 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 54: #line 340 "./parse.y" { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 55: #line 347 "./parse.y" { in_type_spec=0; } break; case 56: #line 349 "./parse.y" { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 58: #line 355 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); } break; case 59: #line 357 "./parse.y" { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 60: #line 359 "./parse.y" { yyval=ConcatStrings(4,yyvsp[-2]," ",yyvsp[-1],yyvsp[0]); } break; case 62: #line 365 "./parse.y" { if(yyvsp[-1][0]=='*' && yyvsp[-1][1]==' ') { yyvsp[-1]=&yyvsp[-1][1]; yyvsp[-1][0]='*'; } yyval=ConcatStrings(4," ",yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 65: #line 374 "./parse.y" { yyval=ConcatStrings(2," ",yyvsp[0]); current->name=yyvsp[0]; if(!current->type) current->type="int"; if(in_funcdef==1 && in_function!=3 && !in_structunion) SeenScopeVariable(yyvsp[0]); } break; case 66: #line 381 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 67: #line 382 "./parse.y" { in_type_spec=0; } break; case 68: #line 382 "./parse.y" { in_type_spec=1; } break; case 69: #line 383 "./parse.y" { yyval=ConcatStrings(4,yyvsp[-5],yyvsp[-4],yyvsp[-2],yyvsp[0]); } break; case 71: #line 394 "./parse.y" { yyval=NULL; } break; case 72: #line 396 "./parse.y" { yyval=NULL; if(in_funcbody) scope|=EXTERN_F; else if(in_header) scope|=EXTERN_H; else scope|=EXTERNAL; } break; case 73: #line 401 "./parse.y" { yyval=NULL; } break; case 74: #line 403 "./parse.y" { yyval=NULL; scope |= LOCAL; } break; case 75: #line 405 "./parse.y" { yyval=NULL; in_typedef=1; if(!in_header) SeenTypedef(NULL,NULL); common_comment=CopyString(GetCurrentComment()); } break; case 76: #line 409 "./parse.y" { yyval=NULL; scope |= INLINED; } break; case 78: #line 415 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); } break; case 79: #line 420 "./parse.y" { if(!current->type) current->qual=ConcatStrings(3,current->qual,yyvsp[0]," "); } break; case 80: #line 422 "./parse.y" { if(!current->type) current->qual=ConcatStrings(3,current->qual,yyvsp[0]," "); } break; case 81: #line 429 "./parse.y" { in_type_spec=1; } break; case 92: #line 447 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); } break; case 93: #line 449 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); } break; case 95: #line 455 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); } break; case 96: #line 457 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); } break; case 106: #line 483 "./parse.y" { in_type_spec=0; } break; case 107: #line 485 "./parse.y" { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 110: #line 497 "./parse.y" { push(); if(!in_header) { if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion); else SeenStructUnionStart(yyvsp[-1]); } in_structunion++; } break; case 111: #line 505 "./parse.y" { pop(); in_structunion--; if(!in_structunion && !current->type) current->type=ConcatStrings(2,yyvsp[-4]," {...}"); if(!in_header && !in_structunion && in_typedef) SeenStructUnionEnd(); yyval=ConcatStrings(5,yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); } break; case 112: #line 510 "./parse.y" { push(); if(!in_header) { if(in_structunion) SeenStructUnionComp(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]),in_structunion); else SeenStructUnionStart(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1])); } in_structunion++; } break; case 113: #line 518 "./parse.y" { pop(); in_structunion--; if(!in_structunion && !current->type) current->type=ConcatStrings(3,yyvsp[-5]," ",yyvsp[-4]); if(!in_header && !in_structunion) SeenStructUnionEnd(); yyval=ConcatStrings(7,yyvsp[-5]," ",yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); } break; case 117: #line 532 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 118: #line 537 "./parse.y" { if(!in_header) SeenStructUnionComp(yyvsp[0],in_structunion); } break; case 119: #line 539 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); if(!in_header) SeenStructUnionComp(yyvsp[-2],in_structunion); } break; case 121: #line 548 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); } break; case 126: #line 565 "./parse.y" { push(); if(!in_header) { if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion); else SeenStructUnionStart(yyvsp[-1]); } in_structunion++; } break; case 127: #line 573 "./parse.y" { pop(); in_structunion--; if(!in_structunion && !current->type) current->type=ConcatStrings(2,yyvsp[-4]," {...}"); if(!in_header && !in_structunion && in_typedef) SeenStructUnionEnd(); yyval=ConcatStrings(5,yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); } break; case 128: #line 578 "./parse.y" { push(); if(!in_header) { if(in_structunion) SeenStructUnionComp(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]),in_structunion); else SeenStructUnionStart(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1])); } in_structunion++; } break; case 129: #line 586 "./parse.y" { pop(); in_structunion--; if(!in_structunion && !current->type) current->type=ConcatStrings(3,yyvsp[-5]," ",yyvsp[-4]); if(!in_header && !in_structunion) SeenStructUnionEnd(); yyval=ConcatStrings(7,yyvsp[-5]," ",yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); } break; case 130: #line 594 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); } break; case 135: #line 611 "./parse.y" { push(); if(!in_header) { if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion); else SeenStructUnionStart(yyvsp[-1]); } in_structunion++; } break; case 136: #line 619 "./parse.y" { pop(); in_structunion--; if(!in_structunion && !current->type) current->type=ConcatStrings(2,yyvsp[-4]," {...}"); if(!in_header && !in_structunion && in_typedef) SeenStructUnionEnd(); yyval=ConcatStrings(5,yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); } break; case 137: #line 624 "./parse.y" { push(); if(!in_header) { if(in_structunion) SeenStructUnionComp(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]),in_structunion); else SeenStructUnionStart(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1])); } in_structunion++; } break; case 138: #line 632 "./parse.y" { pop(); in_structunion--; if(!in_structunion && !current->type) current->type=ConcatStrings(3,yyvsp[-5]," ",yyvsp[-4]); if(!in_header && !in_structunion) SeenStructUnionEnd(); yyval=ConcatStrings(7,yyvsp[-5]," ",yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); } break; case 139: #line 640 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); } break; case 145: #line 658 "./parse.y" { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 147: #line 664 "./parse.y" { yyval = ConcatStrings(3, yyvsp[-1], " ", yyvsp[0]); if(!in_header) SeenStructUnionComp(yyvsp[-1],in_structunion); } break; case 148: #line 667 "./parse.y" { yyval = ConcatStrings(3, yyvsp[-1], " ", yyvsp[0]); if(!in_header) SeenStructUnionComp(yyvsp[-1],in_structunion); } break; case 150: #line 674 "./parse.y" { comp_type=yyvsp[0]; } break; case 151: #line 676 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; } break; case 152: #line 678 "./parse.y" { comp_type=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); } break; case 153: #line 680 "./parse.y" { yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; } break; case 154: #line 682 "./parse.y" { comp_type=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); } break; case 155: #line 684 "./parse.y" { yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; } break; case 156: #line 689 "./parse.y" { if(!in_header) SeenStructUnionComp(ConcatStrings(2,comp_type,yyvsp[0]),in_structunion); } break; case 157: #line 691 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); if(!in_header) SeenStructUnionComp(ConcatStrings(2,comp_type,yyvsp[0]),in_structunion); } break; case 160: #line 702 "./parse.y" { if(in_function==2 && !in_structunion) { DownScope(); pop(); in_function=0; } } break; case 161: #line 707 "./parse.y" { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 162: #line 709 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 166: #line 727 "./parse.y" { pop(); in_funcbody=1; in_function=0; } break; case 167: #line 729 "./parse.y" { in_funcbody=in_function=0; DownScope(); SeenFunctionDefinition(NULL); } break; case 168: #line 734 "./parse.y" { char *func_type,*fname=strstr(yyvsp[0],(current-1)->name),*parenth=strstr(yyvsp[0],"("); if(parenth>fname) {parenth[0]=0;func_type=ConcatStrings(3,(current-1)->qual,(current-1)->type,yyvsp[0]);} else { int open=1; char *argbeg=strstr(&parenth[1],"("),*argend; argbeg[1]=0; for(argend=argbeg+2;*argend;argend++) { if(*argend=='(') open++; if(*argend==')') open--; if(!open) break; } func_type=ConcatStrings(4,(current-1)->qual,(current-1)->type,yyvsp[0],argend); } SeenFunctionDefinition(func_type); common_comment=NULL; } break; case 170: #line 758 "./parse.y" { yyval=ConcatStrings(3,current->qual,current->type,yyvsp[0]); } break; case 172: #line 761 "./parse.y" { yyval=ConcatStrings(3,current->qual,current->type,yyvsp[-1]); } break; case 173: #line 768 "./parse.y" { if(!in_structunion) { push(); in_function=2; } } break; case 176: #line 775 "./parse.y" { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 177: #line 777 "./parse.y" { yyval=ConcatStrings(2,yyvsp[-3],yyvsp[-1]); } break; case 178: #line 782 "./parse.y" { if(!in_structunion) { push(); if(in_function==0) UpScope(); if(in_function==0 && !in_funcdef) in_function=1; if(in_function!=3) in_funcdef++; } } break; case 179: #line 786 "./parse.y" { if(!in_structunion) { pop(); if(in_function!=3) in_funcdef--; if(in_funcdef==0) in_function=3; } yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); } break; case 180: #line 793 "./parse.y" { if(!in_funcdef && !in_function && !in_funcbody && !in_structunion) SeenFunctionDeclaration(current->name,SCOPE); in_type_spec=0; } break; case 181: #line 801 "./parse.y" { if(in_function==1 && in_funcdef==1 && !in_structunion) SeenFunctionArg("void","void"); if(in_structunion) yyval=NULL; else yyval="void"; } break; case 184: #line 809 "./parse.y" { if(in_function==1 && in_funcdef==1 && in_funcbody==0 && !in_structunion) { SeenFunctionArg(yyvsp[0],NULL); SeenScopeVariable(yyvsp[0]); } } break; case 185: #line 811 "./parse.y" { if(in_function==1 && in_funcdef==1 && in_funcbody==0 && !in_structunion) { SeenFunctionArg(yyvsp[0],NULL); SeenScopeVariable(yyvsp[0]); } yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 187: #line 818 "./parse.y" { if(in_function==1 && in_funcdef==1 && in_funcbody==0 && !in_structunion) SeenFunctionArg(yyvsp[0],yyvsp[0]); yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 188: #line 824 "./parse.y" { if(in_function==1 && in_funcdef==1 && in_funcbody==0 && !in_structunion) SeenFunctionArg(strcmp("void",yyvsp[0])?current->name:"void",yyvsp[0]); in_type_spec=0; } break; case 189: #line 827 "./parse.y" { if(in_function==1 && in_funcdef==1 && in_funcbody==0 && !in_structunion) SeenFunctionArg(current->name,yyvsp[0]); in_type_spec=0; yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 190: #line 833 "./parse.y" { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 191: #line 835 "./parse.y" { in_type_spec=0; } break; case 192: #line 837 "./parse.y" { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 205: #line 861 "./parse.y" { UpScope(); reset(); } break; case 206: #line 863 "./parse.y" { DownScope(); } break; case 213: #line 880 "./parse.y" { scope=0; reset(); common_comment=NULL; in_typedef=0; } break; case 222: #line 912 "./parse.y" { UpScope(); reset(); } break; case 223: #line 914 "./parse.y" { DownScope(); } break; case 233: #line 931 "./parse.y" { in_type_spec=0; } break; case 234: #line 933 "./parse.y" { in_type_spec=0; } break; case 254: #line 1006 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 271: #line 1037 "./parse.y" { yyval=ConcatStrings(5,yyvsp[-4],yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 272: #line 1039 "./parse.y" { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 274: #line 1047 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 276: #line 1055 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 278: #line 1063 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 280: #line 1071 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 282: #line 1079 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 284: #line 1087 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 288: #line 1100 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 294: #line 1115 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 298: #line 1128 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 302: #line 1141 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 318: #line 1172 "./parse.y" { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 319: #line 1177 "./parse.y" { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 322: #line 1187 "./parse.y" { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 325: #line 1200 "./parse.y" { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 326: #line 1202 "./parse.y" { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 327: #line 1207 "./parse.y" { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 328: #line 1212 "./parse.y" { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); } break; case 331: #line 1221 "./parse.y" { if(!IsAScopeVariable(yyvsp[0])) SeenFunctionCall(yyvsp[0]); } break; case 347: #line 1265 "./parse.y" { CheckFunctionVariableRef(yyvsp[0],in_funcbody); } break; case 353: #line 1278 "./parse.y" { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); } break; case 354: #line 1279 "./parse.y" { push(); } break; case 355: #line 1279 "./parse.y" { pop(); } break; } #line 705 "/usr/local/share/bison/bison.simple" yyvsp -= yylen; yyssp -= yylen; #if YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG if (yydebug) { short *yyssp1 = yyss - 1; YYFPRINTF (stderr, "state stack now"); while (yyssp1 != yyssp) YYFPRINTF (stderr, " %d", *++yyssp1); YYFPRINTF (stderr, "\n"); } #endif *++yyvsp = yyval; #if YYLSP_NEEDED *++yylsp = yyloc; #endif /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { YYSIZE_T yysize = 0; char *yymsg; int yyx, yycount; yycount = 0; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx) yysize += yystrlen (yytname[yyx]) + 15, yycount++; yysize += yystrlen ("parse error, unexpected ") + 1; yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { char *yyp = yystpcpy (yymsg, "parse error, unexpected "); yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); if (yycount < 5) { yycount = 0; for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) if (yycheck[yyx + yyn] == yyx) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); yyp = yystpcpy (yyp, yytname[yyx]); yycount++; } } yyerror (yymsg); YYSTACK_FREE (yymsg); } else yyerror ("parse error; also virtual memory exhausted"); } else #endif /* defined (YYERROR_VERBOSE) */ yyerror ("parse error"); } goto yyerrlab1; /*--------------------------------------------------. | yyerrlab1 -- error raised explicitly by an action | `--------------------------------------------------*/ yyerrlab1: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; YYDPRINTF ((stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1])); yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; /*-------------------------------------------------------------------. | yyerrdefault -- current state does not do anything special for the | | error token. | `-------------------------------------------------------------------*/ yyerrdefault: #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ /* If its default is to accept any token, ok. Otherwise pop it. */ yyn = yydefact[yystate]; if (yyn) goto yydefault; #endif /*---------------------------------------------------------------. | yyerrpop -- pop the current state because it cannot handle the | | error token | `---------------------------------------------------------------*/ yyerrpop: if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #if YYLSP_NEEDED yylsp--; #endif #if YYDEBUG if (yydebug) { short *yyssp1 = yyss - 1; YYFPRINTF (stderr, "Error: state stack now"); while (yyssp1 != yyssp) YYFPRINTF (stderr, " %d", *++yyssp1); YYFPRINTF (stderr, "\n"); } #endif /*--------------. | yyerrhandle. | `--------------*/ yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; #if YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; /*---------------------------------------------. | yyoverflowab -- parser overflow comes here. | `---------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ yyreturn: #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif return yyresult; } #line 1336 "./parse.y" #if YYDEBUG static int last_yylex[11]; static char *last_yylval[11]; static int count=0,modcount=0; #endif /* YYDEBUG */ /*++++++++++++++++++++++++++++++++++++++ Stop parsing the current file, due to an error. char *s The error message to print out. ++++++++++++++++++++++++++++++++++++++*/ static void yyerror( char *s ) { #if YYDEBUG int i; #endif fflush(stdout); fprintf(stderr,"%s:%d: cxref: %s\n\n",parse_file,parse_line,s); #if YYDEBUG fprintf(stderr,"The previous 10, current and next 10 symbols are:\n"); for(i=count>10?count-11:0,modcount=i%11;i