1 /* A Bison parser, made by GNU Bison 2.1. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
36 /* Identify Bison output. */
40 #define YYBISON_VERSION "2.1"
43 #define YYSKELETON_NAME "yacc.c"
48 /* Using locations. */
49 #define YYLSP_NEEDED 0
56 /* Put the tokens into the symbol table, so that GDB and other debuggers
59 ENT_TYPEDEF_STRUCT
= 258,
61 ENT_EXTERNSTATIC
= 260,
81 #define ENT_TYPEDEF_STRUCT 258
82 #define ENT_STRUCT 259
83 #define ENT_EXTERNSTATIC 260
84 #define ENT_YACCUNION 261
90 #define NESTED_PTR 267
93 #define PERCENTPERCENT 270
98 #define PERCENT_ID 275
104 /* Copy the first part of user declarations. */
105 #line 22 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
109 #include "coretypes.h"
111 #include "gengtype.h"
112 #define YYERROR_VERBOSE
115 /* Enabling traces. */
120 /* Enabling verbose error messages. */
121 #ifdef YYERROR_VERBOSE
122 # undef YYERROR_VERBOSE
123 # define YYERROR_VERBOSE 1
125 # define YYERROR_VERBOSE 0
128 /* Enabling the token table. */
129 #ifndef YYTOKEN_TABLE
130 # define YYTOKEN_TABLE 0
133 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
134 #line 31 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
135 typedef union YYSTYPE
{
141 /* Line 196 of yacc.c. */
142 #line 143 "gengtype-yacc.c"
143 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
144 # define YYSTYPE_IS_DECLARED 1
145 # define YYSTYPE_IS_TRIVIAL 1
150 /* Copy the second part of user declarations. */
153 /* Line 219 of yacc.c. */
154 #line 155 "gengtype-yacc.c"
156 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
157 # define YYSIZE_T __SIZE_TYPE__
159 #if ! defined (YYSIZE_T) && defined (size_t)
160 # define YYSIZE_T size_t
162 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
163 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
164 # define YYSIZE_T size_t
166 #if ! defined (YYSIZE_T)
167 # define YYSIZE_T unsigned int
173 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
174 # define YY_(msgid) dgettext ("bison-runtime", msgid)
178 # define YY_(msgid) msgid
182 #if ! defined (yyoverflow) || YYERROR_VERBOSE
184 /* The parser invokes alloca or malloc; define the necessary symbols. */
186 # ifdef YYSTACK_USE_ALLOCA
187 # if YYSTACK_USE_ALLOCA
189 # define YYSTACK_ALLOC __builtin_alloca
191 # define YYSTACK_ALLOC alloca
192 # if defined (__STDC__) || defined (__cplusplus)
193 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
194 # define YYINCLUDED_STDLIB_H
200 # ifdef YYSTACK_ALLOC
201 /* Pacify GCC's `empty if-body' warning. */
202 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
203 # ifndef YYSTACK_ALLOC_MAXIMUM
204 /* The OS might guarantee only one guard page at the bottom of the stack,
205 and a page size can be as small as 4096 bytes. So we cannot safely
206 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
207 to allow for a few compiler-allocated temporary stack slots. */
208 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
211 # define YYSTACK_ALLOC YYMALLOC
212 # define YYSTACK_FREE YYFREE
213 # ifndef YYSTACK_ALLOC_MAXIMUM
214 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
220 # define YYMALLOC malloc
221 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
222 && (defined (__STDC__) || defined (__cplusplus)))
223 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
228 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
229 && (defined (__STDC__) || defined (__cplusplus)))
230 void free (void *); /* INFRINGES ON USER NAME SPACE */
237 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
240 #if (! defined (yyoverflow) \
241 && (! defined (__cplusplus) \
242 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
244 /* A type that is properly aligned for any stack member. */
251 /* The size of the maximum gap between one aligned stack and the next. */
252 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
254 /* The size of an array large to enough to hold all stacks, each with
256 # define YYSTACK_BYTES(N) \
257 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
258 + YYSTACK_GAP_MAXIMUM)
260 /* Copy COUNT objects from FROM to TO. The source and destination do
263 # if defined (__GNUC__) && 1 < __GNUC__
264 # define YYCOPY(To, From, Count) \
265 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
267 # define YYCOPY(To, From, Count) \
271 for (yyi = 0; yyi < (Count); yyi++) \
272 (To)[yyi] = (From)[yyi]; \
278 /* Relocate STACK from its old location to the new one. The
279 local variables YYSIZE and YYSTACKSIZE give the old and new number of
280 elements in the stack, and YYPTR gives the new location of the
281 stack. Advance YYPTR to a properly aligned location for the next
283 # define YYSTACK_RELOCATE(Stack) \
286 YYSIZE_T yynewbytes; \
287 YYCOPY (&yyptr->Stack, Stack, yysize); \
288 Stack = &yyptr->Stack; \
289 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
290 yyptr += yynewbytes / sizeof (*yyptr); \
296 #if defined (__STDC__) || defined (__cplusplus)
297 typedef signed char yysigned_char
;
299 typedef short int yysigned_char
;
302 /* YYFINAL -- State number of the termination state. */
304 /* YYLAST -- Last index in YYTABLE. */
307 /* YYNTOKENS -- Number of terminals. */
309 /* YYNNTS -- Number of nonterminals. */
311 /* YYNRULES -- Number of rules. */
313 /* YYNRULES -- Number of states. */
314 #define YYNSTATES 127
316 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
318 #define YYMAXUTOK 276
320 #define YYTRANSLATE(YYX) \
321 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
323 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
324 static const unsigned char yytranslate
[] =
326 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
327 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
328 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
329 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
330 31, 32, 29, 2, 30, 2, 2, 2, 2, 2,
331 2, 2, 2, 2, 2, 2, 2, 2, 28, 24,
332 26, 25, 27, 2, 2, 2, 2, 2, 2, 2,
333 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
334 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
335 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
336 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
337 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
338 2, 2, 2, 22, 2, 23, 2, 2, 2, 2,
339 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
340 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
341 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
342 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
343 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
344 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
345 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
346 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
347 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
348 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
349 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
350 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
351 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
352 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
353 15, 16, 17, 18, 19, 20, 21
357 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
359 static const unsigned char yyprhs
[] =
361 0, 0, 3, 4, 7, 10, 13, 14, 23, 24,
362 32, 38, 45, 53, 55, 57, 59, 66, 67, 71,
363 78, 79, 82, 85, 86, 93, 100, 108, 114, 115,
364 118, 120, 122, 124, 126, 129, 135, 138, 144, 147,
365 150, 156, 157, 163, 167, 170, 171, 173, 180, 182,
366 184, 186, 191, 196, 205, 207, 211, 212, 214, 216
369 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
370 static const yysigned_char yyrhs
[] =
372 34, 0, -1, -1, 35, 34, -1, 38, 34, -1,
373 41, 34, -1, -1, 3, 50, 22, 44, 23, 17,
374 36, 24, -1, -1, 4, 50, 22, 44, 23, 37,
375 24, -1, 5, 50, 39, 17, 40, -1, 5, 50,
376 39, 17, 19, 40, -1, 5, 50, 39, 17, 19,
377 19, 40, -1, 47, -1, 24, -1, 25, -1, 6,
378 50, 44, 23, 42, 15, -1, -1, 42, 20, 43,
379 -1, 42, 20, 26, 17, 27, 43, -1, -1, 43,
380 17, -1, 43, 21, -1, -1, 47, 49, 17, 45,
381 24, 44, -1, 47, 49, 17, 19, 24, 44, -1,
382 47, 49, 17, 19, 19, 24, 44, -1, 47, 28,
383 46, 24, 44, -1, -1, 28, 46, -1, 14, -1,
384 17, -1, 16, -1, 17, -1, 47, 29, -1, 9,
385 17, 22, 44, 23, -1, 9, 17, -1, 8, 17,
386 22, 44, 23, -1, 8, 17, -1, 10, 17, -1,
387 10, 17, 22, 48, 23, -1, -1, 17, 25, 14,
388 30, 48, -1, 17, 30, 48, -1, 17, 48, -1,
389 -1, 50, -1, 7, 31, 31, 54, 32, 32, -1,
390 11, -1, 13, -1, 17, -1, 17, 31, 55, 32,
391 -1, 51, 31, 47, 32, -1, 12, 31, 47, 30,
392 55, 30, 55, 32, -1, 52, -1, 53, 30, 52,
393 -1, -1, 53, -1, 18, -1, 55, 18, -1
396 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
397 static const unsigned short int yyrline
[] =
399 0, 65, 65, 66, 67, 68, 72, 71, 81, 80,
400 90, 95, 100, 108, 115, 116, 119, 127, 128, 141,
401 160, 161, 172, 185, 186, 196, 206, 216, 220, 221,
402 224, 224, 228, 230, 232, 234, 239, 241, 246, 248,
403 250, 254, 255, 257, 259, 263, 264, 267, 271, 273,
404 277, 279, 281, 283, 295, 300, 307, 308, 311, 313
408 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
409 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
410 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
411 static const char *const yytname
[] =
413 "$end", "error", "$undefined", "ENT_TYPEDEF_STRUCT", "ENT_STRUCT",
414 "ENT_EXTERNSTATIC", "ENT_YACCUNION", "GTY_TOKEN", "UNION", "STRUCT",
415 "ENUM", "ALIAS", "NESTED_PTR", "PARAM_IS", "NUM", "\"%%\"", "SCALAR",
416 "ID", "STRING", "ARRAY", "PERCENT_ID", "CHAR", "'{'", "'}'", "';'",
417 "'='", "'<'", "'>'", "':'", "'*'", "','", "'('", "')'", "$accept",
418 "start", "typedef_struct", "@1", "@2", "externstatic", "lasttype",
419 "semiequal", "yacc_union", "yacc_typematch", "yacc_ids", "struct_fields",
420 "bitfieldopt", "bitfieldlen", "type", "enum_items", "optionsopt",
421 "options", "type_option", "option", "optionseq", "optionseqopt",
427 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
429 static const unsigned short int yytoknum
[] =
431 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
432 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
433 275, 276, 123, 125, 59, 61, 60, 62, 58, 42,
438 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
439 static const unsigned char yyr1
[] =
441 0, 33, 34, 34, 34, 34, 36, 35, 37, 35,
442 38, 38, 38, 39, 40, 40, 41, 42, 42, 42,
443 43, 43, 43, 44, 44, 44, 44, 44, 45, 45,
444 46, 46, 47, 47, 47, 47, 47, 47, 47, 47,
445 47, 48, 48, 48, 48, 49, 49, 50, 51, 51,
446 52, 52, 52, 52, 53, 53, 54, 54, 55, 55
449 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
450 static const unsigned char yyr2
[] =
452 0, 2, 0, 2, 2, 2, 0, 8, 0, 7,
453 5, 6, 7, 1, 1, 1, 6, 0, 3, 6,
454 0, 2, 2, 0, 6, 6, 7, 5, 0, 2,
455 1, 1, 1, 1, 2, 5, 2, 5, 2, 2,
456 5, 0, 5, 3, 2, 0, 1, 6, 1, 1,
457 1, 4, 4, 8, 1, 3, 0, 1, 1, 2
460 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
461 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
462 means the default is an error. */
463 static const unsigned char yydefact
[] =
465 2, 0, 0, 0, 0, 0, 2, 2, 2, 0,
466 0, 0, 0, 23, 1, 3, 4, 5, 0, 23,
467 23, 0, 0, 0, 32, 33, 0, 13, 0, 45,
468 56, 0, 0, 38, 36, 39, 0, 34, 17, 0,
469 0, 46, 48, 0, 49, 50, 0, 54, 57, 0,
470 0, 8, 23, 23, 41, 0, 14, 15, 10, 0,
471 30, 31, 0, 28, 0, 0, 0, 0, 0, 6,
472 0, 0, 0, 41, 0, 0, 11, 16, 20, 23,
473 0, 0, 0, 0, 58, 0, 0, 55, 47, 0,
474 9, 37, 35, 0, 41, 44, 40, 12, 0, 18,
475 27, 0, 23, 29, 23, 0, 59, 51, 52, 7,
476 0, 43, 0, 21, 22, 23, 25, 24, 0, 41,
477 20, 26, 0, 42, 19, 0, 53
480 /* YYDEFGOTO[NTERM-NUM]. */
481 static const yysigned_char yydefgoto
[] =
483 -1, 5, 6, 89, 70, 7, 26, 58, 8, 59,
484 99, 28, 82, 62, 29, 74, 40, 10, 46, 47,
488 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
490 #define YYPACT_NINF -98
491 static const yysigned_char yypact
[] =
493 58, 12, 12, 12, 12, 43, 58, 58, 58, 5,
494 45, 53, 29, 29, -98, -98, -98, -98, 28, 29,
495 29, 41, 59, 60, -98, -98, 61, 50, 57, 0,
496 4, 63, 65, 62, 67, 68, 16, -98, -98, 51,
497 70, -98, -98, 66, -98, 69, 71, -98, 52, 49,
498 74, -98, 29, 29, 75, 23, -98, -98, -98, -2,
499 -98, -98, 77, -8, 29, 76, 29, 4, 72, -98,
500 79, 82, 83, -3, 84, 27, -98, -98, 73, 29,
501 31, 51, 85, 44, -98, -9, 37, -98, -98, 86,
502 -98, -98, -98, 81, 75, -98, -98, -98, 91, 36,
503 -98, 87, 29, -98, 29, 76, -98, -98, -98, -98,
504 88, -98, 89, -98, -98, 29, -98, -98, 14, 75,
505 -98, -98, 76, -98, 36, -6, -98
508 /* YYPGOTO[NTERM-NUM]. */
509 static const yysigned_char yypgoto
[] =
511 -98, 64, -98, -98, -98, -98, -98, -45, -98, -98,
512 -27, -19, -98, 17, -10, -70, -98, 2, -98, 46,
516 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
517 positive, shift that token. If negative, reduce the rule which
518 number is the opposite. If zero, do what YYDEFACT says.
519 If YYTABLE_NINF, syntax error. */
520 #define YYTABLE_NINF -1
521 static const unsigned char yytable
[] =
523 31, 32, 27, 95, 11, 12, 13, 9, 118, 106,
524 76, 80, 106, 77, 73, 42, 43, 44, 78, 9,
525 81, 45, 93, 107, 111, 125, 126, 94, 39, 37,
526 97, 41, 106, 71, 72, 55, 18, 21, 22, 23,
527 56, 57, 75, 14, 122, 24, 25, 56, 57, 123,
528 101, 56, 57, 113, 83, 102, 86, 114, 33, 30,
529 100, 1, 2, 3, 4, 60, 37, 19, 61, 108,
530 15, 16, 17, 37, 105, 20, 34, 35, 36, 37,
531 38, 68, 67, 116, 52, 117, 50, 63, 51, 53,
532 54, 69, 73, 124, 84, 110, 121, 64, 103, 98,
533 65, 79, 66, 90, 88, 91, 92, 96, 112, 104,
534 109, 115, 0, 87, 0, 0, 120, 0, 119
537 static const yysigned_char yycheck
[] =
539 19, 20, 12, 73, 2, 3, 4, 7, 105, 18,
540 55, 19, 18, 15, 17, 11, 12, 13, 20, 7,
541 28, 17, 25, 32, 94, 122, 32, 30, 28, 29,
542 75, 29, 18, 52, 53, 19, 31, 8, 9, 10,
543 24, 25, 19, 0, 30, 16, 17, 24, 25, 119,
544 19, 24, 25, 17, 64, 24, 66, 21, 17, 31,
545 79, 3, 4, 5, 6, 14, 29, 22, 17, 32,
546 6, 7, 8, 29, 30, 22, 17, 17, 17, 29,
547 23, 32, 30, 102, 22, 104, 23, 17, 23, 22,
548 22, 17, 17, 120, 18, 14, 115, 31, 81, 26,
549 31, 24, 31, 24, 32, 23, 23, 23, 17, 24,
550 24, 24, -1, 67, -1, -1, 27, -1, 30
553 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
554 symbol of state STATE-NUM. */
555 static const unsigned char yystos
[] =
557 0, 3, 4, 5, 6, 34, 35, 38, 41, 7,
558 50, 50, 50, 50, 0, 34, 34, 34, 31, 22,
559 22, 8, 9, 10, 16, 17, 39, 47, 44, 47,
560 31, 44, 44, 17, 17, 17, 17, 29, 23, 28,
561 49, 50, 11, 12, 13, 17, 51, 52, 53, 54,
562 23, 23, 22, 22, 22, 19, 24, 25, 40, 42,
563 14, 17, 46, 17, 31, 31, 31, 30, 32, 17,
564 37, 44, 44, 17, 48, 19, 40, 15, 20, 24,
565 19, 28, 45, 47, 18, 55, 47, 52, 32, 36,
566 24, 23, 23, 25, 30, 48, 23, 40, 26, 43,
567 44, 19, 24, 46, 24, 30, 18, 32, 32, 24,
568 14, 48, 17, 17, 21, 24, 44, 44, 55, 30,
569 27, 44, 30, 48, 43, 55, 32
572 #define yyerrok (yyerrstatus = 0)
573 #define yyclearin (yychar = YYEMPTY)
577 #define YYACCEPT goto yyacceptlab
578 #define YYABORT goto yyabortlab
579 #define YYERROR goto yyerrorlab
582 /* Like YYERROR except do call yyerror. This remains here temporarily
583 to ease the transition to the new meaning of YYERROR, for GCC.
584 Once GCC version 2 has supplanted version 1, this can go. */
586 #define YYFAIL goto yyerrlab
588 #define YYRECOVERING() (!!yyerrstatus)
590 #define YYBACKUP(Token, Value) \
592 if (yychar == YYEMPTY && yylen == 1) \
596 yytoken = YYTRANSLATE (yychar); \
602 yyerror (YY_("syntax error: cannot back up")); \
609 #define YYERRCODE 256
612 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
613 If N is 0, then set CURRENT to the empty location which ends
614 the previous symbol: RHS[0] (always defined). */
616 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
617 #ifndef YYLLOC_DEFAULT
618 # define YYLLOC_DEFAULT(Current, Rhs, N) \
622 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
623 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
624 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
625 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
629 (Current).first_line = (Current).last_line = \
630 YYRHSLOC (Rhs, 0).last_line; \
631 (Current).first_column = (Current).last_column = \
632 YYRHSLOC (Rhs, 0).last_column; \
638 /* YY_LOCATION_PRINT -- Print the location on the stream.
639 This macro was not mandated originally: define only if we know
640 we won't break user code: when these are the locations we know. */
642 #ifndef YY_LOCATION_PRINT
643 # if YYLTYPE_IS_TRIVIAL
644 # define YY_LOCATION_PRINT(File, Loc) \
645 fprintf (File, "%d.%d-%d.%d", \
646 (Loc).first_line, (Loc).first_column, \
647 (Loc).last_line, (Loc).last_column)
649 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
654 /* YYLEX -- calling `yylex' with the right arguments. */
657 # define YYLEX yylex (YYLEX_PARAM)
659 # define YYLEX yylex ()
662 /* Enable debugging if requested. */
666 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
667 # define YYFPRINTF fprintf
670 # define YYDPRINTF(Args) \
676 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
680 YYFPRINTF (stderr, "%s ", Title); \
681 yysymprint (stderr, \
683 YYFPRINTF (stderr, "\n"); \
687 /*------------------------------------------------------------------.
688 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
690 `------------------------------------------------------------------*/
692 #if defined (__STDC__) || defined (__cplusplus)
694 yy_stack_print (short int *bottom
, short int *top
)
697 yy_stack_print (bottom
, top
)
702 YYFPRINTF (stderr
, "Stack now");
703 for (/* Nothing. */; bottom
<= top
; ++bottom
)
704 YYFPRINTF (stderr
, " %d", *bottom
);
705 YYFPRINTF (stderr
, "\n");
708 # define YY_STACK_PRINT(Bottom, Top) \
711 yy_stack_print ((Bottom), (Top)); \
715 /*------------------------------------------------.
716 | Report that the YYRULE is going to be reduced. |
717 `------------------------------------------------*/
719 #if defined (__STDC__) || defined (__cplusplus)
721 yy_reduce_print (int yyrule
)
724 yy_reduce_print (yyrule
)
729 unsigned long int yylno
= yyrline
[yyrule
];
730 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu), ",
732 /* Print the symbols being reduced, and their result. */
733 for (yyi
= yyprhs
[yyrule
]; 0 <= yyrhs
[yyi
]; yyi
++)
734 YYFPRINTF (stderr
, "%s ", yytname
[yyrhs
[yyi
]]);
735 YYFPRINTF (stderr
, "-> %s\n", yytname
[yyr1
[yyrule
]]);
738 # define YY_REDUCE_PRINT(Rule) \
741 yy_reduce_print (Rule); \
744 /* Nonzero means print parse trace. It is left uninitialized so that
745 multiple parsers can coexist. */
748 # define YYDPRINTF(Args)
749 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
750 # define YY_STACK_PRINT(Bottom, Top)
751 # define YY_REDUCE_PRINT(Rule)
752 #endif /* !YYDEBUG */
755 /* YYINITDEPTH -- initial size of the parser's stacks. */
757 # define YYINITDEPTH 200
760 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
761 if the built-in stack extension method is used).
763 Do not make this value too large; the results are undefined if
764 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
765 evaluated with infinite-precision integer arithmetic. */
768 # define YYMAXDEPTH 10000
776 # if defined (__GLIBC__) && defined (_STRING_H)
777 # define yystrlen strlen
779 /* Return the length of YYSTR. */
781 # if defined (__STDC__) || defined (__cplusplus)
782 yystrlen (const char *yystr
)
788 const char *yys
= yystr
;
790 while (*yys
++ != '\0')
793 return yys
- yystr
- 1;
799 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
800 # define yystpcpy stpcpy
802 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
805 # if defined (__STDC__) || defined (__cplusplus)
806 yystpcpy (char *yydest
, const char *yysrc
)
808 yystpcpy (yydest
, yysrc
)
814 const char *yys
= yysrc
;
816 while ((*yyd
++ = *yys
++) != '\0')
825 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
826 quotes and backslashes, so that it's suitable for yyerror. The
827 heuristic is that double-quoting is unnecessary unless the string
828 contains an apostrophe, a comma, or backslash (other than
829 backslash-backslash). YYSTR is taken from yytname. If YYRES is
830 null, do not copy; instead, return the length of what the result
833 yytnamerr (char *yyres
, const char *yystr
)
838 char const *yyp
= yystr
;
845 goto do_not_strip_quotes
;
849 goto do_not_strip_quotes
;
862 do_not_strip_quotes
: ;
866 return yystrlen (yystr
);
868 return yystpcpy (yyres
, yystr
) - yyres
;
872 #endif /* YYERROR_VERBOSE */
877 /*--------------------------------.
878 | Print this symbol on YYOUTPUT. |
879 `--------------------------------*/
881 #if defined (__STDC__) || defined (__cplusplus)
883 yysymprint (FILE *yyoutput
, int yytype
, YYSTYPE
*yyvaluep
)
886 yysymprint (yyoutput
, yytype
, yyvaluep
)
892 /* Pacify ``unused variable'' warnings. */
895 if (yytype
< YYNTOKENS
)
896 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
898 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
902 if (yytype
< YYNTOKENS
)
903 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
910 YYFPRINTF (yyoutput
, ")");
913 #endif /* ! YYDEBUG */
914 /*-----------------------------------------------.
915 | Release the memory associated to this symbol. |
916 `-----------------------------------------------*/
918 #if defined (__STDC__) || defined (__cplusplus)
920 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
923 yydestruct (yymsg
, yytype
, yyvaluep
)
929 /* Pacify ``unused variable'' warnings. */
934 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
945 /* Prevent warnings from -Wmissing-prototypes. */
948 # if defined (__STDC__) || defined (__cplusplus)
949 int yyparse (void *YYPARSE_PARAM
);
953 #else /* ! YYPARSE_PARAM */
954 #if defined (__STDC__) || defined (__cplusplus)
959 #endif /* ! YYPARSE_PARAM */
963 /* The look-ahead symbol. */
966 /* The semantic value of the look-ahead symbol. */
969 /* Number of syntax errors so far. */
979 # if defined (__STDC__) || defined (__cplusplus)
980 int yyparse (void *YYPARSE_PARAM
)
982 int yyparse (YYPARSE_PARAM
)
985 #else /* ! YYPARSE_PARAM */
986 #if defined (__STDC__) || defined (__cplusplus)
1000 /* Number of tokens to shift before error messages enabled. */
1002 /* Look-ahead token as an internal (translated) token number. */
1005 /* Three stacks and their tools:
1006 `yyss': related to states,
1007 `yyvs': related to semantic values,
1008 `yyls': related to locations.
1010 Refer to the stacks thru separate pointers, to allow yyoverflow
1011 to reallocate them elsewhere. */
1013 /* The state stack. */
1014 short int yyssa
[YYINITDEPTH
];
1015 short int *yyss
= yyssa
;
1018 /* The semantic value stack. */
1019 YYSTYPE yyvsa
[YYINITDEPTH
];
1020 YYSTYPE
*yyvs
= yyvsa
;
1025 #define YYPOPSTACK (yyvsp--, yyssp--)
1027 YYSIZE_T yystacksize
= YYINITDEPTH
;
1029 /* The variables used to return semantic value and location from the
1034 /* When reducing, the number of symbols on the RHS of the reduced
1038 YYDPRINTF ((stderr
, "Starting parse\n"));
1043 yychar
= YYEMPTY
; /* Cause a token to be read. */
1045 /* Initialize stack pointers.
1046 Waste one element of value and location stack
1047 so that they stay on the same level as the state stack.
1048 The wasted elements are never initialized. */
1055 /*------------------------------------------------------------.
1056 | yynewstate -- Push a new state, which is found in yystate. |
1057 `------------------------------------------------------------*/
1059 /* In all cases, when you get here, the value and location stacks
1060 have just been pushed. so pushing a state here evens the stacks.
1067 if (yyss
+ yystacksize
- 1 <= yyssp
)
1069 /* Get the current used size of the three stacks, in elements. */
1070 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1074 /* Give user a chance to reallocate the stack. Use copies of
1075 these so that the &'s don't force the real ones into
1077 YYSTYPE
*yyvs1
= yyvs
;
1078 short int *yyss1
= yyss
;
1081 /* Each stack pointer address is followed by the size of the
1082 data in use in that stack, in bytes. This used to be a
1083 conditional around just the two extra args, but that might
1084 be undefined if yyoverflow is a macro. */
1085 yyoverflow (YY_("memory exhausted"),
1086 &yyss1
, yysize
* sizeof (*yyssp
),
1087 &yyvs1
, yysize
* sizeof (*yyvsp
),
1094 #else /* no yyoverflow */
1095 # ifndef YYSTACK_RELOCATE
1096 goto yyexhaustedlab
;
1098 /* Extend the stack our own way. */
1099 if (YYMAXDEPTH
<= yystacksize
)
1100 goto yyexhaustedlab
;
1102 if (YYMAXDEPTH
< yystacksize
)
1103 yystacksize
= YYMAXDEPTH
;
1106 short int *yyss1
= yyss
;
1107 union yyalloc
*yyptr
=
1108 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1110 goto yyexhaustedlab
;
1111 YYSTACK_RELOCATE (yyss
);
1112 YYSTACK_RELOCATE (yyvs
);
1114 # undef YYSTACK_RELOCATE
1116 YYSTACK_FREE (yyss1
);
1119 #endif /* no yyoverflow */
1121 yyssp
= yyss
+ yysize
- 1;
1122 yyvsp
= yyvs
+ yysize
- 1;
1125 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1126 (unsigned long int) yystacksize
));
1128 if (yyss
+ yystacksize
- 1 <= yyssp
)
1132 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1141 /* Do appropriate processing given the current state. */
1142 /* Read a look-ahead token if we need one and don't already have one. */
1145 /* First try to decide what to do without reference to look-ahead token. */
1147 yyn
= yypact
[yystate
];
1148 if (yyn
== YYPACT_NINF
)
1151 /* Not known => get a look-ahead token if don't already have one. */
1153 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1154 if (yychar
== YYEMPTY
)
1156 YYDPRINTF ((stderr
, "Reading a token: "));
1160 if (yychar
<= YYEOF
)
1162 yychar
= yytoken
= YYEOF
;
1163 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1167 yytoken
= YYTRANSLATE (yychar
);
1168 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1171 /* If the proper action on seeing token YYTOKEN is to reduce or to
1172 detect an error, take that action. */
1174 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1179 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1188 /* Shift the look-ahead token. */
1189 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1191 /* Discard the token being shifted unless it is eof. */
1192 if (yychar
!= YYEOF
)
1198 /* Count tokens shifted since error; after three, turn off error
1207 /*-----------------------------------------------------------.
1208 | yydefault -- do the default action for the current state. |
1209 `-----------------------------------------------------------*/
1211 yyn
= yydefact
[yystate
];
1217 /*-----------------------------.
1218 | yyreduce -- Do a reduction. |
1219 `-----------------------------*/
1221 /* yyn is the number of a rule to reduce with. */
1224 /* If YYLEN is nonzero, implement the default value of the action:
1227 Otherwise, the following line sets YYVAL to garbage.
1228 This behavior is undocumented and Bison
1229 users should not rely upon it. Assigning to YYVAL
1230 unconditionally makes the parser a bit smaller, and it avoids a
1231 GCC warning that YYVAL may be used uninitialized. */
1232 yyval
= yyvsp
[1-yylen
];
1235 YY_REDUCE_PRINT (yyn
);
1239 #line 72 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1241 new_structure ((yyvsp
[-5].t
)->u
.s
.tag
, UNION_P ((yyvsp
[-5].t
)), &lexer_line
,
1242 (yyvsp
[-2].p
), (yyvsp
[-4].o
));
1243 do_typedef ((yyvsp
[0].s
), (yyvsp
[-5].t
), &lexer_line
);
1244 lexer_toplevel_done
= 1;
1249 #line 79 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1254 #line 81 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1256 new_structure ((yyvsp
[-4].t
)->u
.s
.tag
, UNION_P ((yyvsp
[-4].t
)), &lexer_line
,
1257 (yyvsp
[-1].p
), (yyvsp
[-3].o
));
1258 lexer_toplevel_done
= 1;
1263 #line 87 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1268 #line 91 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1270 note_variable ((yyvsp
[-1].s
), adjust_field_type ((yyvsp
[-2].t
), (yyvsp
[-3].o
)), (yyvsp
[-3].o
),
1276 #line 96 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1278 note_variable ((yyvsp
[-2].s
), create_array ((yyvsp
[-3].t
), (yyvsp
[-1].s
)),
1279 (yyvsp
[-4].o
), &lexer_line
);
1284 #line 101 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1286 note_variable ((yyvsp
[-3].s
), create_array (create_array ((yyvsp
[-4].t
), (yyvsp
[-1].s
)),
1288 (yyvsp
[-5].o
), &lexer_line
);
1293 #line 109 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1295 lexer_toplevel_done
= 1;
1296 (yyval
.t
) = (yyvsp
[0].t
);
1301 #line 121 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1303 note_yacc_type ((yyvsp
[-4].o
), (yyvsp
[-3].p
), (yyvsp
[-1].p
), &lexer_line
);
1308 #line 127 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1309 { (yyval
.p
) = NULL
; ;}
1313 #line 129 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1316 for (p
= (yyvsp
[0].p
); p
->next
!= NULL
; p
= p
->next
)
1323 p
->next
= (yyvsp
[-2].p
);
1324 (yyval
.p
) = (yyvsp
[0].p
);
1329 #line 142 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1332 type_p newtype
= NULL
;
1333 if (strcmp ((yyvsp
[-4].s
), "type") == 0)
1334 newtype
= (type_p
) 1;
1335 for (p
= (yyvsp
[0].p
); p
->next
!= NULL
; p
= p
->next
)
1337 p
->name
= (yyvsp
[-2].s
);
1340 p
->name
= (yyvsp
[-2].s
);
1341 p
->next
= (yyvsp
[-5].p
);
1343 (yyval
.p
) = (yyvsp
[0].p
);
1348 #line 160 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1349 { (yyval
.p
) = NULL
; ;}
1353 #line 162 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1355 pair_p p
= XCNEW (struct pair
);
1356 p
->next
= (yyvsp
[-1].p
);
1357 p
->line
= lexer_line
;
1358 p
->opt
= XNEW (struct options
);
1359 p
->opt
->name
= "tag";
1360 p
->opt
->next
= NULL
;
1361 p
->opt
->info
= (char *)(yyvsp
[0].s
);
1367 #line 173 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1369 pair_p p
= XCNEW (struct pair
);
1370 p
->next
= (yyvsp
[-1].p
);
1371 p
->line
= lexer_line
;
1372 p
->opt
= XNEW (struct options
);
1373 p
->opt
->name
= "tag";
1374 p
->opt
->next
= NULL
;
1375 p
->opt
->info
= xasprintf ("'%s'", (yyvsp
[0].s
));
1381 #line 185 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1382 { (yyval
.p
) = NULL
; ;}
1386 #line 187 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1388 pair_p p
= XNEW (struct pair
);
1389 p
->type
= adjust_field_type ((yyvsp
[-5].t
), (yyvsp
[-4].o
));
1390 p
->opt
= (yyvsp
[-4].o
);
1391 p
->name
= (yyvsp
[-3].s
);
1392 p
->next
= (yyvsp
[0].p
);
1393 p
->line
= lexer_line
;
1399 #line 197 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1401 pair_p p
= XNEW (struct pair
);
1402 p
->type
= adjust_field_type (create_array ((yyvsp
[-5].t
), (yyvsp
[-2].s
)), (yyvsp
[-4].o
));
1403 p
->opt
= (yyvsp
[-4].o
);
1404 p
->name
= (yyvsp
[-3].s
);
1405 p
->next
= (yyvsp
[0].p
);
1406 p
->line
= lexer_line
;
1412 #line 207 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1414 pair_p p
= XNEW (struct pair
);
1415 p
->type
= create_array (create_array ((yyvsp
[-6].t
), (yyvsp
[-2].s
)), (yyvsp
[-3].s
));
1416 p
->opt
= (yyvsp
[-5].o
);
1417 p
->name
= (yyvsp
[-4].s
);
1418 p
->next
= (yyvsp
[0].p
);
1419 p
->line
= lexer_line
;
1425 #line 217 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1426 { (yyval
.p
) = (yyvsp
[0].p
); ;}
1430 #line 225 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1435 #line 229 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1436 { (yyval
.t
) = (yyvsp
[0].t
); ;}
1440 #line 231 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1441 { (yyval
.t
) = resolve_typedef ((yyvsp
[0].s
), &lexer_line
); ;}
1445 #line 233 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1446 { (yyval
.t
) = create_pointer ((yyvsp
[-1].t
)); ;}
1450 #line 235 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1452 new_structure ((yyvsp
[-3].s
), 0, &lexer_line
, (yyvsp
[-1].p
), NULL
);
1453 (yyval
.t
) = find_structure ((yyvsp
[-3].s
), 0);
1458 #line 240 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1459 { (yyval
.t
) = find_structure ((yyvsp
[0].s
), 0); ;}
1463 #line 242 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1465 new_structure ((yyvsp
[-3].s
), 1, &lexer_line
, (yyvsp
[-1].p
), NULL
);
1466 (yyval
.t
) = find_structure ((yyvsp
[-3].s
), 1);
1471 #line 247 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1472 { (yyval
.t
) = find_structure ((yyvsp
[0].s
), 1); ;}
1476 #line 249 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1477 { (yyval
.t
) = create_scalar_type ((yyvsp
[0].s
), strlen ((yyvsp
[0].s
))); ;}
1481 #line 251 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1482 { (yyval
.t
) = create_scalar_type ((yyvsp
[-3].s
), strlen ((yyvsp
[-3].s
))); ;}
1486 #line 256 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1491 #line 258 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1496 #line 260 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1501 #line 263 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1502 { (yyval
.o
) = NULL
; ;}
1506 #line 264 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1507 { (yyval
.o
) = (yyvsp
[0].o
); ;}
1511 #line 268 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1512 { (yyval
.o
) = (yyvsp
[-2].o
); ;}
1516 #line 272 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1517 { (yyval
.s
) = "ptr_alias"; ;}
1521 #line 274 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1522 { (yyval
.s
) = (yyvsp
[0].s
); ;}
1526 #line 278 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1527 { (yyval
.o
) = create_option ((yyvsp
[0].s
), (void *)""); ;}
1531 #line 280 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1532 { (yyval
.o
) = create_option ((yyvsp
[-3].s
), (void *)(yyvsp
[-1].s
)); ;}
1536 #line 282 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1537 { (yyval
.o
) = create_option ((yyvsp
[-3].s
), adjust_field_type ((yyvsp
[-1].t
), NULL
)); ;}
1541 #line 284 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1543 struct nested_ptr_data d
;
1545 d
.type
= adjust_field_type ((yyvsp
[-5].t
), NULL
);
1546 d
.convert_to
= (yyvsp
[-3].s
);
1547 d
.convert_from
= (yyvsp
[-1].s
);
1548 (yyval
.o
) = create_option ("nested_ptr",
1549 xmemdup (&d
, sizeof (d
), sizeof (d
)));
1554 #line 296 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1556 (yyvsp
[0].o
)->next
= NULL
;
1557 (yyval
.o
) = (yyvsp
[0].o
);
1562 #line 301 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1564 (yyvsp
[0].o
)->next
= (yyvsp
[-2].o
);
1565 (yyval
.o
) = (yyvsp
[0].o
);
1570 #line 307 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1571 { (yyval
.o
) = NULL
; ;}
1575 #line 308 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1576 { (yyval
.o
) = (yyvsp
[0].o
); ;}
1580 #line 312 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1581 { (yyval
.s
) = (yyvsp
[0].s
); ;}
1585 #line 314 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1587 size_t l1
= strlen ((yyvsp
[-1].s
));
1588 size_t l2
= strlen ((yyvsp
[0].s
));
1589 char *s
= XRESIZEVEC (char, (yyvsp
[-1].s
), l1
+ l2
+ 1);
1590 memcpy (s
+ l1
, (yyvsp
[0].s
), l2
+ 1);
1591 XDELETE ((yyvsp
[0].s
));
1600 /* Line 1126 of yacc.c. */
1601 #line 1602 "gengtype-yacc.c"
1607 YY_STACK_PRINT (yyss
, yyssp
);
1612 /* Now `shift' the result of the reduction. Determine what state
1613 that goes to, based on the state we popped back to and the rule
1614 number reduced by. */
1618 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
1619 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1620 yystate
= yytable
[yystate
];
1622 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
1627 /*------------------------------------.
1628 | yyerrlab -- here on detecting error |
1629 `------------------------------------*/
1631 /* If not already recovering from an error, report this error. */
1636 yyn
= yypact
[yystate
];
1638 if (YYPACT_NINF
< yyn
&& yyn
< YYLAST
)
1640 int yytype
= YYTRANSLATE (yychar
);
1641 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
1642 YYSIZE_T yysize
= yysize0
;
1644 int yysize_overflow
= 0;
1646 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
1647 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1651 /* This is so xgettext sees the translatable formats that are
1652 constructed on the fly. */
1653 YY_("syntax error, unexpected %s");
1654 YY_("syntax error, unexpected %s, expecting %s");
1655 YY_("syntax error, unexpected %s, expecting %s or %s");
1656 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1657 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1661 static char const yyunexpected
[] = "syntax error, unexpected %s";
1662 static char const yyexpecting
[] = ", expecting %s";
1663 static char const yyor
[] = " or %s";
1664 char yyformat
[sizeof yyunexpected
1665 + sizeof yyexpecting
- 1
1666 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
1667 * (sizeof yyor
- 1))];
1668 char const *yyprefix
= yyexpecting
;
1670 /* Start YYX at -YYN if negative to avoid negative indexes in
1672 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1674 /* Stay within bounds of both yycheck and yytname. */
1675 int yychecklim
= YYLAST
- yyn
;
1676 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1679 yyarg
[0] = yytname
[yytype
];
1680 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
1682 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1683 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1685 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1689 yyformat
[sizeof yyunexpected
- 1] = '\0';
1692 yyarg
[yycount
++] = yytname
[yyx
];
1693 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1694 yysize_overflow
|= yysize1
< yysize
;
1696 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
1700 yyf
= YY_(yyformat
);
1701 yysize1
= yysize
+ yystrlen (yyf
);
1702 yysize_overflow
|= yysize1
< yysize
;
1705 if (!yysize_overflow
&& yysize
<= YYSTACK_ALLOC_MAXIMUM
)
1706 yymsg
= (char *) YYSTACK_ALLOC (yysize
);
1709 /* Avoid sprintf, as that infringes on the user's name space.
1710 Don't have undefined behavior even if the translation
1711 produced a string with the wrong number of "%s"s. */
1714 while ((*yyp
= *yyf
))
1716 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
1718 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1728 YYSTACK_FREE (yymsg
);
1732 yyerror (YY_("syntax error"));
1733 goto yyexhaustedlab
;
1737 #endif /* YYERROR_VERBOSE */
1738 yyerror (YY_("syntax error"));
1743 if (yyerrstatus
== 3)
1745 /* If just tried and failed to reuse look-ahead token after an
1746 error, discard it. */
1748 if (yychar
<= YYEOF
)
1750 /* Return failure if at end of input. */
1751 if (yychar
== YYEOF
)
1756 yydestruct ("Error: discarding", yytoken
, &yylval
);
1761 /* Else will try to reuse look-ahead token after shifting the error
1766 /*---------------------------------------------------.
1767 | yyerrorlab -- error raised explicitly by YYERROR. |
1768 `---------------------------------------------------*/
1771 /* Pacify compilers like GCC when the user code never invokes
1772 YYERROR and the label yyerrorlab therefore never appears in user
1783 /*-------------------------------------------------------------.
1784 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1785 `-------------------------------------------------------------*/
1787 yyerrstatus
= 3; /* Each real token shifted decrements this. */
1791 yyn
= yypact
[yystate
];
1792 if (yyn
!= YYPACT_NINF
)
1795 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
1803 /* Pop the current state because it cannot handle the error token. */
1808 yydestruct ("Error: popping", yystos
[yystate
], yyvsp
);
1811 YY_STACK_PRINT (yyss
, yyssp
);
1820 /* Shift the error token. */
1821 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
1827 /*-------------------------------------.
1828 | yyacceptlab -- YYACCEPT comes here. |
1829 `-------------------------------------*/
1834 /*-----------------------------------.
1835 | yyabortlab -- YYABORT comes here. |
1836 `-----------------------------------*/
1842 /*-------------------------------------------------.
1843 | yyexhaustedlab -- memory exhaustion comes here. |
1844 `-------------------------------------------------*/
1846 yyerror (YY_("memory exhausted"));
1852 if (yychar
!= YYEOF
&& yychar
!= YYEMPTY
)
1853 yydestruct ("Cleanup: discarding lookahead",
1855 while (yyssp
!= yyss
)
1857 yydestruct ("Cleanup: popping",
1858 yystos
[*yyssp
], yyvsp
);
1863 YYSTACK_FREE (yyss
);
1869 #line 323 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"