1 /* A Bison parser, made from /scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y
4 #define YYBISON 1 /* Identify Bison output. */
6 # define ENT_TYPEDEF_STRUCT 257
7 # define ENT_STRUCT 258
8 # define ENT_EXTERNSTATIC 259
9 # define ENT_YACCUNION 260
10 # define GTY_TOKEN 261
15 # define NESTED_PTR 266
18 # define PERCENTPERCENT 269
23 # define PERCENT_ID 274
26 #line 22 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
30 #include "coretypes.h"
33 #define YYERROR_VERBOSE
35 #line 31 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
43 # define YYSTYPE yystype
44 # define YYSTYPE_IS_TRIVIAL 1
56 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
57 #define YYTRANSLATE(x) ((unsigned)(x) <= 275 ? yytranslate[x] : 55)
59 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
60 static const char yytranslate[] =
62 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
63 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
64 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
65 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
66 31, 32, 29, 2, 30, 2, 2, 2, 2, 2,
67 2, 2, 2, 2, 2, 2, 2, 2, 28, 24,
68 26, 25, 27, 2, 2, 2, 2, 2, 2, 2,
69 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
70 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
71 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
72 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
73 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
74 2, 2, 2, 22, 2, 23, 2, 2, 2, 2,
75 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
76 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
77 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
78 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
79 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
80 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
81 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
82 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
83 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
84 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
85 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
86 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
87 2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
88 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
89 16, 17, 18, 19, 20, 21
93 static const short yyprhs[] =
95 0, 0, 1, 4, 7, 10, 11, 20, 21, 29,
96 35, 42, 50, 52, 54, 56, 63, 64, 68, 75,
97 76, 79, 82, 83, 90, 97, 105, 111, 112, 115,
98 117, 119, 121, 123, 126, 132, 135, 141, 144, 147,
99 153, 154, 160, 164, 167, 168, 170, 177, 179, 181,
100 183, 188, 193, 202, 204, 208, 209, 211, 213
102 static const short yyrhs[] =
104 -1, 34, 33, 0, 37, 33, 0, 40, 33, 0,
105 0, 3, 49, 22, 43, 23, 17, 35, 24, 0,
106 0, 4, 49, 22, 43, 23, 36, 24, 0, 5,
107 49, 38, 17, 39, 0, 5, 49, 38, 17, 19,
108 39, 0, 5, 49, 38, 17, 19, 19, 39, 0,
109 46, 0, 24, 0, 25, 0, 6, 49, 43, 23,
110 41, 15, 0, 0, 41, 20, 42, 0, 41, 20,
111 26, 17, 27, 42, 0, 0, 42, 17, 0, 42,
112 21, 0, 0, 46, 48, 17, 44, 24, 43, 0,
113 46, 48, 17, 19, 24, 43, 0, 46, 48, 17,
114 19, 19, 24, 43, 0, 46, 28, 45, 24, 43,
115 0, 0, 28, 45, 0, 14, 0, 17, 0, 16,
116 0, 17, 0, 46, 29, 0, 9, 17, 22, 43,
117 23, 0, 9, 17, 0, 8, 17, 22, 43, 23,
118 0, 8, 17, 0, 10, 17, 0, 10, 17, 22,
119 47, 23, 0, 0, 17, 25, 14, 30, 47, 0,
120 17, 30, 47, 0, 17, 47, 0, 0, 49, 0,
121 7, 31, 31, 53, 32, 32, 0, 11, 0, 13,
122 0, 17, 0, 17, 31, 54, 32, 0, 50, 31,
123 46, 32, 0, 12, 31, 46, 30, 54, 30, 54,
124 32, 0, 51, 0, 52, 30, 51, 0, 0, 52,
131 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
132 static const short yyrline[] =
134 0, 65, 66, 67, 68, 71, 71, 80, 80, 90,
135 95, 100, 108, 115, 116, 119, 126, 128, 141, 159,
136 161, 172, 185, 186, 196, 206, 216, 220, 221, 224,
137 224, 228, 230, 232, 234, 239, 241, 246, 248, 250,
138 254, 255, 257, 259, 263, 264, 267, 271, 273, 277,
139 279, 281, 283, 295, 300, 307, 308, 311, 313
144 #if (YYDEBUG) || defined YYERROR_VERBOSE
146 /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
147 static const char *const yytname[] =
149 "$", "error", "$undefined.", "ENT_TYPEDEF_STRUCT", "ENT_STRUCT",
150 "ENT_EXTERNSTATIC", "ENT_YACCUNION", "GTY_TOKEN", "UNION", "STRUCT",
151 "ENUM", "ALIAS", "NESTED_PTR", "PARAM_IS", "NUM", "\"%%\"", "SCALAR",
152 "ID", "STRING", "ARRAY", "PERCENT_ID", "CHAR", "'{'", "'}'", "';'",
153 "'='", "'<'", "'>'", "':'", "'*'", "','", "'('", "')'", "start",
154 "typedef_struct", "@1", "@2", "externstatic", "lasttype", "semiequal",
155 "yacc_union", "yacc_typematch", "yacc_ids", "struct_fields",
156 "bitfieldopt", "bitfieldlen", "type", "enum_items", "optionsopt",
157 "options", "type_option", "option", "optionseq", "optionseqopt",
162 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
163 static const short yyr1[] =
165 0, 33, 33, 33, 33, 35, 34, 36, 34, 37,
166 37, 37, 38, 39, 39, 40, 41, 41, 41, 42,
167 42, 42, 43, 43, 43, 43, 43, 44, 44, 45,
168 45, 46, 46, 46, 46, 46, 46, 46, 46, 46,
169 47, 47, 47, 47, 48, 48, 49, 50, 50, 51,
170 51, 51, 51, 52, 52, 53, 53, 54, 54
173 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
174 static const short yyr2[] =
176 0, 0, 2, 2, 2, 0, 8, 0, 7, 5,
177 6, 7, 1, 1, 1, 6, 0, 3, 6, 0,
178 2, 2, 0, 6, 6, 7, 5, 0, 2, 1,
179 1, 1, 1, 2, 5, 2, 5, 2, 2, 5,
180 0, 5, 3, 2, 0, 1, 6, 1, 1, 1,
181 4, 4, 8, 1, 3, 0, 1, 1, 2
184 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
185 doesn't specify something else to do. Zero means the default is an
187 static const short yydefact[] =
189 1, 0, 0, 0, 0, 1, 1, 1, 0, 0,
190 0, 0, 22, 2, 3, 4, 0, 22, 22, 0,
191 0, 0, 31, 32, 0, 12, 0, 44, 55, 0,
192 0, 37, 35, 38, 0, 33, 16, 0, 0, 45,
193 47, 0, 48, 49, 0, 53, 56, 0, 0, 7,
194 22, 22, 40, 0, 13, 14, 9, 0, 29, 30,
195 0, 27, 0, 0, 0, 0, 0, 5, 0, 0,
196 0, 40, 0, 0, 10, 15, 19, 22, 0, 0,
197 0, 0, 57, 0, 0, 54, 46, 0, 8, 36,
198 34, 0, 40, 43, 39, 11, 0, 17, 26, 0,
199 22, 28, 22, 0, 58, 50, 51, 6, 0, 42,
200 0, 20, 21, 22, 24, 23, 0, 40, 19, 25,
201 0, 41, 18, 0, 52, 0, 0, 0
204 static const short yydefgoto[] =
206 13, 5, 87, 68, 6, 24, 56, 7, 57, 97,
207 26, 80, 60, 27, 72, 38, 9, 44, 45, 46,
211 static const short yypact[] =
213 63, 31, 31, 31, 31, 63, 63, 63, 25, 40,
214 49, 27, 27,-32768,-32768,-32768, 41, 27, 27, 57,
215 58, 59,-32768,-32768, 60, 50, 55, 3, 29, 61,
216 64, 66, 67, 68, 26,-32768,-32768, 56, 65,-32768,
217 -32768, 62,-32768, 69, 70,-32768, 51, 48, 74,-32768,
218 27, 27, 75, 33,-32768,-32768,-32768, 1,-32768,-32768,
219 71, 11, 27, 76, 27, 29, 54,-32768, 73, 79,
220 80, -8, 81, 23,-32768,-32768, 72, 27, 35, 56,
221 82, 34,-32768, -6, -14,-32768,-32768, 83,-32768,-32768,
222 -32768, 85, 75,-32768,-32768,-32768, 88, 44,-32768, 84,
223 27,-32768, 27, 76,-32768,-32768,-32768,-32768, 86,-32768,
224 87,-32768,-32768, 27,-32768,-32768, -7, 75,-32768,-32768,
225 76,-32768, 44, -4,-32768, 109, 110,-32768
228 static const short yypgoto[] =
230 13,-32768,-32768,-32768,-32768,-32768, -46,-32768,-32768, -5,
231 -17,-32768, 32, -9, -68,-32768, 2,-32768, 47,-32768,
239 static const short yytable[] =
241 29, 30, 25, 93, 10, 11, 12, 74, 116, 71,
242 8, 104, 104, 125, 104, 35, 75, 91, 106, 14,
243 15, 76, 92, 120, 109, 123, 105, 95, 124, 39,
244 78, 37, 35, 69, 70, 19, 20, 21, 8, 79,
245 40, 41, 42, 22, 23, 53, 43, 54, 55, 121,
246 54, 55, 73, 81, 99, 84, 16, 54, 55, 100,
247 98, 111, 17, 35, 103, 112, 1, 2, 3, 4,
248 58, 18, 28, 59, 31, 32, 33, 34, 36, 35,
249 66, 65, 61, 114, 48, 115, 86, 49, 50, 51,
250 52, 67, 71, 62, 82, 77, 119, 88, 96, 108,
251 63, 64, 89, 90, 94, 110, 102, 107, 113, 126,
252 127, 101, 85, 122, 118, 0, 117
255 static const short yycheck[] =
257 17, 18, 11, 71, 2, 3, 4, 53, 103, 17,
258 7, 18, 18, 0, 18, 29, 15, 25, 32, 6,
259 7, 20, 30, 30, 92, 120, 32, 73, 32, 27,
260 19, 28, 29, 50, 51, 8, 9, 10, 7, 28,
261 11, 12, 13, 16, 17, 19, 17, 24, 25, 117,
262 24, 25, 19, 62, 19, 64, 31, 24, 25, 24,
263 77, 17, 22, 29, 30, 21, 3, 4, 5, 6,
264 14, 22, 31, 17, 17, 17, 17, 17, 23, 29,
265 32, 30, 17, 100, 23, 102, 32, 23, 22, 22,
266 22, 17, 17, 31, 18, 24, 113, 24, 26, 14,
267 31, 31, 23, 23, 23, 17, 24, 24, 24, 0,
268 0, 79, 65, 118, 27, -1, 30
270 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
271 #line 3 "/usr/share/bison/bison.simple"
273 /* Skeleton output parser for bison,
275 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
278 This program is free software; you can redistribute it and/or modify
279 it under the terms of the GNU General Public License as published by
280 the Free Software Foundation; either version 2, or (at your option)
283 This program is distributed in the hope that it will be useful,
284 but WITHOUT ANY WARRANTY; without even the implied warranty of
285 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
286 GNU General Public License for more details.
288 You should have received a copy of the GNU General Public License
289 along with this program; if not, write to the Free Software
290 Foundation, Inc., 59 Temple Place - Suite 330,
291 Boston, MA 02111-1307, USA. */
293 /* As a special exception, when this file is copied by Bison into a
294 Bison output file, you may use that output file without restriction.
295 This special exception was added by the Free Software Foundation
296 in version 1.24 of Bison. */
298 /* This is the parser code that is written into each bison parser when
299 the %semantic_parser declaration is not specified in the grammar.
300 It was written by Richard Stallman by simplifying the hairy parser
301 used when %semantic_parser is specified. */
303 /* All symbols defined below should begin with yy or YY, to avoid
304 infringing on user name space. This should be done even for local
305 variables, as they might otherwise be expanded by user macros.
306 There are some unavoidable exceptions within include files to
307 define necessary library symbols; they are noted "INFRINGES ON
308 USER NAME SPACE" below. */
310 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
312 /* The parser invokes alloca or malloc; define the necessary symbols. */
314 # if YYSTACK_USE_ALLOCA
315 # define YYSTACK_ALLOC alloca
317 # ifndef YYSTACK_USE_ALLOCA
318 # if defined (alloca) || defined (_ALLOCA_H)
319 # define YYSTACK_ALLOC alloca
322 # define YYSTACK_ALLOC __builtin_alloca
328 # ifdef YYSTACK_ALLOC
329 /* Pacify GCC's `empty if-body' warning. */
330 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
332 # if defined (__STDC__) || defined (__cplusplus)
333 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
334 # define YYSIZE_T size_t
336 # define YYSTACK_ALLOC malloc
337 # define YYSTACK_FREE free
339 #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
342 #if (! defined (yyoverflow) \
343 && (! defined (__cplusplus) \
344 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
346 /* A type that is properly aligned for any stack member. */
356 /* The size of the maximum gap between one aligned stack and the next. */
357 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
359 /* The size of an array large to enough to hold all stacks, each with
362 # define YYSTACK_BYTES(N) \
363 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
364 + 2 * YYSTACK_GAP_MAX)
366 # define YYSTACK_BYTES(N) \
367 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
371 /* Copy COUNT objects from FROM to TO. The source and destination do
375 # define YYCOPY(To, From, Count) \
376 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
378 # define YYCOPY(To, From, Count) \
381 register YYSIZE_T yyi; \
382 for (yyi = 0; yyi < (Count); yyi++) \
383 (To)[yyi] = (From)[yyi]; \
389 /* Relocate STACK from its old location to the new one. The
390 local variables YYSIZE and YYSTACKSIZE give the old and new number of
391 elements in the stack, and YYPTR gives the new location of the
392 stack. Advance YYPTR to a properly aligned location for the next
394 # define YYSTACK_RELOCATE(Stack) \
397 YYSIZE_T yynewbytes; \
398 YYCOPY (&yyptr->Stack, Stack, yysize); \
399 Stack = &yyptr->Stack; \
400 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
401 yyptr += yynewbytes / sizeof (*yyptr); \
408 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
409 # define YYSIZE_T __SIZE_TYPE__
411 #if ! defined (YYSIZE_T) && defined (size_t)
412 # define YYSIZE_T size_t
414 #if ! defined (YYSIZE_T)
415 # if defined (__STDC__) || defined (__cplusplus)
416 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
417 # define YYSIZE_T size_t
420 #if ! defined (YYSIZE_T)
421 # define YYSIZE_T unsigned int
424 #define yyerrok (yyerrstatus = 0)
425 #define yyclearin (yychar = YYEMPTY)
428 #define YYACCEPT goto yyacceptlab
429 #define YYABORT goto yyabortlab
430 #define YYERROR goto yyerrlab1
431 /* Like YYERROR except do call yyerror. This remains here temporarily
432 to ease the transition to the new meaning of YYERROR, for GCC.
433 Once GCC version 2 has supplanted version 1, this can go. */
434 #define YYFAIL goto yyerrlab
435 #define YYRECOVERING() (!!yyerrstatus)
436 #define YYBACKUP(Token, Value) \
438 if (yychar == YYEMPTY && yylen == 1) \
442 yychar1 = YYTRANSLATE (yychar); \
448 yyerror ("syntax error: cannot back up"); \
454 #define YYERRCODE 256
457 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
460 When YYLLOC_DEFAULT is run, CURRENT is set the location of the
461 first token. By default, to implement support for ranges, extend
462 its range to the last symbol. */
464 #ifndef YYLLOC_DEFAULT
465 # define YYLLOC_DEFAULT(Current, Rhs, N) \
466 Current.last_line = Rhs[N].last_line; \
467 Current.last_column = Rhs[N].last_column;
471 /* YYLEX -- calling `yylex' with the right arguments. */
476 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
478 # define YYLEX yylex (&yylval, &yylloc)
480 # else /* !YYLSP_NEEDED */
482 # define YYLEX yylex (&yylval, YYLEX_PARAM)
484 # define YYLEX yylex (&yylval)
486 # endif /* !YYLSP_NEEDED */
488 # define YYLEX yylex ()
492 /* Enable debugging if requested. */
496 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
497 # define YYFPRINTF fprintf
500 # define YYDPRINTF(Args) \
505 /* Nonzero means print parse trace. It is left uninitialized so that
506 multiple parsers can coexist. */
509 # define YYDPRINTF(Args)
510 #endif /* !YYDEBUG */
512 /* YYINITDEPTH -- initial size of the parser's stacks. */
514 # define YYINITDEPTH 200
517 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
518 if the built-in stack extension method is used).
520 Do not make this value too large; the results are undefined if
521 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
522 evaluated with infinite-precision integer arithmetic. */
529 # define YYMAXDEPTH 10000
532 #ifdef YYERROR_VERBOSE
535 # if defined (__GLIBC__) && defined (_STRING_H)
536 # define yystrlen strlen
538 /* Return the length of YYSTR. */
540 # if defined (__STDC__) || defined (__cplusplus)
541 yystrlen (const char *yystr)
547 register const char *yys = yystr;
549 while (*yys++ != '\0')
552 return yys - yystr - 1;
558 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
559 # define yystpcpy stpcpy
561 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
564 # if defined (__STDC__) || defined (__cplusplus)
565 yystpcpy (char *yydest, const char *yysrc)
567 yystpcpy (yydest, yysrc)
572 register char *yyd = yydest;
573 register const char *yys = yysrc;
575 while ((*yyd++ = *yys++) != '\0')
584 #line 315 "/usr/share/bison/bison.simple"
587 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
588 into yyparse. The argument should have type void *.
589 It should actually point to an object.
590 Grammar actions can access the variable by casting it
591 to the proper pointer type. */
594 # if defined (__STDC__) || defined (__cplusplus)
595 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
596 # define YYPARSE_PARAM_DECL
598 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
599 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
601 #else /* !YYPARSE_PARAM */
602 # define YYPARSE_PARAM_ARG
603 # define YYPARSE_PARAM_DECL
604 #endif /* !YYPARSE_PARAM */
606 /* Prevent warning if -Wstrict-prototypes. */
608 # ifdef YYPARSE_PARAM
609 int yyparse (void *);
615 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
616 variables are global, or local to YYPARSE. */
618 #define YY_DECL_NON_LSP_VARIABLES \
619 /* The lookahead symbol. */ \
622 /* The semantic value of the lookahead symbol. */ \
625 /* Number of parse errors so far. */ \
629 # define YY_DECL_VARIABLES \
630 YY_DECL_NON_LSP_VARIABLES \
632 /* Location data for the lookahead symbol. */ \
635 # define YY_DECL_VARIABLES \
636 YY_DECL_NON_LSP_VARIABLES
640 /* If nonreentrant, generate the variables here. */
647 yyparse (YYPARSE_PARAM_ARG)
650 /* If reentrant, generate the variables here. */
655 register int yystate;
658 /* Number of tokens to shift before error messages enabled. */
660 /* Lookahead token as an internal (translated) token number. */
663 /* Three stacks and their tools:
664 `yyss': related to states,
665 `yyvs': related to semantic values,
666 `yyls': related to locations.
668 Refer to the stacks thru separate pointers, to allow yyoverflow
669 to reallocate them elsewhere. */
671 /* The state stack. */
672 short yyssa[YYINITDEPTH];
674 register short *yyssp;
676 /* The semantic value stack. */
677 YYSTYPE yyvsa[YYINITDEPTH];
678 YYSTYPE *yyvs = yyvsa;
679 register YYSTYPE *yyvsp;
682 /* The location stack. */
683 YYLTYPE yylsa[YYINITDEPTH];
684 YYLTYPE *yyls = yylsa;
689 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
691 # define YYPOPSTACK (yyvsp--, yyssp--)
694 YYSIZE_T yystacksize = YYINITDEPTH;
697 /* The variables used to return semantic value and location from the
704 /* When reducing, the number of symbols on the RHS of the reduced
708 YYDPRINTF ((stderr, "Starting parse\n"));
713 yychar = YYEMPTY; /* Cause a token to be read. */
715 /* Initialize stack pointers.
716 Waste one element of value and location stack
717 so that they stay on the same level as the state stack.
718 The wasted elements are never initialized. */
727 /*------------------------------------------------------------.
728 | yynewstate -- Push a new state, which is found in yystate. |
729 `------------------------------------------------------------*/
731 /* In all cases, when you get here, the value and location stacks
732 have just been pushed. so pushing a state here evens the stacks.
739 if (yyssp >= yyss + yystacksize - 1)
741 /* Get the current used size of the three stacks, in elements. */
742 YYSIZE_T yysize = yyssp - yyss + 1;
746 /* Give user a chance to reallocate the stack. Use copies of
747 these so that the &'s don't force the real ones into
749 YYSTYPE *yyvs1 = yyvs;
752 /* Each stack pointer address is followed by the size of the
753 data in use in that stack, in bytes. */
755 YYLTYPE *yyls1 = yyls;
756 /* This used to be a conditional around just the two extra args,
757 but that might be undefined if yyoverflow is a macro. */
758 yyoverflow ("parser stack overflow",
759 &yyss1, yysize * sizeof (*yyssp),
760 &yyvs1, yysize * sizeof (*yyvsp),
761 &yyls1, yysize * sizeof (*yylsp),
765 yyoverflow ("parser stack overflow",
766 &yyss1, yysize * sizeof (*yyssp),
767 &yyvs1, yysize * sizeof (*yyvsp),
773 #else /* no yyoverflow */
774 # ifndef YYSTACK_RELOCATE
777 /* Extend the stack our own way. */
778 if (yystacksize >= YYMAXDEPTH)
781 if (yystacksize > YYMAXDEPTH)
782 yystacksize = YYMAXDEPTH;
786 union yyalloc *yyptr =
787 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
790 YYSTACK_RELOCATE (yyss);
791 YYSTACK_RELOCATE (yyvs);
793 YYSTACK_RELOCATE (yyls);
795 # undef YYSTACK_RELOCATE
797 YYSTACK_FREE (yyss1);
800 #endif /* no yyoverflow */
802 yyssp = yyss + yysize - 1;
803 yyvsp = yyvs + yysize - 1;
805 yylsp = yyls + yysize - 1;
808 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
809 (unsigned long int) yystacksize));
811 if (yyssp >= yyss + yystacksize - 1)
815 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
825 /* Do appropriate processing given the current state. */
826 /* Read a lookahead token if we need one and don't already have one. */
829 /* First try to decide what to do without reference to lookahead token. */
831 yyn = yypact[yystate];
835 /* Not known => get a lookahead token if don't already have one. */
837 /* yychar is either YYEMPTY or YYEOF
838 or a valid token in external form. */
840 if (yychar == YYEMPTY)
842 YYDPRINTF ((stderr, "Reading a token: "));
846 /* Convert token to internal form (in yychar1) for indexing tables with */
848 if (yychar <= 0) /* This means end of input. */
851 yychar = YYEOF; /* Don't call YYLEX any more */
853 YYDPRINTF ((stderr, "Now at end of input.\n"));
857 yychar1 = YYTRANSLATE (yychar);
860 /* We have to keep this `#if YYDEBUG', since we use variables
861 which are defined only if `YYDEBUG' is set. */
864 YYFPRINTF (stderr, "Next token is %d (%s",
865 yychar, yytname[yychar1]);
866 /* Give the individual parser a way to print the precise
867 meaning of a token, for further debugging info. */
869 YYPRINT (stderr, yychar, yylval);
871 YYFPRINTF (stderr, ")\n");
877 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
882 /* yyn is what to do for this token type in this state.
883 Negative => reduce, -yyn is rule number.
884 Positive => shift, yyn is new state.
885 New state is final state => don't bother to shift,
887 0, or most negative number => error. */
902 /* Shift the lookahead token. */
903 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
904 yychar, yytname[yychar1]));
906 /* Discard the token being shifted unless it is eof. */
915 /* Count tokens shifted since error; after three, turn off error
924 /*-----------------------------------------------------------.
925 | yydefault -- do the default action for the current state. |
926 `-----------------------------------------------------------*/
928 yyn = yydefact[yystate];
934 /*-----------------------------.
935 | yyreduce -- Do a reduction. |
936 `-----------------------------*/
938 /* yyn is the number of a rule to reduce with. */
941 /* If YYLEN is nonzero, implement the default value of the action:
944 Otherwise, the following line sets YYVAL to the semantic value of
945 the lookahead token. This behavior is undocumented and Bison
946 users should not rely upon it. Assigning to YYVAL
947 unconditionally makes the parser a bit smaller, and it avoids a
948 GCC warning that YYVAL may be used uninitialized. */
949 yyval = yyvsp[1-yylen];
952 /* Similarly for the default location. Let the user run additional
953 commands if for instance locations are ranges. */
954 yyloc = yylsp[1-yylen];
955 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
959 /* We have to keep this `#if YYDEBUG', since we use variables which
960 are defined only if `YYDEBUG' is set. */
965 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
968 /* Print the symbols being reduced, and their result. */
969 for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
970 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
971 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
978 #line 72 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
980 new_structure (yyvsp[-5].t->u.s.tag, UNION_P (yyvsp[-5].t), &lexer_line,
981 yyvsp[-2].p, yyvsp[-4].o);
982 do_typedef (yyvsp[0].s, yyvsp[-5].t, &lexer_line);
983 lexer_toplevel_done = 1;
987 #line 79 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
991 #line 81 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
993 new_structure (yyvsp[-4].t->u.s.tag, UNION_P (yyvsp[-4].t), &lexer_line,
994 yyvsp[-1].p, yyvsp[-3].o);
995 lexer_toplevel_done = 1;
999 #line 87 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1003 #line 91 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1005 note_variable (yyvsp[-1].s, adjust_field_type (yyvsp[-2].t, yyvsp[-3].o), yyvsp[-3].o,
1010 #line 96 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1012 note_variable (yyvsp[-2].s, create_array (yyvsp[-3].t, yyvsp[-1].s),
1013 yyvsp[-4].o, &lexer_line);
1017 #line 101 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1019 note_variable (yyvsp[-3].s, create_array (create_array (yyvsp[-4].t, yyvsp[-1].s),
1021 yyvsp[-5].o, &lexer_line);
1025 #line 109 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1027 lexer_toplevel_done = 1;
1028 yyval.t = yyvsp[0].t;
1032 #line 121 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1034 note_yacc_type (yyvsp[-4].o, yyvsp[-3].p, yyvsp[-1].p, &lexer_line);
1038 #line 127 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1042 #line 129 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1045 for (p = yyvsp[0].p; p->next != NULL; p = p->next)
1052 p->next = yyvsp[-2].p;
1053 yyval.p = yyvsp[0].p;
1057 #line 142 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1060 type_p newtype = NULL;
1061 if (strcmp (yyvsp[-4].s, "type") == 0)
1062 newtype = (type_p) 1;
1063 for (p = yyvsp[0].p; p->next != NULL; p = p->next)
1065 p->name = yyvsp[-2].s;
1068 p->name = yyvsp[-2].s;
1069 p->next = yyvsp[-5].p;
1071 yyval.p = yyvsp[0].p;
1075 #line 160 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1079 #line 162 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1081 pair_p p = XCNEW (struct pair);
1082 p->next = yyvsp[-1].p;
1083 p->line = lexer_line;
1084 p->opt = XNEW (struct options);
1085 p->opt->name = "tag";
1086 p->opt->next = NULL;
1087 p->opt->info = (char *)yyvsp[0].s;
1092 #line 173 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1094 pair_p p = XCNEW (struct pair);
1095 p->next = yyvsp[-1].p;
1096 p->line = lexer_line;
1097 p->opt = XNEW (struct options);
1098 p->opt->name = "tag";
1099 p->opt->next = NULL;
1100 p->opt->info = xasprintf ("'%s'", yyvsp[0].s);
1105 #line 185 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1109 #line 187 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1111 pair_p p = XNEW (struct pair);
1112 p->type = adjust_field_type (yyvsp[-5].t, yyvsp[-4].o);
1113 p->opt = yyvsp[-4].o;
1114 p->name = yyvsp[-3].s;
1115 p->next = yyvsp[0].p;
1116 p->line = lexer_line;
1121 #line 197 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1123 pair_p p = XNEW (struct pair);
1124 p->type = adjust_field_type (create_array (yyvsp[-5].t, yyvsp[-2].s), yyvsp[-4].o);
1125 p->opt = yyvsp[-4].o;
1126 p->name = yyvsp[-3].s;
1127 p->next = yyvsp[0].p;
1128 p->line = lexer_line;
1133 #line 207 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1135 pair_p p = XNEW (struct pair);
1136 p->type = create_array (create_array (yyvsp[-6].t, yyvsp[-2].s), yyvsp[-3].s);
1137 p->opt = yyvsp[-5].o;
1138 p->name = yyvsp[-4].s;
1139 p->next = yyvsp[0].p;
1140 p->line = lexer_line;
1145 #line 217 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1146 { yyval.p = yyvsp[0].p; ;
1149 #line 225 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1153 #line 229 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1154 { yyval.t = yyvsp[0].t; ;
1157 #line 231 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1158 { yyval.t = resolve_typedef (yyvsp[0].s, &lexer_line); ;
1161 #line 233 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1162 { yyval.t = create_pointer (yyvsp[-1].t); ;
1165 #line 235 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1167 new_structure (yyvsp[-3].s, 0, &lexer_line, yyvsp[-1].p, NULL);
1168 yyval.t = find_structure (yyvsp[-3].s, 0);
1172 #line 240 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1173 { yyval.t = find_structure (yyvsp[0].s, 0); ;
1176 #line 242 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1178 new_structure (yyvsp[-3].s, 1, &lexer_line, yyvsp[-1].p, NULL);
1179 yyval.t = find_structure (yyvsp[-3].s, 1);
1183 #line 247 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1184 { yyval.t = find_structure (yyvsp[0].s, 1); ;
1187 #line 249 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1188 { yyval.t = create_scalar_type (yyvsp[0].s, strlen (yyvsp[0].s)); ;
1191 #line 251 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1192 { yyval.t = create_scalar_type (yyvsp[-3].s, strlen (yyvsp[-3].s)); ;
1195 #line 256 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1199 #line 258 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1203 #line 260 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1207 #line 263 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1211 #line 264 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1212 { yyval.o = yyvsp[0].o; ;
1215 #line 268 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1216 { yyval.o = yyvsp[-2].o; ;
1219 #line 272 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1220 { yyval.s = "ptr_alias"; ;
1223 #line 274 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1224 { yyval.s = yyvsp[0].s; ;
1227 #line 278 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1228 { yyval.o = create_option (yyvsp[0].s, (void *)""); ;
1231 #line 280 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1232 { yyval.o = create_option (yyvsp[-3].s, (void *)yyvsp[-1].s); ;
1235 #line 282 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1236 { yyval.o = create_option (yyvsp[-3].s, adjust_field_type (yyvsp[-1].t, NULL)); ;
1239 #line 284 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1241 struct nested_ptr_data d;
1243 d.type = adjust_field_type (yyvsp[-5].t, NULL);
1244 d.convert_to = yyvsp[-3].s;
1245 d.convert_from = yyvsp[-1].s;
1246 yyval.o = create_option ("nested_ptr",
1247 xmemdup (&d, sizeof (d), sizeof (d)));
1251 #line 296 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1253 yyvsp[0].o->next = NULL;
1254 yyval.o = yyvsp[0].o;
1258 #line 301 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1260 yyvsp[0].o->next = yyvsp[-2].o;
1261 yyval.o = yyvsp[0].o;
1265 #line 307 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1269 #line 308 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1270 { yyval.o = yyvsp[0].o; ;
1273 #line 312 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1274 { yyval.s = yyvsp[0].s; ;
1277 #line 314 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"
1279 size_t l1 = strlen (yyvsp[-1].s);
1280 size_t l2 = strlen (yyvsp[0].s);
1281 char *s = XRESIZEVEC (char, yyvsp[-1].s, l1 + l2 + 1);
1282 memcpy (s + l1, yyvsp[0].s, l2 + 1);
1283 XDELETE (yyvsp[0].s);
1289 #line 705 "/usr/share/bison/bison.simple"
1301 short *yyssp1 = yyss - 1;
1302 YYFPRINTF (stderr, "state stack now");
1303 while (yyssp1 != yyssp)
1304 YYFPRINTF (stderr, " %d", *++yyssp1);
1305 YYFPRINTF (stderr, "\n");
1314 /* Now `shift' the result of the reduction. Determine what state
1315 that goes to, based on the state we popped back to and the rule
1316 number reduced by. */
1320 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
1321 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1322 yystate = yytable[yystate];
1324 yystate = yydefgoto[yyn - YYNTBASE];
1329 /*------------------------------------.
1330 | yyerrlab -- here on detecting error |
1331 `------------------------------------*/
1333 /* If not already recovering from an error, report this error. */
1338 #ifdef YYERROR_VERBOSE
1339 yyn = yypact[yystate];
1341 if (yyn > YYFLAG && yyn < YYLAST)
1343 YYSIZE_T yysize = 0;
1348 /* Start YYX at -YYN if negative to avoid negative indexes in
1350 for (yyx = yyn < 0 ? -yyn : 0;
1351 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1352 if (yycheck[yyx + yyn] == yyx)
1353 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1354 yysize += yystrlen ("parse error, unexpected ") + 1;
1355 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
1356 yymsg = (char *) YYSTACK_ALLOC (yysize);
1359 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1360 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1365 for (yyx = yyn < 0 ? -yyn : 0;
1366 yyx < (int) (sizeof (yytname) / sizeof (char *));
1368 if (yycheck[yyx + yyn] == yyx)
1370 const char *yyq = ! yycount ? ", expecting " : " or ";
1371 yyp = yystpcpy (yyp, yyq);
1372 yyp = yystpcpy (yyp, yytname[yyx]);
1377 YYSTACK_FREE (yymsg);
1380 yyerror ("parse error; also virtual memory exhausted");
1383 #endif /* defined (YYERROR_VERBOSE) */
1384 yyerror ("parse error");
1389 /*--------------------------------------------------.
1390 | yyerrlab1 -- error raised explicitly by an action |
1391 `--------------------------------------------------*/
1393 if (yyerrstatus == 3)
1395 /* If just tried and failed to reuse lookahead token after an
1396 error, discard it. */
1398 /* return failure if at end of input */
1399 if (yychar == YYEOF)
1401 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1402 yychar, yytname[yychar1]));
1406 /* Else will try to reuse lookahead token after shifting the error
1409 yyerrstatus = 3; /* Each real token shifted decrements this */
1414 /*-------------------------------------------------------------------.
1415 | yyerrdefault -- current state does not do anything special for the |
1417 `-------------------------------------------------------------------*/
1420 /* This is wrong; only states that explicitly want error tokens
1421 should shift them. */
1423 /* If its default is to accept any token, ok. Otherwise pop it. */
1424 yyn = yydefact[yystate];
1430 /*---------------------------------------------------------------.
1431 | yyerrpop -- pop the current state because it cannot handle the |
1433 `---------------------------------------------------------------*/
1446 short *yyssp1 = yyss - 1;
1447 YYFPRINTF (stderr, "Error: state stack now");
1448 while (yyssp1 != yyssp)
1449 YYFPRINTF (stderr, " %d", *++yyssp1);
1450 YYFPRINTF (stderr, "\n");
1458 yyn = yypact[yystate];
1463 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1480 YYDPRINTF ((stderr, "Shifting error token, "));
1491 /*-------------------------------------.
1492 | yyacceptlab -- YYACCEPT comes here. |
1493 `-------------------------------------*/
1498 /*-----------------------------------.
1499 | yyabortlab -- YYABORT comes here. |
1500 `-----------------------------------*/
1505 /*---------------------------------------------.
1506 | yyoverflowab -- parser overflow comes here. |
1507 `---------------------------------------------*/
1509 yyerror ("parser stack overflow");
1516 YYSTACK_FREE (yyss);
1520 #line 323 "/scratch/mitchell/gcc-releases/gcc-4.0.0/gcc-4.0.0/gcc/gengtype-yacc.y"