updated with Tizen:Base source codes
[external/byacc.git] / test / grammar.tab.c
1 #ifndef lint
2 static const char yysccsid[] = "@(#)yaccpar     1.9 (Berkeley) 02/21/93";
3 #endif
4
5 #include <stdlib.h>
6 #include <string.h>
7
8 #define YYBYACC 1
9 #define YYMAJOR 1
10 #define YYMINOR 9
11
12 #define YYEMPTY        (-1)
13 #define yyclearin      (yychar = YYEMPTY)
14 #define yyerrok        (yyerrflag = 0)
15 #define YYRECOVERING() (yyerrflag != 0)
16
17 /* compatibility with bison */
18 #ifdef YYPARSE_PARAM
19 /* compatibility with FreeBSD */
20 #ifdef YYPARSE_PARAM_TYPE
21 #define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
22 #else
23 #define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
24 #endif
25 #else
26 #define YYPARSE_DECL() yyparse(void)
27 #endif /* YYPARSE_PARAM */
28
29 extern int YYPARSE_DECL();
30
31 static int yygrowstack(void);
32 #define yyparse    grammar_parse
33 #define yylex      grammar_lex
34 #define yyerror    grammar_error
35 #define yychar     grammar_char
36 #define yyval      grammar_val
37 #define yylval     grammar_lval
38 #define yydebug    grammar_debug
39 #define yynerrs    grammar_nerrs
40 #define yyerrflag  grammar_errflag
41 #define yyss       grammar_ss
42 #define yyssp      grammar_ssp
43 #define yyvs       grammar_vs
44 #define yyvsp      grammar_vsp
45 #define yylhs      grammar_lhs
46 #define yylen      grammar_len
47 #define yydefred   grammar_defred
48 #define yydgoto    grammar_dgoto
49 #define yysindex   grammar_sindex
50 #define yyrindex   grammar_rindex
51 #define yygindex   grammar_gindex
52 #define yytable    grammar_table
53 #define yycheck    grammar_check
54 #define yyname     grammar_name
55 #define yyrule     grammar_rule
56 #define YYPREFIX "grammar_"
57 #line 69 "grammar.y"
58 #include <stdio.h>
59 #include <ctype.h>
60 #include "cproto.h"
61 #include "symbol.h"
62 #include "semantic.h"
63
64 #define YYMAXDEPTH 150
65
66 extern  int     yylex (void);
67
68 /* declaration specifier attributes for the typedef statement currently being
69  * scanned
70  */
71 static int cur_decl_spec_flags;
72
73 /* pointer to parameter list for the current function definition */
74 static ParameterList *func_params;
75
76 /* A parser semantic action sets this pointer to the current declarator in
77  * a function parameter declaration in order to catch any comments following
78  * the parameter declaration on the same line.  If the lexer scans a comment
79  * and <cur_declarator> is not NULL, then the comment is attached to the
80  * declarator.  To ignore subsequent comments, the lexer sets this to NULL
81  * after scanning a comment or end of line.
82  */
83 static Declarator *cur_declarator;
84
85 /* temporary string buffer */
86 static char buf[MAX_TEXT_SIZE];
87
88 /* table of typedef names */
89 static SymbolTable *typedef_names;
90
91 /* table of define names */
92 static SymbolTable *define_names;
93
94 /* table of type qualifiers */
95 static SymbolTable *type_qualifiers;
96
97 /* information about the current input file */
98 typedef struct {
99     char *base_name;            /* base input file name */
100     char *file_name;            /* current file name */
101     FILE *file;                 /* input file */
102     unsigned line_num;          /* current line number in input file */
103     FILE *tmp_file;             /* temporary file */
104     long begin_comment;         /* tmp file offset after last written ) or ; */
105     long end_comment;           /* tmp file offset after last comment */
106     boolean convert;            /* if TRUE, convert function definitions */
107     boolean changed;            /* TRUE if conversion done in this file */
108 } IncludeStack;
109
110 static IncludeStack *cur_file;  /* current input file */
111
112 #include "yyerror.c"
113
114 static int haveAnsiParam (void);
115
116
117 /* Flags to enable us to find if a procedure returns a value.
118  */
119 static int return_val,  /* nonzero on BRACES iff return-expression found */
120            returned_at; /* marker for token-number to set 'return_val' */
121
122 #if OPT_LINTLIBRARY
123 static char *dft_decl_spec (void);
124
125 static char *
126 dft_decl_spec (void)
127 {
128     return (lintLibrary() && !return_val) ? "void" : "int";
129 }
130
131 #else
132 #define dft_decl_spec() "int"
133 #endif
134
135 static int
136 haveAnsiParam (void)
137 {
138     Parameter *p;
139     if (func_params != 0) {
140         for (p = func_params->first; p != 0; p = p->next) {
141             if (p->declarator->func_def == FUNC_ANSI) {
142                 return TRUE;
143             }
144         }
145     }
146     return FALSE;
147 }
148 #line 149 "grammar.tab.c"
149 #define T_IDENTIFIER 257
150 #define T_TYPEDEF_NAME 258
151 #define T_DEFINE_NAME 259
152 #define T_AUTO 260
153 #define T_EXTERN 261
154 #define T_REGISTER 262
155 #define T_STATIC 263
156 #define T_TYPEDEF 264
157 #define T_INLINE 265
158 #define T_EXTENSION 266
159 #define T_CHAR 267
160 #define T_DOUBLE 268
161 #define T_FLOAT 269
162 #define T_INT 270
163 #define T_VOID 271
164 #define T_LONG 272
165 #define T_SHORT 273
166 #define T_SIGNED 274
167 #define T_UNSIGNED 275
168 #define T_ENUM 276
169 #define T_STRUCT 277
170 #define T_UNION 278
171 #define T_Bool 279
172 #define T_Complex 280
173 #define T_Imaginary 281
174 #define T_TYPE_QUALIFIER 282
175 #define T_BRACKETS 283
176 #define T_LBRACE 284
177 #define T_MATCHRBRACE 285
178 #define T_ELLIPSIS 286
179 #define T_INITIALIZER 287
180 #define T_STRING_LITERAL 288
181 #define T_ASM 289
182 #define T_ASMARG 290
183 #define T_VA_DCL 291
184 #define YYERRCODE 256
185 static const short grammar_lhs[] = {                     -1,
186     0,    0,   26,   26,   27,   27,   27,   27,   27,   27,
187    27,   31,   30,   30,   28,   28,   34,   28,   32,   32,
188    33,   33,   35,   35,   37,   38,   29,   39,   29,   36,
189    36,   36,   40,   40,    1,    1,    2,    2,    2,    3,
190     3,    3,    3,    3,    3,    4,    4,    4,    4,    4,
191     4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
192     5,    5,    6,    6,    6,   19,   19,    8,    8,    9,
193    41,    9,    7,    7,    7,   25,   23,   23,   10,   10,
194    11,   11,   11,   11,   11,   20,   20,   21,   21,   22,
195    22,   14,   14,   15,   15,   16,   16,   16,   17,   17,
196    18,   18,   24,   24,   12,   12,   12,   13,   13,   13,
197    13,   13,   13,   13,
198 };
199 static const short grammar_len[] = {                      2,
200     0,    1,    1,    2,    1,    1,    1,    1,    3,    2,
201     2,    2,    3,    3,    2,    3,    0,    5,    2,    1,
202     0,    1,    1,    3,    0,    0,    7,    0,    5,    0,
203     1,    1,    1,    2,    1,    2,    1,    1,    1,    1,
204     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
205     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
206     1,    1,    3,    2,    2,    1,    1,    1,    3,    1,
207     0,    4,    3,    2,    2,    1,    1,    1,    2,    1,
208     1,    3,    2,    4,    4,    2,    3,    0,    1,    1,
209     2,    1,    3,    1,    3,    2,    2,    1,    0,    1,
210     1,    3,    1,    2,    1,    2,    1,    3,    2,    1,
211     4,    3,    3,    2,
212 };
213 static const short grammar_defred[] = {                   0,
214     0,    0,    0,    0,   77,    0,   62,   40,    0,   42,
215    43,   20,   44,    0,   46,   47,   48,   49,   54,   50,
216    51,   52,   53,   76,   66,   67,   55,   56,   57,   61,
217     0,    7,    0,    0,   35,   37,   38,   39,   59,   60,
218    28,    0,    0,    0,  103,   81,    0,    0,    3,    5,
219     6,    8,    0,   10,   11,   78,    0,   90,    0,    0,
220   104,    0,   19,    0,   41,   45,   15,   36,    0,   68,
221     0,    0,    0,   83,    0,    0,   64,    0,    0,   74,
222     4,   58,    0,   82,   87,   91,    0,   14,   13,    9,
223    16,    0,   71,    0,   31,   33,    0,    0,    0,    0,
224     0,   94,    0,    0,  101,   12,   63,   73,    0,    0,
225    69,    0,    0,    0,   34,    0,  110,   96,   97,    0,
226     0,   84,    0,   85,    0,   23,    0,    0,   72,   26,
227    29,  114,    0,    0,    0,  109,    0,   93,   95,  102,
228    18,    0,    0,  108,  113,  112,    0,   24,   27,  111,
229 };
230 static const short grammar_dgoto[] = {                   33,
231    87,   35,   36,   37,   38,   39,   40,   69,   70,   41,
232    42,  119,  120,  100,  101,  102,  103,  104,   43,   44,
233    59,   60,   45,   46,   47,   48,   49,   50,   51,   52,
234    77,   53,  127,  109,  128,   97,   94,  143,   72,   98,
235   112,
236 };
237 static const short grammar_sindex[] = {                  -2,
238    -3,   27, -239, -177,    0,    0,    0,    0, -274,    0,
239     0,    0,    0, -246,    0,    0,    0,    0,    0,    0,
240     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
241  -266,    0,    0,  455,    0,    0,    0,    0,    0,    0,
242     0,  -35, -245,  128,    0,    0, -245,   -2,    0,    0,
243     0,    0,  642,    0,    0,    0,  -15,    0,  -12, -239,
244     0,  590,    0,  -27,    0,    0,    0,    0,  -10,    0,
245   -11,  534,  -72,    0, -237, -232,    0,  -35, -232,    0,
246     0,    0,  642,    0,    0,    0,  455,    0,    0,    0,
247     0,   27,    0,  534,    0,    0, -222,  617,  209,   34,
248    39,    0,   44,   42,    0,    0,    0,    0,   27,  -11,
249     0, -200, -196, -195,    0,  174,    0,    0,    0,  -33,
250   243,    0,  561,    0, -177,    0,   33,   49,    0,    0,
251     0,    0,   53,   55,  417,    0,  -33,    0,    0,    0,
252     0,   27, -188,    0,    0,    0,   57,    0,    0,    0,
253 };
254 static const short grammar_rindex[] = {                  99,
255     0,    0,  275,    0,    0,  -38,    0,    0,  481,    0,
256     0,    0,    0,  509,    0,    0,    0,    0,    0,    0,
257     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
258     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
259     0,   30,    0,    0,    0,    0,    0,  101,    0,    0,
260     0,    0,    0,    0,    0,    0,    0,    0,  343,  309,
261     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
262    98, -182,   62,    0,    0,  133,    0,   64,  379,    0,
263     0,    0,   -5,    0,    0,    0,    0,    0,    0,    0,
264     0,    0,    0, -182,    0,    0,    0, -180,  -19,    0,
265    65,    0,    0,   68,    0,    0,    0,    0,   51,    9,
266     0,    0,    0,    0,    0,    0,    0,    0,    0,  -13,
267    19,    0,    0,    0,    0,    0,    0,   52,    0,    0,
268     0,    0,    0,    0,    0,    0,   35,    0,    0,    0,
269     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
270 };
271 static const short grammar_gindex[] = {                   0,
272    11,  -17,    0,    0,   13,    0,    0,    0,   20,    8,
273   -43,   -1,   -8,  -89,    0,   -9,    0,    0,    0,  -44,
274     0,    0,    4,    0,    0,    0,   70,  -53,    0,    0,
275   -18,    0,    0,    0,    0,   22,    0,    0,    0,    0,
276     0,
277 };
278 #define YYTABLESIZE 924
279 static const short grammar_table[] = {                   58,
280    78,   58,   58,   58,   73,   58,  135,   61,   88,   57,
281    34,    5,   56,   62,   85,   58,   68,   63,   96,    7,
282    58,   98,   78,   64,   98,   84,  134,  107,   80,    3,
283   107,   90,   17,   92,   17,    4,   17,    2,   75,    3,
284    96,   71,   30,   89,  115,  147,   76,  106,   91,   93,
285    79,   75,   70,   17,  121,   55,   32,  107,   34,  105,
286   108,  114,  105,   83,    4,   68,    2,   70,    3,   68,
287    80,  121,   86,   80,  122,  106,  105,   78,  106,    5,
288    56,   68,  123,   99,  124,  125,  129,  130,   80,  131,
289    80,  141,  142,  144,  110,  145,  149,  150,    1,  110,
290     2,   30,   99,   32,   79,   92,  118,   79,  100,   21,
291    22,  111,  137,  139,  133,  113,  126,   81,    0,    0,
292     0,    0,   79,   57,   79,    0,   99,    0,  140,    0,
293     0,    0,    0,   99,    0,    0,    0,    0,    0,    0,
294     0,   70,    0,    0,    0,   99,    0,    0,    0,  148,
295     0,    0,    0,    0,    0,    0,   70,    0,    0,    0,
296     0,    0,    0,    0,    0,    4,    0,    2,    0,    0,
297    65,    0,   65,   65,   65,    0,   65,    0,    0,    0,
298     0,    0,    0,    0,    5,    6,    7,    8,   65,   10,
299    11,   65,   13,   66,   15,   16,   17,   18,   19,   20,
300    21,   22,   23,   24,   25,   26,   27,   28,   29,   30,
301     0,    4,    0,  116,  132,    3,    0,    0,   58,   58,
302    58,   58,   58,   58,   58,   78,   58,   58,   58,   58,
303    58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
304    58,   58,   58,   58,   58,   78,    4,   74,  116,  136,
305     3,   17,   78,    1,    5,    6,    7,    8,    9,   10,
306    11,   12,   13,   14,   15,   16,   17,   18,   19,   20,
307    21,   22,   23,   24,   25,   26,   27,   28,   29,   30,
308     4,   54,  116,    5,   56,    0,   31,   80,   80,   80,
309    80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
310    80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
311    80,   80,   88,   80,   88,   88,   88,    0,   88,    0,
312    80,   79,   79,   79,   79,   79,   79,   79,   79,   79,
313    79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
314    79,   79,   79,   79,   79,   79,   89,   79,   89,   89,
315    89,    0,   89,    0,   79,   25,   25,   25,   25,   25,
316    25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
317    25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
318    86,   25,   86,   86,    5,   56,   86,    0,   25,   65,
319    65,   65,   65,   65,   65,   65,    0,   65,   65,   65,
320    65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
321    65,   65,   65,   65,   65,   65,   75,    0,   75,   75,
322    75,    0,   75,    0,    0,    0,    0,    0,    0,    0,
323     5,    6,    7,    8,   65,   10,   11,   75,   13,   66,
324    15,   16,   17,   18,   19,   20,   21,   22,   23,   24,
325    25,   26,   27,   28,   29,   30,  117,  146,    0,    0,
326     0,    0,    0,    0,    0,    5,    6,    7,    8,   65,
327    10,   11,    0,   13,   66,   15,   16,   17,   18,   19,
328    20,   21,   22,   23,   24,   25,   26,   27,   28,   29,
329    30,  117,    4,    0,    2,    0,    3,    0,    0,    5,
330    56,    0,    0,    0,    0,    0,    0,    0,    0,    0,
331     0,    0,    0,   67,    0,    0,    0,    0,   41,    0,
332    41,    0,   41,    0,    0,  117,    0,    0,    0,    0,
333     0,   88,   88,    0,    0,    0,    0,    0,    0,   41,
334     0,    0,    0,    0,    0,    0,   45,    0,   45,    0,
335    45,    0,    0,    0,    0,    0,    0,   88,    0,    0,
336     0,    0,    0,    0,    0,   89,   89,   45,    0,    0,
337     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
338     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
339     0,   89,    0,    0,    0,    0,    0,    0,    0,   86,
340    86,    0,    0,    0,    0,    0,    0,    0,    0,    0,
341     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
342     0,    0,    0,    0,    0,   86,    0,    0,    0,    0,
343     0,    0,    0,    0,    0,   75,   75,   75,   75,   75,
344    75,   75,    0,   75,   75,   75,   75,   75,   75,   75,
345    75,   75,   75,   75,   75,   75,   75,   75,   75,   75,
346    75,   75,    0,    0,    0,    0,    0,    0,    0,    0,
347     0,    0,    0,    0,   82,    7,    8,   65,   10,   11,
348     0,   13,   66,   15,   16,   17,   18,   19,   20,   21,
349    22,   23,   24,   25,   26,   27,   28,   29,   30,    0,
350     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
351     0,    5,    6,    7,    8,   65,   10,   11,    0,   13,
352    66,   15,   16,   17,   18,   19,   20,   21,   22,   23,
353    24,   25,   26,   27,   28,   29,   30,   41,   41,   41,
354    41,   41,   41,   41,    0,   41,   41,   41,   41,   41,
355    41,   41,   41,   41,   41,   41,   41,   41,   41,   41,
356    41,   41,   41,    0,    0,   45,   45,   45,   45,   45,
357    45,   45,    0,   45,   45,   45,   45,   45,   45,   45,
358    45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
359    45,   82,    7,    8,   65,   10,   11,   12,   13,   14,
360    15,   16,   17,   18,   19,   20,   21,   22,   23,   24,
361    25,   26,   27,   28,   29,   30,    0,    0,   82,    7,
362     8,   65,   10,   11,   95,   13,   66,   15,   16,   17,
363    18,   19,   20,   21,   22,   23,   24,   25,   26,   27,
364    28,   29,   30,    0,    0,    0,  138,   82,    7,    8,
365    65,   10,   11,   12,   13,   14,   15,   16,   17,   18,
366    19,   20,   21,   22,   23,   24,   25,   26,   27,   28,
367    29,   30,    0,   75,   82,    7,    8,   65,   10,   11,
368    12,   13,   14,   15,   16,   17,   18,   19,   20,   21,
369    22,   23,   24,   25,   26,   27,   28,   29,   30,   82,
370     7,    8,   65,   10,   11,    0,   13,   66,   15,   16,
371    17,   18,   19,   20,   21,   22,   23,   24,   25,   26,
372    27,   28,   29,   30,
373 };
374 static const short grammar_check[] = {                   38,
375    44,   40,   41,   42,   40,   44,   40,    4,   62,    2,
376     0,  257,  258,  288,   59,    3,   34,  264,   72,  259,
377    59,   41,   61,  290,   44,   41,  116,   41,   47,   42,
378    44,   59,   38,   44,   40,   38,   42,   40,  284,   42,
379    94,   34,  282,   62,   98,  135,   43,  285,   59,   61,
380    47,  284,   44,   59,   99,   59,   59,   76,   48,   41,
381    79,  284,   44,   53,   38,   83,   40,   59,   42,   87,
382    41,  116,   60,   44,   41,   41,   73,  121,   44,  257,
383   258,   99,   44,   73,   41,   44,  287,  284,   59,  285,
384    61,   59,   44,   41,   87,   41,  285,   41,    0,   92,
385     0,  284,   41,  284,   41,   41,   99,   44,   41,   59,
386    59,   92,  121,  123,  116,   94,  109,   48,   -1,   -1,
387    -1,   -1,   59,  116,   61,   -1,  116,   -1,  125,   -1,
388    -1,   -1,   -1,  123,   -1,   -1,   -1,   -1,   -1,   -1,
389    -1,   44,   -1,   -1,   -1,  135,   -1,   -1,   -1,  142,
390    -1,   -1,   -1,   -1,   -1,   -1,   59,   -1,   -1,   -1,
391    -1,   -1,   -1,   -1,   -1,   38,   -1,   40,   -1,   -1,
392    38,   -1,   40,   41,   42,   -1,   44,   -1,   -1,   -1,
393    -1,   -1,   -1,   -1,  257,  258,  259,  260,  261,  262,
394   263,   59,  265,  266,  267,  268,  269,  270,  271,  272,
395   273,  274,  275,  276,  277,  278,  279,  280,  281,  282,
396    -1,   38,   -1,   40,   41,   42,   -1,   -1,  257,  258,
397   259,  260,  261,  262,  263,  264,  265,  266,  267,  268,
398   269,  270,  271,  272,  273,  274,  275,  276,  277,  278,
399   279,  280,  281,  282,  283,  284,   38,  283,   40,  283,
400    42,  257,  291,  256,  257,  258,  259,  260,  261,  262,
401   263,  264,  265,  266,  267,  268,  269,  270,  271,  272,
402   273,  274,  275,  276,  277,  278,  279,  280,  281,  282,
403    38,  285,   40,  257,  258,   -1,  289,  258,  259,  260,
404   261,  262,  263,  264,  265,  266,  267,  268,  269,  270,
405   271,  272,  273,  274,  275,  276,  277,  278,  279,  280,
406   281,  282,   38,  284,   40,   41,   42,   -1,   44,   -1,
407   291,  258,  259,  260,  261,  262,  263,  264,  265,  266,
408   267,  268,  269,  270,  271,  272,  273,  274,  275,  276,
409   277,  278,  279,  280,  281,  282,   38,  284,   40,   41,
410    42,   -1,   44,   -1,  291,  258,  259,  260,  261,  262,
411   263,  264,  265,  266,  267,  268,  269,  270,  271,  272,
412   273,  274,  275,  276,  277,  278,  279,  280,  281,  282,
413    38,  284,   40,   41,  257,  258,   44,   -1,  291,  257,
414   258,  259,  260,  261,  262,  263,   -1,  265,  266,  267,
415   268,  269,  270,  271,  272,  273,  274,  275,  276,  277,
416   278,  279,  280,  281,  282,  283,   38,   -1,   40,   41,
417    42,   -1,   44,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
418   257,  258,  259,  260,  261,  262,  263,   59,  265,  266,
419   267,  268,  269,  270,  271,  272,  273,  274,  275,  276,
420   277,  278,  279,  280,  281,  282,  283,   41,   -1,   -1,
421    -1,   -1,   -1,   -1,   -1,  257,  258,  259,  260,  261,
422   262,  263,   -1,  265,  266,  267,  268,  269,  270,  271,
423   272,  273,  274,  275,  276,  277,  278,  279,  280,  281,
424   282,  283,   38,   -1,   40,   -1,   42,   -1,   -1,  257,
425   258,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
426    -1,   -1,   -1,   59,   -1,   -1,   -1,   -1,   38,   -1,
427    40,   -1,   42,   -1,   -1,  283,   -1,   -1,   -1,   -1,
428    -1,  257,  258,   -1,   -1,   -1,   -1,   -1,   -1,   59,
429    -1,   -1,   -1,   -1,   -1,   -1,   38,   -1,   40,   -1,
430    42,   -1,   -1,   -1,   -1,   -1,   -1,  283,   -1,   -1,
431    -1,   -1,   -1,   -1,   -1,  257,  258,   59,   -1,   -1,
432    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
433    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
434    -1,  283,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  257,
435   258,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
436    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
437    -1,   -1,   -1,   -1,   -1,  283,   -1,   -1,   -1,   -1,
438    -1,   -1,   -1,   -1,   -1,  257,  258,  259,  260,  261,
439   262,  263,   -1,  265,  266,  267,  268,  269,  270,  271,
440   272,  273,  274,  275,  276,  277,  278,  279,  280,  281,
441   282,  283,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
442    -1,   -1,   -1,   -1,  258,  259,  260,  261,  262,  263,
443    -1,  265,  266,  267,  268,  269,  270,  271,  272,  273,
444   274,  275,  276,  277,  278,  279,  280,  281,  282,   -1,
445    -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
446    -1,  257,  258,  259,  260,  261,  262,  263,   -1,  265,
447   266,  267,  268,  269,  270,  271,  272,  273,  274,  275,
448   276,  277,  278,  279,  280,  281,  282,  257,  258,  259,
449   260,  261,  262,  263,   -1,  265,  266,  267,  268,  269,
450   270,  271,  272,  273,  274,  275,  276,  277,  278,  279,
451   280,  281,  282,   -1,   -1,  257,  258,  259,  260,  261,
452   262,  263,   -1,  265,  266,  267,  268,  269,  270,  271,
453   272,  273,  274,  275,  276,  277,  278,  279,  280,  281,
454   282,  258,  259,  260,  261,  262,  263,  264,  265,  266,
455   267,  268,  269,  270,  271,  272,  273,  274,  275,  276,
456   277,  278,  279,  280,  281,  282,   -1,   -1,  258,  259,
457   260,  261,  262,  263,  291,  265,  266,  267,  268,  269,
458   270,  271,  272,  273,  274,  275,  276,  277,  278,  279,
459   280,  281,  282,   -1,   -1,   -1,  286,  258,  259,  260,
460   261,  262,  263,  264,  265,  266,  267,  268,  269,  270,
461   271,  272,  273,  274,  275,  276,  277,  278,  279,  280,
462   281,  282,   -1,  284,  258,  259,  260,  261,  262,  263,
463   264,  265,  266,  267,  268,  269,  270,  271,  272,  273,
464   274,  275,  276,  277,  278,  279,  280,  281,  282,  258,
465   259,  260,  261,  262,  263,   -1,  265,  266,  267,  268,
466   269,  270,  271,  272,  273,  274,  275,  276,  277,  278,
467   279,  280,  281,  282,
468 };
469 #define YYFINAL 33
470 #ifndef YYDEBUG
471 #define YYDEBUG 0
472 #endif
473 #define YYMAXTOKEN 291
474 #if YYDEBUG
475 static const char *grammar_name[] = {
476
477 "end-of-file",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,
478 0,0,0,0,"'&'",0,"'('","')'","'*'",0,"','",0,0,0,0,0,0,0,0,0,0,0,0,0,0,"';'",0,
479 "'='",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,
480 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,
481 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,
482 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,
483 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,
484 "T_IDENTIFIER","T_TYPEDEF_NAME","T_DEFINE_NAME","T_AUTO","T_EXTERN",
485 "T_REGISTER","T_STATIC","T_TYPEDEF","T_INLINE","T_EXTENSION","T_CHAR",
486 "T_DOUBLE","T_FLOAT","T_INT","T_VOID","T_LONG","T_SHORT","T_SIGNED",
487 "T_UNSIGNED","T_ENUM","T_STRUCT","T_UNION","T_Bool","T_Complex","T_Imaginary",
488 "T_TYPE_QUALIFIER","T_BRACKETS","T_LBRACE","T_MATCHRBRACE","T_ELLIPSIS",
489 "T_INITIALIZER","T_STRING_LITERAL","T_ASM","T_ASMARG","T_VA_DCL",
490 };
491 static const char *grammar_rule[] = {
492 "$accept : program",
493 "program :",
494 "program : translation_unit",
495 "translation_unit : external_declaration",
496 "translation_unit : translation_unit external_declaration",
497 "external_declaration : declaration",
498 "external_declaration : function_definition",
499 "external_declaration : ';'",
500 "external_declaration : linkage_specification",
501 "external_declaration : T_ASM T_ASMARG ';'",
502 "external_declaration : error T_MATCHRBRACE",
503 "external_declaration : error ';'",
504 "braces : T_LBRACE T_MATCHRBRACE",
505 "linkage_specification : T_EXTERN T_STRING_LITERAL braces",
506 "linkage_specification : T_EXTERN T_STRING_LITERAL declaration",
507 "declaration : decl_specifiers ';'",
508 "declaration : decl_specifiers init_declarator_list ';'",
509 "$$1 :",
510 "declaration : any_typedef decl_specifiers $$1 opt_declarator_list ';'",
511 "any_typedef : T_EXTENSION T_TYPEDEF",
512 "any_typedef : T_TYPEDEF",
513 "opt_declarator_list :",
514 "opt_declarator_list : declarator_list",
515 "declarator_list : declarator",
516 "declarator_list : declarator_list ',' declarator",
517 "$$2 :",
518 "$$3 :",
519 "function_definition : decl_specifiers declarator $$2 opt_declaration_list T_LBRACE $$3 T_MATCHRBRACE",
520 "$$4 :",
521 "function_definition : declarator $$4 opt_declaration_list T_LBRACE T_MATCHRBRACE",
522 "opt_declaration_list :",
523 "opt_declaration_list : T_VA_DCL",
524 "opt_declaration_list : declaration_list",
525 "declaration_list : declaration",
526 "declaration_list : declaration_list declaration",
527 "decl_specifiers : decl_specifier",
528 "decl_specifiers : decl_specifiers decl_specifier",
529 "decl_specifier : storage_class",
530 "decl_specifier : type_specifier",
531 "decl_specifier : type_qualifier",
532 "storage_class : T_AUTO",
533 "storage_class : T_EXTERN",
534 "storage_class : T_REGISTER",
535 "storage_class : T_STATIC",
536 "storage_class : T_INLINE",
537 "storage_class : T_EXTENSION",
538 "type_specifier : T_CHAR",
539 "type_specifier : T_DOUBLE",
540 "type_specifier : T_FLOAT",
541 "type_specifier : T_INT",
542 "type_specifier : T_LONG",
543 "type_specifier : T_SHORT",
544 "type_specifier : T_SIGNED",
545 "type_specifier : T_UNSIGNED",
546 "type_specifier : T_VOID",
547 "type_specifier : T_Bool",
548 "type_specifier : T_Complex",
549 "type_specifier : T_Imaginary",
550 "type_specifier : T_TYPEDEF_NAME",
551 "type_specifier : struct_or_union_specifier",
552 "type_specifier : enum_specifier",
553 "type_qualifier : T_TYPE_QUALIFIER",
554 "type_qualifier : T_DEFINE_NAME",
555 "struct_or_union_specifier : struct_or_union any_id braces",
556 "struct_or_union_specifier : struct_or_union braces",
557 "struct_or_union_specifier : struct_or_union any_id",
558 "struct_or_union : T_STRUCT",
559 "struct_or_union : T_UNION",
560 "init_declarator_list : init_declarator",
561 "init_declarator_list : init_declarator_list ',' init_declarator",
562 "init_declarator : declarator",
563 "$$5 :",
564 "init_declarator : declarator '=' $$5 T_INITIALIZER",
565 "enum_specifier : enumeration any_id braces",
566 "enum_specifier : enumeration braces",
567 "enum_specifier : enumeration any_id",
568 "enumeration : T_ENUM",
569 "any_id : T_IDENTIFIER",
570 "any_id : T_TYPEDEF_NAME",
571 "declarator : pointer direct_declarator",
572 "declarator : direct_declarator",
573 "direct_declarator : identifier_or_ref",
574 "direct_declarator : '(' declarator ')'",
575 "direct_declarator : direct_declarator T_BRACKETS",
576 "direct_declarator : direct_declarator '(' parameter_type_list ')'",
577 "direct_declarator : direct_declarator '(' opt_identifier_list ')'",
578 "pointer : '*' opt_type_qualifiers",
579 "pointer : '*' opt_type_qualifiers pointer",
580 "opt_type_qualifiers :",
581 "opt_type_qualifiers : type_qualifier_list",
582 "type_qualifier_list : type_qualifier",
583 "type_qualifier_list : type_qualifier_list type_qualifier",
584 "parameter_type_list : parameter_list",
585 "parameter_type_list : parameter_list ',' T_ELLIPSIS",
586 "parameter_list : parameter_declaration",
587 "parameter_list : parameter_list ',' parameter_declaration",
588 "parameter_declaration : decl_specifiers declarator",
589 "parameter_declaration : decl_specifiers abs_declarator",
590 "parameter_declaration : decl_specifiers",
591 "opt_identifier_list :",
592 "opt_identifier_list : identifier_list",
593 "identifier_list : any_id",
594 "identifier_list : identifier_list ',' any_id",
595 "identifier_or_ref : any_id",
596 "identifier_or_ref : '&' any_id",
597 "abs_declarator : pointer",
598 "abs_declarator : pointer direct_abs_declarator",
599 "abs_declarator : direct_abs_declarator",
600 "direct_abs_declarator : '(' abs_declarator ')'",
601 "direct_abs_declarator : direct_abs_declarator T_BRACKETS",
602 "direct_abs_declarator : T_BRACKETS",
603 "direct_abs_declarator : direct_abs_declarator '(' parameter_type_list ')'",
604 "direct_abs_declarator : direct_abs_declarator '(' ')'",
605 "direct_abs_declarator : '(' parameter_type_list ')'",
606 "direct_abs_declarator : '(' ')'",
607
608 };
609 #endif
610 #if YYDEBUG
611 #include <stdio.h>
612 #endif
613
614 /* define the initial stack-sizes */
615 #ifdef YYSTACKSIZE
616 #undef YYMAXDEPTH
617 #define YYMAXDEPTH  YYSTACKSIZE
618 #else
619 #ifdef YYMAXDEPTH
620 #define YYSTACKSIZE YYMAXDEPTH
621 #else
622 #define YYSTACKSIZE 500
623 #define YYMAXDEPTH  500
624 #endif
625 #endif
626
627 #define YYINITSTACKSIZE 500
628
629 int      yydebug;
630 int      yynerrs;
631 int      yyerrflag;
632 int      yychar;
633 short   *yyssp;
634 YYSTYPE *yyvsp;
635 YYSTYPE  yyval;
636 YYSTYPE  yylval;
637
638 /* variables for the parser stack */
639 static short   *yyss;
640 static short   *yysslim;
641 static YYSTYPE *yyvs;
642 static unsigned yystacksize;
643 #line 816 "grammar.y"
644
645 #if defined(__EMX__) || defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(vms)
646 # ifdef USE_flex
647 #  include "lexyy.c"
648 # else
649 #  include "lex_yy.c"
650 # endif
651 #else
652 # include "lex.yy.c"
653 #endif
654
655 static void
656 yaccError (char *msg)
657 {
658     func_params = NULL;
659     put_error();                /* tell what line we're on, and what file */
660     fprintf(stderr, "%s at token '%s'\n", msg, yytext);
661 }
662
663 /* Initialize the table of type qualifier keywords recognized by the lexical
664  * analyzer.
665  */
666 void
667 init_parser (void)
668 {
669     static char *keywords[] = {
670         "const",
671         "restrict",
672         "volatile",
673         "interrupt",
674 #ifdef vms
675         "noshare",
676         "readonly",
677 #endif
678 #if defined(MSDOS) || defined(OS2)
679         "__cdecl",
680         "__export",
681         "__far",
682         "__fastcall",
683         "__fortran",
684         "__huge",
685         "__inline",
686         "__interrupt",
687         "__loadds",
688         "__near",
689         "__pascal",
690         "__saveregs",
691         "__segment",
692         "__stdcall",
693         "__syscall",
694         "_cdecl",
695         "_cs",
696         "_ds",
697         "_es",
698         "_export",
699         "_far",
700         "_fastcall",
701         "_fortran",
702         "_huge",
703         "_interrupt",
704         "_loadds",
705         "_near",
706         "_pascal",
707         "_saveregs",
708         "_seg",
709         "_segment",
710         "_ss",
711         "cdecl",
712         "far",
713         "huge",
714         "near",
715         "pascal",
716 #ifdef OS2
717         "__far16",
718 #endif
719 #endif
720 #ifdef __GNUC__
721         /* gcc aliases */
722         "__builtin_va_arg",
723         "__builtin_va_list",
724         "__const",
725         "__const__",
726         "__inline",
727         "__inline__",
728         "__restrict",
729         "__restrict__",
730         "__volatile",
731         "__volatile__",
732 #endif
733     };
734     unsigned i;
735
736     /* Initialize type qualifier table. */
737     type_qualifiers = new_symbol_table();
738     for (i = 0; i < sizeof(keywords)/sizeof(keywords[0]); ++i) {
739         new_symbol(type_qualifiers, keywords[i], NULL, DS_NONE);
740     }
741 }
742
743 /* Process the C source file.  Write function prototypes to the standard
744  * output.  Convert function definitions and write the converted source
745  * code to a temporary file.
746  */
747 void
748 process_file (FILE *infile, char *name)
749 {
750     char *s;
751
752     if (strlen(name) > 2) {
753         s = name + strlen(name) - 2;
754         if (*s == '.') {
755             ++s;
756             if (*s == 'l' || *s == 'y')
757                 BEGIN LEXYACC;
758 #if defined(MSDOS) || defined(OS2)
759             if (*s == 'L' || *s == 'Y')
760                 BEGIN LEXYACC;
761 #endif
762         }
763     }
764
765     included_files = new_symbol_table();
766     typedef_names = new_symbol_table();
767     define_names = new_symbol_table();
768     inc_depth = -1;
769     curly = 0;
770     ly_count = 0;
771     func_params = NULL;
772     yyin = infile;
773     include_file(strcpy(base_file, name), func_style != FUNC_NONE);
774     if (file_comments) {
775 #if OPT_LINTLIBRARY
776         if (lintLibrary()) {
777             put_blankline(stdout);
778             begin_tracking();
779         }
780 #endif
781         put_string(stdout, "/* ");
782         put_string(stdout, cur_file_name());
783         put_string(stdout, " */\n");
784     }
785     yyparse();
786     free_symbol_table(define_names);
787     free_symbol_table(typedef_names);
788     free_symbol_table(included_files);
789 }
790
791 #ifdef NO_LEAKS
792 void
793 free_parser(void)
794 {
795     free_symbol_table (type_qualifiers);
796 #ifdef FLEX_SCANNER
797     if (yy_current_buffer != 0)
798         yy_delete_buffer(yy_current_buffer);
799 #endif
800 }
801 #endif
802 #line 803 "grammar.tab.c"
803 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
804 static int yygrowstack(void)
805 {
806     int i;
807     unsigned newsize;
808     short *newss;
809     YYSTYPE *newvs;
810
811     if ((newsize = yystacksize) == 0)
812         newsize = YYINITSTACKSIZE;
813     else if (newsize >= YYMAXDEPTH)
814         return -1;
815     else if ((newsize *= 2) > YYMAXDEPTH)
816         newsize = YYMAXDEPTH;
817
818     i = yyssp - yyss;
819     newss = (yyss != 0)
820           ? (short *)realloc(yyss, newsize * sizeof(*newss))
821           : (short *)malloc(newsize * sizeof(*newss));
822     if (newss == 0)
823         return -1;
824
825     yyss  = newss;
826     yyssp = newss + i;
827     newvs = (yyvs != 0)
828           ? (YYSTYPE *)realloc(yyvs, newsize * sizeof(*newvs))
829           : (YYSTYPE *)malloc(newsize * sizeof(*newvs));
830     if (newvs == 0)
831         return -1;
832
833     yyvs = newvs;
834     yyvsp = newvs + i;
835     yystacksize = newsize;
836     yysslim = yyss + newsize - 1;
837     return 0;
838 }
839
840 #define YYABORT  goto yyabort
841 #define YYREJECT goto yyabort
842 #define YYACCEPT goto yyaccept
843 #define YYERROR  goto yyerrlab
844
845 int
846 YYPARSE_DECL()
847 {
848     int yym, yyn, yystate;
849 #if YYDEBUG
850     const char *yys;
851
852     if ((yys = getenv("YYDEBUG")) != 0)
853     {
854         yyn = *yys;
855         if (yyn >= '0' && yyn <= '9')
856             yydebug = yyn - '0';
857     }
858 #endif
859
860     yynerrs = 0;
861     yyerrflag = 0;
862     yychar = YYEMPTY;
863     yystate = 0;
864
865     if (yyss == NULL && yygrowstack()) goto yyoverflow;
866     yyssp = yyss;
867     yyvsp = yyvs;
868     yystate = 0;
869     *yyssp = 0;
870
871 yyloop:
872     if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
873     if (yychar < 0)
874     {
875         if ((yychar = yylex()) < 0) yychar = 0;
876 #if YYDEBUG
877         if (yydebug)
878         {
879             yys = 0;
880             if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
881             if (!yys) yys = "illegal-symbol";
882             printf("%sdebug: state %d, reading %d (%s)\n",
883                     YYPREFIX, yystate, yychar, yys);
884         }
885 #endif
886     }
887     if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
888             yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
889     {
890 #if YYDEBUG
891         if (yydebug)
892             printf("%sdebug: state %d, shifting to state %d\n",
893                     YYPREFIX, yystate, yytable[yyn]);
894 #endif
895         if (yyssp >= yysslim && yygrowstack())
896         {
897             goto yyoverflow;
898         }
899         yystate = yytable[yyn];
900         *++yyssp = yytable[yyn];
901         *++yyvsp = yylval;
902         yychar = YYEMPTY;
903         if (yyerrflag > 0)  --yyerrflag;
904         goto yyloop;
905     }
906     if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
907             yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
908     {
909         yyn = yytable[yyn];
910         goto yyreduce;
911     }
912     if (yyerrflag) goto yyinrecovery;
913
914     yyerror("syntax error");
915
916     goto yyerrlab;
917
918 yyerrlab:
919     ++yynerrs;
920
921 yyinrecovery:
922     if (yyerrflag < 3)
923     {
924         yyerrflag = 3;
925         for (;;)
926         {
927             if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
928                     yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
929             {
930 #if YYDEBUG
931                 if (yydebug)
932                     printf("%sdebug: state %d, error recovery shifting\
933  to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
934 #endif
935                 if (yyssp >= yysslim && yygrowstack())
936                 {
937                     goto yyoverflow;
938                 }
939                 yystate = yytable[yyn];
940                 *++yyssp = yytable[yyn];
941                 *++yyvsp = yylval;
942                 goto yyloop;
943             }
944             else
945             {
946 #if YYDEBUG
947                 if (yydebug)
948                     printf("%sdebug: error recovery discarding state %d\n",
949                             YYPREFIX, *yyssp);
950 #endif
951                 if (yyssp <= yyss) goto yyabort;
952                 --yyssp;
953                 --yyvsp;
954             }
955         }
956     }
957     else
958     {
959         if (yychar == 0) goto yyabort;
960 #if YYDEBUG
961         if (yydebug)
962         {
963             yys = 0;
964             if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
965             if (!yys) yys = "illegal-symbol";
966             printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
967                     YYPREFIX, yystate, yychar, yys);
968         }
969 #endif
970         yychar = YYEMPTY;
971         goto yyloop;
972     }
973
974 yyreduce:
975 #if YYDEBUG
976     if (yydebug)
977         printf("%sdebug: state %d, reducing by rule %d (%s)\n",
978                 YYPREFIX, yystate, yyn, yyrule[yyn]);
979 #endif
980     yym = yylen[yyn];
981     if (yym)
982         yyval = yyvsp[1-yym];
983     else
984         memset(&yyval, 0, sizeof yyval);
985     switch (yyn)
986     {
987 case 10:
988 #line 179 "grammar.y"
989         {
990             yyerrok;
991         }
992 break;
993 case 11:
994 #line 183 "grammar.y"
995         {
996             yyerrok;
997         }
998 break;
999 case 13:
1000 #line 194 "grammar.y"
1001         {
1002             /* Provide an empty action here so bison will not complain about
1003              * incompatible types in the default action it normally would
1004              * have generated.
1005              */
1006         }
1007 break;
1008 case 14:
1009 #line 201 "grammar.y"
1010         {
1011             /* empty */
1012         }
1013 break;
1014 case 15:
1015 #line 208 "grammar.y"
1016         {
1017 #if OPT_LINTLIBRARY
1018             if (types_out && want_typedef()) {
1019                 gen_declarations(&yyvsp[-1].decl_spec, (DeclaratorList *)0);
1020                 flush_varargs();
1021             }
1022 #endif
1023             free_decl_spec(&yyvsp[-1].decl_spec);
1024             end_typedef();
1025         }
1026 break;
1027 case 16:
1028 #line 219 "grammar.y"
1029         {
1030             if (func_params != NULL) {
1031                 set_param_types(func_params, &yyvsp[-2].decl_spec, &yyvsp[-1].decl_list);
1032             } else {
1033                 gen_declarations(&yyvsp[-2].decl_spec, &yyvsp[-1].decl_list);
1034 #if OPT_LINTLIBRARY
1035                 flush_varargs();
1036 #endif
1037                 free_decl_list(&yyvsp[-1].decl_list);
1038             }
1039             free_decl_spec(&yyvsp[-2].decl_spec);
1040             end_typedef();
1041         }
1042 break;
1043 case 17:
1044 #line 233 "grammar.y"
1045         {
1046             cur_decl_spec_flags = yyvsp[0].decl_spec.flags;
1047             free_decl_spec(&yyvsp[0].decl_spec);
1048         }
1049 break;
1050 case 18:
1051 #line 238 "grammar.y"
1052         {
1053             end_typedef();
1054         }
1055 break;
1056 case 19:
1057 #line 245 "grammar.y"
1058         {
1059             begin_typedef();
1060         }
1061 break;
1062 case 20:
1063 #line 249 "grammar.y"
1064         {
1065             begin_typedef();
1066         }
1067 break;
1068 case 23:
1069 #line 261 "grammar.y"
1070         {
1071             int flags = cur_decl_spec_flags;
1072
1073             /* If the typedef is a pointer type, then reset the short type
1074              * flags so it does not get promoted.
1075              */
1076             if (strcmp(yyvsp[0].declarator->text, yyvsp[0].declarator->name) != 0)
1077                 flags &= ~(DS_CHAR | DS_SHORT | DS_FLOAT);
1078             new_symbol(typedef_names, yyvsp[0].declarator->name, NULL, flags);
1079             free_declarator(yyvsp[0].declarator);
1080         }
1081 break;
1082 case 24:
1083 #line 273 "grammar.y"
1084         {
1085             int flags = cur_decl_spec_flags;
1086
1087             if (strcmp(yyvsp[0].declarator->text, yyvsp[0].declarator->name) != 0)
1088                 flags &= ~(DS_CHAR | DS_SHORT | DS_FLOAT);
1089             new_symbol(typedef_names, yyvsp[0].declarator->name, NULL, flags);
1090             free_declarator(yyvsp[0].declarator);
1091         }
1092 break;
1093 case 25:
1094 #line 285 "grammar.y"
1095         {
1096             check_untagged(&yyvsp[-1].decl_spec);
1097             if (yyvsp[0].declarator->func_def == FUNC_NONE) {
1098                 yyerror("syntax error");
1099                 YYERROR;
1100             }
1101             func_params = &(yyvsp[0].declarator->head->params);
1102             func_params->begin_comment = cur_file->begin_comment;
1103             func_params->end_comment = cur_file->end_comment;
1104         }
1105 break;
1106 case 26:
1107 #line 296 "grammar.y"
1108         {
1109             /* If we're converting to K&R and we've got a nominally K&R
1110              * function which has a parameter which is ANSI (i.e., a prototyped
1111              * function pointer), then we must override the deciphered value of
1112              * 'func_def' so that the parameter will be converted.
1113              */
1114             if (func_style == FUNC_TRADITIONAL
1115              && haveAnsiParam()
1116              && yyvsp[-3].declarator->head->func_def == func_style) {
1117                 yyvsp[-3].declarator->head->func_def = FUNC_BOTH;
1118             }
1119
1120             func_params = NULL;
1121
1122             if (cur_file->convert)
1123                 gen_func_definition(&yyvsp[-4].decl_spec, yyvsp[-3].declarator);
1124             gen_prototype(&yyvsp[-4].decl_spec, yyvsp[-3].declarator);
1125 #if OPT_LINTLIBRARY
1126             flush_varargs();
1127 #endif
1128             free_decl_spec(&yyvsp[-4].decl_spec);
1129             free_declarator(yyvsp[-3].declarator);
1130         }
1131 break;
1132 case 28:
1133 #line 321 "grammar.y"
1134         {
1135             if (yyvsp[0].declarator->func_def == FUNC_NONE) {
1136                 yyerror("syntax error");
1137                 YYERROR;
1138             }
1139             func_params = &(yyvsp[0].declarator->head->params);
1140             func_params->begin_comment = cur_file->begin_comment;
1141             func_params->end_comment = cur_file->end_comment;
1142         }
1143 break;
1144 case 29:
1145 #line 331 "grammar.y"
1146         {
1147             DeclSpec decl_spec;
1148
1149             func_params = NULL;
1150
1151             new_decl_spec(&decl_spec, dft_decl_spec(), yyvsp[-4].declarator->begin, DS_NONE);
1152             if (cur_file->convert)
1153                 gen_func_definition(&decl_spec, yyvsp[-4].declarator);
1154             gen_prototype(&decl_spec, yyvsp[-4].declarator);
1155 #if OPT_LINTLIBRARY
1156             flush_varargs();
1157 #endif
1158             free_decl_spec(&decl_spec);
1159             free_declarator(yyvsp[-4].declarator);
1160         }
1161 break;
1162 case 36:
1163 #line 362 "grammar.y"
1164         {
1165             join_decl_specs(&yyval.decl_spec, &yyvsp[-1].decl_spec, &yyvsp[0].decl_spec);
1166             free(yyvsp[-1].decl_spec.text);
1167             free(yyvsp[0].decl_spec.text);
1168         }
1169 break;
1170 case 40:
1171 #line 377 "grammar.y"
1172         {
1173             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_NONE);
1174         }
1175 break;
1176 case 41:
1177 #line 381 "grammar.y"
1178         {
1179             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_EXTERN);
1180         }
1181 break;
1182 case 42:
1183 #line 385 "grammar.y"
1184         {
1185             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_NONE);
1186         }
1187 break;
1188 case 43:
1189 #line 389 "grammar.y"
1190         {
1191             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_STATIC);
1192         }
1193 break;
1194 case 44:
1195 #line 393 "grammar.y"
1196         {
1197             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_INLINE);
1198         }
1199 break;
1200 case 45:
1201 #line 397 "grammar.y"
1202         {
1203             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_JUNK);
1204         }
1205 break;
1206 case 46:
1207 #line 404 "grammar.y"
1208         {
1209             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_CHAR);
1210         }
1211 break;
1212 case 47:
1213 #line 408 "grammar.y"
1214         {
1215             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_NONE);
1216         }
1217 break;
1218 case 48:
1219 #line 412 "grammar.y"
1220         {
1221             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_FLOAT);
1222         }
1223 break;
1224 case 49:
1225 #line 416 "grammar.y"
1226         {
1227             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_NONE);
1228         }
1229 break;
1230 case 50:
1231 #line 420 "grammar.y"
1232         {
1233             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_NONE);
1234         }
1235 break;
1236 case 51:
1237 #line 424 "grammar.y"
1238         {
1239             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_SHORT);
1240         }
1241 break;
1242 case 52:
1243 #line 428 "grammar.y"
1244         {
1245             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_NONE);
1246         }
1247 break;
1248 case 53:
1249 #line 432 "grammar.y"
1250         {
1251             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_NONE);
1252         }
1253 break;
1254 case 54:
1255 #line 436 "grammar.y"
1256         {
1257             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_NONE);
1258         }
1259 break;
1260 case 55:
1261 #line 440 "grammar.y"
1262         {
1263             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_CHAR);
1264         }
1265 break;
1266 case 56:
1267 #line 444 "grammar.y"
1268         {
1269             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_NONE);
1270         }
1271 break;
1272 case 57:
1273 #line 448 "grammar.y"
1274         {
1275             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_NONE);
1276         }
1277 break;
1278 case 58:
1279 #line 452 "grammar.y"
1280         {
1281             Symbol *s;
1282             s = find_symbol(typedef_names, yyvsp[0].text.text);
1283             if (s != NULL)
1284                 new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, s->flags);
1285         }
1286 break;
1287 case 61:
1288 #line 464 "grammar.y"
1289         {
1290             new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, DS_NONE);
1291         }
1292 break;
1293 case 62:
1294 #line 468 "grammar.y"
1295         {
1296             /* This rule allows the <pointer> nonterminal to scan #define
1297              * names as if they were type modifiers.
1298              */
1299             Symbol *s;
1300             s = find_symbol(define_names, yyvsp[0].text.text);
1301             if (s != NULL)
1302                 new_decl_spec(&yyval.decl_spec, yyvsp[0].text.text, yyvsp[0].text.begin, s->flags);
1303         }
1304 break;
1305 case 63:
1306 #line 481 "grammar.y"
1307         {
1308             char *s;
1309             if ((s = implied_typedef()) == 0)
1310                 (void)sprintf(s = buf, "%s %s", yyvsp[-2].text.text, yyvsp[-1].text.text);
1311             new_decl_spec(&yyval.decl_spec, s, yyvsp[-2].text.begin, DS_NONE);
1312         }
1313 break;
1314 case 64:
1315 #line 488 "grammar.y"
1316         {
1317             char *s;
1318             if ((s = implied_typedef()) == 0)
1319                 (void)sprintf(s = buf, "%s {}", yyvsp[-1].text.text);
1320             new_decl_spec(&yyval.decl_spec, s, yyvsp[-1].text.begin, DS_NONE);
1321         }
1322 break;
1323 case 65:
1324 #line 495 "grammar.y"
1325         {
1326             (void)sprintf(buf, "%s %s", yyvsp[-1].text.text, yyvsp[0].text.text);
1327             new_decl_spec(&yyval.decl_spec, buf, yyvsp[-1].text.begin, DS_NONE);
1328         }
1329 break;
1330 case 66:
1331 #line 503 "grammar.y"
1332         {
1333             imply_typedef(yyval.text.text);
1334         }
1335 break;
1336 case 67:
1337 #line 507 "grammar.y"
1338         {
1339             imply_typedef(yyval.text.text);
1340         }
1341 break;
1342 case 68:
1343 #line 514 "grammar.y"
1344         {
1345             new_decl_list(&yyval.decl_list, yyvsp[0].declarator);
1346         }
1347 break;
1348 case 69:
1349 #line 518 "grammar.y"
1350         {
1351             add_decl_list(&yyval.decl_list, &yyvsp[-2].decl_list, yyvsp[0].declarator);
1352         }
1353 break;
1354 case 70:
1355 #line 525 "grammar.y"
1356         {
1357             if (yyvsp[0].declarator->func_def != FUNC_NONE && func_params == NULL &&
1358                 func_style == FUNC_TRADITIONAL && cur_file->convert) {
1359                 gen_func_declarator(yyvsp[0].declarator);
1360                 fputs(cur_text(), cur_file->tmp_file);
1361             }
1362             cur_declarator = yyval.declarator;
1363         }
1364 break;
1365 case 71:
1366 #line 534 "grammar.y"
1367         {
1368             if (yyvsp[-1].declarator->func_def != FUNC_NONE && func_params == NULL &&
1369                 func_style == FUNC_TRADITIONAL && cur_file->convert) {
1370                 gen_func_declarator(yyvsp[-1].declarator);
1371                 fputs(" =", cur_file->tmp_file);
1372             }
1373         }
1374 break;
1375 case 73:
1376 #line 546 "grammar.y"
1377         {
1378             char *s;
1379             if ((s = implied_typedef()) == 0)
1380                 (void)sprintf(s = buf, "enum %s", yyvsp[-1].text.text);
1381             new_decl_spec(&yyval.decl_spec, s, yyvsp[-2].text.begin, DS_NONE);
1382         }
1383 break;
1384 case 74:
1385 #line 553 "grammar.y"
1386         {
1387             char *s;
1388             if ((s = implied_typedef()) == 0)
1389                 (void)sprintf(s = buf, "%s {}", yyvsp[-1].text.text);
1390             new_decl_spec(&yyval.decl_spec, s, yyvsp[-1].text.begin, DS_NONE);
1391         }
1392 break;
1393 case 75:
1394 #line 560 "grammar.y"
1395         {
1396             (void)sprintf(buf, "enum %s", yyvsp[0].text.text);
1397             new_decl_spec(&yyval.decl_spec, buf, yyvsp[-1].text.begin, DS_NONE);
1398         }
1399 break;
1400 case 76:
1401 #line 568 "grammar.y"
1402         {
1403             imply_typedef("enum");
1404             yyval.text = yyvsp[0].text;
1405         }
1406 break;
1407 case 79:
1408 #line 581 "grammar.y"
1409         {
1410             yyval.declarator = yyvsp[0].declarator;
1411             (void)sprintf(buf, "%s%s", yyvsp[-1].text.text, yyval.declarator->text);
1412             free(yyval.declarator->text);
1413             yyval.declarator->text = xstrdup(buf);
1414             yyval.declarator->begin = yyvsp[-1].text.begin;
1415             yyval.declarator->pointer = TRUE;
1416         }
1417 break;
1418 case 81:
1419 #line 594 "grammar.y"
1420         {
1421             yyval.declarator = new_declarator(yyvsp[0].text.text, yyvsp[0].text.text, yyvsp[0].text.begin);
1422         }
1423 break;
1424 case 82:
1425 #line 598 "grammar.y"
1426         {
1427             yyval.declarator = yyvsp[-1].declarator;
1428             (void)sprintf(buf, "(%s)", yyval.declarator->text);
1429             free(yyval.declarator->text);
1430             yyval.declarator->text = xstrdup(buf);
1431             yyval.declarator->begin = yyvsp[-2].text.begin;
1432         }
1433 break;
1434 case 83:
1435 #line 606 "grammar.y"
1436         {
1437             yyval.declarator = yyvsp[-1].declarator;
1438             (void)sprintf(buf, "%s%s", yyval.declarator->text, yyvsp[0].text.text);
1439             free(yyval.declarator->text);
1440             yyval.declarator->text = xstrdup(buf);
1441         }
1442 break;
1443 case 84:
1444 #line 613 "grammar.y"
1445         {
1446             yyval.declarator = new_declarator("%s()", yyvsp[-3].declarator->name, yyvsp[-3].declarator->begin);
1447             yyval.declarator->params = yyvsp[-1].param_list;
1448             yyval.declarator->func_stack = yyvsp[-3].declarator;
1449             yyval.declarator->head = (yyvsp[-3].declarator->func_stack == NULL) ? yyval.declarator : yyvsp[-3].declarator->head;
1450             yyval.declarator->func_def = FUNC_ANSI;
1451         }
1452 break;
1453 case 85:
1454 #line 621 "grammar.y"
1455         {
1456             yyval.declarator = new_declarator("%s()", yyvsp[-3].declarator->name, yyvsp[-3].declarator->begin);
1457             yyval.declarator->params = yyvsp[-1].param_list;
1458             yyval.declarator->func_stack = yyvsp[-3].declarator;
1459             yyval.declarator->head = (yyvsp[-3].declarator->func_stack == NULL) ? yyval.declarator : yyvsp[-3].declarator->head;
1460             yyval.declarator->func_def = FUNC_TRADITIONAL;
1461         }
1462 break;
1463 case 86:
1464 #line 632 "grammar.y"
1465         {
1466             (void)sprintf(yyval.text.text, "*%s", yyvsp[0].text.text);
1467             yyval.text.begin = yyvsp[-1].text.begin;
1468         }
1469 break;
1470 case 87:
1471 #line 637 "grammar.y"
1472         {
1473             (void)sprintf(yyval.text.text, "*%s%s", yyvsp[-1].text.text, yyvsp[0].text.text);
1474             yyval.text.begin = yyvsp[-2].text.begin;
1475         }
1476 break;
1477 case 88:
1478 #line 645 "grammar.y"
1479         {
1480             strcpy(yyval.text.text, "");
1481             yyval.text.begin = 0L;
1482         }
1483 break;
1484 case 90:
1485 #line 654 "grammar.y"
1486         {
1487             (void)sprintf(yyval.text.text, "%s ", yyvsp[0].decl_spec.text);
1488             yyval.text.begin = yyvsp[0].decl_spec.begin;
1489             free(yyvsp[0].decl_spec.text);
1490         }
1491 break;
1492 case 91:
1493 #line 660 "grammar.y"
1494         {
1495             (void)sprintf(yyval.text.text, "%s%s ", yyvsp[-1].text.text, yyvsp[0].decl_spec.text);
1496             yyval.text.begin = yyvsp[-1].text.begin;
1497             free(yyvsp[0].decl_spec.text);
1498         }
1499 break;
1500 case 93:
1501 #line 670 "grammar.y"
1502         {
1503             add_ident_list(&yyval.param_list, &yyvsp[-2].param_list, "...");
1504         }
1505 break;
1506 case 94:
1507 #line 677 "grammar.y"
1508         {
1509             new_param_list(&yyval.param_list, yyvsp[0].parameter);
1510         }
1511 break;
1512 case 95:
1513 #line 681 "grammar.y"
1514         {
1515             add_param_list(&yyval.param_list, &yyvsp[-2].param_list, yyvsp[0].parameter);
1516         }
1517 break;
1518 case 96:
1519 #line 688 "grammar.y"
1520         {
1521             check_untagged(&yyvsp[-1].decl_spec);
1522             yyval.parameter = new_parameter(&yyvsp[-1].decl_spec, yyvsp[0].declarator);
1523         }
1524 break;
1525 case 97:
1526 #line 693 "grammar.y"
1527         {
1528             check_untagged(&yyvsp[-1].decl_spec);
1529             yyval.parameter = new_parameter(&yyvsp[-1].decl_spec, yyvsp[0].declarator);
1530         }
1531 break;
1532 case 98:
1533 #line 698 "grammar.y"
1534         {
1535             check_untagged(&yyvsp[0].decl_spec);
1536             yyval.parameter = new_parameter(&yyvsp[0].decl_spec, (Declarator *)0);
1537         }
1538 break;
1539 case 99:
1540 #line 706 "grammar.y"
1541         {
1542             new_ident_list(&yyval.param_list);
1543         }
1544 break;
1545 case 101:
1546 #line 714 "grammar.y"
1547         {
1548             new_ident_list(&yyval.param_list);
1549             add_ident_list(&yyval.param_list, &yyval.param_list, yyvsp[0].text.text);
1550         }
1551 break;
1552 case 102:
1553 #line 719 "grammar.y"
1554         {
1555             add_ident_list(&yyval.param_list, &yyvsp[-2].param_list, yyvsp[0].text.text);
1556         }
1557 break;
1558 case 103:
1559 #line 726 "grammar.y"
1560         {
1561             yyval.text = yyvsp[0].text;
1562         }
1563 break;
1564 case 104:
1565 #line 730 "grammar.y"
1566         {
1567 #if OPT_LINTLIBRARY
1568             if (lintLibrary()) { /* Lint doesn't grok C++ ref variables */
1569                 yyval.text = yyvsp[0].text;
1570             } else
1571 #endif
1572                 (void)sprintf(yyval.text.text, "&%s", yyvsp[0].text.text);
1573             yyval.text.begin = yyvsp[-1].text.begin;
1574         }
1575 break;
1576 case 105:
1577 #line 743 "grammar.y"
1578         {
1579             yyval.declarator = new_declarator(yyvsp[0].text.text, "", yyvsp[0].text.begin);
1580         }
1581 break;
1582 case 106:
1583 #line 747 "grammar.y"
1584         {
1585             yyval.declarator = yyvsp[0].declarator;
1586             (void)sprintf(buf, "%s%s", yyvsp[-1].text.text, yyval.declarator->text);
1587             free(yyval.declarator->text);
1588             yyval.declarator->text = xstrdup(buf);
1589             yyval.declarator->begin = yyvsp[-1].text.begin;
1590         }
1591 break;
1592 case 108:
1593 #line 759 "grammar.y"
1594         {
1595             yyval.declarator = yyvsp[-1].declarator;
1596             (void)sprintf(buf, "(%s)", yyval.declarator->text);
1597             free(yyval.declarator->text);
1598             yyval.declarator->text = xstrdup(buf);
1599             yyval.declarator->begin = yyvsp[-2].text.begin;
1600         }
1601 break;
1602 case 109:
1603 #line 767 "grammar.y"
1604         {
1605             yyval.declarator = yyvsp[-1].declarator;
1606             (void)sprintf(buf, "%s%s", yyval.declarator->text, yyvsp[0].text.text);
1607             free(yyval.declarator->text);
1608             yyval.declarator->text = xstrdup(buf);
1609         }
1610 break;
1611 case 110:
1612 #line 774 "grammar.y"
1613         {
1614             yyval.declarator = new_declarator(yyvsp[0].text.text, "", yyvsp[0].text.begin);
1615         }
1616 break;
1617 case 111:
1618 #line 778 "grammar.y"
1619         {
1620             yyval.declarator = new_declarator("%s()", "", yyvsp[-3].declarator->begin);
1621             yyval.declarator->params = yyvsp[-1].param_list;
1622             yyval.declarator->func_stack = yyvsp[-3].declarator;
1623             yyval.declarator->head = (yyvsp[-3].declarator->func_stack == NULL) ? yyval.declarator : yyvsp[-3].declarator->head;
1624             yyval.declarator->func_def = FUNC_ANSI;
1625         }
1626 break;
1627 case 112:
1628 #line 786 "grammar.y"
1629         {
1630             yyval.declarator = new_declarator("%s()", "", yyvsp[-2].declarator->begin);
1631             yyval.declarator->func_stack = yyvsp[-2].declarator;
1632             yyval.declarator->head = (yyvsp[-2].declarator->func_stack == NULL) ? yyval.declarator : yyvsp[-2].declarator->head;
1633             yyval.declarator->func_def = FUNC_ANSI;
1634         }
1635 break;
1636 case 113:
1637 #line 793 "grammar.y"
1638         {
1639             Declarator *d;
1640
1641             d = new_declarator("", "", yyvsp[-2].text.begin);
1642             yyval.declarator = new_declarator("%s()", "", yyvsp[-2].text.begin);
1643             yyval.declarator->params = yyvsp[-1].param_list;
1644             yyval.declarator->func_stack = d;
1645             yyval.declarator->head = yyval.declarator;
1646             yyval.declarator->func_def = FUNC_ANSI;
1647         }
1648 break;
1649 case 114:
1650 #line 804 "grammar.y"
1651         {
1652             Declarator *d;
1653
1654             d = new_declarator("", "", yyvsp[-1].text.begin);
1655             yyval.declarator = new_declarator("%s()", "", yyvsp[-1].text.begin);
1656             yyval.declarator->func_stack = d;
1657             yyval.declarator->head = yyval.declarator;
1658             yyval.declarator->func_def = FUNC_ANSI;
1659         }
1660 break;
1661 #line 1662 "grammar.tab.c"
1662     }
1663     yyssp -= yym;
1664     yystate = *yyssp;
1665     yyvsp -= yym;
1666     yym = yylhs[yyn];
1667     if (yystate == 0 && yym == 0)
1668     {
1669 #if YYDEBUG
1670         if (yydebug)
1671             printf("%sdebug: after reduction, shifting from state 0 to\
1672  state %d\n", YYPREFIX, YYFINAL);
1673 #endif
1674         yystate = YYFINAL;
1675         *++yyssp = YYFINAL;
1676         *++yyvsp = yyval;
1677         if (yychar < 0)
1678         {
1679             if ((yychar = yylex()) < 0) yychar = 0;
1680 #if YYDEBUG
1681             if (yydebug)
1682             {
1683                 yys = 0;
1684                 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
1685                 if (!yys) yys = "illegal-symbol";
1686                 printf("%sdebug: state %d, reading %d (%s)\n",
1687                         YYPREFIX, YYFINAL, yychar, yys);
1688             }
1689 #endif
1690         }
1691         if (yychar == 0) goto yyaccept;
1692         goto yyloop;
1693     }
1694     if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
1695             yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
1696         yystate = yytable[yyn];
1697     else
1698         yystate = yydgoto[yym];
1699 #if YYDEBUG
1700     if (yydebug)
1701         printf("%sdebug: after reduction, shifting from state %d \
1702 to state %d\n", YYPREFIX, *yyssp, yystate);
1703 #endif
1704     if (yyssp >= yysslim && yygrowstack())
1705     {
1706         goto yyoverflow;
1707     }
1708     *++yyssp = (short) yystate;
1709     *++yyvsp = yyval;
1710     goto yyloop;
1711
1712 yyoverflow:
1713     yyerror("yacc stack overflow");
1714
1715 yyabort:
1716     return (1);
1717
1718 yyaccept:
1719     return (0);
1720 }