home *** CD-ROM | disk | FTP | other *** search
-
- /* A Bison parser, made from parse.y
- by GNU Bison version 1.25
- */
-
- #define YYBISON 1 /* Identify Bison output. */
-
- #define IDENTIFIER 258
- #define TYPE_NAME 259
- #define LITERAL 260
- #define STRING_LITERAL 261
- #define ELLIPSES 262
- #define MUL_ASSIGN 263
- #define DIV_ASSIGN 264
- #define MOD_ASSIGN 265
- #define ADD_ASSIGN 266
- #define SUB_ASSIGN 267
- #define LEFT_ASSIGN 268
- #define RIGHT_ASSIGN 269
- #define AND_ASSIGN 270
- #define XOR_ASSIGN 271
- #define OR_ASSIGN 272
- #define EQ_OP 273
- #define NE_OP 274
- #define PTR_OP 275
- #define AND_OP 276
- #define OR_OP 277
- #define DEC_OP 278
- #define INC_OP 279
- #define LE_OP 280
- #define GE_OP 281
- #define LEFT_SHIFT 282
- #define RIGHT_SHIFT 283
- #define SIZEOF 284
- #define TYPEDEF 285
- #define EXTERN 286
- #define STATIC 287
- #define AUTO 288
- #define REGISTER 289
- #define CONST 290
- #define VOLATILE 291
- #define VOID 292
- #define INLINE 293
- #define CHAR 294
- #define SHORT 295
- #define INT 296
- #define LONG 297
- #define SIGNED 298
- #define UNSIGNED 299
- #define FLOAT 300
- #define DOUBLE 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
-
-
- /***************************************
- $Header: /home/amb/cxref/RCS/parse.y 1.29 1997/11/20 19:19:07 amb Exp $
-
- C Cross Referencing & Documentation tool. Version 1.4a.
-
- C parser.
- ******************/ /******************
- Written by Andrew M. Bishop
-
- This file Copyright 1995,96,97 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 <string.h>
- #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)
- {
- 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
- #endif
- #include <stdio.h>
-
- #ifndef __cplusplus
- #ifndef __STDC__
- #ifndef const
- #define const
- #endif
- #endif
- #endif
-
-
-
- #define YYFINAL 552
- #define YYFLAG -32768
- #define YYNTBASE 87
-
- #define YYTRANSLATE(x) ((unsigned)(x) <= 317 ? yytranslate[x] : 254)
-
- 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, 85, 2, 2, 2, 83, 77, 2, 68,
- 69, 72, 80, 64, 81, 86, 82, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 73, 63, 78,
- 65, 79, 74, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 70, 2, 71, 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, 2, 66, 75, 67, 84, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 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, 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
- };
-
- #if YYDEBUG != 0
- 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, 78, 81, 85, 90, 92, 95, 97, 101, 104,
- 108, 112, 117, 120, 124, 128, 133, 135, 138, 140,
- 143, 146, 150, 152, 156, 158, 160, 162, 166, 167,
- 168, 175, 177, 179, 181, 183, 185, 187, 189, 191,
- 194, 196, 198, 200, 202, 204, 206, 208, 210, 212,
- 214, 216, 218, 221, 224, 226, 229, 232, 234, 236,
- 238, 240, 242, 244, 246, 248, 250, 253, 255, 257,
- 258, 264, 265, 272, 274, 277, 279, 283, 285, 289,
- 291, 294, 296, 298, 300, 302, 303, 309, 310, 317,
- 320, 322, 324, 326, 328, 329, 335, 336, 343, 346,
- 348, 350, 352, 355, 358, 361, 363, 364, 369, 370,
- 376, 377, 383, 385, 389, 391, 393, 395, 398, 402,
- 404, 406, 408, 409, 413, 415, 417, 420, 423, 427,
- 429, 431, 434, 435, 441, 443, 444, 446, 448, 450,
- 454, 456, 460, 462, 466, 469, 471, 474, 476, 478,
- 480, 482, 484, 486, 488, 490, 492, 494, 496, 498,
- 500, 503, 504, 505, 511, 512, 514, 516, 519, 521,
- 523, 525, 533, 539, 541, 543, 545, 553, 559, 562,
- 566, 570, 574, 579, 584, 589, 595, 601, 604, 607,
- 610, 613, 615, 617, 623, 626, 629, 632, 636, 638,
- 641, 645, 647, 649, 653, 655, 657, 661, 667, 669,
- 671, 673, 675, 677, 679, 681, 683, 685, 687, 689,
- 691, 697, 702, 704, 708, 710, 714, 716, 720, 722,
- 726, 728, 732, 734, 738, 740, 742, 744, 748, 750,
- 752, 754, 756, 758, 762, 764, 766, 768, 772, 774,
- 776, 778, 782, 784, 786, 788, 790, 792, 794, 796,
- 798, 800, 802, 804, 806, 808, 810, 813, 816, 821,
- 828, 835, 838, 841, 844, 847, 852, 855, 858, 861,
- 863, 865, 867, 869, 871, 873, 875, 877, 879, 883,
- 887, 891, 896, 900, 905, 908, 911, 916, 918, 920,
- 922, 924, 926, 929, 933, 934, 935, 941, 943, 945,
- 949, 955, 963, 973, 985, 987, 990, 993, 994, 996,
- 1000, 1005, 1006, 1008, 1012, 1017, 1020, 1022, 1026, 1027,
- 1029, 1033, 1037, 1043, 1048, 1055, 1057
- };
-
- static const short yyrhs[] = { -1,
- 88, 0, 89, 0, 88, 89, 0, 91, 0, 156,
- 0, 243, 0, 194, 0, 91, 0, 90, 91, 0,
- 92, 94, 63, 0, 92, 63, 0, 93, 0, 111,
- 0, 111, 93, 0, 114, 0, 114, 93, 0, 113,
- 0, 113, 93, 0, 96, 0, 0, 94, 64, 95,
- 96, 0, 97, 0, 103, 0, 103, 248, 0, 103,
- 98, 0, 103, 248, 98, 0, 65, 100, 0, 100,
- 0, 99, 64, 100, 0, 198, 0, 66, 67, 0,
- 66, 99, 67, 0, 66, 99, 64, 67, 0, 104,
- 0, 104, 102, 0, 102, 0, 68, 101, 69, 0,
- 70, 71, 0, 102, 70, 71, 0, 70, 241, 71,
- 0, 102, 70, 241, 71, 0, 68, 69, 0, 102,
- 68, 69, 0, 68, 167, 69, 0, 102, 68, 167,
- 69, 0, 105, 0, 104, 105, 0, 72, 0, 72,
- 112, 0, 72, 104, 0, 72, 112, 104, 0, 106,
- 0, 68, 103, 69, 0, 107, 0, 162, 0, 3,
- 0, 105, 70, 71, 0, 0, 0, 105, 70, 108,
- 241, 109, 71, 0, 3, 0, 33, 0, 31, 0,
- 34, 0, 32, 0, 30, 0, 38, 0, 113, 0,
- 112, 113, 0, 35, 0, 36, 0, 115, 0, 122,
- 0, 116, 0, 117, 0, 132, 0, 119, 0, 138,
- 0, 120, 0, 45, 0, 46, 0, 46, 42, 0,
- 42, 46, 0, 118, 0, 118, 113, 0, 117, 118,
- 0, 43, 0, 44, 0, 39, 0, 40, 0, 41,
- 0, 42, 0, 4, 0, 37, 0, 92, 0, 92,
- 101, 0, 123, 0, 130, 0, 0, 49, 66, 124,
- 126, 67, 0, 0, 49, 131, 66, 125, 126, 67,
- 0, 127, 0, 127, 64, 0, 128, 0, 127, 64,
- 128, 0, 129, 0, 129, 65, 198, 0, 3, 0,
- 49, 131, 0, 3, 0, 4, 0, 133, 0, 136,
- 0, 0, 47, 66, 134, 144, 67, 0, 0, 47,
- 137, 66, 135, 144, 67, 0, 47, 137, 0, 3,
- 0, 4, 0, 139, 0, 142, 0, 0, 48, 66,
- 140, 144, 67, 0, 0, 48, 143, 66, 141, 144,
- 67, 0, 48, 143, 0, 3, 0, 4, 0, 145,
- 0, 144, 145, 0, 133, 63, 0, 139, 63, 0,
- 146, 0, 0, 114, 147, 150, 63, 0, 0, 112,
- 114, 148, 150, 63, 0, 0, 114, 112, 149, 150,
- 63, 0, 151, 0, 150, 64, 151, 0, 152, 0,
- 153, 0, 103, 0, 73, 154, 0, 103, 73, 154,
- 0, 198, 0, 3, 0, 4, 0, 0, 158, 157,
- 172, 0, 159, 0, 160, 0, 92, 160, 0, 160,
- 90, 0, 92, 160, 90, 0, 161, 0, 162, 0,
- 104, 162, 0, 0, 164, 68, 163, 165, 69, 0,
- 105, 0, 0, 167, 0, 166, 0, 3, 0, 166,
- 64, 3, 0, 168, 0, 168, 64, 7, 0, 169,
- 0, 168, 64, 169, 0, 92, 103, 0, 92, 0,
- 92, 101, 0, 243, 0, 172, 0, 177, 0, 180,
- 0, 185, 0, 189, 0, 190, 0, 191, 0, 192,
- 0, 193, 0, 194, 0, 195, 0, 170, 0, 171,
- 170, 0, 0, 0, 66, 173, 175, 174, 67, 0,
- 0, 176, 0, 171, 0, 176, 171, 0, 90, 0,
- 179, 0, 178, 0, 52, 68, 196, 69, 170, 53,
- 170, 0, 52, 68, 196, 69, 170, 0, 181, 0,
- 182, 0, 184, 0, 56, 170, 55, 68, 196, 69,
- 63, 0, 57, 68, 183, 69, 170, 0, 63, 63,
- 0, 196, 63, 63, 0, 63, 196, 63, 0, 63,
- 63, 196, 0, 63, 196, 63, 196, 0, 196, 63,
- 63, 196, 0, 196, 63, 196, 63, 0, 196, 63,
- 196, 63, 196, 0, 55, 68, 196, 69, 170, 0,
- 186, 73, 0, 188, 73, 0, 187, 73, 0, 50,
- 241, 0, 51, 0, 3, 0, 54, 68, 196, 69,
- 170, 0, 60, 63, 0, 59, 63, 0, 196, 63,
- 0, 58, 3, 63, 0, 63, 0, 61, 63, 0,
- 61, 196, 63, 0, 197, 0, 198, 0, 197, 64,
- 198, 0, 200, 0, 249, 0, 216, 199, 198, 0,
- 216, 199, 66, 250, 67, 0, 65, 0, 8, 0,
- 9, 0, 10, 0, 11, 0, 12, 0, 13, 0,
- 14, 0, 15, 0, 16, 0, 17, 0, 201, 0,
- 201, 74, 196, 73, 200, 0, 201, 74, 73, 200,
- 0, 202, 0, 201, 22, 202, 0, 203, 0, 202,
- 21, 203, 0, 204, 0, 203, 75, 204, 0, 205,
- 0, 204, 76, 205, 0, 206, 0, 205, 77, 206,
- 0, 208, 0, 206, 207, 208, 0, 18, 0, 19,
- 0, 210, 0, 208, 209, 210, 0, 78, 0, 25,
- 0, 79, 0, 26, 0, 212, 0, 210, 211, 212,
- 0, 27, 0, 28, 0, 214, 0, 212, 213, 214,
- 0, 80, 0, 81, 0, 216, 0, 214, 215, 216,
- 0, 72, 0, 82, 0, 83, 0, 217, 0, 218,
- 0, 219, 0, 220, 0, 221, 0, 222, 0, 223,
- 0, 224, 0, 225, 0, 226, 0, 227, 0, 77,
- 216, 0, 84, 216, 0, 68, 121, 69, 216, 0,
- 68, 121, 69, 66, 250, 67, 0, 68, 121, 69,
- 66, 253, 67, 0, 72, 216, 0, 85, 216, 0,
- 23, 216, 0, 24, 216, 0, 29, 68, 121, 69,
- 0, 29, 216, 0, 81, 216, 0, 80, 216, 0,
- 228, 0, 231, 0, 232, 0, 233, 0, 234, 0,
- 235, 0, 236, 0, 229, 0, 230, 0, 227, 86,
- 155, 0, 227, 20, 155, 0, 227, 68, 69, 0,
- 227, 68, 242, 69, 0, 110, 68, 69, 0, 110,
- 68, 242, 69, 0, 227, 23, 0, 227, 24, 0,
- 227, 70, 196, 71, 0, 110, 0, 5, 0, 237,
- 0, 238, 0, 6, 0, 237, 6, 0, 68, 196,
- 69, 0, 0, 0, 68, 239, 172, 240, 69, 0,
- 196, 0, 198, 0, 242, 64, 198, 0, 244, 68,
- 237, 69, 63, 0, 244, 68, 237, 73, 245, 69,
- 63, 0, 244, 68, 237, 73, 245, 73, 245, 69,
- 63, 0, 244, 68, 237, 73, 245, 73, 245, 73,
- 247, 69, 63, 0, 62, 0, 62, 36, 0, 36,
- 62, 0, 0, 246, 0, 245, 64, 246, 0, 237,
- 68, 196, 69, 0, 0, 237, 0, 247, 64, 237,
- 0, 62, 68, 237, 69, 0, 21, 188, 0, 251,
- 0, 250, 64, 251, 0, 0, 198, 0, 66, 250,
- 67, 0, 155, 73, 198, 0, 155, 73, 66, 250,
- 67, 0, 86, 155, 65, 198, 0, 86, 155, 65,
- 66, 250, 67, 0, 252, 0, 253, 64, 252, 0
- };
-
- #endif
-
- #if YYDEBUG != 0
- static const short yyrline[] = { 0,
- 169, 170, 174, 175, 179, 181, 183, 184, 190, 192,
- 198, 200, 205, 210, 211, 213, 215, 218, 219, 226,
- 227, 228, 231, 275, 276, 277, 278, 282, 286, 287,
- 291, 292, 293, 294, 301, 302, 304, 308, 311, 313,
- 315, 317, 319, 321, 323, 325, 332, 334, 339, 340,
- 342, 344, 349, 350, 354, 355, 359, 366, 368, 368,
- 369, 375, 379, 381, 386, 388, 390, 394, 399, 400,
- 405, 407, 414, 419, 420, 421, 422, 423, 424, 425,
- 429, 430, 431, 433, 438, 439, 441, 446, 447, 448,
- 449, 450, 451, 455, 459, 463, 465, 472, 473, 477,
- 485, 490, 498, 506, 507, 511, 512, 517, 519, 524,
- 528, 533, 534, 540, 541, 545, 553, 558, 566, 574,
- 579, 580, 586, 587, 591, 599, 604, 612, 620, 625,
- 626, 632, 633, 638, 641, 644, 648, 650, 652, 654,
- 656, 658, 663, 665, 671, 672, 676, 681, 683, 688,
- 692, 693, 701, 704, 708, 730, 731, 733, 734, 741,
- 746, 747, 752, 755, 761, 769, 772, 773, 777, 779,
- 785, 786, 792, 795, 801, 803, 805, 812, 813, 814,
- 815, 816, 817, 818, 819, 820, 821, 822, 823, 827,
- 828, 834, 837, 839, 842, 843, 844, 845, 849, 855,
- 856, 860, 864, 870, 871, 872, 876, 880, 884, 885,
- 886, 887, 888, 889, 890, 891, 895, 901, 902, 903,
- 907, 911, 915, 921, 927, 930, 934, 938, 942, 946,
- 947, 953, 959, 960, 967, 968, 969, 970, 973, 974,
- 975, 976, 977, 978, 979, 980, 981, 982, 983, 989,
- 990, 992, 999, 1000, 1007, 1008, 1015, 1016, 1023, 1024,
- 1031, 1032, 1039, 1040, 1044, 1045, 1051, 1052, 1056, 1057,
- 1058, 1059, 1065, 1066, 1070, 1071, 1077, 1078, 1082, 1083,
- 1089, 1090, 1094, 1095, 1096, 1102, 1103, 1104, 1105, 1106,
- 1107, 1108, 1109, 1110, 1111, 1112, 1116, 1120, 1125, 1127,
- 1128, 1132, 1136, 1141, 1145, 1149, 1151, 1156, 1161, 1168,
- 1169, 1170, 1172, 1173, 1174, 1175, 1179, 1180, 1184, 1188,
- 1192, 1193, 1197, 1198, 1202, 1206, 1210, 1214, 1216, 1217,
- 1218, 1221, 1222, 1226, 1228, 1228, 1229, 1234, 1238, 1239,
- 1247, 1248, 1249, 1250, 1254, 1255, 1256, 1260, 1261, 1262,
- 1266, 1270, 1271, 1272, 1276, 1282, 1288, 1289, 1293, 1294,
- 1295, 1299, 1300, 1301, 1302, 1306, 1307
- };
- #endif
-
-
- #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
-
- 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","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_list","initializer",
- "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","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","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","statement_list","compound_statement",
- "@15","@16","compound_statement_body","inner_declaration_list","conditional_statement",
- "if_else_statement","if_statement","iterative_statement","do_statement","for_statement",
- "for_expressions","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","@17","@18","constant_expression","expression_list",
- "asm_statement","asm_type","asm_inout_list","asm_inout","asm_clobber_list","asm_label",
- "named_label_address","assignment_expression_list","assignment_expression_list_item",
- "named_assignment","named_assignment_list", NULL
- };
- #endif
-
- static const short yyr1[] = { 0,
- 87, 87, 88, 88, 89, 89, 89, 89, 90, 90,
- 91, 91, 92, 93, 93, 93, 93, 93, 93, 94,
- 95, 94, 96, 97, 97, 97, 97, 98, 99, 99,
- 100, 100, 100, 100, 101, 101, 101, 102, 102, 102,
- 102, 102, 102, 102, 102, 102, 103, 103, 104, 104,
- 104, 104, 105, 105, 105, 105, 106, 107, 108, 109,
- 107, 110, 111, 111, 111, 111, 111, 111, 112, 112,
- 113, 113, 114, 115, 115, 115, 115, 115, 115, 115,
- 116, 116, 116, 116, 117, 117, 117, 118, 118, 118,
- 118, 118, 118, 119, 120, 121, 121, 122, 122, 124,
- 123, 125, 123, 126, 126, 127, 127, 128, 128, 129,
- 130, 131, 131, 132, 132, 134, 133, 135, 133, 136,
- 137, 137, 138, 138, 140, 139, 141, 139, 142, 143,
- 143, 144, 144, 145, 145, 145, 147, 146, 148, 146,
- 149, 146, 150, 150, 151, 151, 152, 153, 153, 154,
- 155, 155, 157, 156, 158, 159, 159, 159, 159, 160,
- 161, 161, 163, 162, 164, 165, 165, 165, 166, 166,
- 167, 167, 168, 168, 169, 169, 169, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 171,
- 171, 173, 174, 172, 175, 175, 175, 175, 176, 177,
- 177, 178, 179, 180, 180, 180, 181, 182, 183, 183,
- 183, 183, 183, 183, 183, 183, 184, 185, 185, 185,
- 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
- 195, 196, 197, 197, 198, 198, 198, 198, 199, 199,
- 199, 199, 199, 199, 199, 199, 199, 199, 199, 200,
- 200, 200, 201, 201, 202, 202, 203, 203, 204, 204,
- 205, 205, 206, 206, 207, 207, 208, 208, 209, 209,
- 209, 209, 210, 210, 211, 211, 212, 212, 213, 213,
- 214, 214, 215, 215, 215, 216, 216, 216, 216, 216,
- 216, 216, 216, 216, 216, 216, 217, 218, 219, 219,
- 219, 220, 221, 222, 223, 224, 224, 225, 226, 227,
- 227, 227, 227, 227, 227, 227, 228, 228, 229, 230,
- 231, 231, 232, 232, 233, 234, 235, 236, 236, 236,
- 236, 237, 237, 238, 239, 240, 238, 241, 242, 242,
- 243, 243, 243, 243, 244, 244, 244, 245, 245, 245,
- 246, 247, 247, 247, 248, 249, 250, 250, 251, 251,
- 251, 252, 252, 252, 252, 253, 253
- };
-
- 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,
- 1, 2, 3, 4, 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, 2, 2, 1, 2, 2, 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, 1, 2, 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, 2, 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, 1,
- 2, 0, 0, 5, 0, 1, 1, 2, 1, 1,
- 1, 7, 5, 1, 1, 1, 7, 5, 2, 3,
- 3, 3, 4, 4, 4, 5, 5, 2, 2, 2,
- 2, 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,
- 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, 1, 3, 0, 1,
- 3, 3, 5, 4, 6, 1, 3
- };
-
- static const short yydefact[] = { 1,
- 57, 94, 67, 64, 66, 63, 65, 71, 72, 95,
- 68, 90, 91, 92, 93, 88, 89, 81, 82, 0,
- 0, 0, 345, 229, 0, 49, 2, 3, 5, 0,
- 13, 0, 165, 53, 55, 14, 18, 16, 73, 75,
- 76, 85, 78, 80, 74, 98, 99, 77, 114, 115,
- 79, 123, 124, 6, 153, 155, 156, 160, 161, 0,
- 8, 7, 0, 347, 84, 83, 121, 122, 116, 120,
- 130, 131, 125, 129, 112, 113, 100, 111, 346, 0,
- 0, 47, 56, 72, 51, 50, 69, 4, 12, 0,
- 20, 23, 24, 0, 157, 162, 59, 15, 19, 17,
- 93, 87, 86, 0, 158, 9, 0, 163, 0, 0,
- 118, 0, 127, 0, 102, 54, 48, 52, 70, 11,
- 21, 0, 0, 26, 25, 159, 58, 0, 192, 154,
- 10, 166, 332, 0, 0, 137, 114, 123, 0, 132,
- 136, 0, 0, 0, 110, 0, 104, 106, 108, 0,
- 0, 0, 62, 329, 0, 0, 0, 0, 0, 335,
- 0, 0, 0, 0, 0, 0, 28, 328, 31, 235,
- 250, 253, 255, 257, 259, 261, 263, 267, 273, 277,
- 281, 286, 287, 288, 289, 290, 291, 292, 293, 294,
- 295, 296, 310, 317, 318, 311, 312, 313, 314, 315,
- 316, 330, 331, 236, 27, 338, 232, 233, 60, 195,
- 169, 176, 0, 168, 167, 171, 173, 333, 0, 348,
- 139, 141, 0, 134, 135, 117, 133, 0, 126, 0,
- 101, 105, 0, 0, 22, 0, 223, 356, 304, 305,
- 335, 307, 32, 0, 29, 96, 0, 0, 0, 302,
- 297, 309, 308, 298, 303, 0, 0, 0, 0, 0,
- 0, 0, 265, 266, 0, 270, 272, 269, 271, 0,
- 275, 276, 0, 279, 280, 0, 283, 284, 285, 0,
- 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
- 239, 0, 0, 325, 326, 0, 0, 0, 0, 0,
- 62, 0, 222, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 199, 190, 197, 179, 193, 196, 180, 201,
- 200, 181, 204, 205, 206, 182, 0, 0, 0, 183,
- 184, 185, 186, 187, 188, 189, 0, 178, 0, 0,
- 177, 37, 175, 35, 164, 0, 0, 341, 0, 0,
- 349, 0, 0, 0, 147, 0, 143, 145, 146, 119,
- 128, 107, 109, 103, 355, 0, 0, 33, 0, 97,
- 35, 0, 334, 336, 323, 339, 0, 254, 281, 0,
- 0, 256, 258, 260, 262, 264, 268, 274, 278, 282,
- 359, 237, 151, 152, 320, 321, 0, 0, 319, 234,
- 61, 221, 0, 0, 0, 0, 0, 0, 0, 226,
- 225, 230, 0, 191, 0, 198, 218, 220, 219, 227,
- 43, 0, 0, 39, 0, 0, 0, 36, 170, 172,
- 174, 0, 0, 0, 348, 0, 0, 148, 150, 0,
- 138, 0, 306, 34, 30, 359, 299, 0, 0, 324,
- 252, 0, 359, 360, 0, 357, 322, 327, 0, 0,
- 0, 0, 0, 0, 0, 228, 231, 194, 38, 45,
- 41, 44, 0, 40, 0, 0, 350, 342, 0, 140,
- 142, 149, 144, 62, 0, 0, 0, 366, 0, 337,
- 340, 251, 0, 359, 238, 0, 0, 0, 0, 209,
- 0, 0, 0, 46, 42, 351, 0, 352, 0, 0,
- 300, 0, 301, 361, 358, 203, 224, 217, 0, 212,
- 211, 208, 210, 0, 343, 353, 0, 0, 359, 362,
- 367, 0, 0, 213, 214, 215, 0, 0, 359, 364,
- 0, 202, 207, 216, 354, 344, 0, 363, 365, 0,
- 0, 0
- };
-
- static const short yydefgoto[] = { 550,
- 27, 28, 105, 106, 107, 31, 90, 151, 91, 92,
- 124, 244, 167, 422, 342, 355, 81, 82, 34, 35,
- 128, 300, 168, 36, 135, 37, 38, 39, 40, 41,
- 42, 43, 44, 247, 45, 46, 114, 150, 146, 147,
- 148, 149, 47, 78, 48, 49, 110, 142, 50, 70,
- 51, 52, 112, 144, 53, 74, 139, 140, 141, 223,
- 352, 353, 356, 357, 358, 359, 438, 486, 54, 104,
- 55, 56, 57, 58, 83, 132, 60, 213, 214, 423,
- 216, 217, 314, 315, 316, 210, 415, 317, 318, 319,
- 320, 321, 322, 323, 324, 464, 325, 326, 327, 328,
- 329, 330, 331, 332, 333, 334, 335, 336, 337, 207,
- 208, 292, 170, 171, 172, 173, 174, 175, 176, 265,
- 177, 270, 178, 273, 179, 276, 180, 280, 181, 182,
- 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
- 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
- 203, 249, 448, 209, 377, 338, 63, 350, 351, 527,
- 125, 204, 455, 456, 488, 489
- };
-
- static const short yypact[] = { 1228,
- -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 23,-32768,
- -32768,-32768,-32768,-32768, 69,-32768,-32768,-32768, 113, 21,
- 32, 60, 29,-32768, 48, 10, 1228,-32768,-32768, 76,
- -32768, 49, 90,-32768,-32768, 1578, 1578, 1578,-32768,-32768,
- 321, 40,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
- -32768,-32768,-32768,-32768,-32768,-32768, 1578,-32768, 203, 129,
- -32768,-32768, 141,-32768,-32768,-32768,-32768,-32768,-32768, 114,
- -32768,-32768,-32768, 123,-32768,-32768,-32768, 158,-32768, 162,
- 49, 149,-32768,-32768,-32768, 10,-32768,-32768,-32768, 31,
- -32768,-32768, 104, 49, 1578, 203, 176,-32768,-32768,-32768,
- -32768,-32768,-32768, 186, 1578,-32768, 76,-32768, 287, 1291,
- -32768, 1291,-32768, 288,-32768,-32768, 149,-32768,-32768,-32768,
- -32768, 231, 628,-32768, 253, 1578,-32768, 1121,-32768,-32768,
- -32768, 1512,-32768, 122, 1291, 40, 247, 264, 1382,-32768,
- -32768, 1291, 1416, 1291,-32768, 263, 269,-32768, 271, 288,
- 48, 287,-32768,-32768, 331, 1149, 1149, 1171, 596, 478,
- 1149, 1149, 1149, 1149, 1149, 1149,-32768, 270,-32768,-32768,
- 55, 316, 272, 275, 278, 285, 196, 146, 121, -10,
- 246,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
- -32768, 183,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
- -32768, 340,-32768,-32768,-32768,-32768, 292,-32768,-32768, 408,
- -32768, 144, 283, 303,-32768, 304,-32768,-32768, 306, 287,
- -32768, 40, 111,-32768,-32768,-32768,-32768, 1431,-32768, 1465,
- -32768, 288, 1121, 299,-32768, 35,-32768,-32768,-32768,-32768,
- 478,-32768,-32768, 17,-32768, 155, 305, 307, 186,-32768,
- -32768,-32768,-32768,-32768,-32768, 701, 1149, 711, 1149, 1149,
- 1149, 1149,-32768,-32768, 1149,-32768,-32768,-32768,-32768, 1149,
- -32768,-32768, 1149,-32768,-32768, 1149,-32768,-32768,-32768, 1149,
- -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
- -32768, 733, 302,-32768,-32768, 743, 1121, 302, 1121, 300,
- 308, 1121,-32768, 309, 310, 314, 528, 317, 372, 323,
- 324, 816, 1578,-32768, 528,-32768,-32768, 528,-32768,-32768,
- -32768,-32768,-32768,-32768,-32768,-32768, 311, 315, 318,-32768,
- -32768,-32768,-32768,-32768,-32768,-32768, 327,-32768, 1275, 827,
- -32768, 180,-32768, 66,-32768, 389, 1532,-32768, 28, 112,
- -32768, 111, 111, 1121, 320, 245,-32768,-32768,-32768,-32768,
- -32768,-32768,-32768,-32768,-32768, 325, 618,-32768, 1321,-32768,
- 230, 1081,-32768,-32768,-32768,-32768, -3, 316,-32768, 1149,
- 322, 272, 275, 278, 285, 196, 146, 121, -10,-32768,
- 849,-32768,-32768,-32768,-32768,-32768, 14, 326,-32768,-32768,
- -32768,-32768, 1121, 1121, 1121, 23, 341, 917, 335,-32768,
- -32768,-32768, 337,-32768, 338, 528,-32768,-32768,-32768,-32768,
- -32768, 333, 346,-32768, 339, 1367, 939, 180,-32768,-32768,
- -32768, 1121, 287, 343, 287, 250, 252,-32768,-32768, 1121,
- -32768, 111, 1081,-32768,-32768, 273,-32768, 348, 1121,-32768,
- -32768, 1149, 849,-32768, 103,-32768,-32768,-32768, 350, 351,
- 352, 336, 949, 353, 360,-32768,-32768,-32768,-32768,-32768,
- -32768,-32768, 355,-32768, 354, 357,-32768,-32768, 166,-32768,
- -32768,-32768,-32768, 361, 302, 362, 165,-32768, 174,-32768,
- -32768,-32768, 222, 849,-32768, 528, 528, 528, 1121, 1121,
- 367, 528, 985,-32768,-32768,-32768, 370, 287, 344, 1022,
- -32768, 19,-32768,-32768,-32768, 383,-32768,-32768, 392,-32768,
- 1121,-32768, 1121, 409,-32768, 340, 81, 1053, 849,-32768,
- -32768, 528, 410,-32768,-32768, 1121, 287, 412, 849,-32768,
- 223,-32768,-32768,-32768, 340,-32768, 228,-32768,-32768, 477,
- 479,-32768
- };
-
- static const short yypgoto[] = {-32768,
- -32768, 451, -79, 4, 1, 244,-32768,-32768, 345,-32768,
- 365,-32768, -149, -186, -297, -19, 3, 5,-32768,-32768,
- -32768,-32768,-32768,-32768, -11, 101, -42,-32768,-32768,-32768,
- 445,-32768,-32768, 254,-32768,-32768,-32768,-32768, 347,-32768,
- 255,-32768,-32768,-32768,-32768, -20,-32768,-32768,-32768,-32768,
- -32768, -2,-32768,-32768,-32768,-32768, 52, -72,-32768,-32768,
- -32768,-32768, -31, 56,-32768,-32768, 51, -280,-32768,-32768,
- -32768,-32768, 464,-32768, 12,-32768,-32768,-32768,-32768, -125,
- -32768, 153, -298, 185, -90,-32768,-32768,-32768,-32768,-32768,
- -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
- 349,-32768,-32768,-32768,-32768,-32768, 80,-32768, -120,-32768,
- -121,-32768, -361,-32768, 248, 276, 268, 277, 267,-32768,
- 241,-32768, 260,-32768, 259,-32768, 261,-32768, -108,-32768,
- -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
- -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -109,
- -32768,-32768,-32768, -281, 240, 163,-32768, 105, 106,-32768,
- -32768,-32768, -426, 47, 30,-32768
- };
-
-
- #define YYLAST 1627
-
-
- static const short yytable[] = { 134,
- 30, 169, 32, 29, 33, 80, 215, 206, 407, 245,
- 93, 59, 395, 130, 86, 126, 414, 399, 451, 487,
- 402, 393, 394, 67, 68, 341, 493, 30, 85, 32,
- 29, 33, 94, 218, 71, 72, 33, 169, 59, 248,
- 218, 59, 236, 96, 8, 84, 428, 239, 240, 242,
- 1, 1, 250, 251, 252, 253, 254, 255, 425, 370,
- 449, 277, 75, 76, 79, 450, 227, 136, 1, 136,
- 227, 278, 279, 428, 8, 84, 257, 449, 1, 61,
- 367, 26, 457, 368, 64, 117, 69, 93, 118, 137,
- 492, 137, 221, 120, 121, 432, 136, 73, 117, 136,
- 136, 136, 541, 365, 485, 96, 61, 138, 131, 138,
- 349, 363, 547, 1, 65, 25, 25, 414, 137, 26,
- 248, 137, 137, 137, 222, 77, 87, 218, 258, 131,
- 313, 93, 212, 339, 376, 340, 138, 381, 89, 138,
- 138, 138, 103, 25, 537, 475, 1, 26, 379, 538,
- 379, 379, 379, 379, 66, 227, 379, 227, 374, 97,
- 246, 379, 62, 143, 379, 122, 494, 379, 123, 495,
- 392, 390, 271, 272, 376, 433, 398, 400, 25, 111,
- 434, 206, 26, 354, 435, 136, 119, 136, 113, 62,
- 219, 413, 343, 228, 220, 230, 108, 516, 517, 518,
- 274, 275, 293, 522, 509, 294, 295, 137, 109, 137,
- 87, 339, 87, 340, 344, 26, -165, 445, 97, 206,
- 266, 267, 369, 115, 340, 138, 26, 138, 494, 433,
- 116, 511, 439, 542, 507, 119, 87, 512, 508, 87,
- 513, 246, 87, 87, 87, 169, 127, 426, 371, 427,
- 296, 129, 297, 281, 282, 283, 284, 285, 286, 287,
- 288, 289, 290, 447, -56, -56, -56, -56, 298, 454,
- -56, 379, -56, 268, 269, 484, 394, 154, 133, 98,
- 99, 100, 459, 460, 461, 494, 494, 465, 514, 548,
- 145, 494, 133, 155, 549, 156, 157, 369, 152, 340,
- 473, 158, 263, 264, 393, 394, 206, 441, 442, 224,
- 291, 476, 480, 442, 481, 442, 131, 123, 439, 80,
- 436, 437, 119, 349, 454, 349, 225, 491, 87, 231,
- 87, 454, 232, 237, 447, 233, 259, 256, 453, 212,
- 160, 344, 501, 379, 161, 218, 260, 212, 117, 162,
- 261, 345, 163, 164, 262, 299, 165, 166, 485, 12,
- 13, 14, 101, 16, 17, 364, 346, 347, 348, 212,
- 401, 371, 454, 372, 409, 373, 403, 404, 519, 520,
- -223, 405, 524, 417, 408, 410, 411, 418, 530, 420,
- 419, 429, 440, 443, 452, 462, 458, 466, 526, 467,
- 534, 469, 535, 499, 468, 478, 540, 454, 528, 471,
- 301, 2, 154, 133, 470, 544, 490, 454, 496, 497,
- 498, 502, 503, 504, 505, 506, 212, 545, 155, 521,
- 156, 157, 525, -151, 510, 532, 158, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 302, 303, 304,
- 533, 305, 306, 307, 308, 309, 310, 311, 312, 23,
- 24, 536, 543, 129, 546, 160, 551, 88, 552, 161,
- 153, 2, 154, 133, 162, 102, 362, 163, 164, 205,
- 482, 165, 166, 95, 366, 235, 234, 483, 155, 431,
- 156, 157, 416, 238, 378, 386, 158, 3, 4, 5,
- 6, 7, 8, 84, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 383, 385, 387,
- 301, 388, 154, 133, 382, 397, 389, 384, 477, 479,
- 515, 531, 0, 0, 0, 160, 0, 0, 155, 161,
- 156, 157, 0, 0, 162, 0, 158, 163, 164, 0,
- 0, 165, 166, 406, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 302, 303, 304,
- 0, 305, 306, 307, 308, 309, 310, 311, 312, 23,
- 24, 0, 0, 129, 0, 160, 0, 0, 153, 161,
- 154, 133, 0, 0, 162, 0, 0, 163, 164, 0,
- 0, 165, 166, 0, 0, 0, 155, 0, 156, 157,
- 153, 0, 154, 133, 158, 0, 0, 0, 0, 0,
- 153, 0, 154, 133, 0, 0, 0, 0, 155, 0,
- 156, 157, 0, 0, 0, 0, 158, 0, 155, 0,
- 156, 157, 0, 0, 0, 0, 158, 0, 0, 0,
- 0, 159, 243, 160, 0, 0, 0, 161, 0, 0,
- 0, 0, 162, 0, 0, 163, 164, 0, 0, 165,
- 166, 0, 0, 159, 444, 160, 0, 0, 0, 161,
- 0, 0, 0, 159, 162, 160, 0, 163, 164, 161,
- 0, 165, 166, 153, 162, 154, 133, 163, 164, 0,
- 0, 165, 166, 153, 0, 154, 133, 0, 0, 0,
- 0, 155, 0, 156, 157, 0, 0, 0, 0, 158,
- 0, 155, 0, 156, 157, 153, 0, 154, 133, 158,
- 0, 0, 0, 0, 0, 153, 0, 154, 133, 0,
- 0, 0, 0, 155, 0, 156, 157, 0, 0, 0,
- 0, 158, 0, 155, 0, 156, 157, 0, 160, 375,
- 0, 158, 161, 0, 0, 0, 0, 162, 160, 0,
- 163, 164, 161, 380, 165, 166, 0, 162, 0, 0,
- 163, 164, 0, 0, 165, 166, 0, 0, 391, 0,
- 160, 0, 0, 0, 161, 0, 0, 0, 0, 162,
- 160, 396, 163, 164, 161, 0, 165, 166, 153, 162,
- 154, 133, 163, 164, 0, 0, 165, 166, 0, 153,
- 0, 154, 133, 0, 0, 0, 155, 0, 156, 157,
- 0, 0, 0, 0, 158, 0, 0, 155, 0, 156,
- 157, 153, 0, 154, 133, 158, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 155,
- 0, 156, 157, 0, 0, 0, 0, 158, 412, 0,
- 0, 0, 0, 160, 0, 0, 0, 161, 0, 0,
- 0, 0, 162, 0, 160, 163, 164, 424, 161, 165,
- 166, 0, 0, 162, 0, 0, 163, 164, 0, 0,
- 165, 166, 0, 0, 453, 0, 160, 0, 0, 153,
- 161, 154, 133, 0, 0, 162, 0, 0, 163, 164,
- 0, 0, 165, 166, 0, 0, 0, 155, 0, 156,
- 157, 153, 0, 154, 133, 158, 0, 0, 0, 0,
- 0, 153, 0, 154, 133, 0, 0, 0, 0, 155,
- 0, 156, 157, 0, 0, 0, 0, 158, 0, 155,
- 0, 156, 157, 0, 0, 0, 0, 158, 0, 463,
- 0, 0, 0, 0, 160, 0, 0, 153, 161, 154,
- 133, 0, 0, 162, 0, 0, 163, 164, 0, 0,
- 165, 166, 0, 0, 0, 155, 160, 156, 157, 474,
- 161, 500, 0, 158, 0, 162, 160, 0, 163, 164,
- 161, 0, 165, 166, 153, 162, 154, 133, 163, 164,
- 0, 0, 165, 166, 0, 0, 0, 0, 0, 0,
- 0, 0, 155, 0, 156, 157, 0, 523, 0, 0,
- 158, 0, 160, 0, 0, 153, 161, 154, 133, 0,
- 0, 162, 0, 0, 163, 164, 0, 0, 165, 166,
- 0, 0, 0, 155, 0, 156, 157, 0, 0, 0,
- 0, 158, 0, 153, 0, 154, 133, 529, 0, 160,
- 0, 0, 0, 161, 0, 0, 0, 0, 162, 0,
- 0, 163, 164, 156, 157, 165, 166, 0, 0, 158,
- 0, 0, 0, 0, 0, 0, 0, 0, 539, 0,
- 160, 0, 0, 153, 161, 154, 133, 0, 0, 162,
- 0, 0, 163, 164, 0, 0, 165, 166, 0, 0,
- 0, 155, 0, 156, 157, 0, 446, 0, 160, 158,
- 0, 153, 161, 154, 133, 0, 0, 162, 0, 0,
- 163, 164, 0, 0, 165, 166, 0, 0, 0, 0,
- 0, 156, 157, 153, 0, 154, 133, 158, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 160, 0,
- 0, 0, 161, 156, 157, 0, 0, 162, 0, 158,
- 163, 164, 0, 0, 165, 166, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 160, 0, 0, 0,
- 161, 0, 0, 0, 0, 162, 0, 0, 163, 164,
- 1, 2, 165, 166, 0, 0, 0, 0, 241, 0,
- 0, 0, 161, 0, 0, 0, 0, 162, 0, 0,
- 163, 164, 0, 0, 165, 166, 0, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 1, 2, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 23,
- 24, 0, 0, 0, 2, 25, 0, 0, 0, 26,
- 0, 0, 0, 0, 3, 4, 5, 6, 7, 8,
- 84, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 2, 8, 84, 10, 0, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 0, 0, 339, 421, 340, 0, 26, 0, 0, 0,
- 3, 4, 5, 6, 7, 8, 84, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 2, 0, 0, 369, 421,
- 340, 0, 26, 0, 0, 0, 3, 4, 5, 6,
- 7, 8, 84, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 8, 84, 10, 2,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 0, 0, 0, 2, 472, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 226, 0,
- 8, 84, 10, 0, 12, 13, 14, 15, 16, 17,
- 18, 19, 20, 21, 22, 8, 84, 10, 2, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 0, 0, 229, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 360, 0, 8,
- 84, 10, 0, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 211, 2, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 361, 0, 0, 0, 2, 0, 0, 430, 0,
- 0, 3, 4, 5, 6, 7, 8, 84, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 3, 4, 5, 6, 7, 8, 84, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 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, 84, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22
- };
-
- static const short yycheck[] = { 109,
- 0, 123, 0, 0, 0, 25, 132, 128, 307, 159,
- 30, 0, 293, 104, 26, 95, 315, 298, 380, 446,
- 302, 3, 4, 3, 4, 212, 453, 27, 26, 27,
- 27, 27, 30, 6, 3, 4, 32, 159, 27, 160,
- 6, 30, 152, 32, 35, 36, 344, 156, 157, 158,
- 3, 3, 161, 162, 163, 164, 165, 166, 340, 246,
- 64, 72, 3, 4, 36, 69, 139, 110, 3, 112,
- 143, 82, 83, 371, 35, 36, 22, 64, 3, 0,
- 64, 72, 69, 67, 62, 81, 66, 107, 86, 110,
- 452, 112, 135, 63, 64, 68, 139, 66, 94, 142,
- 143, 144, 529, 69, 86, 94, 27, 110, 105, 112,
- 220, 233, 539, 3, 46, 68, 68, 416, 139, 72,
- 241, 142, 143, 144, 136, 66, 26, 6, 74, 126,
- 210, 151, 132, 68, 256, 70, 139, 258, 63, 142,
- 143, 144, 42, 68, 64, 427, 3, 72, 257, 69,
- 259, 260, 261, 262, 42, 228, 265, 230, 249, 70,
- 160, 270, 0, 112, 273, 62, 64, 276, 65, 67,
- 292, 280, 27, 28, 296, 64, 297, 299, 68, 66,
- 69, 302, 72, 73, 73, 228, 86, 230, 66, 27,
- 69, 312, 212, 142, 73, 144, 68, 496, 497, 498,
- 80, 81, 20, 502, 485, 23, 24, 228, 68, 230,
- 110, 68, 112, 70, 212, 72, 68, 367, 70, 340,
- 25, 26, 68, 66, 70, 228, 72, 230, 64, 64,
- 69, 67, 354, 532, 69, 135, 136, 64, 73, 139,
- 67, 241, 142, 143, 144, 367, 71, 68, 246, 70,
- 68, 66, 70, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 372, 62, 63, 64, 65, 86, 391,
- 68, 380, 70, 78, 79, 3, 4, 5, 6, 36,
- 37, 38, 403, 404, 405, 64, 64, 408, 67, 67,
- 3, 64, 6, 21, 67, 23, 24, 68, 68, 70,
- 426, 29, 18, 19, 3, 4, 427, 63, 64, 63,
- 65, 432, 63, 64, 63, 64, 313, 65, 440, 339,
- 352, 353, 222, 433, 446, 435, 63, 449, 228, 67,
- 230, 453, 64, 3, 443, 65, 21, 68, 66, 339,
- 68, 339, 463, 452, 72, 6, 75, 347, 344, 77,
- 76, 69, 80, 81, 77, 64, 84, 85, 86, 39,
- 40, 41, 42, 43, 44, 67, 64, 64, 63, 369,
- 71, 369, 494, 69, 3, 69, 68, 68, 499, 500,
- 73, 68, 503, 73, 68, 63, 63, 73, 510, 63,
- 73, 3, 73, 69, 73, 55, 71, 63, 508, 63,
- 521, 69, 523, 68, 67, 63, 528, 529, 65, 71,
- 3, 4, 5, 6, 69, 536, 69, 539, 69, 69,
- 69, 69, 63, 69, 71, 69, 426, 537, 21, 63,
- 23, 24, 63, 73, 73, 53, 29, 30, 31, 32,
- 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
- 69, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 63, 63, 66, 63, 68, 0, 27, 0, 72,
- 3, 4, 5, 6, 77, 41, 232, 80, 81, 125,
- 440, 84, 85, 30, 241, 151, 150, 442, 21, 347,
- 23, 24, 318, 155, 257, 265, 29, 30, 31, 32,
- 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 260, 262, 270,
- 3, 273, 5, 6, 259, 296, 276, 261, 433, 435,
- 494, 512, -1, -1, -1, 68, -1, -1, 21, 72,
- 23, 24, -1, -1, 77, -1, 29, 80, 81, -1,
- -1, 84, 85, 36, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 50, 51, 52,
- -1, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, -1, -1, 66, -1, 68, -1, -1, 3, 72,
- 5, 6, -1, -1, 77, -1, -1, 80, 81, -1,
- -1, 84, 85, -1, -1, -1, 21, -1, 23, 24,
- 3, -1, 5, 6, 29, -1, -1, -1, -1, -1,
- 3, -1, 5, 6, -1, -1, -1, -1, 21, -1,
- 23, 24, -1, -1, -1, -1, 29, -1, 21, -1,
- 23, 24, -1, -1, -1, -1, 29, -1, -1, -1,
- -1, 66, 67, 68, -1, -1, -1, 72, -1, -1,
- -1, -1, 77, -1, -1, 80, 81, -1, -1, 84,
- 85, -1, -1, 66, 67, 68, -1, -1, -1, 72,
- -1, -1, -1, 66, 77, 68, -1, 80, 81, 72,
- -1, 84, 85, 3, 77, 5, 6, 80, 81, -1,
- -1, 84, 85, 3, -1, 5, 6, -1, -1, -1,
- -1, 21, -1, 23, 24, -1, -1, -1, -1, 29,
- -1, 21, -1, 23, 24, 3, -1, 5, 6, 29,
- -1, -1, -1, -1, -1, 3, -1, 5, 6, -1,
- -1, -1, -1, 21, -1, 23, 24, -1, -1, -1,
- -1, 29, -1, 21, -1, 23, 24, -1, 68, 69,
- -1, 29, 72, -1, -1, -1, -1, 77, 68, -1,
- 80, 81, 72, 73, 84, 85, -1, 77, -1, -1,
- 80, 81, -1, -1, 84, 85, -1, -1, 66, -1,
- 68, -1, -1, -1, 72, -1, -1, -1, -1, 77,
- 68, 69, 80, 81, 72, -1, 84, 85, 3, 77,
- 5, 6, 80, 81, -1, -1, 84, 85, -1, 3,
- -1, 5, 6, -1, -1, -1, 21, -1, 23, 24,
- -1, -1, -1, -1, 29, -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, -1, 29, 63, -1,
- -1, -1, -1, 68, -1, -1, -1, 72, -1, -1,
- -1, -1, 77, -1, 68, 80, 81, 71, 72, 84,
- 85, -1, -1, 77, -1, -1, 80, 81, -1, -1,
- 84, 85, -1, -1, 66, -1, 68, -1, -1, 3,
- 72, 5, 6, -1, -1, 77, -1, -1, 80, 81,
- -1, -1, 84, 85, -1, -1, -1, 21, -1, 23,
- 24, 3, -1, 5, 6, 29, -1, -1, -1, -1,
- -1, 3, -1, 5, 6, -1, -1, -1, -1, 21,
- -1, 23, 24, -1, -1, -1, -1, 29, -1, 21,
- -1, 23, 24, -1, -1, -1, -1, 29, -1, 63,
- -1, -1, -1, -1, 68, -1, -1, 3, 72, 5,
- 6, -1, -1, 77, -1, -1, 80, 81, -1, -1,
- 84, 85, -1, -1, -1, 21, 68, 23, 24, 71,
- 72, 63, -1, 29, -1, 77, 68, -1, 80, 81,
- 72, -1, 84, 85, 3, 77, 5, 6, 80, 81,
- -1, -1, 84, 85, -1, -1, -1, -1, -1, -1,
- -1, -1, 21, -1, 23, 24, -1, 63, -1, -1,
- 29, -1, 68, -1, -1, 3, 72, 5, 6, -1,
- -1, 77, -1, -1, 80, 81, -1, -1, 84, 85,
- -1, -1, -1, 21, -1, 23, 24, -1, -1, -1,
- -1, 29, -1, 3, -1, 5, 6, 66, -1, 68,
- -1, -1, -1, 72, -1, -1, -1, -1, 77, -1,
- -1, 80, 81, 23, 24, 84, 85, -1, -1, 29,
- -1, -1, -1, -1, -1, -1, -1, -1, 66, -1,
- 68, -1, -1, 3, 72, 5, 6, -1, -1, 77,
- -1, -1, 80, 81, -1, -1, 84, 85, -1, -1,
- -1, 21, -1, 23, 24, -1, 66, -1, 68, 29,
- -1, 3, 72, 5, 6, -1, -1, 77, -1, -1,
- 80, 81, -1, -1, 84, 85, -1, -1, -1, -1,
- -1, 23, 24, 3, -1, 5, 6, 29, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 68, -1,
- -1, -1, 72, 23, 24, -1, -1, 77, -1, 29,
- 80, 81, -1, -1, 84, 85, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 68, -1, -1, -1,
- 72, -1, -1, -1, -1, 77, -1, -1, 80, 81,
- 3, 4, 84, 85, -1, -1, -1, -1, 68, -1,
- -1, -1, 72, -1, -1, -1, -1, 77, -1, -1,
- 80, 81, -1, -1, 84, 85, -1, 30, 31, 32,
- 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 3, 4, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 62,
- 63, -1, -1, -1, 4, 68, -1, -1, -1, 72,
- -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 4, 35, 36, 37, -1, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- -1, -1, 68, 69, 70, -1, 72, -1, -1, -1,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 4, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 4, -1, -1, 68, 69,
- 70, -1, 72, -1, -1, -1, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 35, 36, 37, 4,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, -1, -1, -1, 4, 69, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 67, -1,
- 35, 36, 37, -1, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, 35, 36, 37, 4, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- -1, -1, 67, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 67, -1, 35,
- 36, 37, -1, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 3, 4, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 67, -1, -1, -1, 4, -1, -1, 7, -1,
- -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 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
- };
- /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-
-
- /* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990 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., 675 Mass Ave, Cambridge, MA 02139, 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. */
-
- #ifndef alloca
- #ifdef __GNUC__
- #define alloca __builtin_alloca
- #else /* not GNU C. */
- #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
- #include <alloca.h>
- #else /* not sparc */
- #if defined (MSDOS) && !defined (__TURBOC__)
- #include <malloc.h>
- #else /* not MSDOS, or __TURBOC__ */
- #if defined(_AIX)
- #include <malloc.h>
- #pragma alloca
- #else /* not MSDOS, __TURBOC__, or _AIX */
- #ifdef __hpux
- #ifdef __cplusplus
- extern "C" {
- void *alloca (unsigned int);
- };
- #else /* not __cplusplus */
- void *alloca ();
- #endif /* not __cplusplus */
- #endif /* __hpux */
- #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
- #ifdef YYLEX_PARAM
- #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
- #else
- #define YYLEX yylex(&yylval, &yylloc)
- #endif
- #else /* not YYLSP_NEEDED */
- #ifdef YYLEX_PARAM
- #define YYLEX yylex(&yylval, YYLEX_PARAM)
- #else
- #define YYLEX yylex(&yylval)
- #endif
- #endif /* not YYLSP_NEEDED */
- #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
-
- /* Prevent warning if -Wstrict-prototypes. */
- #ifdef __GNUC__
- int yyparse (void);
- #endif
-
- #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
- #define __yy_memcpy(TO,FROM,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_memcpy (to, from, count)
- char *to;
- char *from;
- 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_memcpy (char *to, char *from, int count)
- {
- register char *f = from;
- register char *t = to;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
- }
-
- #endif
- #endif
-
-
-
- /* 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
- #ifdef __cplusplus
- #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
- #define YYPARSE_PARAM_DECL
- #else /* not __cplusplus */
- #define YYPARSE_PARAM_ARG YYPARSE_PARAM
- #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
- #endif /* not __cplusplus */
- #else /* not YYPARSE_PARAM */
- #define YYPARSE_PARAM_ARG
- #define YYPARSE_PARAM_DECL
- #endif /* not YYPARSE_PARAM */
-
- int
- yyparse(YYPARSE_PARAM_ARG)
- YYPARSE_PARAM_DECL
- {
- 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 = 0; /* 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--, yyssp--, yylsp--)
- #else
- #define YYPOPSTACK (yyvsp--, yyssp--)
- #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.
- The wasted elements are never initialized. */
-
- 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. */
- #ifdef YYLSP_NEEDED
- /* 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, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yystacksize);
- #else
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yystacksize);
- #endif
-
- 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_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
- #ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1, 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
-
- goto 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)
- {
- #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];
- if (yylen > 0)
- 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 symbols 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 5:
- { scope=0; reset(); common_comment=NULL; in_typedef=0; ;
- break;}
- case 6:
- { scope=0; reset(); common_comment=NULL; in_typedef=0; ;
- break;}
- case 9:
- { scope=0; reset(); common_comment=NULL; in_typedef=0; ;
- break;}
- case 10:
- { scope=0; reset(); common_comment=NULL; in_typedef=0;
- yyval=yyvsp[0]; ;
- break;}
- case 11:
- { in_type_spec=0; ;
- break;}
- case 12:
- { in_type_spec=0; ;
- break;}
- case 13:
- { if(!in_typedef) {common_comment=GetCurrentComment(); SetCurrentComment(common_comment);} ;
- break;}
- case 15:
- { if(yyvsp[-1]) yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); else yyval=yyvsp[0]; ;
- break;}
- case 16:
- { if(!current->type) current->type=yyvsp[0]; ;
- break;}
- case 17:
- { if(!current->type) current->type=yyvsp[-1];
- yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
- break;}
- case 19:
- { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
- break;}
- case 21:
- { in_type_spec=1; ;
- break;}
- case 23:
- {
- if(!in_function && !in_funcdef && !in_structunion)
- {
- char* specific_comment=GetCurrentComment();
- if(!common_comment) SetCurrentComment(specific_comment); else
- if(!specific_comment) SetCurrentComment(common_comment); else
- if(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]));
- }
- 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);
- DownScope();
- }
- }
-
- if(in_function==3) in_function=0;
- ;
- break;}
- case 36:
- { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 38:
- { 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 39:
- { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 40:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 41:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 42:
- { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 43:
- { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 44:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 45:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 46:
- { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 47:
- { in_type_spec=0; ;
- break;}
- case 48:
- { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 50:
- { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
- break;}
- case 51:
- { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 52:
- { yyval=ConcatStrings(4,yyvsp[-2]," ",yyvsp[-1],yyvsp[0]); ;
- break;}
- case 54:
- { 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 57:
- { 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 58:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 59:
- { in_type_spec=0; ;
- break;}
- case 60:
- { in_type_spec=1; ;
- break;}
- case 61:
- { yyval=ConcatStrings(4,yyvsp[-5],yyvsp[-4],yyvsp[-2],yyvsp[0]); ;
- break;}
- case 63:
- { yyval=NULL; ;
- break;}
- case 64:
- { yyval=NULL;
- if(in_funcbody) scope|=EXTERN_F;
- else if(in_header) scope|=EXTERN_H;
- else scope|=EXTERNAL; ;
- break;}
- case 65:
- { yyval=NULL; ;
- break;}
- case 66:
- { yyval=NULL; scope |= LOCAL; ;
- break;}
- case 67:
- { yyval=NULL;
- in_typedef=1; if(!in_header) SeenTypedef(NULL,NULL);
- common_comment=GetCurrentComment(); ;
- break;}
- case 68:
- { yyval=NULL; scope |= INLINED; ;
- break;}
- case 70:
- { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
- break;}
- case 71:
- { if(!current->type) current->qual=ConcatStrings(3,current->qual,yyvsp[0]," "); ;
- break;}
- case 72:
- { if(!current->type) current->qual=ConcatStrings(3,current->qual,yyvsp[0]," "); ;
- break;}
- case 73:
- { in_type_spec=1; ;
- break;}
- case 83:
- { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
- break;}
- case 84:
- { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
- break;}
- case 86:
- { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
- break;}
- case 87:
- { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
- break;}
- case 96:
- { in_type_spec=0; ;
- break;}
- case 97:
- { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 100:
- { push();
- if(!in_header)
- {
- if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion);
- else SeenStructUnionStart(yyvsp[-1]);
- }
- in_structunion++; ;
- break;}
- case 101:
- { 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 102:
- { 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 103:
- { 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 107:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 108:
- { if(!in_header) SeenStructUnionComp(yyvsp[0],in_structunion); ;
- break;}
- case 109:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); if(!in_header) SeenStructUnionComp(yyvsp[-2],in_structunion); ;
- break;}
- case 111:
- { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
- break;}
- case 116:
- { push();
- if(!in_header)
- {
- if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion);
- else SeenStructUnionStart(yyvsp[-1]);
- }
- in_structunion++; ;
- break;}
- case 117:
- { 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 118:
- { 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 119:
- { 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 120:
- { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
- break;}
- case 125:
- { push();
- if(!in_header)
- {
- if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion);
- else SeenStructUnionStart(yyvsp[-1]);
- }
- in_structunion++; ;
- break;}
- case 126:
- { 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 127:
- { 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 128:
- { 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 129:
- { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
- break;}
- case 133:
- { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 134:
- { yyval = ConcatStrings(3, yyvsp[-1], " ", yyvsp[0]);
- if(!in_header) SeenStructUnionComp(yyvsp[-1],in_structunion); ;
- break;}
- case 135:
- { yyval = ConcatStrings(3, yyvsp[-1], " ", yyvsp[0]);
- if(!in_header) SeenStructUnionComp(yyvsp[-1],in_structunion); ;
- break;}
- case 137:
- { comp_type=yyvsp[0]; ;
- break;}
- case 138:
- { yyval=ConcatStrings(3,yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; ;
- break;}
- case 139:
- { comp_type=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
- break;}
- case 140:
- { yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; ;
- break;}
- case 141:
- { comp_type=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ;
- break;}
- case 142:
- { yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; ;
- break;}
- case 143:
- { if(!in_header) SeenStructUnionComp(ConcatStrings(2,comp_type,yyvsp[0]),in_structunion); ;
- break;}
- case 144:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]);
- if(!in_header) SeenStructUnionComp(ConcatStrings(2,comp_type,yyvsp[0]),in_structunion); ;
- break;}
- case 147:
- { if(in_function==2) { DownScope(); pop(); in_function=0; } ;
- break;}
- case 148:
- { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 149:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 153:
- { pop(); in_funcbody=1; in_function=0; ;
- break;}
- case 154:
- { in_funcbody=in_function=0; DownScope(); SeenFunctionDefinition(NULL); ;
- break;}
- case 155:
- { 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);
- ;
- break;}
- case 157:
- { yyval=ConcatStrings(3,current->qual,current->type,yyvsp[0]); ;
- break;}
- case 159:
- { yyval=ConcatStrings(3,current->qual,current->type,yyvsp[-1]); ;
- break;}
- case 160:
- { push(); in_function=2; ;
- break;}
- case 162:
- { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 163:
- { push(); if(in_function==0) UpScope();
- if(in_function==0 && !in_funcdef) in_function=1; if(in_function!=3) in_funcdef++; ;
- break;}
- case 164:
- { 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 165:
- {
- if(!in_funcdef && !in_function && !in_funcbody) SeenFunctionDeclaration(current->name,SCOPE);
- in_type_spec=0;
- ;
- break;}
- case 166:
- { if(in_function==1 && in_funcdef==1) SeenFunctionArg("void","void");
- if(in_structunion) yyval=NULL; else yyval="void"; ;
- break;}
- case 169:
- { if(in_function==1 && in_funcdef==1 && in_funcbody==0) { SeenFunctionArg(yyvsp[0],NULL); SeenScopeVariable(yyvsp[0]); } ;
- break;}
- case 170:
- { if(in_function==1 && in_funcdef==1 && in_funcbody==0) { SeenFunctionArg(yyvsp[0],NULL); SeenScopeVariable(yyvsp[0]); }
- yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 172:
- { if(in_function==1 && in_funcdef==1 && in_funcbody==0) SeenFunctionArg(yyvsp[0],yyvsp[0]);
- yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 173:
- { if(in_function==1 && in_funcdef==1 && in_funcbody==0) SeenFunctionArg(strcmp("void",yyvsp[0])?current->name:"void",yyvsp[0]);
- in_type_spec=0; ;
- break;}
- case 174:
- { if(in_function==1 && in_funcdef==1 && in_funcbody==0) SeenFunctionArg(current->name,yyvsp[0]);
- in_type_spec=0; yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 175:
- { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 176:
- { in_type_spec=0; ;
- break;}
- case 177:
- { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 192:
- { UpScope(); reset(); ;
- break;}
- case 193:
- { DownScope(); ;
- break;}
- case 234:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 251:
- { yyval=ConcatStrings(5,yyvsp[-4],yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 252:
- { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 254:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 256:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 258:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 260:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 262:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 264:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 268:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 274:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 278:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 282:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 298:
- { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 299:
- { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 303:
- { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 306:
- { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 307:
- { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 308:
- { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 309:
- { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ;
- break;}
- case 312:
- { if(!IsAScopeVariable(yyvsp[0])) SeenFunctionCall(yyvsp[0]); ;
- break;}
- case 328:
- { CheckFunctionVariableRef(yyvsp[0],in_funcbody); ;
- break;}
- case 334:
- { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ;
- break;}
- case 335:
- { push(); ;
- break;}
- case 336:
- { pop(); ;
- break;}
- }
- /* the action file gets copied in in place of this dollarsign */
-
-
- 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;
- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- size += strlen(yytname[x]) + 15, count++;
- msg = (char *) malloc(size + 15);
- if (msg != 0)
- {
- strcpy(msg, "parse error");
-
- if (count < 5)
- {
- count = 0;
- for (x = (yyn < 0 ? -yyn : 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
- yyerror ("parse error; also virtual memory exceeded");
- }
- else
- #endif /* YYERROR_VERBOSE */
- yyerror("parse error");
- }
-
- goto yyerrlab1;
- 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;
- }
-
-
- #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<count-1;i++,modcount=i%11)
- #ifdef YYBISON
- fprintf(stderr,"%3d | %3d : %16s : %s\n",i+1-count,last_yylex[modcount],last_yylex[modcount]>255?yytname[last_yylex[modcount]-255]:"",last_yylval[modcount]);
- #else
- fprintf(stderr,"%3d | %3d : %s\n",i+1-count,last_yylex[modcount],last_yylval[modcount]);
- #endif
-
- #ifdef YYBISON
- fprintf(stderr," 0 | %3d : %16s : %s\n",yychar,yychar>255?yytname[yychar-255]:"",yylval);
- #else
- fprintf(stderr," 0 | %3d : %s\n",yychar,yylval);
- #endif
-
- for(i=0;i<10;i++)
- {
- yychar=yylex();
- if(!yychar)
- {fprintf(stderr,"END OF FILE\n");break;}
- #ifdef YYBISON
- fprintf(stderr,"%3d | %3d : %16s : %s\n",i+1,yychar,yychar>255?yytname[yychar-255]:"",yylval);
- #else
- fprintf(stderr,"%3d | %3d : %s\n",i+1,yychar,yylval);
- #endif
- }
-
- fprintf(stderr,"\n");
-
- #endif /* YYDEBUG */
-
- /* Finish off the input. */
-
- #undef yylex
-
- if(yychar)
- while((yychar=yylex()));
- }
-
-
- /*++++++++++++++++++++++++++++++++++++++
- Call the lexer, the feedback from the parser to the lexer is applied here.
-
- int cxref_yylex Returns the value from the lexer, modified due to parser feedback.
- ++++++++++++++++++++++++++++++++++++++*/
-
- static int cxref_yylex(void)
- {
- static int last_yyl=0;
- int yyl=yylex();
-
- if(yyl==TYPE_NAME)
- if(in_type_spec || last_yyl==TYPE_NAME ||
- last_yyl==CHAR || last_yyl==SHORT || last_yyl==INT || last_yyl==LONG ||
- last_yyl==SIGNED || last_yyl==UNSIGNED ||
- last_yyl==FLOAT || last_yyl==DOUBLE)
- yyl=IDENTIFIER;
-
- last_yyl=yyl;
-
- #if YYDEBUG
-
- last_yylex [modcount]=yyl;
- last_yylval[modcount]=yylval;
-
- if(yyl)
- {
- count++;
- modcount=count%11;
- }
- else
- {
- count=0;
- modcount=0;
- }
-
- #if YYDEBUG == 2
-
- if(yyl)
- #ifdef YYBISON
- printf("#parse.y# %6d | %16s:%4d | %3d : %16s : %s\n",count,parse_file,parse_line,yyl,yyl>255?yytname[yyl-255]:"",yylval);
- #else
- printf("#parse.y# %6d | %16s:%4d | %3d : %s\n",count,parse_file,parse_line,yyl,yylval);
- #endif /* YYBISON */
- else
- printf("#parse.y# %6d | %16s:%4d | END OF FILE\n",count,parse_file,parse_line);
-
- fflush(stdout);
-
- #endif /* YYDEBUG==2 */
-
- #endif /* YYDEBUG */
-
- return(yyl);
- }
-