Home | History | Annotate | Line # | Download | only in btyacc
grammar.tab.c revision 1.1.1.3.2.1
      1 /*	$NetBSD: grammar.tab.c,v 1.1.1.3.2.1 2017/03/20 06:52:18 pgoyette Exp $	*/
      2 
      3 /* original parser id follows */
      4 /* yysccsid[] = "@(#)yaccpar	1.9 (Berkeley) 02/21/93" */
      5 /* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
      6 
      7 #define YYBYACC 1
      8 #define YYMAJOR 1
      9 #define YYMINOR 9
     10 #define YYCHECK "yyyymmdd"
     11 
     12 #define YYEMPTY        (-1)
     13 #define yyclearin      (yychar = YYEMPTY)
     14 #define yyerrok        (yyerrflag = 0)
     15 #define YYRECOVERING() (yyerrflag != 0)
     16 #define YYENOMEM       (-2)
     17 #define YYEOF          0
     18 #undef YYBTYACC
     19 #define YYBTYACC 0
     20 #define YYDEBUGSTR YYPREFIX "debug"
     21 
     22 #ifndef yyparse
     23 #define yyparse    grammar_parse
     24 #endif /* yyparse */
     25 
     26 #ifndef yylex
     27 #define yylex      grammar_lex
     28 #endif /* yylex */
     29 
     30 #ifndef yyerror
     31 #define yyerror    grammar_error
     32 #endif /* yyerror */
     33 
     34 #ifndef yychar
     35 #define yychar     grammar_char
     36 #endif /* yychar */
     37 
     38 #ifndef yyval
     39 #define yyval      grammar_val
     40 #endif /* yyval */
     41 
     42 #ifndef yylval
     43 #define yylval     grammar_lval
     44 #endif /* yylval */
     45 
     46 #ifndef yydebug
     47 #define yydebug    grammar_debug
     48 #endif /* yydebug */
     49 
     50 #ifndef yynerrs
     51 #define yynerrs    grammar_nerrs
     52 #endif /* yynerrs */
     53 
     54 #ifndef yyerrflag
     55 #define yyerrflag  grammar_errflag
     56 #endif /* yyerrflag */
     57 
     58 #ifndef yylhs
     59 #define yylhs      grammar_lhs
     60 #endif /* yylhs */
     61 
     62 #ifndef yylen
     63 #define yylen      grammar_len
     64 #endif /* yylen */
     65 
     66 #ifndef yydefred
     67 #define yydefred   grammar_defred
     68 #endif /* yydefred */
     69 
     70 #ifndef yystos
     71 #define yystos     grammar_stos
     72 #endif /* yystos */
     73 
     74 #ifndef yydgoto
     75 #define yydgoto    grammar_dgoto
     76 #endif /* yydgoto */
     77 
     78 #ifndef yysindex
     79 #define yysindex   grammar_sindex
     80 #endif /* yysindex */
     81 
     82 #ifndef yyrindex
     83 #define yyrindex   grammar_rindex
     84 #endif /* yyrindex */
     85 
     86 #ifndef yygindex
     87 #define yygindex   grammar_gindex
     88 #endif /* yygindex */
     89 
     90 #ifndef yytable
     91 #define yytable    grammar_table
     92 #endif /* yytable */
     93 
     94 #ifndef yycheck
     95 #define yycheck    grammar_check
     96 #endif /* yycheck */
     97 
     98 #ifndef yyname
     99 #define yyname     grammar_name
    100 #endif /* yyname */
    101 
    102 #ifndef yyrule
    103 #define yyrule     grammar_rule
    104 #endif /* yyrule */
    105 
    106 #if YYBTYACC
    107 
    108 #ifndef yycindex
    109 #define yycindex   grammar_cindex
    110 #endif /* yycindex */
    111 
    112 #ifndef yyctable
    113 #define yyctable   grammar_ctable
    114 #endif /* yyctable */
    115 
    116 #endif /* YYBTYACC */
    117 
    118 #define YYPREFIX "grammar_"
    119 
    120 #define YYPURE 0
    121 
    122 #line 9 "grammar.y"
    123 #ifdef YYBISON
    124 #include <stdlib.h>
    125 #define YYSTYPE_IS_DECLARED
    126 #define yyerror yaccError
    127 #endif
    128 
    129 #if defined(YYBISON) || !defined(YYBYACC)
    130 static void yyerror(const char *s);
    131 #endif
    132 #line 81 "grammar.y"
    133 #include <stdio.h>
    134 #include <ctype.h>
    135 #include <string.h>
    136 
    137 #define OPT_LINTLIBRARY 1
    138 
    139 #ifndef TRUE
    140 #define	TRUE	(1)
    141 #endif
    142 
    143 #ifndef FALSE
    144 #define	FALSE	(0)
    145 #endif
    146 
    147 /* #include "cproto.h" */
    148 #define MAX_TEXT_SIZE 1024
    149 
    150 /* Prototype styles */
    151 #if OPT_LINTLIBRARY
    152 #define PROTO_ANSI_LLIB		-2	/* form ANSI lint-library source */
    153 #define PROTO_LINTLIBRARY	-1	/* form lint-library source */
    154 #endif
    155 #define PROTO_NONE		0	/* do not output any prototypes */
    156 #define PROTO_TRADITIONAL	1	/* comment out parameters */
    157 #define PROTO_ABSTRACT		2	/* comment out parameter names */
    158 #define PROTO_ANSI		3	/* ANSI C prototype */
    159 
    160 typedef int PrototypeStyle;
    161 
    162 typedef char boolean;
    163 
    164 extern boolean types_out;
    165 extern PrototypeStyle proto_style;
    166 
    167 #define ansiLintLibrary() (proto_style == PROTO_ANSI_LLIB)
    168 #define knrLintLibrary()  (proto_style == PROTO_LINTLIBRARY)
    169 #define lintLibrary()     (knrLintLibrary() || ansiLintLibrary())
    170 
    171 #if OPT_LINTLIBRARY
    172 #define FUNC_UNKNOWN		-1	/* unspecified */
    173 #else
    174 #define FUNC_UNKNOWN		0	/* unspecified (same as FUNC_NONE) */
    175 #endif
    176 #define FUNC_NONE		0	/* not a function definition */
    177 #define FUNC_TRADITIONAL	1	/* traditional style */
    178 #define FUNC_ANSI		2	/* ANSI style */
    179 #define FUNC_BOTH		3	/* both styles */
    180 
    181 typedef int FuncDefStyle;
    182 
    183 /* Source file text */
    184 typedef struct text {
    185     char text[MAX_TEXT_SIZE];	/* source text */
    186     long begin; 		/* offset in temporary file */
    187 } Text;
    188 
    189 /* Declaration specifier flags */
    190 #define DS_NONE 	0	/* default */
    191 #define DS_EXTERN	1	/* contains "extern" specifier */
    192 #define DS_STATIC	2	/* contains "static" specifier */
    193 #define DS_CHAR 	4	/* contains "char" type specifier */
    194 #define DS_SHORT	8	/* contains "short" type specifier */
    195 #define DS_FLOAT	16	/* contains "float" type specifier */
    196 #define DS_INLINE	32	/* contains "inline" specifier */
    197 #define DS_JUNK 	64	/* we're not interested in this declaration */
    198 
    199 /* This structure stores information about a declaration specifier. */
    200 typedef struct decl_spec {
    201     unsigned short flags;	/* flags defined above */
    202     char *text; 		/* source text */
    203     long begin; 		/* offset in temporary file */
    204 } DeclSpec;
    205 
    206 /* This is a list of function parameters. */
    207 typedef struct _ParameterList {
    208     struct parameter *first;	/* pointer to first parameter in list */
    209     struct parameter *last;	/* pointer to last parameter in list */
    210     long begin_comment; 	/* begin offset of comment */
    211     long end_comment;		/* end offset of comment */
    212     char *comment;		/* comment at start of parameter list */
    213 } ParameterList;
    214 
    215 /* This structure stores information about a declarator. */
    216 typedef struct _Declarator {
    217     char *name; 			/* name of variable or function */
    218     char *text; 			/* source text */
    219     long begin; 			/* offset in temporary file */
    220     long begin_comment; 		/* begin offset of comment */
    221     long end_comment;			/* end offset of comment */
    222     FuncDefStyle func_def;		/* style of function definition */
    223     ParameterList params;		/* function parameters */
    224     boolean pointer;			/* TRUE if it declares a pointer */
    225     struct _Declarator *head;		/* head function declarator */
    226     struct _Declarator *func_stack;	/* stack of function declarators */
    227     struct _Declarator *next;		/* next declarator in list */
    228 } Declarator;
    229 
    230 /* This structure stores information about a function parameter. */
    231 typedef struct parameter {
    232     struct parameter *next;	/* next parameter in list */
    233     DeclSpec decl_spec;
    234     Declarator *declarator;
    235     char *comment;		/* comment following the parameter */
    236 } Parameter;
    237 
    238 /* This is a list of declarators. */
    239 typedef struct declarator_list {
    240     Declarator *first;		/* pointer to first declarator in list */
    241     Declarator *last;		/* pointer to last declarator in list */
    242 } DeclaratorList;
    243 
    244 /* #include "symbol.h" */
    245 typedef struct symbol {
    246     struct symbol *next;	/* next symbol in list */
    247     char *name; 		/* name of symbol */
    248     char *value;		/* value of symbol (for defines) */
    249     short flags;		/* symbol attributes */
    250 } Symbol;
    251 
    252 /* parser stack entry type */
    253 typedef union {
    254     Text text;
    255     DeclSpec decl_spec;
    256     Parameter *parameter;
    257     ParameterList param_list;
    258     Declarator *declarator;
    259     DeclaratorList decl_list;
    260 } YYSTYPE;
    261 
    262 /* The hash table length should be a prime number. */
    263 #define SYM_MAX_HASH 251
    264 
    265 typedef struct symbol_table {
    266     Symbol *bucket[SYM_MAX_HASH];	/* hash buckets */
    267 } SymbolTable;
    268 
    269 extern SymbolTable *new_symbol_table	/* Create symbol table */
    270 	(void);
    271 extern void free_symbol_table		/* Destroy symbol table */
    272 	(SymbolTable *s);
    273 extern Symbol *find_symbol		/* Lookup symbol name */
    274 	(SymbolTable *s, const char *n);
    275 extern Symbol *new_symbol		/* Define new symbol */
    276 	(SymbolTable *s, const char *n, const char *v, int f);
    277 
    278 /* #include "semantic.h" */
    279 extern void new_decl_spec (DeclSpec *, const char *, long, int);
    280 extern void free_decl_spec (DeclSpec *);
    281 extern void join_decl_specs (DeclSpec *, DeclSpec *, DeclSpec *);
    282 extern void check_untagged (DeclSpec *);
    283 extern Declarator *new_declarator (const char *, const char *, long);
    284 extern void free_declarator (Declarator *);
    285 extern void new_decl_list (DeclaratorList *, Declarator *);
    286 extern void free_decl_list (DeclaratorList *);
    287 extern void add_decl_list (DeclaratorList *, DeclaratorList *, Declarator *);
    288 extern Parameter *new_parameter (DeclSpec *, Declarator *);
    289 extern void free_parameter (Parameter *);
    290 extern void new_param_list (ParameterList *, Parameter *);
    291 extern void free_param_list (ParameterList *);
    292 extern void add_param_list (ParameterList *, ParameterList *, Parameter *);
    293 extern void new_ident_list (ParameterList *);
    294 extern void add_ident_list (ParameterList *, ParameterList *, const char *);
    295 extern void set_param_types (ParameterList *, DeclSpec *, DeclaratorList *);
    296 extern void gen_declarations (DeclSpec *, DeclaratorList *);
    297 extern void gen_prototype (DeclSpec *, Declarator *);
    298 extern void gen_func_declarator (Declarator *);
    299 extern void gen_func_definition (DeclSpec *, Declarator *);
    300 
    301 extern void init_parser     (void);
    302 extern void process_file    (FILE *infile, char *name);
    303 extern char *cur_text       (void);
    304 extern char *cur_file_name  (void);
    305 extern char *implied_typedef (void);
    306 extern void include_file    (char *name, int convert);
    307 extern char *supply_parm    (int count);
    308 extern char *xstrdup        (const char *);
    309 extern int already_declared (char *name);
    310 extern int is_actual_func   (Declarator *d);
    311 extern int lint_ellipsis    (Parameter *p);
    312 extern int want_typedef     (void);
    313 extern void begin_tracking  (void);
    314 extern void begin_typedef   (void);
    315 extern void copy_typedef    (char *s);
    316 extern void ellipsis_varargs (Declarator *d);
    317 extern void end_typedef     (void);
    318 extern void flush_varargs   (void);
    319 extern void fmt_library     (int code);
    320 extern void imply_typedef   (const char *s);
    321 extern void indent          (FILE *outf);
    322 extern void put_blankline   (FILE *outf);
    323 extern void put_body        (FILE *outf, DeclSpec *decl_spec, Declarator *declarator);
    324 extern void put_char        (FILE *outf, int c);
    325 extern void put_error       (void);
    326 extern void put_newline     (FILE *outf);
    327 extern void put_padded      (FILE *outf, const char *s);
    328 extern void put_string      (FILE *outf, const char *s);
    329 extern void track_in        (void);
    330 
    331 extern boolean file_comments;
    332 extern FuncDefStyle func_style;
    333 extern char base_file[];
    334 
    335 extern	int	yylex (void);
    336 
    337 /* declaration specifier attributes for the typedef statement currently being
    338  * scanned
    339  */
    340 static int cur_decl_spec_flags;
    341 
    342 /* pointer to parameter list for the current function definition */
    343 static ParameterList *func_params;
    344 
    345 /* A parser semantic action sets this pointer to the current declarator in
    346  * a function parameter declaration in order to catch any comments following
    347  * the parameter declaration on the same line.  If the lexer scans a comment
    348  * and <cur_declarator> is not NULL, then the comment is attached to the
    349  * declarator.  To ignore subsequent comments, the lexer sets this to NULL
    350  * after scanning a comment or end of line.
    351  */
    352 static Declarator *cur_declarator;
    353 
    354 /* temporary string buffer */
    355 static char buf[MAX_TEXT_SIZE];
    356 
    357 /* table of typedef names */
    358 static SymbolTable *typedef_names;
    359 
    360 /* table of define names */
    361 static SymbolTable *define_names;
    362 
    363 /* table of type qualifiers */
    364 static SymbolTable *type_qualifiers;
    365 
    366 /* information about the current input file */
    367 typedef struct {
    368     char *base_name;		/* base input file name */
    369     char *file_name;		/* current file name */
    370     FILE *file; 		/* input file */
    371     unsigned line_num;		/* current line number in input file */
    372     FILE *tmp_file;		/* temporary file */
    373     long begin_comment; 	/* tmp file offset after last written ) or ; */
    374     long end_comment;		/* tmp file offset after last comment */
    375     boolean convert;		/* if TRUE, convert function definitions */
    376     boolean changed;		/* TRUE if conversion done in this file */
    377 } IncludeStack;
    378 
    379 static IncludeStack *cur_file;	/* current input file */
    380 
    381 /* #include "yyerror.c" */
    382 
    383 static int haveAnsiParam (void);
    384 
    385 
    386 /* Flags to enable us to find if a procedure returns a value.
    387  */
    388 static int return_val;	/* nonzero on BRACES iff return-expression found */
    389 
    390 static const char *
    391 dft_decl_spec (void)
    392 {
    393     return (lintLibrary() && !return_val) ? "void" : "int";
    394 }
    395 
    396 static int
    397 haveAnsiParam (void)
    398 {
    399     Parameter *p;
    400     if (func_params != 0) {
    401 	for (p = func_params->first; p != 0; p = p->next) {
    402 	    if (p->declarator->func_def == FUNC_ANSI) {
    403 		return TRUE;
    404 	    }
    405 	}
    406     }
    407     return FALSE;
    408 }
    409 #line 408 "grammar.tab.c"
    410 
    411 /* compatibility with bison */
    412 #ifdef YYPARSE_PARAM
    413 /* compatibility with FreeBSD */
    414 # ifdef YYPARSE_PARAM_TYPE
    415 #  define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
    416 # else
    417 #  define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
    418 # endif
    419 #else
    420 # define YYPARSE_DECL() yyparse(void)
    421 #endif
    422 
    423 /* Parameters sent to lex. */
    424 #ifdef YYLEX_PARAM
    425 # define YYLEX_DECL() yylex(void *YYLEX_PARAM)
    426 # define YYLEX yylex(YYLEX_PARAM)
    427 #else
    428 # define YYLEX_DECL() yylex(void)
    429 # define YYLEX yylex()
    430 #endif
    431 
    432 /* Parameters sent to yyerror. */
    433 #ifndef YYERROR_DECL
    434 #define YYERROR_DECL() yyerror(const char *s)
    435 #endif
    436 #ifndef YYERROR_CALL
    437 #define YYERROR_CALL(msg) yyerror(msg)
    438 #endif
    439 
    440 extern int YYPARSE_DECL();
    441 
    442 #define T_IDENTIFIER 257
    443 #define T_TYPEDEF_NAME 258
    444 #define T_DEFINE_NAME 259
    445 #define T_AUTO 260
    446 #define T_EXTERN 261
    447 #define T_REGISTER 262
    448 #define T_STATIC 263
    449 #define T_TYPEDEF 264
    450 #define T_INLINE 265
    451 #define T_EXTENSION 266
    452 #define T_CHAR 267
    453 #define T_DOUBLE 268
    454 #define T_FLOAT 269
    455 #define T_INT 270
    456 #define T_VOID 271
    457 #define T_LONG 272
    458 #define T_SHORT 273
    459 #define T_SIGNED 274
    460 #define T_UNSIGNED 275
    461 #define T_ENUM 276
    462 #define T_STRUCT 277
    463 #define T_UNION 278
    464 #define T_Bool 279
    465 #define T_Complex 280
    466 #define T_Imaginary 281
    467 #define T_TYPE_QUALIFIER 282
    468 #define T_BRACKETS 283
    469 #define T_LBRACE 284
    470 #define T_MATCHRBRACE 285
    471 #define T_ELLIPSIS 286
    472 #define T_INITIALIZER 287
    473 #define T_STRING_LITERAL 288
    474 #define T_ASM 289
    475 #define T_ASMARG 290
    476 #define T_VA_DCL 291
    477 #define YYERRCODE 256
    478 typedef short YYINT;
    479 static const YYINT grammar_lhs[] = {                     -1,
    480     0,    0,   26,   26,   27,   27,   27,   27,   27,   27,
    481    27,   31,   30,   30,   28,   28,   34,   28,   32,   32,
    482    33,   33,   35,   35,   37,   38,   29,   39,   29,   36,
    483    36,   36,   40,   40,    1,    1,    2,    2,    2,    3,
    484     3,    3,    3,    3,    3,    4,    4,    4,    4,    4,
    485     4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
    486     5,    5,    6,    6,    6,   19,   19,    8,    8,    9,
    487    41,    9,    7,    7,    7,   25,   23,   23,   10,   10,
    488    11,   11,   11,   11,   11,   20,   20,   21,   21,   22,
    489    22,   14,   14,   15,   15,   16,   16,   16,   17,   17,
    490    18,   18,   24,   24,   12,   12,   12,   13,   13,   13,
    491    13,   13,   13,   13,
    492 };
    493 static const YYINT grammar_len[] = {                      2,
    494     0,    1,    1,    2,    1,    1,    1,    1,    3,    2,
    495     2,    2,    3,    3,    2,    3,    0,    5,    2,    1,
    496     0,    1,    1,    3,    0,    0,    7,    0,    5,    0,
    497     1,    1,    1,    2,    1,    2,    1,    1,    1,    1,
    498     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    499     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    500     1,    1,    3,    2,    2,    1,    1,    1,    3,    1,
    501     0,    4,    3,    2,    2,    1,    1,    1,    2,    1,
    502     1,    3,    2,    4,    4,    2,    3,    0,    1,    1,
    503     2,    1,    3,    1,    3,    2,    2,    1,    0,    1,
    504     1,    3,    1,    2,    1,    2,    1,    3,    2,    1,
    505     4,    3,    3,    2,
    506 };
    507 static const YYINT grammar_defred[] = {                   0,
    508     0,    0,    0,    0,   77,    0,   62,   40,    0,   42,
    509    43,   20,   44,    0,   46,   47,   48,   49,   54,   50,
    510    51,   52,   53,   76,   66,   67,   55,   56,   57,   61,
    511     0,    7,    0,    0,   35,   37,   38,   39,   59,   60,
    512    28,    0,    0,    0,  103,   81,    0,    0,    3,    5,
    513     6,    8,    0,   10,   11,   78,    0,   90,    0,    0,
    514   104,    0,   19,    0,   41,   45,   15,   36,    0,   68,
    515     0,    0,    0,   83,    0,    0,   64,    0,    0,   74,
    516     4,   58,    0,   82,   87,   91,    0,   14,   13,    9,
    517    16,    0,   71,    0,   31,   33,    0,    0,    0,    0,
    518     0,   94,    0,    0,  101,   12,   63,   73,    0,    0,
    519    69,    0,    0,    0,   34,    0,  110,   96,   97,    0,
    520     0,   84,    0,   85,    0,   23,    0,    0,   72,   26,
    521    29,  114,    0,    0,    0,  109,    0,   93,   95,  102,
    522    18,    0,    0,  108,  113,  112,    0,   24,   27,  111,
    523 };
    524 #if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
    525 static const YYINT grammar_stos[] = {                     0,
    526   256,   40,   42,   38,  257,  258,  259,  260,  261,  262,
    527   263,  264,  265,  266,  267,  268,  269,  270,  271,  272,
    528   273,  274,  275,  276,  277,  278,  279,  280,  281,  282,
    529   289,   59,  293,  294,  295,  296,  297,  298,  299,  300,
    530   303,  304,  312,  313,  316,  317,  318,  319,  320,  321,
    531   322,  323,  325,  285,   59,  258,  303,  298,  314,  315,
    532   316,  288,  264,  290,  261,  266,   59,  295,  301,  302,
    533   303,  332,   40,  283,  284,  316,  324,  304,  316,  324,
    534   320,  258,  294,   41,  313,  298,  294,  321,  324,   59,
    535    59,   44,   61,  330,  291,  321,  329,  333,  294,  307,
    536   308,  309,  310,  311,  316,  285,  324,  324,  327,  303,
    537   302,  334,  329,  284,  321,   40,  283,  303,  305,  306,
    538   313,   41,   44,   41,   44,  303,  326,  328,  287,  284,
    539   285,   41,  305,  307,   40,  283,  306,  286,  309,  316,
    540    59,   44,  331,   41,   41,   41,  307,  303,  285,   41,
    541 };
    542 #endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
    543 static const YYINT grammar_dgoto[] = {                   33,
    544    87,   35,   36,   37,   38,   39,   40,   69,   70,   41,
    545    42,  119,  120,  100,  101,  102,  103,  104,   43,   44,
    546    59,   60,   45,   46,   47,   48,   49,   50,   51,   52,
    547    77,   53,  127,  109,  128,   97,   94,  143,   72,   98,
    548   112,
    549 };
    550 static const YYINT grammar_sindex[] = {                  -2,
    551    -3,   27, -239, -177,    0,    0,    0,    0, -274,    0,
    552     0,    0,    0, -246,    0,    0,    0,    0,    0,    0,
    553     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    554  -266,    0,    0,  455,    0,    0,    0,    0,    0,    0,
    555     0,  -35, -245,  128,    0,    0, -245,   -2,    0,    0,
    556     0,    0,  642,    0,    0,    0,  -15,    0,  -12, -239,
    557     0,  590,    0,  -27,    0,    0,    0,    0,  -10,    0,
    558   -11,  534,  -72,    0, -237, -232,    0,  -35, -232,    0,
    559     0,    0,  642,    0,    0,    0,  455,    0,    0,    0,
    560     0,   27,    0,  534,    0,    0, -222,  617,  209,   34,
    561    39,    0,   44,   42,    0,    0,    0,    0,   27,  -11,
    562     0, -200, -196, -195,    0,  174,    0,    0,    0,  -33,
    563   243,    0,  561,    0, -177,    0,   33,   49,    0,    0,
    564     0,    0,   53,   55,  417,    0,  -33,    0,    0,    0,
    565     0,   27, -188,    0,    0,    0,   57,    0,    0,    0,
    566 };
    567 static const YYINT grammar_rindex[] = {                  99,
    568     0,    0,  275,    0,    0,  -38,    0,    0,  481,    0,
    569     0,    0,    0,  509,    0,    0,    0,    0,    0,    0,
    570     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    571     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    572     0,   30,    0,    0,    0,    0,    0,  101,    0,    0,
    573     0,    0,    0,    0,    0,    0,    0,    0,  343,  309,
    574     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    575    98, -182,   62,    0,    0,  133,    0,   64,  379,    0,
    576     0,    0,   -5,    0,    0,    0,    0,    0,    0,    0,
    577     0,    0,    0, -182,    0,    0,    0, -180,  -19,    0,
    578    65,    0,    0,   68,    0,    0,    0,    0,   51,    9,
    579     0,    0,    0,    0,    0,    0,    0,    0,    0,  -13,
    580    19,    0,    0,    0,    0,    0,    0,   52,    0,    0,
    581     0,    0,    0,    0,    0,    0,   35,    0,    0,    0,
    582     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    583 };
    584 #if YYBTYACC
    585 static const YYINT grammar_cindex[] = {                   0,
    586     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    587     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    588     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    589     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    590     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    591     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    592     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    593     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    594     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    595     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    596     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    597     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    598     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    599     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    600     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    601 };
    602 #endif
    603 static const YYINT grammar_gindex[] = {                   0,
    604    11,  -17,    0,    0,   13,    0,    0,    0,   20,    8,
    605   -43,   -1,   -8,  -89,    0,   -9,    0,    0,    0,  -44,
    606     0,    0,    4,    0,    0,    0,   70,  -53,    0,    0,
    607   -18,    0,    0,    0,    0,   22,    0,    0,    0,    0,
    608     0,
    609 };
    610 #define YYTABLESIZE 924
    611 static const YYINT grammar_table[] = {                   58,
    612    78,   58,   58,   58,   73,   58,  135,   61,   88,   57,
    613    34,    5,   56,   62,   85,   58,   68,   63,   96,    7,
    614    58,   98,   78,   64,   98,   84,  134,  107,   80,    3,
    615   107,   90,   17,   92,   17,    4,   17,    2,   75,    3,
    616    96,   71,   30,   89,  115,  147,   76,  106,   91,   93,
    617    79,   75,   70,   17,  121,   55,   32,  107,   34,  105,
    618   108,  114,  105,   83,    4,   68,    2,   70,    3,   68,
    619    80,  121,   86,   80,  122,  106,  105,   78,  106,    5,
    620    56,   68,  123,   99,  124,  125,  129,  130,   80,  131,
    621    80,  141,  142,  144,  110,  145,  149,  150,    1,  110,
    622     2,   30,   99,   32,   79,   92,  118,   79,  100,   21,
    623    22,  111,  137,  139,  133,  113,  126,   81,    0,    0,
    624     0,    0,   79,   57,   79,    0,   99,    0,  140,    0,
    625     0,    0,    0,   99,    0,    0,    0,    0,    0,    0,
    626     0,   70,    0,    0,    0,   99,    0,    0,    0,  148,
    627     0,    0,    0,    0,    0,    0,   70,    0,    0,    0,
    628     0,    0,    0,    0,    0,    4,    0,    2,    0,    0,
    629    65,    0,   65,   65,   65,    0,   65,    0,    0,    0,
    630     0,    0,    0,    0,    5,    6,    7,    8,   65,   10,
    631    11,   65,   13,   66,   15,   16,   17,   18,   19,   20,
    632    21,   22,   23,   24,   25,   26,   27,   28,   29,   30,
    633     0,    4,    0,  116,  132,    3,    0,    0,   58,   58,
    634    58,   58,   58,   58,   58,   78,   58,   58,   58,   58,
    635    58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
    636    58,   58,   58,   58,   58,   78,    4,   74,  116,  136,
    637     3,   17,   78,    1,    5,    6,    7,    8,    9,   10,
    638    11,   12,   13,   14,   15,   16,   17,   18,   19,   20,
    639    21,   22,   23,   24,   25,   26,   27,   28,   29,   30,
    640     4,   54,  116,    5,   56,    0,   31,   80,   80,   80,
    641    80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
    642    80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
    643    80,   80,   88,   80,   88,   88,   88,    0,   88,    0,
    644    80,   79,   79,   79,   79,   79,   79,   79,   79,   79,
    645    79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
    646    79,   79,   79,   79,   79,   79,   89,   79,   89,   89,
    647    89,    0,   89,    0,   79,   25,   25,   25,   25,   25,
    648    25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
    649    25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
    650    86,   25,   86,   86,    5,   56,   86,    0,   25,   65,
    651    65,   65,   65,   65,   65,   65,    0,   65,   65,   65,
    652    65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
    653    65,   65,   65,   65,   65,   65,   75,    0,   75,   75,
    654    75,    0,   75,    0,    0,    0,    0,    0,    0,    0,
    655     5,    6,    7,    8,   65,   10,   11,   75,   13,   66,
    656    15,   16,   17,   18,   19,   20,   21,   22,   23,   24,
    657    25,   26,   27,   28,   29,   30,  117,  146,    0,    0,
    658     0,    0,    0,    0,    0,    5,    6,    7,    8,   65,
    659    10,   11,    0,   13,   66,   15,   16,   17,   18,   19,
    660    20,   21,   22,   23,   24,   25,   26,   27,   28,   29,
    661    30,  117,    4,    0,    2,    0,    3,    0,    0,    5,
    662    56,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    663     0,    0,    0,   67,    0,    0,    0,    0,   41,    0,
    664    41,    0,   41,    0,    0,  117,    0,    0,    0,    0,
    665     0,   88,   88,    0,    0,    0,    0,    0,    0,   41,
    666     0,    0,    0,    0,    0,    0,   45,    0,   45,    0,
    667    45,    0,    0,    0,    0,    0,    0,   88,    0,    0,
    668     0,    0,    0,    0,    0,   89,   89,   45,    0,    0,
    669     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    670     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    671     0,   89,    0,    0,    0,    0,    0,    0,    0,   86,
    672    86,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    673     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    674     0,    0,    0,    0,    0,   86,    0,    0,    0,    0,
    675     0,    0,    0,    0,    0,   75,   75,   75,   75,   75,
    676    75,   75,    0,   75,   75,   75,   75,   75,   75,   75,
    677    75,   75,   75,   75,   75,   75,   75,   75,   75,   75,
    678    75,   75,    0,    0,    0,    0,    0,    0,    0,    0,
    679     0,    0,    0,    0,   82,    7,    8,   65,   10,   11,
    680     0,   13,   66,   15,   16,   17,   18,   19,   20,   21,
    681    22,   23,   24,   25,   26,   27,   28,   29,   30,    0,
    682     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    683     0,    5,    6,    7,    8,   65,   10,   11,    0,   13,
    684    66,   15,   16,   17,   18,   19,   20,   21,   22,   23,
    685    24,   25,   26,   27,   28,   29,   30,   41,   41,   41,
    686    41,   41,   41,   41,    0,   41,   41,   41,   41,   41,
    687    41,   41,   41,   41,   41,   41,   41,   41,   41,   41,
    688    41,   41,   41,    0,    0,   45,   45,   45,   45,   45,
    689    45,   45,    0,   45,   45,   45,   45,   45,   45,   45,
    690    45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
    691    45,   82,    7,    8,   65,   10,   11,   12,   13,   14,
    692    15,   16,   17,   18,   19,   20,   21,   22,   23,   24,
    693    25,   26,   27,   28,   29,   30,    0,    0,   82,    7,
    694     8,   65,   10,   11,   95,   13,   66,   15,   16,   17,
    695    18,   19,   20,   21,   22,   23,   24,   25,   26,   27,
    696    28,   29,   30,    0,    0,    0,  138,   82,    7,    8,
    697    65,   10,   11,   12,   13,   14,   15,   16,   17,   18,
    698    19,   20,   21,   22,   23,   24,   25,   26,   27,   28,
    699    29,   30,    0,   75,   82,    7,    8,   65,   10,   11,
    700    12,   13,   14,   15,   16,   17,   18,   19,   20,   21,
    701    22,   23,   24,   25,   26,   27,   28,   29,   30,   82,
    702     7,    8,   65,   10,   11,    0,   13,   66,   15,   16,
    703    17,   18,   19,   20,   21,   22,   23,   24,   25,   26,
    704    27,   28,   29,   30,
    705 };
    706 static const YYINT grammar_check[] = {                   38,
    707    44,   40,   41,   42,   40,   44,   40,    4,   62,    2,
    708     0,  257,  258,  288,   59,    3,   34,  264,   72,  259,
    709    59,   41,   61,  290,   44,   41,  116,   41,   47,   42,
    710    44,   59,   38,   44,   40,   38,   42,   40,  284,   42,
    711    94,   34,  282,   62,   98,  135,   43,  285,   59,   61,
    712    47,  284,   44,   59,   99,   59,   59,   76,   48,   41,
    713    79,  284,   44,   53,   38,   83,   40,   59,   42,   87,
    714    41,  116,   60,   44,   41,   41,   73,  121,   44,  257,
    715   258,   99,   44,   73,   41,   44,  287,  284,   59,  285,
    716    61,   59,   44,   41,   87,   41,  285,   41,    0,   92,
    717     0,  284,   41,  284,   41,   41,   99,   44,   41,   59,
    718    59,   92,  121,  123,  116,   94,  109,   48,   -1,   -1,
    719    -1,   -1,   59,  116,   61,   -1,  116,   -1,  125,   -1,
    720    -1,   -1,   -1,  123,   -1,   -1,   -1,   -1,   -1,   -1,
    721    -1,   44,   -1,   -1,   -1,  135,   -1,   -1,   -1,  142,
    722    -1,   -1,   -1,   -1,   -1,   -1,   59,   -1,   -1,   -1,
    723    -1,   -1,   -1,   -1,   -1,   38,   -1,   40,   -1,   -1,
    724    38,   -1,   40,   41,   42,   -1,   44,   -1,   -1,   -1,
    725    -1,   -1,   -1,   -1,  257,  258,  259,  260,  261,  262,
    726   263,   59,  265,  266,  267,  268,  269,  270,  271,  272,
    727   273,  274,  275,  276,  277,  278,  279,  280,  281,  282,
    728    -1,   38,   -1,   40,   41,   42,   -1,   -1,  257,  258,
    729   259,  260,  261,  262,  263,  264,  265,  266,  267,  268,
    730   269,  270,  271,  272,  273,  274,  275,  276,  277,  278,
    731   279,  280,  281,  282,  283,  284,   38,  283,   40,  283,
    732    42,  257,  291,  256,  257,  258,  259,  260,  261,  262,
    733   263,  264,  265,  266,  267,  268,  269,  270,  271,  272,
    734   273,  274,  275,  276,  277,  278,  279,  280,  281,  282,
    735    38,  285,   40,  257,  258,   -1,  289,  258,  259,  260,
    736   261,  262,  263,  264,  265,  266,  267,  268,  269,  270,
    737   271,  272,  273,  274,  275,  276,  277,  278,  279,  280,
    738   281,  282,   38,  284,   40,   41,   42,   -1,   44,   -1,
    739   291,  258,  259,  260,  261,  262,  263,  264,  265,  266,
    740   267,  268,  269,  270,  271,  272,  273,  274,  275,  276,
    741   277,  278,  279,  280,  281,  282,   38,  284,   40,   41,
    742    42,   -1,   44,   -1,  291,  258,  259,  260,  261,  262,
    743   263,  264,  265,  266,  267,  268,  269,  270,  271,  272,
    744   273,  274,  275,  276,  277,  278,  279,  280,  281,  282,
    745    38,  284,   40,   41,  257,  258,   44,   -1,  291,  257,
    746   258,  259,  260,  261,  262,  263,   -1,  265,  266,  267,
    747   268,  269,  270,  271,  272,  273,  274,  275,  276,  277,
    748   278,  279,  280,  281,  282,  283,   38,   -1,   40,   41,
    749    42,   -1,   44,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    750   257,  258,  259,  260,  261,  262,  263,   59,  265,  266,
    751   267,  268,  269,  270,  271,  272,  273,  274,  275,  276,
    752   277,  278,  279,  280,  281,  282,  283,   41,   -1,   -1,
    753    -1,   -1,   -1,   -1,   -1,  257,  258,  259,  260,  261,
    754   262,  263,   -1,  265,  266,  267,  268,  269,  270,  271,
    755   272,  273,  274,  275,  276,  277,  278,  279,  280,  281,
    756   282,  283,   38,   -1,   40,   -1,   42,   -1,   -1,  257,
    757   258,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    758    -1,   -1,   -1,   59,   -1,   -1,   -1,   -1,   38,   -1,
    759    40,   -1,   42,   -1,   -1,  283,   -1,   -1,   -1,   -1,
    760    -1,  257,  258,   -1,   -1,   -1,   -1,   -1,   -1,   59,
    761    -1,   -1,   -1,   -1,   -1,   -1,   38,   -1,   40,   -1,
    762    42,   -1,   -1,   -1,   -1,   -1,   -1,  283,   -1,   -1,
    763    -1,   -1,   -1,   -1,   -1,  257,  258,   59,   -1,   -1,
    764    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    765    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    766    -1,  283,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  257,
    767   258,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    768    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    769    -1,   -1,   -1,   -1,   -1,  283,   -1,   -1,   -1,   -1,
    770    -1,   -1,   -1,   -1,   -1,  257,  258,  259,  260,  261,
    771   262,  263,   -1,  265,  266,  267,  268,  269,  270,  271,
    772   272,  273,  274,  275,  276,  277,  278,  279,  280,  281,
    773   282,  283,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    774    -1,   -1,   -1,   -1,  258,  259,  260,  261,  262,  263,
    775    -1,  265,  266,  267,  268,  269,  270,  271,  272,  273,
    776   274,  275,  276,  277,  278,  279,  280,  281,  282,   -1,
    777    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    778    -1,  257,  258,  259,  260,  261,  262,  263,   -1,  265,
    779   266,  267,  268,  269,  270,  271,  272,  273,  274,  275,
    780   276,  277,  278,  279,  280,  281,  282,  257,  258,  259,
    781   260,  261,  262,  263,   -1,  265,  266,  267,  268,  269,
    782   270,  271,  272,  273,  274,  275,  276,  277,  278,  279,
    783   280,  281,  282,   -1,   -1,  257,  258,  259,  260,  261,
    784   262,  263,   -1,  265,  266,  267,  268,  269,  270,  271,
    785   272,  273,  274,  275,  276,  277,  278,  279,  280,  281,
    786   282,  258,  259,  260,  261,  262,  263,  264,  265,  266,
    787   267,  268,  269,  270,  271,  272,  273,  274,  275,  276,
    788   277,  278,  279,  280,  281,  282,   -1,   -1,  258,  259,
    789   260,  261,  262,  263,  291,  265,  266,  267,  268,  269,
    790   270,  271,  272,  273,  274,  275,  276,  277,  278,  279,
    791   280,  281,  282,   -1,   -1,   -1,  286,  258,  259,  260,
    792   261,  262,  263,  264,  265,  266,  267,  268,  269,  270,
    793   271,  272,  273,  274,  275,  276,  277,  278,  279,  280,
    794   281,  282,   -1,  284,  258,  259,  260,  261,  262,  263,
    795   264,  265,  266,  267,  268,  269,  270,  271,  272,  273,
    796   274,  275,  276,  277,  278,  279,  280,  281,  282,  258,
    797   259,  260,  261,  262,  263,   -1,  265,  266,  267,  268,
    798   269,  270,  271,  272,  273,  274,  275,  276,  277,  278,
    799   279,  280,  281,  282,
    800 };
    801 #if YYBTYACC
    802 static const YYINT grammar_ctable[] = {                  -1,
    803    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    804    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    805    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    806    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    807    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    808    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    809    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    810    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    811    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    812    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    813    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    814    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    815    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    816    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    817    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    818    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    819    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    820    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    821    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    822    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    823    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    824    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    825    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    826    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    827    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    828    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    829    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    830    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    831    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    832    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    833    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    834    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    835    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    836    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    837    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    838    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    839    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    840    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    841    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    842    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    843    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    844    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    845    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    846    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    847    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    848    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    849    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    850    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    851    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    852    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    853    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    854    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    855    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    856    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    857    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    858    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    859    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    860    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    861    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    862    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    863    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    864    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    865    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    866    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    867    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    868    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    869    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    870    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    871    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    872    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    873    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    874    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    875    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    876    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    877    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    878    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    879    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    880    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    881    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    882    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    883    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    884    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    885    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    886    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    887    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    888    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    889    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    890    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    891    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    892    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    893    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    894    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    895    -1,   -1,   -1,
    896 };
    897 #endif
    898 #define YYFINAL 33
    899 #ifndef YYDEBUG
    900 #define YYDEBUG 0
    901 #endif
    902 #define YYMAXTOKEN 291
    903 #define YYUNDFTOKEN 335
    904 #define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))
    905 #if YYDEBUG
    906 static const char *const grammar_name[] = {
    907 
    908 "$end",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,0,0,0,0,0,0,0,0,0,0,0,
    909 0,"'&'",0,"'('","')'","'*'",0,"','",0,0,0,0,0,0,0,0,0,0,0,0,0,0,"';'",0,"'='",0,
    910 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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    911 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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    912 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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    913 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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    914 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,0,0,0,0,0,0,0,0,"error",
    915 "T_IDENTIFIER","T_TYPEDEF_NAME","T_DEFINE_NAME","T_AUTO","T_EXTERN",
    916 "T_REGISTER","T_STATIC","T_TYPEDEF","T_INLINE","T_EXTENSION","T_CHAR",
    917 "T_DOUBLE","T_FLOAT","T_INT","T_VOID","T_LONG","T_SHORT","T_SIGNED",
    918 "T_UNSIGNED","T_ENUM","T_STRUCT","T_UNION","T_Bool","T_Complex","T_Imaginary",
    919 "T_TYPE_QUALIFIER","T_BRACKETS","T_LBRACE","T_MATCHRBRACE","T_ELLIPSIS",
    920 "T_INITIALIZER","T_STRING_LITERAL","T_ASM","T_ASMARG","T_VA_DCL","$accept",
    921 "program","decl_specifiers","decl_specifier","storage_class","type_specifier",
    922 "type_qualifier","struct_or_union_specifier","enum_specifier",
    923 "init_declarator_list","init_declarator","declarator","direct_declarator",
    924 "abs_declarator","direct_abs_declarator","parameter_type_list","parameter_list",
    925 "parameter_declaration","opt_identifier_list","identifier_list",
    926 "struct_or_union","pointer","opt_type_qualifiers","type_qualifier_list",
    927 "any_id","identifier_or_ref","enumeration","translation_unit",
    928 "external_declaration","declaration","function_definition",
    929 "linkage_specification","braces","any_typedef","opt_declarator_list","$$1",
    930 "declarator_list","opt_declaration_list","$$2","$$3","$$4","declaration_list",
    931 "$$5","illegal-symbol",
    932 };
    933 static const char *const grammar_rule[] = {
    934 "$accept : program",
    935 "program :",
    936 "program : translation_unit",
    937 "translation_unit : external_declaration",
    938 "translation_unit : translation_unit external_declaration",
    939 "external_declaration : declaration",
    940 "external_declaration : function_definition",
    941 "external_declaration : ';'",
    942 "external_declaration : linkage_specification",
    943 "external_declaration : T_ASM T_ASMARG ';'",
    944 "external_declaration : error T_MATCHRBRACE",
    945 "external_declaration : error ';'",
    946 "braces : T_LBRACE T_MATCHRBRACE",
    947 "linkage_specification : T_EXTERN T_STRING_LITERAL braces",
    948 "linkage_specification : T_EXTERN T_STRING_LITERAL declaration",
    949 "declaration : decl_specifiers ';'",
    950 "declaration : decl_specifiers init_declarator_list ';'",
    951 "$$1 :",
    952 "declaration : any_typedef decl_specifiers $$1 opt_declarator_list ';'",
    953 "any_typedef : T_EXTENSION T_TYPEDEF",
    954 "any_typedef : T_TYPEDEF",
    955 "opt_declarator_list :",
    956 "opt_declarator_list : declarator_list",
    957 "declarator_list : declarator",
    958 "declarator_list : declarator_list ',' declarator",
    959 "$$2 :",
    960 "$$3 :",
    961 "function_definition : decl_specifiers declarator $$2 opt_declaration_list T_LBRACE $$3 T_MATCHRBRACE",
    962 "$$4 :",
    963 "function_definition : declarator $$4 opt_declaration_list T_LBRACE T_MATCHRBRACE",
    964 "opt_declaration_list :",
    965 "opt_declaration_list : T_VA_DCL",
    966 "opt_declaration_list : declaration_list",
    967 "declaration_list : declaration",
    968 "declaration_list : declaration_list declaration",
    969 "decl_specifiers : decl_specifier",
    970 "decl_specifiers : decl_specifiers decl_specifier",
    971 "decl_specifier : storage_class",
    972 "decl_specifier : type_specifier",
    973 "decl_specifier : type_qualifier",
    974 "storage_class : T_AUTO",
    975 "storage_class : T_EXTERN",
    976 "storage_class : T_REGISTER",
    977 "storage_class : T_STATIC",
    978 "storage_class : T_INLINE",
    979 "storage_class : T_EXTENSION",
    980 "type_specifier : T_CHAR",
    981 "type_specifier : T_DOUBLE",
    982 "type_specifier : T_FLOAT",
    983 "type_specifier : T_INT",
    984 "type_specifier : T_LONG",
    985 "type_specifier : T_SHORT",
    986 "type_specifier : T_SIGNED",
    987 "type_specifier : T_UNSIGNED",
    988 "type_specifier : T_VOID",
    989 "type_specifier : T_Bool",
    990 "type_specifier : T_Complex",
    991 "type_specifier : T_Imaginary",
    992 "type_specifier : T_TYPEDEF_NAME",
    993 "type_specifier : struct_or_union_specifier",
    994 "type_specifier : enum_specifier",
    995 "type_qualifier : T_TYPE_QUALIFIER",
    996 "type_qualifier : T_DEFINE_NAME",
    997 "struct_or_union_specifier : struct_or_union any_id braces",
    998 "struct_or_union_specifier : struct_or_union braces",
    999 "struct_or_union_specifier : struct_or_union any_id",
   1000 "struct_or_union : T_STRUCT",
   1001 "struct_or_union : T_UNION",
   1002 "init_declarator_list : init_declarator",
   1003 "init_declarator_list : init_declarator_list ',' init_declarator",
   1004 "init_declarator : declarator",
   1005 "$$5 :",
   1006 "init_declarator : declarator '=' $$5 T_INITIALIZER",
   1007 "enum_specifier : enumeration any_id braces",
   1008 "enum_specifier : enumeration braces",
   1009 "enum_specifier : enumeration any_id",
   1010 "enumeration : T_ENUM",
   1011 "any_id : T_IDENTIFIER",
   1012 "any_id : T_TYPEDEF_NAME",
   1013 "declarator : pointer direct_declarator",
   1014 "declarator : direct_declarator",
   1015 "direct_declarator : identifier_or_ref",
   1016 "direct_declarator : '(' declarator ')'",
   1017 "direct_declarator : direct_declarator T_BRACKETS",
   1018 "direct_declarator : direct_declarator '(' parameter_type_list ')'",
   1019 "direct_declarator : direct_declarator '(' opt_identifier_list ')'",
   1020 "pointer : '*' opt_type_qualifiers",
   1021 "pointer : '*' opt_type_qualifiers pointer",
   1022 "opt_type_qualifiers :",
   1023 "opt_type_qualifiers : type_qualifier_list",
   1024 "type_qualifier_list : type_qualifier",
   1025 "type_qualifier_list : type_qualifier_list type_qualifier",
   1026 "parameter_type_list : parameter_list",
   1027 "parameter_type_list : parameter_list ',' T_ELLIPSIS",
   1028 "parameter_list : parameter_declaration",
   1029 "parameter_list : parameter_list ',' parameter_declaration",
   1030 "parameter_declaration : decl_specifiers declarator",
   1031 "parameter_declaration : decl_specifiers abs_declarator",
   1032 "parameter_declaration : decl_specifiers",
   1033 "opt_identifier_list :",
   1034 "opt_identifier_list : identifier_list",
   1035 "identifier_list : any_id",
   1036 "identifier_list : identifier_list ',' any_id",
   1037 "identifier_or_ref : any_id",
   1038 "identifier_or_ref : '&' any_id",
   1039 "abs_declarator : pointer",
   1040 "abs_declarator : pointer direct_abs_declarator",
   1041 "abs_declarator : direct_abs_declarator",
   1042 "direct_abs_declarator : '(' abs_declarator ')'",
   1043 "direct_abs_declarator : direct_abs_declarator T_BRACKETS",
   1044 "direct_abs_declarator : T_BRACKETS",
   1045 "direct_abs_declarator : direct_abs_declarator '(' parameter_type_list ')'",
   1046 "direct_abs_declarator : direct_abs_declarator '(' ')'",
   1047 "direct_abs_declarator : '(' parameter_type_list ')'",
   1048 "direct_abs_declarator : '(' ')'",
   1049 
   1050 };
   1051 #endif
   1052 
   1053 int      yydebug;
   1054 int      yynerrs;
   1055 
   1056 int      yyerrflag;
   1057 int      yychar;
   1058 YYSTYPE  yyval;
   1059 YYSTYPE  yylval;
   1060 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1061 YYLTYPE  yyloc; /* position returned by actions */
   1062 YYLTYPE  yylloc; /* position from the lexer */
   1063 #endif
   1064 
   1065 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1066 #ifndef YYLLOC_DEFAULT
   1067 #define YYLLOC_DEFAULT(loc, rhs, n) \
   1068 do \
   1069 { \
   1070     if (n == 0) \
   1071     { \
   1072         (loc).first_line   = ((rhs)[-1]).last_line; \
   1073         (loc).first_column = ((rhs)[-1]).last_column; \
   1074         (loc).last_line    = ((rhs)[-1]).last_line; \
   1075         (loc).last_column  = ((rhs)[-1]).last_column; \
   1076     } \
   1077     else \
   1078     { \
   1079         (loc).first_line   = ((rhs)[ 0 ]).first_line; \
   1080         (loc).first_column = ((rhs)[ 0 ]).first_column; \
   1081         (loc).last_line    = ((rhs)[n-1]).last_line; \
   1082         (loc).last_column  = ((rhs)[n-1]).last_column; \
   1083     } \
   1084 } while (0)
   1085 #endif /* YYLLOC_DEFAULT */
   1086 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
   1087 #if YYBTYACC
   1088 
   1089 #ifndef YYLVQUEUEGROWTH
   1090 #define YYLVQUEUEGROWTH 32
   1091 #endif
   1092 #endif /* YYBTYACC */
   1093 
   1094 /* define the initial stack-sizes */
   1095 #ifdef YYSTACKSIZE
   1096 #undef YYMAXDEPTH
   1097 #define YYMAXDEPTH  YYSTACKSIZE
   1098 #else
   1099 #ifdef YYMAXDEPTH
   1100 #define YYSTACKSIZE YYMAXDEPTH
   1101 #else
   1102 #define YYSTACKSIZE 10000
   1103 #define YYMAXDEPTH  10000
   1104 #endif
   1105 #endif
   1106 
   1107 #ifndef YYINITSTACKSIZE
   1108 #define YYINITSTACKSIZE 200
   1109 #endif
   1110 
   1111 typedef struct {
   1112     unsigned stacksize;
   1113     YYINT    *s_base;
   1114     YYINT    *s_mark;
   1115     YYINT    *s_last;
   1116     YYSTYPE  *l_base;
   1117     YYSTYPE  *l_mark;
   1118 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1119     YYLTYPE  *p_base;
   1120     YYLTYPE  *p_mark;
   1121 #endif
   1122 } YYSTACKDATA;
   1123 #if YYBTYACC
   1124 
   1125 struct YYParseState_s
   1126 {
   1127     struct YYParseState_s *save;    /* Previously saved parser state */
   1128     YYSTACKDATA            yystack; /* saved parser stack */
   1129     int                    state;   /* saved parser state */
   1130     int                    errflag; /* saved error recovery status */
   1131     int                    lexeme;  /* saved index of the conflict lexeme in the lexical queue */
   1132     YYINT                  ctry;    /* saved index in yyctable[] for this conflict */
   1133 };
   1134 typedef struct YYParseState_s YYParseState;
   1135 #endif /* YYBTYACC */
   1136 /* variables for the parser stack */
   1137 static YYSTACKDATA yystack;
   1138 #if YYBTYACC
   1139 
   1140 /* Current parser state */
   1141 static YYParseState *yyps = 0;
   1142 
   1143 /* yypath != NULL: do the full parse, starting at *yypath parser state. */
   1144 static YYParseState *yypath = 0;
   1145 
   1146 /* Base of the lexical value queue */
   1147 static YYSTYPE *yylvals = 0;
   1148 
   1149 /* Current position at lexical value queue */
   1150 static YYSTYPE *yylvp = 0;
   1151 
   1152 /* End position of lexical value queue */
   1153 static YYSTYPE *yylve = 0;
   1154 
   1155 /* The last allocated position at the lexical value queue */
   1156 static YYSTYPE *yylvlim = 0;
   1157 
   1158 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1159 /* Base of the lexical position queue */
   1160 static YYLTYPE *yylpsns = 0;
   1161 
   1162 /* Current position at lexical position queue */
   1163 static YYLTYPE *yylpp = 0;
   1164 
   1165 /* End position of lexical position queue */
   1166 static YYLTYPE *yylpe = 0;
   1167 
   1168 /* The last allocated position at the lexical position queue */
   1169 static YYLTYPE *yylplim = 0;
   1170 #endif
   1171 
   1172 /* Current position at lexical token queue */
   1173 static YYINT  *yylexp = 0;
   1174 
   1175 static YYINT  *yylexemes = 0;
   1176 #endif /* YYBTYACC */
   1177 #line 1014 "grammar.y"
   1178 
   1179 /* lex.yy.c */
   1180 #define BEGIN yy_start = 1 + 2 *
   1181 
   1182 #define CPP1 1
   1183 #define INIT1 2
   1184 #define INIT2 3
   1185 #define CURLY 4
   1186 #define LEXYACC 5
   1187 #define ASM 6
   1188 #define CPP_INLINE 7
   1189 
   1190 extern char *yytext;
   1191 extern FILE *yyin, *yyout;
   1192 
   1193 static int curly;			/* number of curly brace nesting levels */
   1194 static int ly_count;			/* number of occurances of %% */
   1195 static int inc_depth;			/* include nesting level */
   1196 static SymbolTable *included_files;	/* files already included */
   1197 static int yy_start = 0;		/* start state number */
   1198 
   1199 #define grammar_error(s) yaccError(s)
   1200 
   1201 static void
   1202 yaccError (const char *msg)
   1203 {
   1204     func_params = NULL;
   1205     put_error();		/* tell what line we're on, and what file */
   1206     fprintf(stderr, "%s at token '%s'\n", msg, yytext);
   1207 }
   1208 
   1209 /* Initialize the table of type qualifier keywords recognized by the lexical
   1210  * analyzer.
   1211  */
   1212 void
   1213 init_parser (void)
   1214 {
   1215     static const char *keywords[] = {
   1216 	"const",
   1217 	"restrict",
   1218 	"volatile",
   1219 	"interrupt",
   1220 #ifdef vms
   1221 	"noshare",
   1222 	"readonly",
   1223 #endif
   1224 #if defined(MSDOS) || defined(OS2)
   1225 	"__cdecl",
   1226 	"__export",
   1227 	"__far",
   1228 	"__fastcall",
   1229 	"__fortran",
   1230 	"__huge",
   1231 	"__inline",
   1232 	"__interrupt",
   1233 	"__loadds",
   1234 	"__near",
   1235 	"__pascal",
   1236 	"__saveregs",
   1237 	"__segment",
   1238 	"__stdcall",
   1239 	"__syscall",
   1240 	"_cdecl",
   1241 	"_cs",
   1242 	"_ds",
   1243 	"_es",
   1244 	"_export",
   1245 	"_far",
   1246 	"_fastcall",
   1247 	"_fortran",
   1248 	"_huge",
   1249 	"_interrupt",
   1250 	"_loadds",
   1251 	"_near",
   1252 	"_pascal",
   1253 	"_saveregs",
   1254 	"_seg",
   1255 	"_segment",
   1256 	"_ss",
   1257 	"cdecl",
   1258 	"far",
   1259 	"huge",
   1260 	"near",
   1261 	"pascal",
   1262 #ifdef OS2
   1263 	"__far16",
   1264 #endif
   1265 #endif
   1266 #ifdef __GNUC__
   1267 	/* gcc aliases */
   1268 	"__builtin_va_arg",
   1269 	"__builtin_va_list",
   1270 	"__const",
   1271 	"__const__",
   1272 	"__inline",
   1273 	"__inline__",
   1274 	"__restrict",
   1275 	"__restrict__",
   1276 	"__volatile",
   1277 	"__volatile__",
   1278 #endif
   1279     };
   1280     unsigned i;
   1281 
   1282     /* Initialize type qualifier table. */
   1283     type_qualifiers = new_symbol_table();
   1284     for (i = 0; i < sizeof(keywords)/sizeof(keywords[0]); ++i) {
   1285 	new_symbol(type_qualifiers, keywords[i], NULL, DS_NONE);
   1286     }
   1287 }
   1288 
   1289 /* Process the C source file.  Write function prototypes to the standard
   1290  * output.  Convert function definitions and write the converted source
   1291  * code to a temporary file.
   1292  */
   1293 void
   1294 process_file (FILE *infile, char *name)
   1295 {
   1296     char *s;
   1297 
   1298     if (strlen(name) > 2) {
   1299 	s = name + strlen(name) - 2;
   1300 	if (*s == '.') {
   1301 	    ++s;
   1302 	    if (*s == 'l' || *s == 'y')
   1303 		BEGIN LEXYACC;
   1304 #if defined(MSDOS) || defined(OS2)
   1305 	    if (*s == 'L' || *s == 'Y')
   1306 		BEGIN LEXYACC;
   1307 #endif
   1308 	}
   1309     }
   1310 
   1311     included_files = new_symbol_table();
   1312     typedef_names = new_symbol_table();
   1313     define_names = new_symbol_table();
   1314     inc_depth = -1;
   1315     curly = 0;
   1316     ly_count = 0;
   1317     func_params = NULL;
   1318     yyin = infile;
   1319     include_file(strcpy(base_file, name), func_style != FUNC_NONE);
   1320     if (file_comments) {
   1321 #if OPT_LINTLIBRARY
   1322     	if (lintLibrary()) {
   1323 	    put_blankline(stdout);
   1324 	    begin_tracking();
   1325 	}
   1326 #endif
   1327 	put_string(stdout, "/* ");
   1328 	put_string(stdout, cur_file_name());
   1329 	put_string(stdout, " */\n");
   1330     }
   1331     yyparse();
   1332     free_symbol_table(define_names);
   1333     free_symbol_table(typedef_names);
   1334     free_symbol_table(included_files);
   1335 }
   1336 
   1337 #ifdef NO_LEAKS
   1338 void
   1339 free_parser(void)
   1340 {
   1341     free_symbol_table (type_qualifiers);
   1342 #ifdef FLEX_SCANNER
   1343     if (yy_current_buffer != 0)
   1344 	yy_delete_buffer(yy_current_buffer);
   1345 #endif
   1346 }
   1347 #endif
   1348 #line 1347 "grammar.tab.c"
   1349 
   1350 /* For use in generated program */
   1351 #define yydepth (int)(yystack.s_mark - yystack.s_base)
   1352 #if YYBTYACC
   1353 #define yytrial (yyps->save)
   1354 #endif /* YYBTYACC */
   1355 
   1356 #if YYDEBUG
   1357 #include <stdio.h>	/* needed for printf */
   1358 #endif
   1359 
   1360 #include <stdlib.h>	/* needed for malloc, etc */
   1361 #include <string.h>	/* needed for memset */
   1362 
   1363 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
   1364 static int yygrowstack(YYSTACKDATA *data)
   1365 {
   1366     int i;
   1367     unsigned newsize;
   1368     YYINT *newss;
   1369     YYSTYPE *newvs;
   1370 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1371     YYLTYPE *newps;
   1372 #endif
   1373 
   1374     if ((newsize = data->stacksize) == 0)
   1375         newsize = YYINITSTACKSIZE;
   1376     else if (newsize >= YYMAXDEPTH)
   1377         return YYENOMEM;
   1378     else if ((newsize *= 2) > YYMAXDEPTH)
   1379         newsize = YYMAXDEPTH;
   1380 
   1381     i = (int) (data->s_mark - data->s_base);
   1382     newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss));
   1383     if (newss == 0)
   1384         return YYENOMEM;
   1385 
   1386     data->s_base = newss;
   1387     data->s_mark = newss + i;
   1388 
   1389     newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));
   1390     if (newvs == 0)
   1391         return YYENOMEM;
   1392 
   1393     data->l_base = newvs;
   1394     data->l_mark = newvs + i;
   1395 
   1396 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1397     newps = (YYLTYPE *)realloc(data->p_base, newsize * sizeof(*newps));
   1398     if (newps == 0)
   1399         return YYENOMEM;
   1400 
   1401     data->p_base = newps;
   1402     data->p_mark = newps + i;
   1403 #endif
   1404 
   1405     data->stacksize = newsize;
   1406     data->s_last = data->s_base + newsize - 1;
   1407 
   1408 #if YYDEBUG
   1409     if (yydebug)
   1410         fprintf(stderr, "%sdebug: stack size increased to %d\n", YYPREFIX, newsize);
   1411 #endif
   1412     return 0;
   1413 }
   1414 
   1415 #if YYPURE || defined(YY_NO_LEAKS)
   1416 static void yyfreestack(YYSTACKDATA *data)
   1417 {
   1418     free(data->s_base);
   1419     free(data->l_base);
   1420 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1421     free(data->p_base);
   1422 #endif
   1423     memset(data, 0, sizeof(*data));
   1424 }
   1425 #else
   1426 #define yyfreestack(data) /* nothing */
   1427 #endif /* YYPURE || defined(YY_NO_LEAKS) */
   1428 #if YYBTYACC
   1429 
   1430 static YYParseState *
   1431 yyNewState(unsigned size)
   1432 {
   1433     YYParseState *p = (YYParseState *) malloc(sizeof(YYParseState));
   1434     if (p == NULL) return NULL;
   1435 
   1436     p->yystack.stacksize = size;
   1437     if (size == 0)
   1438     {
   1439         p->yystack.s_base = NULL;
   1440         p->yystack.l_base = NULL;
   1441 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1442         p->yystack.p_base = NULL;
   1443 #endif
   1444         return p;
   1445     }
   1446     p->yystack.s_base    = (YYINT *) malloc(size * sizeof(YYINT));
   1447     if (p->yystack.s_base == NULL) return NULL;
   1448     p->yystack.l_base    = (YYSTYPE *) malloc(size * sizeof(YYSTYPE));
   1449     if (p->yystack.l_base == NULL) return NULL;
   1450     memset(p->yystack.l_base, 0, size * sizeof(YYSTYPE));
   1451 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1452     p->yystack.p_base    = (YYLTYPE *) malloc(size * sizeof(YYLTYPE));
   1453     if (p->yystack.p_base == NULL) return NULL;
   1454     memset(p->yystack.p_base, 0, size * sizeof(YYLTYPE));
   1455 #endif
   1456 
   1457     return p;
   1458 }
   1459 
   1460 static void
   1461 yyFreeState(YYParseState *p)
   1462 {
   1463     yyfreestack(&p->yystack);
   1464     free(p);
   1465 }
   1466 #endif /* YYBTYACC */
   1467 
   1468 #define YYABORT  goto yyabort
   1469 #define YYREJECT goto yyabort
   1470 #define YYACCEPT goto yyaccept
   1471 #define YYERROR  goto yyerrlab
   1472 #if YYBTYACC
   1473 #define YYVALID        do { if (yyps->save)            goto yyvalid; } while(0)
   1474 #define YYVALID_NESTED do { if (yyps->save && \
   1475                                 yyps->save->save == 0) goto yyvalid; } while(0)
   1476 #endif /* YYBTYACC */
   1477 
   1478 int
   1479 YYPARSE_DECL()
   1480 {
   1481     int yym, yyn, yystate, yyresult;
   1482 #if YYBTYACC
   1483     int yynewerrflag;
   1484     YYParseState *yyerrctx = NULL;
   1485 #endif /* YYBTYACC */
   1486 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1487     YYLTYPE  yyerror_loc_range[2]; /* position of error start & end */
   1488 #endif
   1489 #if YYDEBUG
   1490     const char *yys;
   1491 
   1492     if ((yys = getenv("YYDEBUG")) != 0)
   1493     {
   1494         yyn = *yys;
   1495         if (yyn >= '0' && yyn <= '9')
   1496             yydebug = yyn - '0';
   1497     }
   1498     if (yydebug)
   1499         fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX);
   1500 #endif
   1501 
   1502 #if YYBTYACC
   1503     yyps = yyNewState(0); if (yyps == 0) goto yyenomem;
   1504     yyps->save = 0;
   1505 #endif /* YYBTYACC */
   1506     yym = 0;
   1507     yyn = 0;
   1508     yynerrs = 0;
   1509     yyerrflag = 0;
   1510     yychar = YYEMPTY;
   1511     yystate = 0;
   1512 
   1513 #if YYPURE
   1514     memset(&yystack, 0, sizeof(yystack));
   1515 #endif
   1516 
   1517     if (yystack.s_base == NULL && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
   1518     yystack.s_mark = yystack.s_base;
   1519     yystack.l_mark = yystack.l_base;
   1520 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1521     yystack.p_mark = yystack.p_base;
   1522 #endif
   1523     yystate = 0;
   1524     *yystack.s_mark = 0;
   1525 
   1526 yyloop:
   1527     if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
   1528     if (yychar < 0)
   1529     {
   1530 #if YYBTYACC
   1531         do {
   1532         if (yylvp < yylve)
   1533         {
   1534             /* we're currently re-reading tokens */
   1535             yylval = *yylvp++;
   1536 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1537             yylloc = *yylpp++;
   1538 #endif
   1539             yychar = *yylexp++;
   1540             break;
   1541         }
   1542         if (yyps->save)
   1543         {
   1544             /* in trial mode; save scanner results for future parse attempts */
   1545             if (yylvp == yylvlim)
   1546             {   /* Enlarge lexical value queue */
   1547                 size_t p = (size_t) (yylvp - yylvals);
   1548                 size_t s = (size_t) (yylvlim - yylvals);
   1549 
   1550                 s += YYLVQUEUEGROWTH;
   1551                 if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
   1552                 if ((yylvals   = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
   1553 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1554                 if ((yylpsns   = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
   1555 #endif
   1556                 yylvp   = yylve = yylvals + p;
   1557                 yylvlim = yylvals + s;
   1558 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1559                 yylpp   = yylpe = yylpsns + p;
   1560                 yylplim = yylpsns + s;
   1561 #endif
   1562                 yylexp  = yylexemes + p;
   1563             }
   1564             *yylexp = (YYINT) YYLEX;
   1565             *yylvp++ = yylval;
   1566             yylve++;
   1567 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1568             *yylpp++ = yylloc;
   1569             yylpe++;
   1570 #endif
   1571             yychar = *yylexp++;
   1572             break;
   1573         }
   1574         /* normal operation, no conflict encountered */
   1575 #endif /* YYBTYACC */
   1576         yychar = YYLEX;
   1577 #if YYBTYACC
   1578         } while (0);
   1579 #endif /* YYBTYACC */
   1580         if (yychar < 0) yychar = YYEOF;
   1581 #if YYDEBUG
   1582         if (yydebug)
   1583         {
   1584             if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
   1585             fprintf(stderr, "%s[%d]: state %d, reading token %d (%s)",
   1586                             YYDEBUGSTR, yydepth, yystate, yychar, yys);
   1587 #ifdef YYSTYPE_TOSTRING
   1588 #if YYBTYACC
   1589             if (!yytrial)
   1590 #endif /* YYBTYACC */
   1591                 fprintf(stderr, " <%s>", YYSTYPE_TOSTRING(yychar, yylval));
   1592 #endif
   1593             fputc('\n', stderr);
   1594         }
   1595 #endif
   1596     }
   1597 #if YYBTYACC
   1598 
   1599     /* Do we have a conflict? */
   1600     if (((yyn = yycindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
   1601         yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
   1602     {
   1603         YYINT ctry;
   1604 
   1605         if (yypath)
   1606         {
   1607             YYParseState *save;
   1608 #if YYDEBUG
   1609             if (yydebug)
   1610                 fprintf(stderr, "%s[%d]: CONFLICT in state %d: following successful trial parse\n",
   1611                                 YYDEBUGSTR, yydepth, yystate);
   1612 #endif
   1613             /* Switch to the next conflict context */
   1614             save = yypath;
   1615             yypath = save->save;
   1616             save->save = NULL;
   1617             ctry = save->ctry;
   1618             if (save->state != yystate) YYABORT;
   1619             yyFreeState(save);
   1620 
   1621         }
   1622         else
   1623         {
   1624 
   1625             /* Unresolved conflict - start/continue trial parse */
   1626             YYParseState *save;
   1627 #if YYDEBUG
   1628             if (yydebug)
   1629             {
   1630                 fprintf(stderr, "%s[%d]: CONFLICT in state %d. ", YYDEBUGSTR, yydepth, yystate);
   1631                 if (yyps->save)
   1632                     fputs("ALREADY in conflict, continuing trial parse.\n", stderr);
   1633                 else
   1634                     fputs("Starting trial parse.\n", stderr);
   1635             }
   1636 #endif
   1637             save                  = yyNewState((unsigned)(yystack.s_mark - yystack.s_base + 1));
   1638             if (save == NULL) goto yyenomem;
   1639             save->save            = yyps->save;
   1640             save->state           = yystate;
   1641             save->errflag         = yyerrflag;
   1642             save->yystack.s_mark  = save->yystack.s_base + (yystack.s_mark - yystack.s_base);
   1643             memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));
   1644             save->yystack.l_mark  = save->yystack.l_base + (yystack.l_mark - yystack.l_base);
   1645             memcpy (save->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
   1646 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1647             save->yystack.p_mark  = save->yystack.p_base + (yystack.p_mark - yystack.p_base);
   1648             memcpy (save->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
   1649 #endif
   1650             ctry                  = yytable[yyn];
   1651             if (yyctable[ctry] == -1)
   1652             {
   1653 #if YYDEBUG
   1654                 if (yydebug && yychar >= YYEOF)
   1655                     fprintf(stderr, "%s[%d]: backtracking 1 token\n", YYDEBUGSTR, yydepth);
   1656 #endif
   1657                 ctry++;
   1658             }
   1659             save->ctry = ctry;
   1660             if (yyps->save == NULL)
   1661             {
   1662                 /* If this is a first conflict in the stack, start saving lexemes */
   1663                 if (!yylexemes)
   1664                 {
   1665                     yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
   1666                     if (yylexemes == NULL) goto yyenomem;
   1667                     yylvals   = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
   1668                     if (yylvals == NULL) goto yyenomem;
   1669                     yylvlim   = yylvals + YYLVQUEUEGROWTH;
   1670 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1671                     yylpsns   = (YYLTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYLTYPE));
   1672                     if (yylpsns == NULL) goto yyenomem;
   1673                     yylplim   = yylpsns + YYLVQUEUEGROWTH;
   1674 #endif
   1675                 }
   1676                 if (yylvp == yylve)
   1677                 {
   1678                     yylvp  = yylve = yylvals;
   1679 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1680                     yylpp  = yylpe = yylpsns;
   1681 #endif
   1682                     yylexp = yylexemes;
   1683                     if (yychar >= YYEOF)
   1684                     {
   1685                         *yylve++ = yylval;
   1686 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1687                         *yylpe++ = yylloc;
   1688 #endif
   1689                         *yylexp  = (YYINT) yychar;
   1690                         yychar   = YYEMPTY;
   1691                     }
   1692                 }
   1693             }
   1694             if (yychar >= YYEOF)
   1695             {
   1696                 yylvp--;
   1697 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1698                 yylpp--;
   1699 #endif
   1700                 yylexp--;
   1701                 yychar = YYEMPTY;
   1702             }
   1703             save->lexeme = (int) (yylvp - yylvals);
   1704             yyps->save   = save;
   1705         }
   1706         if (yytable[yyn] == ctry)
   1707         {
   1708 #if YYDEBUG
   1709             if (yydebug)
   1710                 fprintf(stderr, "%s[%d]: state %d, shifting to state %d\n",
   1711                                 YYDEBUGSTR, yydepth, yystate, yyctable[ctry]);
   1712 #endif
   1713             if (yychar < 0)
   1714             {
   1715                 yylvp++;
   1716 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1717                 yylpp++;
   1718 #endif
   1719                 yylexp++;
   1720             }
   1721             if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)
   1722                 goto yyoverflow;
   1723             yystate = yyctable[ctry];
   1724             *++yystack.s_mark = (YYINT) yystate;
   1725             *++yystack.l_mark = yylval;
   1726 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1727             *++yystack.p_mark = yylloc;
   1728 #endif
   1729             yychar  = YYEMPTY;
   1730             if (yyerrflag > 0) --yyerrflag;
   1731             goto yyloop;
   1732         }
   1733         else
   1734         {
   1735             yyn = yyctable[ctry];
   1736             goto yyreduce;
   1737         }
   1738     } /* End of code dealing with conflicts */
   1739 #endif /* YYBTYACC */
   1740     if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
   1741             yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
   1742     {
   1743 #if YYDEBUG
   1744         if (yydebug)
   1745             fprintf(stderr, "%s[%d]: state %d, shifting to state %d\n",
   1746                             YYDEBUGSTR, yydepth, yystate, yytable[yyn]);
   1747 #endif
   1748         if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
   1749         yystate = yytable[yyn];
   1750         *++yystack.s_mark = yytable[yyn];
   1751         *++yystack.l_mark = yylval;
   1752 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1753         *++yystack.p_mark = yylloc;
   1754 #endif
   1755         yychar = YYEMPTY;
   1756         if (yyerrflag > 0)  --yyerrflag;
   1757         goto yyloop;
   1758     }
   1759     if (((yyn = yyrindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
   1760             yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
   1761     {
   1762         yyn = yytable[yyn];
   1763         goto yyreduce;
   1764     }
   1765     if (yyerrflag != 0) goto yyinrecovery;
   1766 #if YYBTYACC
   1767 
   1768     yynewerrflag = 1;
   1769     goto yyerrhandler;
   1770     goto yyerrlab; /* redundant goto avoids 'unused label' warning */
   1771 
   1772 yyerrlab:
   1773     /* explicit YYERROR from an action -- pop the rhs of the rule reduced
   1774      * before looking for error recovery */
   1775     yystack.s_mark -= yym;
   1776     yystate = *yystack.s_mark;
   1777     yystack.l_mark -= yym;
   1778 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1779     yystack.p_mark -= yym;
   1780 #endif
   1781 
   1782     yynewerrflag = 0;
   1783 yyerrhandler:
   1784     while (yyps->save)
   1785     {
   1786         int ctry;
   1787         YYParseState *save = yyps->save;
   1788 #if YYDEBUG
   1789         if (yydebug)
   1790             fprintf(stderr, "%s[%d]: ERROR in state %d, CONFLICT BACKTRACKING to state %d, %d tokens\n",
   1791                             YYDEBUGSTR, yydepth, yystate, yyps->save->state,
   1792                     (int)(yylvp - yylvals - yyps->save->lexeme));
   1793 #endif
   1794         /* Memorize most forward-looking error state in case it's really an error. */
   1795         if (yyerrctx == NULL || yyerrctx->lexeme < yylvp - yylvals)
   1796         {
   1797             /* Free old saved error context state */
   1798             if (yyerrctx) yyFreeState(yyerrctx);
   1799             /* Create and fill out new saved error context state */
   1800             yyerrctx                 = yyNewState((unsigned)(yystack.s_mark - yystack.s_base + 1));
   1801             if (yyerrctx == NULL) goto yyenomem;
   1802             yyerrctx->save           = yyps->save;
   1803             yyerrctx->state          = yystate;
   1804             yyerrctx->errflag        = yyerrflag;
   1805             yyerrctx->yystack.s_mark = yyerrctx->yystack.s_base + (yystack.s_mark - yystack.s_base);
   1806             memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));
   1807             yyerrctx->yystack.l_mark = yyerrctx->yystack.l_base + (yystack.l_mark - yystack.l_base);
   1808             memcpy (yyerrctx->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
   1809 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1810             yyerrctx->yystack.p_mark = yyerrctx->yystack.p_base + (yystack.p_mark - yystack.p_base);
   1811             memcpy (yyerrctx->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
   1812 #endif
   1813             yyerrctx->lexeme         = (int) (yylvp - yylvals);
   1814         }
   1815         yylvp          = yylvals   + save->lexeme;
   1816 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1817         yylpp          = yylpsns   + save->lexeme;
   1818 #endif
   1819         yylexp         = yylexemes + save->lexeme;
   1820         yychar         = YYEMPTY;
   1821         yystack.s_mark = yystack.s_base + (save->yystack.s_mark - save->yystack.s_base);
   1822         memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));
   1823         yystack.l_mark = yystack.l_base + (save->yystack.l_mark - save->yystack.l_base);
   1824         memcpy (yystack.l_base, save->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
   1825 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1826         yystack.p_mark = yystack.p_base + (save->yystack.p_mark - save->yystack.p_base);
   1827         memcpy (yystack.p_base, save->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
   1828 #endif
   1829         ctry           = ++save->ctry;
   1830         yystate        = save->state;
   1831         /* We tried shift, try reduce now */
   1832         if ((yyn = yyctable[ctry]) >= 0) goto yyreduce;
   1833         yyps->save     = save->save;
   1834         save->save     = NULL;
   1835         yyFreeState(save);
   1836 
   1837         /* Nothing left on the stack -- error */
   1838         if (!yyps->save)
   1839         {
   1840 #if YYDEBUG
   1841             if (yydebug)
   1842                 fprintf(stderr, "%sdebug[%d,trial]: trial parse FAILED, entering ERROR mode\n",
   1843                                 YYPREFIX, yydepth);
   1844 #endif
   1845             /* Restore state as it was in the most forward-advanced error */
   1846             yylvp          = yylvals   + yyerrctx->lexeme;
   1847 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1848             yylpp          = yylpsns   + yyerrctx->lexeme;
   1849 #endif
   1850             yylexp         = yylexemes + yyerrctx->lexeme;
   1851             yychar         = yylexp[-1];
   1852             yylval         = yylvp[-1];
   1853 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1854             yylloc         = yylpp[-1];
   1855 #endif
   1856             yystack.s_mark = yystack.s_base + (yyerrctx->yystack.s_mark - yyerrctx->yystack.s_base);
   1857             memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));
   1858             yystack.l_mark = yystack.l_base + (yyerrctx->yystack.l_mark - yyerrctx->yystack.l_base);
   1859             memcpy (yystack.l_base, yyerrctx->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
   1860 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1861             yystack.p_mark = yystack.p_base + (yyerrctx->yystack.p_mark - yyerrctx->yystack.p_base);
   1862             memcpy (yystack.p_base, yyerrctx->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
   1863 #endif
   1864             yystate        = yyerrctx->state;
   1865             yyFreeState(yyerrctx);
   1866             yyerrctx       = NULL;
   1867         }
   1868         yynewerrflag = 1;
   1869     }
   1870     if (yynewerrflag == 0) goto yyinrecovery;
   1871 #endif /* YYBTYACC */
   1872 
   1873     YYERROR_CALL("syntax error");
   1874 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1875     yyerror_loc_range[0] = yylloc; /* lookahead position is error start position */
   1876 #endif
   1877 
   1878 #if !YYBTYACC
   1879     goto yyerrlab; /* redundant goto avoids 'unused label' warning */
   1880 yyerrlab:
   1881 #endif
   1882     ++yynerrs;
   1883 
   1884 yyinrecovery:
   1885     if (yyerrflag < 3)
   1886     {
   1887         yyerrflag = 3;
   1888         for (;;)
   1889         {
   1890             if (((yyn = yysindex[*yystack.s_mark]) != 0) && (yyn += YYERRCODE) >= 0 &&
   1891                     yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) YYERRCODE)
   1892             {
   1893 #if YYDEBUG
   1894                 if (yydebug)
   1895                     fprintf(stderr, "%s[%d]: state %d, error recovery shifting to state %d\n",
   1896                                     YYDEBUGSTR, yydepth, *yystack.s_mark, yytable[yyn]);
   1897 #endif
   1898                 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
   1899                 yystate = yytable[yyn];
   1900                 *++yystack.s_mark = yytable[yyn];
   1901                 *++yystack.l_mark = yylval;
   1902 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1903                 /* lookahead position is error end position */
   1904                 yyerror_loc_range[1] = yylloc;
   1905                 YYLLOC_DEFAULT(yyloc, yyerror_loc_range, 2); /* position of error span */
   1906                 *++yystack.p_mark = yyloc;
   1907 #endif
   1908                 goto yyloop;
   1909             }
   1910             else
   1911             {
   1912 #if YYDEBUG
   1913                 if (yydebug)
   1914                     fprintf(stderr, "%s[%d]: error recovery discarding state %d\n",
   1915                                     YYDEBUGSTR, yydepth, *yystack.s_mark);
   1916 #endif
   1917                 if (yystack.s_mark <= yystack.s_base) goto yyabort;
   1918 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1919                 /* the current TOS position is the error start position */
   1920                 yyerror_loc_range[0] = *yystack.p_mark;
   1921 #endif
   1922 #if defined(YYDESTRUCT_CALL)
   1923 #if YYBTYACC
   1924                 if (!yytrial)
   1925 #endif /* YYBTYACC */
   1926 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1927                     YYDESTRUCT_CALL("error: discarding state",
   1928                                     yystos[*yystack.s_mark], yystack.l_mark, yystack.p_mark);
   1929 #else
   1930                     YYDESTRUCT_CALL("error: discarding state",
   1931                                     yystos[*yystack.s_mark], yystack.l_mark);
   1932 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
   1933 #endif /* defined(YYDESTRUCT_CALL) */
   1934                 --yystack.s_mark;
   1935                 --yystack.l_mark;
   1936 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1937                 --yystack.p_mark;
   1938 #endif
   1939             }
   1940         }
   1941     }
   1942     else
   1943     {
   1944         if (yychar == YYEOF) goto yyabort;
   1945 #if YYDEBUG
   1946         if (yydebug)
   1947         {
   1948             if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
   1949             fprintf(stderr, "%s[%d]: state %d, error recovery discarding token %d (%s)\n",
   1950                             YYDEBUGSTR, yydepth, yystate, yychar, yys);
   1951         }
   1952 #endif
   1953 #if defined(YYDESTRUCT_CALL)
   1954 #if YYBTYACC
   1955         if (!yytrial)
   1956 #endif /* YYBTYACC */
   1957 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1958             YYDESTRUCT_CALL("error: discarding token", yychar, &yylval, &yylloc);
   1959 #else
   1960             YYDESTRUCT_CALL("error: discarding token", yychar, &yylval);
   1961 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
   1962 #endif /* defined(YYDESTRUCT_CALL) */
   1963         yychar = YYEMPTY;
   1964         goto yyloop;
   1965     }
   1966 
   1967 yyreduce:
   1968     yym = yylen[yyn];
   1969 #if YYDEBUG
   1970     if (yydebug)
   1971     {
   1972         fprintf(stderr, "%s[%d]: state %d, reducing by rule %d (%s)",
   1973                         YYDEBUGSTR, yydepth, yystate, yyn, yyrule[yyn]);
   1974 #ifdef YYSTYPE_TOSTRING
   1975 #if YYBTYACC
   1976         if (!yytrial)
   1977 #endif /* YYBTYACC */
   1978             if (yym > 0)
   1979             {
   1980                 int i;
   1981                 fputc('<', stderr);
   1982                 for (i = yym; i > 0; i--)
   1983                 {
   1984                     if (i != yym) fputs(", ", stderr);
   1985                     fputs(YYSTYPE_TOSTRING(yystos[yystack.s_mark[1-i]],
   1986                                            yystack.l_mark[1-i]), stderr);
   1987                 }
   1988                 fputc('>', stderr);
   1989             }
   1990 #endif
   1991         fputc('\n', stderr);
   1992     }
   1993 #endif
   1994     if (yym > 0)
   1995         yyval = yystack.l_mark[1-yym];
   1996     else
   1997         memset(&yyval, 0, sizeof yyval);
   1998 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   1999 
   2000     /* Perform position reduction */
   2001     memset(&yyloc, 0, sizeof(yyloc));
   2002 #if YYBTYACC
   2003     if (!yytrial)
   2004 #endif /* YYBTYACC */
   2005     {
   2006         YYLLOC_DEFAULT(yyloc, &yystack.p_mark[1-yym], yym);
   2007         /* just in case YYERROR is invoked within the action, save
   2008            the start of the rhs as the error start position */
   2009         yyerror_loc_range[0] = yystack.p_mark[1-yym];
   2010     }
   2011 #endif
   2012 
   2013     switch (yyn)
   2014     {
   2015 case 10:
   2016 #line 377 "grammar.y"
   2017 	{
   2018 	    yyerrok;
   2019 	}
   2020 break;
   2021 case 11:
   2022 #line 381 "grammar.y"
   2023 	{
   2024 	    yyerrok;
   2025 	}
   2026 break;
   2027 case 13:
   2028 #line 392 "grammar.y"
   2029 	{
   2030 	    /* Provide an empty action here so bison will not complain about
   2031 	     * incompatible types in the default action it normally would
   2032 	     * have generated.
   2033 	     */
   2034 	}
   2035 break;
   2036 case 14:
   2037 #line 399 "grammar.y"
   2038 	{
   2039 	    /* empty */
   2040 	}
   2041 break;
   2042 case 15:
   2043 #line 406 "grammar.y"
   2044 	{
   2045 #if OPT_LINTLIBRARY
   2046 	    if (types_out && want_typedef()) {
   2047 		gen_declarations(&yystack.l_mark[-1].decl_spec, (DeclaratorList *)0);
   2048 		flush_varargs();
   2049 	    }
   2050 #endif
   2051 	    free_decl_spec(&yystack.l_mark[-1].decl_spec);
   2052 	    end_typedef();
   2053 	}
   2054 break;
   2055 case 16:
   2056 #line 417 "grammar.y"
   2057 	{
   2058 	    if (func_params != NULL) {
   2059 		set_param_types(func_params, &yystack.l_mark[-2].decl_spec, &yystack.l_mark[-1].decl_list);
   2060 	    } else {
   2061 		gen_declarations(&yystack.l_mark[-2].decl_spec, &yystack.l_mark[-1].decl_list);
   2062 #if OPT_LINTLIBRARY
   2063 		flush_varargs();
   2064 #endif
   2065 		free_decl_list(&yystack.l_mark[-1].decl_list);
   2066 	    }
   2067 	    free_decl_spec(&yystack.l_mark[-2].decl_spec);
   2068 	    end_typedef();
   2069 	}
   2070 break;
   2071 case 17:
   2072 #line 431 "grammar.y"
   2073 	{
   2074 	    cur_decl_spec_flags = yystack.l_mark[0].decl_spec.flags;
   2075 	    free_decl_spec(&yystack.l_mark[0].decl_spec);
   2076 	}
   2077 break;
   2078 case 18:
   2079 #line 436 "grammar.y"
   2080 	{
   2081 	    end_typedef();
   2082 	}
   2083 break;
   2084 case 19:
   2085 #line 443 "grammar.y"
   2086 	{
   2087 	    begin_typedef();
   2088 	}
   2089 break;
   2090 case 20:
   2091 #line 447 "grammar.y"
   2092 	{
   2093 	    begin_typedef();
   2094 	}
   2095 break;
   2096 case 23:
   2097 #line 459 "grammar.y"
   2098 	{
   2099 	    int flags = cur_decl_spec_flags;
   2100 
   2101 	    /* If the typedef is a pointer type, then reset the short type
   2102 	     * flags so it does not get promoted.
   2103 	     */
   2104 	    if (strcmp(yystack.l_mark[0].declarator->text, yystack.l_mark[0].declarator->name) != 0)
   2105 		flags &= ~(DS_CHAR | DS_SHORT | DS_FLOAT);
   2106 	    new_symbol(typedef_names, yystack.l_mark[0].declarator->name, NULL, flags);
   2107 	    free_declarator(yystack.l_mark[0].declarator);
   2108 	}
   2109 break;
   2110 case 24:
   2111 #line 471 "grammar.y"
   2112 	{
   2113 	    int flags = cur_decl_spec_flags;
   2114 
   2115 	    if (strcmp(yystack.l_mark[0].declarator->text, yystack.l_mark[0].declarator->name) != 0)
   2116 		flags &= ~(DS_CHAR | DS_SHORT | DS_FLOAT);
   2117 	    new_symbol(typedef_names, yystack.l_mark[0].declarator->name, NULL, flags);
   2118 	    free_declarator(yystack.l_mark[0].declarator);
   2119 	}
   2120 break;
   2121 case 25:
   2122 #line 483 "grammar.y"
   2123 	{
   2124 	    check_untagged(&yystack.l_mark[-1].decl_spec);
   2125 	    if (yystack.l_mark[0].declarator->func_def == FUNC_NONE) {
   2126 		yyerror("syntax error");
   2127 		YYERROR;
   2128 	    }
   2129 	    func_params = &(yystack.l_mark[0].declarator->head->params);
   2130 	    func_params->begin_comment = cur_file->begin_comment;
   2131 	    func_params->end_comment = cur_file->end_comment;
   2132 	}
   2133 break;
   2134 case 26:
   2135 #line 494 "grammar.y"
   2136 	{
   2137 	    /* If we're converting to K&R and we've got a nominally K&R
   2138 	     * function which has a parameter which is ANSI (i.e., a prototyped
   2139 	     * function pointer), then we must override the deciphered value of
   2140 	     * 'func_def' so that the parameter will be converted.
   2141 	     */
   2142 	    if (func_style == FUNC_TRADITIONAL
   2143 	     && haveAnsiParam()
   2144 	     && yystack.l_mark[-3].declarator->head->func_def == func_style) {
   2145 		yystack.l_mark[-3].declarator->head->func_def = FUNC_BOTH;
   2146 	    }
   2147 
   2148 	    func_params = NULL;
   2149 
   2150 	    if (cur_file->convert)
   2151 		gen_func_definition(&yystack.l_mark[-4].decl_spec, yystack.l_mark[-3].declarator);
   2152 	    gen_prototype(&yystack.l_mark[-4].decl_spec, yystack.l_mark[-3].declarator);
   2153 #if OPT_LINTLIBRARY
   2154 	    flush_varargs();
   2155 #endif
   2156 	    free_decl_spec(&yystack.l_mark[-4].decl_spec);
   2157 	    free_declarator(yystack.l_mark[-3].declarator);
   2158 	}
   2159 break;
   2160 case 28:
   2161 #line 519 "grammar.y"
   2162 	{
   2163 	    if (yystack.l_mark[0].declarator->func_def == FUNC_NONE) {
   2164 		yyerror("syntax error");
   2165 		YYERROR;
   2166 	    }
   2167 	    func_params = &(yystack.l_mark[0].declarator->head->params);
   2168 	    func_params->begin_comment = cur_file->begin_comment;
   2169 	    func_params->end_comment = cur_file->end_comment;
   2170 	}
   2171 break;
   2172 case 29:
   2173 #line 529 "grammar.y"
   2174 	{
   2175 	    DeclSpec decl_spec;
   2176 
   2177 	    func_params = NULL;
   2178 
   2179 	    new_decl_spec(&decl_spec, dft_decl_spec(), yystack.l_mark[-4].declarator->begin, DS_NONE);
   2180 	    if (cur_file->convert)
   2181 		gen_func_definition(&decl_spec, yystack.l_mark[-4].declarator);
   2182 	    gen_prototype(&decl_spec, yystack.l_mark[-4].declarator);
   2183 #if OPT_LINTLIBRARY
   2184 	    flush_varargs();
   2185 #endif
   2186 	    free_decl_spec(&decl_spec);
   2187 	    free_declarator(yystack.l_mark[-4].declarator);
   2188 	}
   2189 break;
   2190 case 36:
   2191 #line 560 "grammar.y"
   2192 	{
   2193 	    join_decl_specs(&yyval.decl_spec, &yystack.l_mark[-1].decl_spec, &yystack.l_mark[0].decl_spec);
   2194 	    free(yystack.l_mark[-1].decl_spec.text);
   2195 	    free(yystack.l_mark[0].decl_spec.text);
   2196 	}
   2197 break;
   2198 case 40:
   2199 #line 575 "grammar.y"
   2200 	{
   2201 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_NONE);
   2202 	}
   2203 break;
   2204 case 41:
   2205 #line 579 "grammar.y"
   2206 	{
   2207 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_EXTERN);
   2208 	}
   2209 break;
   2210 case 42:
   2211 #line 583 "grammar.y"
   2212 	{
   2213 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_NONE);
   2214 	}
   2215 break;
   2216 case 43:
   2217 #line 587 "grammar.y"
   2218 	{
   2219 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_STATIC);
   2220 	}
   2221 break;
   2222 case 44:
   2223 #line 591 "grammar.y"
   2224 	{
   2225 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_INLINE);
   2226 	}
   2227 break;
   2228 case 45:
   2229 #line 595 "grammar.y"
   2230 	{
   2231 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_JUNK);
   2232 	}
   2233 break;
   2234 case 46:
   2235 #line 602 "grammar.y"
   2236 	{
   2237 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_CHAR);
   2238 	}
   2239 break;
   2240 case 47:
   2241 #line 606 "grammar.y"
   2242 	{
   2243 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_NONE);
   2244 	}
   2245 break;
   2246 case 48:
   2247 #line 610 "grammar.y"
   2248 	{
   2249 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_FLOAT);
   2250 	}
   2251 break;
   2252 case 49:
   2253 #line 614 "grammar.y"
   2254 	{
   2255 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_NONE);
   2256 	}
   2257 break;
   2258 case 50:
   2259 #line 618 "grammar.y"
   2260 	{
   2261 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_NONE);
   2262 	}
   2263 break;
   2264 case 51:
   2265 #line 622 "grammar.y"
   2266 	{
   2267 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_SHORT);
   2268 	}
   2269 break;
   2270 case 52:
   2271 #line 626 "grammar.y"
   2272 	{
   2273 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_NONE);
   2274 	}
   2275 break;
   2276 case 53:
   2277 #line 630 "grammar.y"
   2278 	{
   2279 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_NONE);
   2280 	}
   2281 break;
   2282 case 54:
   2283 #line 634 "grammar.y"
   2284 	{
   2285 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_NONE);
   2286 	}
   2287 break;
   2288 case 55:
   2289 #line 638 "grammar.y"
   2290 	{
   2291 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_CHAR);
   2292 	}
   2293 break;
   2294 case 56:
   2295 #line 642 "grammar.y"
   2296 	{
   2297 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_NONE);
   2298 	}
   2299 break;
   2300 case 57:
   2301 #line 646 "grammar.y"
   2302 	{
   2303 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_NONE);
   2304 	}
   2305 break;
   2306 case 58:
   2307 #line 650 "grammar.y"
   2308 	{
   2309 	    Symbol *s;
   2310 	    s = find_symbol(typedef_names, yystack.l_mark[0].text.text);
   2311 	    if (s != NULL)
   2312 		new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, s->flags);
   2313 	}
   2314 break;
   2315 case 61:
   2316 #line 662 "grammar.y"
   2317 	{
   2318 	    new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, DS_NONE);
   2319 	}
   2320 break;
   2321 case 62:
   2322 #line 666 "grammar.y"
   2323 	{
   2324 	    /* This rule allows the <pointer> nonterminal to scan #define
   2325 	     * names as if they were type modifiers.
   2326 	     */
   2327 	    Symbol *s;
   2328 	    s = find_symbol(define_names, yystack.l_mark[0].text.text);
   2329 	    if (s != NULL)
   2330 		new_decl_spec(&yyval.decl_spec, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin, s->flags);
   2331 	}
   2332 break;
   2333 case 63:
   2334 #line 679 "grammar.y"
   2335 	{
   2336 	    char *s;
   2337 	    if ((s = implied_typedef()) == 0)
   2338 	        (void)sprintf(s = buf, "%s %s", yystack.l_mark[-2].text.text, yystack.l_mark[-1].text.text);
   2339 	    new_decl_spec(&yyval.decl_spec, s, yystack.l_mark[-2].text.begin, DS_NONE);
   2340 	}
   2341 break;
   2342 case 64:
   2343 #line 686 "grammar.y"
   2344 	{
   2345 	    char *s;
   2346 	    if ((s = implied_typedef()) == 0)
   2347 		(void)sprintf(s = buf, "%s {}", yystack.l_mark[-1].text.text);
   2348 	    new_decl_spec(&yyval.decl_spec, s, yystack.l_mark[-1].text.begin, DS_NONE);
   2349 	}
   2350 break;
   2351 case 65:
   2352 #line 693 "grammar.y"
   2353 	{
   2354 	    (void)sprintf(buf, "%s %s", yystack.l_mark[-1].text.text, yystack.l_mark[0].text.text);
   2355 	    new_decl_spec(&yyval.decl_spec, buf, yystack.l_mark[-1].text.begin, DS_NONE);
   2356 	}
   2357 break;
   2358 case 66:
   2359 #line 701 "grammar.y"
   2360 	{
   2361 	    imply_typedef(yyval.text.text);
   2362 	}
   2363 break;
   2364 case 67:
   2365 #line 705 "grammar.y"
   2366 	{
   2367 	    imply_typedef(yyval.text.text);
   2368 	}
   2369 break;
   2370 case 68:
   2371 #line 712 "grammar.y"
   2372 	{
   2373 	    new_decl_list(&yyval.decl_list, yystack.l_mark[0].declarator);
   2374 	}
   2375 break;
   2376 case 69:
   2377 #line 716 "grammar.y"
   2378 	{
   2379 	    add_decl_list(&yyval.decl_list, &yystack.l_mark[-2].decl_list, yystack.l_mark[0].declarator);
   2380 	}
   2381 break;
   2382 case 70:
   2383 #line 723 "grammar.y"
   2384 	{
   2385 	    if (yystack.l_mark[0].declarator->func_def != FUNC_NONE && func_params == NULL &&
   2386 		func_style == FUNC_TRADITIONAL && cur_file->convert) {
   2387 		gen_func_declarator(yystack.l_mark[0].declarator);
   2388 		fputs(cur_text(), cur_file->tmp_file);
   2389 	    }
   2390 	    cur_declarator = yyval.declarator;
   2391 	}
   2392 break;
   2393 case 71:
   2394 #line 732 "grammar.y"
   2395 	{
   2396 	    if (yystack.l_mark[-1].declarator->func_def != FUNC_NONE && func_params == NULL &&
   2397 		func_style == FUNC_TRADITIONAL && cur_file->convert) {
   2398 		gen_func_declarator(yystack.l_mark[-1].declarator);
   2399 		fputs(" =", cur_file->tmp_file);
   2400 	    }
   2401 	}
   2402 break;
   2403 case 73:
   2404 #line 744 "grammar.y"
   2405 	{
   2406 	    char *s;
   2407 	    if ((s = implied_typedef()) == 0)
   2408 		(void)sprintf(s = buf, "enum %s", yystack.l_mark[-1].text.text);
   2409 	    new_decl_spec(&yyval.decl_spec, s, yystack.l_mark[-2].text.begin, DS_NONE);
   2410 	}
   2411 break;
   2412 case 74:
   2413 #line 751 "grammar.y"
   2414 	{
   2415 	    char *s;
   2416 	    if ((s = implied_typedef()) == 0)
   2417 		(void)sprintf(s = buf, "%s {}", yystack.l_mark[-1].text.text);
   2418 	    new_decl_spec(&yyval.decl_spec, s, yystack.l_mark[-1].text.begin, DS_NONE);
   2419 	}
   2420 break;
   2421 case 75:
   2422 #line 758 "grammar.y"
   2423 	{
   2424 	    (void)sprintf(buf, "enum %s", yystack.l_mark[0].text.text);
   2425 	    new_decl_spec(&yyval.decl_spec, buf, yystack.l_mark[-1].text.begin, DS_NONE);
   2426 	}
   2427 break;
   2428 case 76:
   2429 #line 766 "grammar.y"
   2430 	{
   2431 	    imply_typedef("enum");
   2432 	    yyval.text = yystack.l_mark[0].text;
   2433 	}
   2434 break;
   2435 case 79:
   2436 #line 779 "grammar.y"
   2437 	{
   2438 	    yyval.declarator = yystack.l_mark[0].declarator;
   2439 	    (void)sprintf(buf, "%s%s", yystack.l_mark[-1].text.text, yyval.declarator->text);
   2440 	    free(yyval.declarator->text);
   2441 	    yyval.declarator->text = xstrdup(buf);
   2442 	    yyval.declarator->begin = yystack.l_mark[-1].text.begin;
   2443 	    yyval.declarator->pointer = TRUE;
   2444 	}
   2445 break;
   2446 case 81:
   2447 #line 792 "grammar.y"
   2448 	{
   2449 	    yyval.declarator = new_declarator(yystack.l_mark[0].text.text, yystack.l_mark[0].text.text, yystack.l_mark[0].text.begin);
   2450 	}
   2451 break;
   2452 case 82:
   2453 #line 796 "grammar.y"
   2454 	{
   2455 	    yyval.declarator = yystack.l_mark[-1].declarator;
   2456 	    (void)sprintf(buf, "(%s)", yyval.declarator->text);
   2457 	    free(yyval.declarator->text);
   2458 	    yyval.declarator->text = xstrdup(buf);
   2459 	    yyval.declarator->begin = yystack.l_mark[-2].text.begin;
   2460 	}
   2461 break;
   2462 case 83:
   2463 #line 804 "grammar.y"
   2464 	{
   2465 	    yyval.declarator = yystack.l_mark[-1].declarator;
   2466 	    (void)sprintf(buf, "%s%s", yyval.declarator->text, yystack.l_mark[0].text.text);
   2467 	    free(yyval.declarator->text);
   2468 	    yyval.declarator->text = xstrdup(buf);
   2469 	}
   2470 break;
   2471 case 84:
   2472 #line 811 "grammar.y"
   2473 	{
   2474 	    yyval.declarator = new_declarator("%s()", yystack.l_mark[-3].declarator->name, yystack.l_mark[-3].declarator->begin);
   2475 	    yyval.declarator->params = yystack.l_mark[-1].param_list;
   2476 	    yyval.declarator->func_stack = yystack.l_mark[-3].declarator;
   2477 	    yyval.declarator->head = (yystack.l_mark[-3].declarator->func_stack == NULL) ? yyval.declarator : yystack.l_mark[-3].declarator->head;
   2478 	    yyval.declarator->func_def = FUNC_ANSI;
   2479 	}
   2480 break;
   2481 case 85:
   2482 #line 819 "grammar.y"
   2483 	{
   2484 	    yyval.declarator = new_declarator("%s()", yystack.l_mark[-3].declarator->name, yystack.l_mark[-3].declarator->begin);
   2485 	    yyval.declarator->params = yystack.l_mark[-1].param_list;
   2486 	    yyval.declarator->func_stack = yystack.l_mark[-3].declarator;
   2487 	    yyval.declarator->head = (yystack.l_mark[-3].declarator->func_stack == NULL) ? yyval.declarator : yystack.l_mark[-3].declarator->head;
   2488 	    yyval.declarator->func_def = FUNC_TRADITIONAL;
   2489 	}
   2490 break;
   2491 case 86:
   2492 #line 830 "grammar.y"
   2493 	{
   2494 	    (void)sprintf(yyval.text.text, "*%s", yystack.l_mark[0].text.text);
   2495 	    yyval.text.begin = yystack.l_mark[-1].text.begin;
   2496 	}
   2497 break;
   2498 case 87:
   2499 #line 835 "grammar.y"
   2500 	{
   2501 	    (void)sprintf(yyval.text.text, "*%s%s", yystack.l_mark[-1].text.text, yystack.l_mark[0].text.text);
   2502 	    yyval.text.begin = yystack.l_mark[-2].text.begin;
   2503 	}
   2504 break;
   2505 case 88:
   2506 #line 843 "grammar.y"
   2507 	{
   2508 	    strcpy(yyval.text.text, "");
   2509 	    yyval.text.begin = 0L;
   2510 	}
   2511 break;
   2512 case 90:
   2513 #line 852 "grammar.y"
   2514 	{
   2515 	    (void)sprintf(yyval.text.text, "%s ", yystack.l_mark[0].decl_spec.text);
   2516 	    yyval.text.begin = yystack.l_mark[0].decl_spec.begin;
   2517 	    free(yystack.l_mark[0].decl_spec.text);
   2518 	}
   2519 break;
   2520 case 91:
   2521 #line 858 "grammar.y"
   2522 	{
   2523 	    (void)sprintf(yyval.text.text, "%s%s ", yystack.l_mark[-1].text.text, yystack.l_mark[0].decl_spec.text);
   2524 	    yyval.text.begin = yystack.l_mark[-1].text.begin;
   2525 	    free(yystack.l_mark[0].decl_spec.text);
   2526 	}
   2527 break;
   2528 case 93:
   2529 #line 868 "grammar.y"
   2530 	{
   2531 	    add_ident_list(&yyval.param_list, &yystack.l_mark[-2].param_list, "...");
   2532 	}
   2533 break;
   2534 case 94:
   2535 #line 875 "grammar.y"
   2536 	{
   2537 	    new_param_list(&yyval.param_list, yystack.l_mark[0].parameter);
   2538 	}
   2539 break;
   2540 case 95:
   2541 #line 879 "grammar.y"
   2542 	{
   2543 	    add_param_list(&yyval.param_list, &yystack.l_mark[-2].param_list, yystack.l_mark[0].parameter);
   2544 	}
   2545 break;
   2546 case 96:
   2547 #line 886 "grammar.y"
   2548 	{
   2549 	    check_untagged(&yystack.l_mark[-1].decl_spec);
   2550 	    yyval.parameter = new_parameter(&yystack.l_mark[-1].decl_spec, yystack.l_mark[0].declarator);
   2551 	}
   2552 break;
   2553 case 97:
   2554 #line 891 "grammar.y"
   2555 	{
   2556 	    check_untagged(&yystack.l_mark[-1].decl_spec);
   2557 	    yyval.parameter = new_parameter(&yystack.l_mark[-1].decl_spec, yystack.l_mark[0].declarator);
   2558 	}
   2559 break;
   2560 case 98:
   2561 #line 896 "grammar.y"
   2562 	{
   2563 	    check_untagged(&yystack.l_mark[0].decl_spec);
   2564 	    yyval.parameter = new_parameter(&yystack.l_mark[0].decl_spec, (Declarator *)0);
   2565 	}
   2566 break;
   2567 case 99:
   2568 #line 904 "grammar.y"
   2569 	{
   2570 	    new_ident_list(&yyval.param_list);
   2571 	}
   2572 break;
   2573 case 101:
   2574 #line 912 "grammar.y"
   2575 	{
   2576 	    new_ident_list(&yyval.param_list);
   2577 	    add_ident_list(&yyval.param_list, &yyval.param_list, yystack.l_mark[0].text.text);
   2578 	}
   2579 break;
   2580 case 102:
   2581 #line 917 "grammar.y"
   2582 	{
   2583 	    add_ident_list(&yyval.param_list, &yystack.l_mark[-2].param_list, yystack.l_mark[0].text.text);
   2584 	}
   2585 break;
   2586 case 103:
   2587 #line 924 "grammar.y"
   2588 	{
   2589 	    yyval.text = yystack.l_mark[0].text;
   2590 	}
   2591 break;
   2592 case 104:
   2593 #line 928 "grammar.y"
   2594 	{
   2595 #if OPT_LINTLIBRARY
   2596 	    if (lintLibrary()) { /* Lint doesn't grok C++ ref variables */
   2597 		yyval.text = yystack.l_mark[0].text;
   2598 	    } else
   2599 #endif
   2600 		(void)sprintf(yyval.text.text, "&%s", yystack.l_mark[0].text.text);
   2601 	    yyval.text.begin = yystack.l_mark[-1].text.begin;
   2602 	}
   2603 break;
   2604 case 105:
   2605 #line 941 "grammar.y"
   2606 	{
   2607 	    yyval.declarator = new_declarator(yystack.l_mark[0].text.text, "", yystack.l_mark[0].text.begin);
   2608 	}
   2609 break;
   2610 case 106:
   2611 #line 945 "grammar.y"
   2612 	{
   2613 	    yyval.declarator = yystack.l_mark[0].declarator;
   2614 	    (void)sprintf(buf, "%s%s", yystack.l_mark[-1].text.text, yyval.declarator->text);
   2615 	    free(yyval.declarator->text);
   2616 	    yyval.declarator->text = xstrdup(buf);
   2617 	    yyval.declarator->begin = yystack.l_mark[-1].text.begin;
   2618 	}
   2619 break;
   2620 case 108:
   2621 #line 957 "grammar.y"
   2622 	{
   2623 	    yyval.declarator = yystack.l_mark[-1].declarator;
   2624 	    (void)sprintf(buf, "(%s)", yyval.declarator->text);
   2625 	    free(yyval.declarator->text);
   2626 	    yyval.declarator->text = xstrdup(buf);
   2627 	    yyval.declarator->begin = yystack.l_mark[-2].text.begin;
   2628 	}
   2629 break;
   2630 case 109:
   2631 #line 965 "grammar.y"
   2632 	{
   2633 	    yyval.declarator = yystack.l_mark[-1].declarator;
   2634 	    (void)sprintf(buf, "%s%s", yyval.declarator->text, yystack.l_mark[0].text.text);
   2635 	    free(yyval.declarator->text);
   2636 	    yyval.declarator->text = xstrdup(buf);
   2637 	}
   2638 break;
   2639 case 110:
   2640 #line 972 "grammar.y"
   2641 	{
   2642 	    yyval.declarator = new_declarator(yystack.l_mark[0].text.text, "", yystack.l_mark[0].text.begin);
   2643 	}
   2644 break;
   2645 case 111:
   2646 #line 976 "grammar.y"
   2647 	{
   2648 	    yyval.declarator = new_declarator("%s()", "", yystack.l_mark[-3].declarator->begin);
   2649 	    yyval.declarator->params = yystack.l_mark[-1].param_list;
   2650 	    yyval.declarator->func_stack = yystack.l_mark[-3].declarator;
   2651 	    yyval.declarator->head = (yystack.l_mark[-3].declarator->func_stack == NULL) ? yyval.declarator : yystack.l_mark[-3].declarator->head;
   2652 	    yyval.declarator->func_def = FUNC_ANSI;
   2653 	}
   2654 break;
   2655 case 112:
   2656 #line 984 "grammar.y"
   2657 	{
   2658 	    yyval.declarator = new_declarator("%s()", "", yystack.l_mark[-2].declarator->begin);
   2659 	    yyval.declarator->func_stack = yystack.l_mark[-2].declarator;
   2660 	    yyval.declarator->head = (yystack.l_mark[-2].declarator->func_stack == NULL) ? yyval.declarator : yystack.l_mark[-2].declarator->head;
   2661 	    yyval.declarator->func_def = FUNC_ANSI;
   2662 	}
   2663 break;
   2664 case 113:
   2665 #line 991 "grammar.y"
   2666 	{
   2667 	    Declarator *d;
   2668 
   2669 	    d = new_declarator("", "", yystack.l_mark[-2].text.begin);
   2670 	    yyval.declarator = new_declarator("%s()", "", yystack.l_mark[-2].text.begin);
   2671 	    yyval.declarator->params = yystack.l_mark[-1].param_list;
   2672 	    yyval.declarator->func_stack = d;
   2673 	    yyval.declarator->head = yyval.declarator;
   2674 	    yyval.declarator->func_def = FUNC_ANSI;
   2675 	}
   2676 break;
   2677 case 114:
   2678 #line 1002 "grammar.y"
   2679 	{
   2680 	    Declarator *d;
   2681 
   2682 	    d = new_declarator("", "", yystack.l_mark[-1].text.begin);
   2683 	    yyval.declarator = new_declarator("%s()", "", yystack.l_mark[-1].text.begin);
   2684 	    yyval.declarator->func_stack = d;
   2685 	    yyval.declarator->head = yyval.declarator;
   2686 	    yyval.declarator->func_def = FUNC_ANSI;
   2687 	}
   2688 break;
   2689 #line 2688 "grammar.tab.c"
   2690     default:
   2691         break;
   2692     }
   2693     yystack.s_mark -= yym;
   2694     yystate = *yystack.s_mark;
   2695     yystack.l_mark -= yym;
   2696 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   2697     yystack.p_mark -= yym;
   2698 #endif
   2699     yym = yylhs[yyn];
   2700     if (yystate == 0 && yym == 0)
   2701     {
   2702 #if YYDEBUG
   2703         if (yydebug)
   2704         {
   2705             fprintf(stderr, "%s[%d]: after reduction, ", YYDEBUGSTR, yydepth);
   2706 #ifdef YYSTYPE_TOSTRING
   2707 #if YYBTYACC
   2708             if (!yytrial)
   2709 #endif /* YYBTYACC */
   2710                 fprintf(stderr, "result is <%s>, ", YYSTYPE_TOSTRING(yystos[YYFINAL], yyval));
   2711 #endif
   2712             fprintf(stderr, "shifting from state 0 to final state %d\n", YYFINAL);
   2713         }
   2714 #endif
   2715         yystate = YYFINAL;
   2716         *++yystack.s_mark = YYFINAL;
   2717         *++yystack.l_mark = yyval;
   2718 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   2719         *++yystack.p_mark = yyloc;
   2720 #endif
   2721         if (yychar < 0)
   2722         {
   2723 #if YYBTYACC
   2724             do {
   2725             if (yylvp < yylve)
   2726             {
   2727                 /* we're currently re-reading tokens */
   2728                 yylval = *yylvp++;
   2729 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   2730                 yylloc = *yylpp++;
   2731 #endif
   2732                 yychar = *yylexp++;
   2733                 break;
   2734             }
   2735             if (yyps->save)
   2736             {
   2737                 /* in trial mode; save scanner results for future parse attempts */
   2738                 if (yylvp == yylvlim)
   2739                 {   /* Enlarge lexical value queue */
   2740                     size_t p = (size_t) (yylvp - yylvals);
   2741                     size_t s = (size_t) (yylvlim - yylvals);
   2742 
   2743                     s += YYLVQUEUEGROWTH;
   2744                     if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
   2745                         goto yyenomem;
   2746                     if ((yylvals   = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
   2747                         goto yyenomem;
   2748 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   2749                     if ((yylpsns   = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
   2750                         goto yyenomem;
   2751 #endif
   2752                     yylvp   = yylve = yylvals + p;
   2753                     yylvlim = yylvals + s;
   2754 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   2755                     yylpp   = yylpe = yylpsns + p;
   2756                     yylplim = yylpsns + s;
   2757 #endif
   2758                     yylexp  = yylexemes + p;
   2759                 }
   2760                 *yylexp = (YYINT) YYLEX;
   2761                 *yylvp++ = yylval;
   2762                 yylve++;
   2763 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   2764                 *yylpp++ = yylloc;
   2765                 yylpe++;
   2766 #endif
   2767                 yychar = *yylexp++;
   2768                 break;
   2769             }
   2770             /* normal operation, no conflict encountered */
   2771 #endif /* YYBTYACC */
   2772             yychar = YYLEX;
   2773 #if YYBTYACC
   2774             } while (0);
   2775 #endif /* YYBTYACC */
   2776             if (yychar < 0) yychar = YYEOF;
   2777 #if YYDEBUG
   2778             if (yydebug)
   2779             {
   2780                 if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
   2781                 fprintf(stderr, "%s[%d]: state %d, reading token %d (%s)\n",
   2782                                 YYDEBUGSTR, yydepth, YYFINAL, yychar, yys);
   2783             }
   2784 #endif
   2785         }
   2786         if (yychar == YYEOF) goto yyaccept;
   2787         goto yyloop;
   2788     }
   2789     if (((yyn = yygindex[yym]) != 0) && (yyn += yystate) >= 0 &&
   2790             yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yystate)
   2791         yystate = yytable[yyn];
   2792     else
   2793         yystate = yydgoto[yym];
   2794 #if YYDEBUG
   2795     if (yydebug)
   2796     {
   2797         fprintf(stderr, "%s[%d]: after reduction, ", YYDEBUGSTR, yydepth);
   2798 #ifdef YYSTYPE_TOSTRING
   2799 #if YYBTYACC
   2800         if (!yytrial)
   2801 #endif /* YYBTYACC */
   2802             fprintf(stderr, "result is <%s>, ", YYSTYPE_TOSTRING(yystos[yystate], yyval));
   2803 #endif
   2804         fprintf(stderr, "shifting from state %d to state %d\n", *yystack.s_mark, yystate);
   2805     }
   2806 #endif
   2807     if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
   2808     *++yystack.s_mark = (YYINT) yystate;
   2809     *++yystack.l_mark = yyval;
   2810 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   2811     *++yystack.p_mark = yyloc;
   2812 #endif
   2813     goto yyloop;
   2814 #if YYBTYACC
   2815 
   2816     /* Reduction declares that this path is valid. Set yypath and do a full parse */
   2817 yyvalid:
   2818     if (yypath) YYABORT;
   2819     while (yyps->save)
   2820     {
   2821         YYParseState *save = yyps->save;
   2822         yyps->save = save->save;
   2823         save->save = yypath;
   2824         yypath = save;
   2825     }
   2826 #if YYDEBUG
   2827     if (yydebug)
   2828         fprintf(stderr, "%s[%d]: state %d, CONFLICT trial successful, backtracking to state %d, %d tokens\n",
   2829                         YYDEBUGSTR, yydepth, yystate, yypath->state, (int)(yylvp - yylvals - yypath->lexeme));
   2830 #endif
   2831     if (yyerrctx)
   2832     {
   2833         yyFreeState(yyerrctx);
   2834         yyerrctx = NULL;
   2835     }
   2836     yylvp          = yylvals + yypath->lexeme;
   2837 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   2838     yylpp          = yylpsns + yypath->lexeme;
   2839 #endif
   2840     yylexp         = yylexemes + yypath->lexeme;
   2841     yychar         = YYEMPTY;
   2842     yystack.s_mark = yystack.s_base + (yypath->yystack.s_mark - yypath->yystack.s_base);
   2843     memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));
   2844     yystack.l_mark = yystack.l_base + (yypath->yystack.l_mark - yypath->yystack.l_base);
   2845     memcpy (yystack.l_base, yypath->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));
   2846 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   2847     yystack.p_mark = yystack.p_base + (yypath->yystack.p_mark - yypath->yystack.p_base);
   2848     memcpy (yystack.p_base, yypath->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));
   2849 #endif
   2850     yystate        = yypath->state;
   2851     goto yyloop;
   2852 #endif /* YYBTYACC */
   2853 
   2854 yyoverflow:
   2855     YYERROR_CALL("yacc stack overflow");
   2856 #if YYBTYACC
   2857     goto yyabort_nomem;
   2858 yyenomem:
   2859     YYERROR_CALL("memory exhausted");
   2860 yyabort_nomem:
   2861 #endif /* YYBTYACC */
   2862     yyresult = 2;
   2863     goto yyreturn;
   2864 
   2865 yyabort:
   2866     yyresult = 1;
   2867     goto yyreturn;
   2868 
   2869 yyaccept:
   2870 #if YYBTYACC
   2871     if (yyps->save) goto yyvalid;
   2872 #endif /* YYBTYACC */
   2873     yyresult = 0;
   2874 
   2875 yyreturn:
   2876 #if defined(YYDESTRUCT_CALL)
   2877     if (yychar != YYEOF && yychar != YYEMPTY)
   2878 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   2879         YYDESTRUCT_CALL("cleanup: discarding token", yychar, &yylval, &yylloc);
   2880 #else
   2881         YYDESTRUCT_CALL("cleanup: discarding token", yychar, &yylval);
   2882 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
   2883 
   2884     {
   2885         YYSTYPE *pv;
   2886 #if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
   2887         YYLTYPE *pp;
   2888 
   2889         for (pv = yystack.l_base, pp = yystack.p_base; pv <= yystack.l_mark; ++pv, ++pp)
   2890              YYDESTRUCT_CALL("cleanup: discarding state",
   2891                              yystos[*(yystack.s_base + (pv - yystack.l_base))], pv, pp);
   2892 #else
   2893         for (pv = yystack.l_base; pv <= yystack.l_mark; ++pv)
   2894              YYDESTRUCT_CALL("cleanup: discarding state",
   2895                              yystos[*(yystack.s_base + (pv - yystack.l_base))], pv);
   2896 #endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */
   2897     }
   2898 #endif /* defined(YYDESTRUCT_CALL) */
   2899 
   2900 #if YYBTYACC
   2901     if (yyerrctx)
   2902     {
   2903         yyFreeState(yyerrctx);
   2904         yyerrctx = NULL;
   2905     }
   2906     while (yyps)
   2907     {
   2908         YYParseState *save = yyps;
   2909         yyps = save->save;
   2910         save->save = NULL;
   2911         yyFreeState(save);
   2912     }
   2913     while (yypath)
   2914     {
   2915         YYParseState *save = yypath;
   2916         yypath = save->save;
   2917         save->save = NULL;
   2918         yyFreeState(save);
   2919     }
   2920 #endif /* YYBTYACC */
   2921     yyfreestack(&yystack);
   2922     return (yyresult);
   2923 }
   2924