1/* A Bison parser, made by GNU Bison 2.1.  */
2
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.
5
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)
9   any later version.
10
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.
15
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.  */
20
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.  */
25
26/* Written by Richard Stallman by simplifying the original so called
27   ``semantic'' parser.  */
28
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.  */
35
36/* Identify Bison output.  */
37#define YYBISON 1
38
39/* Bison version.  */
40#define YYBISON_VERSION "2.1"
41
42/* Skeleton name.  */
43#define YYSKELETON_NAME "yacc.c"
44
45/* Pure parsers.  */
46#define YYPURE 0
47
48/* Using locations.  */
49#define YYLSP_NEEDED 0
50
51
52
53/* Tokens.  */
54#ifndef YYTOKENTYPE
55# define YYTOKENTYPE
56   /* Put the tokens into the symbol table, so that GDB and other debuggers
57      know about them.  */
58   enum yytokentype {
59     ENT_TYPEDEF_STRUCT = 258,
60     ENT_STRUCT = 259,
61     ENT_EXTERNSTATIC = 260,
62     ENT_YACCUNION = 261,
63     GTY_TOKEN = 262,
64     UNION = 263,
65     STRUCT = 264,
66     ENUM = 265,
67     ALIAS = 266,
68     NESTED_PTR = 267,
69     PARAM_IS = 268,
70     NUM = 269,
71     PERCENTPERCENT = 270,
72     SCALAR = 271,
73     ID = 272,
74     STRING = 273,
75     ARRAY = 274,
76     PERCENT_ID = 275,
77     CHAR = 276
78   };
79#endif
80/* Tokens.  */
81#define ENT_TYPEDEF_STRUCT 258
82#define ENT_STRUCT 259
83#define ENT_EXTERNSTATIC 260
84#define ENT_YACCUNION 261
85#define GTY_TOKEN 262
86#define UNION 263
87#define STRUCT 264
88#define ENUM 265
89#define ALIAS 266
90#define NESTED_PTR 267
91#define PARAM_IS 268
92#define NUM 269
93#define PERCENTPERCENT 270
94#define SCALAR 271
95#define ID 272
96#define STRING 273
97#define ARRAY 274
98#define PERCENT_ID 275
99#define CHAR 276
100
101
102
103
104/* Copy the first part of user declarations.  */
105#line 22 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
106
107#include "bconfig.h"
108#include "system.h"
109#include "coretypes.h"
110#include "tm.h"
111#include "gengtype.h"
112#define YYERROR_VERBOSE
113
114
115/* Enabling traces.  */
116#ifndef YYDEBUG
117# define YYDEBUG 0
118#endif
119
120/* Enabling verbose error messages.  */
121#ifdef YYERROR_VERBOSE
122# undef YYERROR_VERBOSE
123# define YYERROR_VERBOSE 1
124#else
125# define YYERROR_VERBOSE 0
126#endif
127
128/* Enabling the token table.  */
129#ifndef YYTOKEN_TABLE
130# define YYTOKEN_TABLE 0
131#endif
132
133#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
134#line 31 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
135typedef union YYSTYPE {
136  type_p t;
137  pair_p p;
138  options_p o;
139  const char *s;
140} 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
146#endif
147
148
149
150/* Copy the second part of user declarations.  */
151
152
153/* Line 219 of yacc.c.  */
154#line 155 "gengtype-yacc.c"
155
156#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
157# define YYSIZE_T __SIZE_TYPE__
158#endif
159#if ! defined (YYSIZE_T) && defined (size_t)
160# define YYSIZE_T size_t
161#endif
162#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
163# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
164# define YYSIZE_T size_t
165#endif
166#if ! defined (YYSIZE_T)
167# define YYSIZE_T unsigned int
168#endif
169
170#ifndef YY_
171# if YYENABLE_NLS
172#  if ENABLE_NLS
173#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
174#   define YY_(msgid) dgettext ("bison-runtime", msgid)
175#  endif
176# endif
177# ifndef YY_
178#  define YY_(msgid) msgid
179# endif
180#endif
181
182#if ! defined (yyoverflow) || YYERROR_VERBOSE
183
184/* The parser invokes alloca or malloc; define the necessary symbols.  */
185
186# ifdef YYSTACK_USE_ALLOCA
187#  if YYSTACK_USE_ALLOCA
188#   ifdef __GNUC__
189#    define YYSTACK_ALLOC __builtin_alloca
190#   else
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
195#    endif
196#   endif
197#  endif
198# endif
199
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 */
209#  endif
210# else
211#  define YYSTACK_ALLOC YYMALLOC
212#  define YYSTACK_FREE YYFREE
213#  ifndef YYSTACK_ALLOC_MAXIMUM
214#   define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
215#  endif
216#  ifdef __cplusplus
217extern "C" {
218#  endif
219#  ifndef YYMALLOC
220#   define YYMALLOC malloc
221#   if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
222	&& (defined (__STDC__) || defined (__cplusplus)))
223void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
224#   endif
225#  endif
226#  ifndef YYFREE
227#   define YYFREE free
228#   if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
229	&& (defined (__STDC__) || defined (__cplusplus)))
230void free (void *); /* INFRINGES ON USER NAME SPACE */
231#   endif
232#  endif
233#  ifdef __cplusplus
234}
235#  endif
236# endif
237#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
238
239
240#if (! defined (yyoverflow) \
241     && (! defined (__cplusplus) \
242	 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
243
244/* A type that is properly aligned for any stack member.  */
245union yyalloc
246{
247  short int yyss;
248  YYSTYPE yyvs;
249  };
250
251/* The size of the maximum gap between one aligned stack and the next.  */
252# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
253
254/* The size of an array large to enough to hold all stacks, each with
255   N elements.  */
256# define YYSTACK_BYTES(N) \
257     ((N) * (sizeof (short int) + sizeof (YYSTYPE))			\
258      + YYSTACK_GAP_MAXIMUM)
259
260/* Copy COUNT objects from FROM to TO.  The source and destination do
261   not overlap.  */
262# ifndef YYCOPY
263#  if defined (__GNUC__) && 1 < __GNUC__
264#   define YYCOPY(To, From, Count) \
265      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
266#  else
267#   define YYCOPY(To, From, Count)		\
268      do					\
269	{					\
270	  YYSIZE_T yyi;				\
271	  for (yyi = 0; yyi < (Count); yyi++)	\
272	    (To)[yyi] = (From)[yyi];		\
273	}					\
274      while (0)
275#  endif
276# endif
277
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
282   stack.  */
283# define YYSTACK_RELOCATE(Stack)					\
284    do									\
285      {									\
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);				\
291      }									\
292    while (0)
293
294#endif
295
296#if defined (__STDC__) || defined (__cplusplus)
297   typedef signed char yysigned_char;
298#else
299   typedef short int yysigned_char;
300#endif
301
302/* YYFINAL -- State number of the termination state. */
303#define YYFINAL  14
304/* YYLAST -- Last index in YYTABLE.  */
305#define YYLAST   118
306
307/* YYNTOKENS -- Number of terminals. */
308#define YYNTOKENS  33
309/* YYNNTS -- Number of nonterminals. */
310#define YYNNTS  23
311/* YYNRULES -- Number of rules. */
312#define YYNRULES  59
313/* YYNRULES -- Number of states. */
314#define YYNSTATES  127
315
316/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
317#define YYUNDEFTOK  2
318#define YYMAXUTOK   276
319
320#define YYTRANSLATE(YYX)						\
321  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
322
323/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
324static const unsigned char yytranslate[] =
325{
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
354};
355
356#if YYDEBUG
357/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
358   YYRHS.  */
359static const unsigned char yyprhs[] =
360{
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
367};
368
369/* YYRHS -- A `-1'-separated list of the rules' RHS. */
370static const yysigned_char yyrhs[] =
371{
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
394};
395
396/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
397static const unsigned short int yyrline[] =
398{
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
405};
406#endif
407
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. */
411static const char *const yytname[] =
412{
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",
422  "stringseq", 0
423};
424#endif
425
426# ifdef YYPRINT
427/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
428   token YYLEX-NUM.  */
429static const unsigned short int yytoknum[] =
430{
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,
434      44,    40,    41
435};
436# endif
437
438/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
439static const unsigned char yyr1[] =
440{
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
447};
448
449/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
450static const unsigned char yyr2[] =
451{
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
458};
459
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.  */
463static const unsigned char yydefact[] =
464{
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
478};
479
480/* YYDEFGOTO[NTERM-NUM]. */
481static const yysigned_char yydefgoto[] =
482{
483      -1,     5,     6,    89,    70,     7,    26,    58,     8,    59,
484      99,    28,    82,    62,    29,    74,    40,    10,    46,    47,
485      48,    49,    85
486};
487
488/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
489   STATE-NUM.  */
490#define YYPACT_NINF -98
491static const yysigned_char yypact[] =
492{
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
506};
507
508/* YYPGOTO[NTERM-NUM].  */
509static const yysigned_char yypgoto[] =
510{
511     -98,    64,   -98,   -98,   -98,   -98,   -98,   -45,   -98,   -98,
512     -27,   -19,   -98,    17,   -10,   -70,   -98,     2,   -98,    46,
513     -98,   -98,   -97
514};
515
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
521static const unsigned char yytable[] =
522{
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
535};
536
537static const yysigned_char yycheck[] =
538{
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
551};
552
553/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
554   symbol of state STATE-NUM.  */
555static const unsigned char yystos[] =
556{
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
570};
571
572#define yyerrok		(yyerrstatus = 0)
573#define yyclearin	(yychar = YYEMPTY)
574#define YYEMPTY		(-2)
575#define YYEOF		0
576
577#define YYACCEPT	goto yyacceptlab
578#define YYABORT		goto yyabortlab
579#define YYERROR		goto yyerrorlab
580
581
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.  */
585
586#define YYFAIL		goto yyerrlab
587
588#define YYRECOVERING()  (!!yyerrstatus)
589
590#define YYBACKUP(Token, Value)					\
591do								\
592  if (yychar == YYEMPTY && yylen == 1)				\
593    {								\
594      yychar = (Token);						\
595      yylval = (Value);						\
596      yytoken = YYTRANSLATE (yychar);				\
597      YYPOPSTACK;						\
598      goto yybackup;						\
599    }								\
600  else								\
601    {								\
602      yyerror (YY_("syntax error: cannot back up")); \
603      YYERROR;							\
604    }								\
605while (0)
606
607
608#define YYTERROR	1
609#define YYERRCODE	256
610
611
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).  */
615
616#define YYRHSLOC(Rhs, K) ((Rhs)[K])
617#ifndef YYLLOC_DEFAULT
618# define YYLLOC_DEFAULT(Current, Rhs, N)				\
619    do									\
620      if (N)								\
621	{								\
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;	\
626	}								\
627      else								\
628	{								\
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;				\
633	}								\
634    while (0)
635#endif
636
637
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.  */
641
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)
648# else
649#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
650# endif
651#endif
652
653
654/* YYLEX -- calling `yylex' with the right arguments.  */
655
656#ifdef YYLEX_PARAM
657# define YYLEX yylex (YYLEX_PARAM)
658#else
659# define YYLEX yylex ()
660#endif
661
662/* Enable debugging if requested.  */
663#if YYDEBUG
664
665# ifndef YYFPRINTF
666#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
667#  define YYFPRINTF fprintf
668# endif
669
670# define YYDPRINTF(Args)			\
671do {						\
672  if (yydebug)					\
673    YYFPRINTF Args;				\
674} while (0)
675
676# define YY_SYMBOL_PRINT(Title, Type, Value, Location)		\
677do {								\
678  if (yydebug)							\
679    {								\
680      YYFPRINTF (stderr, "%s ", Title);				\
681      yysymprint (stderr,					\
682                  Type, Value);	\
683      YYFPRINTF (stderr, "\n");					\
684    }								\
685} while (0)
686
687/*------------------------------------------------------------------.
688| yy_stack_print -- Print the state stack from its BOTTOM up to its |
689| TOP (included).                                                   |
690`------------------------------------------------------------------*/
691
692#if defined (__STDC__) || defined (__cplusplus)
693static void
694yy_stack_print (short int *bottom, short int *top)
695#else
696static void
697yy_stack_print (bottom, top)
698    short int *bottom;
699    short int *top;
700#endif
701{
702  YYFPRINTF (stderr, "Stack now");
703  for (/* Nothing. */; bottom <= top; ++bottom)
704    YYFPRINTF (stderr, " %d", *bottom);
705  YYFPRINTF (stderr, "\n");
706}
707
708# define YY_STACK_PRINT(Bottom, Top)				\
709do {								\
710  if (yydebug)							\
711    yy_stack_print ((Bottom), (Top));				\
712} while (0)
713
714
715/*------------------------------------------------.
716| Report that the YYRULE is going to be reduced.  |
717`------------------------------------------------*/
718
719#if defined (__STDC__) || defined (__cplusplus)
720static void
721yy_reduce_print (int yyrule)
722#else
723static void
724yy_reduce_print (yyrule)
725    int yyrule;
726#endif
727{
728  int yyi;
729  unsigned long int yylno = yyrline[yyrule];
730  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
731             yyrule - 1, yylno);
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]]);
736}
737
738# define YY_REDUCE_PRINT(Rule)		\
739do {					\
740  if (yydebug)				\
741    yy_reduce_print (Rule);		\
742} while (0)
743
744/* Nonzero means print parse trace.  It is left uninitialized so that
745   multiple parsers can coexist.  */
746int yydebug;
747#else /* !YYDEBUG */
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 */
753
754
755/* YYINITDEPTH -- initial size of the parser's stacks.  */
756#ifndef	YYINITDEPTH
757# define YYINITDEPTH 200
758#endif
759
760/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
761   if the built-in stack extension method is used).
762
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.  */
766
767#ifndef YYMAXDEPTH
768# define YYMAXDEPTH 10000
769#endif
770
771
772
773#if YYERROR_VERBOSE
774
775# ifndef yystrlen
776#  if defined (__GLIBC__) && defined (_STRING_H)
777#   define yystrlen strlen
778#  else
779/* Return the length of YYSTR.  */
780static YYSIZE_T
781#   if defined (__STDC__) || defined (__cplusplus)
782yystrlen (const char *yystr)
783#   else
784yystrlen (yystr)
785     const char *yystr;
786#   endif
787{
788  const char *yys = yystr;
789
790  while (*yys++ != '\0')
791    continue;
792
793  return yys - yystr - 1;
794}
795#  endif
796# endif
797
798# ifndef yystpcpy
799#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
800#   define yystpcpy stpcpy
801#  else
802/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
803   YYDEST.  */
804static char *
805#   if defined (__STDC__) || defined (__cplusplus)
806yystpcpy (char *yydest, const char *yysrc)
807#   else
808yystpcpy (yydest, yysrc)
809     char *yydest;
810     const char *yysrc;
811#   endif
812{
813  char *yyd = yydest;
814  const char *yys = yysrc;
815
816  while ((*yyd++ = *yys++) != '\0')
817    continue;
818
819  return yyd - 1;
820}
821#  endif
822# endif
823
824# ifndef yytnamerr
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
831   would have been.  */
832static YYSIZE_T
833yytnamerr (char *yyres, const char *yystr)
834{
835  if (*yystr == '"')
836    {
837      size_t yyn = 0;
838      char const *yyp = yystr;
839
840      for (;;)
841	switch (*++yyp)
842	  {
843	  case '\'':
844	  case ',':
845	    goto do_not_strip_quotes;
846
847	  case '\\':
848	    if (*++yyp != '\\')
849	      goto do_not_strip_quotes;
850	    /* Fall through.  */
851	  default:
852	    if (yyres)
853	      yyres[yyn] = *yyp;
854	    yyn++;
855	    break;
856
857	  case '"':
858	    if (yyres)
859	      yyres[yyn] = '\0';
860	    return yyn;
861	  }
862    do_not_strip_quotes: ;
863    }
864
865  if (! yyres)
866    return yystrlen (yystr);
867
868  return yystpcpy (yyres, yystr) - yyres;
869}
870# endif
871
872#endif /* YYERROR_VERBOSE */
873
874
875
876#if YYDEBUG
877/*--------------------------------.
878| Print this symbol on YYOUTPUT.  |
879`--------------------------------*/
880
881#if defined (__STDC__) || defined (__cplusplus)
882static void
883yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
884#else
885static void
886yysymprint (yyoutput, yytype, yyvaluep)
887    FILE *yyoutput;
888    int yytype;
889    YYSTYPE *yyvaluep;
890#endif
891{
892  /* Pacify ``unused variable'' warnings.  */
893  (void) yyvaluep;
894
895  if (yytype < YYNTOKENS)
896    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
897  else
898    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
899
900
901# ifdef YYPRINT
902  if (yytype < YYNTOKENS)
903    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
904# endif
905  switch (yytype)
906    {
907      default:
908        break;
909    }
910  YYFPRINTF (yyoutput, ")");
911}
912
913#endif /* ! YYDEBUG */
914/*-----------------------------------------------.
915| Release the memory associated to this symbol.  |
916`-----------------------------------------------*/
917
918#if defined (__STDC__) || defined (__cplusplus)
919static void
920yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
921#else
922static void
923yydestruct (yymsg, yytype, yyvaluep)
924    const char *yymsg;
925    int yytype;
926    YYSTYPE *yyvaluep;
927#endif
928{
929  /* Pacify ``unused variable'' warnings.  */
930  (void) yyvaluep;
931
932  if (!yymsg)
933    yymsg = "Deleting";
934  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
935
936  switch (yytype)
937    {
938
939      default:
940        break;
941    }
942}
943
944
945/* Prevent warnings from -Wmissing-prototypes.  */
946
947#ifdef YYPARSE_PARAM
948# if defined (__STDC__) || defined (__cplusplus)
949int yyparse (void *YYPARSE_PARAM);
950# else
951int yyparse ();
952# endif
953#else /* ! YYPARSE_PARAM */
954#if defined (__STDC__) || defined (__cplusplus)
955int yyparse (void);
956#else
957int yyparse ();
958#endif
959#endif /* ! YYPARSE_PARAM */
960
961
962
963/* The look-ahead symbol.  */
964int yychar;
965
966/* The semantic value of the look-ahead symbol.  */
967YYSTYPE yylval;
968
969/* Number of syntax errors so far.  */
970int yynerrs;
971
972
973
974/*----------.
975| yyparse.  |
976`----------*/
977
978#ifdef YYPARSE_PARAM
979# if defined (__STDC__) || defined (__cplusplus)
980int yyparse (void *YYPARSE_PARAM)
981# else
982int yyparse (YYPARSE_PARAM)
983  void *YYPARSE_PARAM;
984# endif
985#else /* ! YYPARSE_PARAM */
986#if defined (__STDC__) || defined (__cplusplus)
987int
988yyparse (void)
989#else
990int
991yyparse ()
992    ;
993#endif
994#endif
995{
996
997  int yystate;
998  int yyn;
999  int yyresult;
1000  /* Number of tokens to shift before error messages enabled.  */
1001  int yyerrstatus;
1002  /* Look-ahead token as an internal (translated) token number.  */
1003  int yytoken = 0;
1004
1005  /* Three stacks and their tools:
1006     `yyss': related to states,
1007     `yyvs': related to semantic values,
1008     `yyls': related to locations.
1009
1010     Refer to the stacks thru separate pointers, to allow yyoverflow
1011     to reallocate them elsewhere.  */
1012
1013  /* The state stack.  */
1014  short int yyssa[YYINITDEPTH];
1015  short int *yyss = yyssa;
1016  short int *yyssp;
1017
1018  /* The semantic value stack.  */
1019  YYSTYPE yyvsa[YYINITDEPTH];
1020  YYSTYPE *yyvs = yyvsa;
1021  YYSTYPE *yyvsp;
1022
1023
1024
1025#define YYPOPSTACK   (yyvsp--, yyssp--)
1026
1027  YYSIZE_T yystacksize = YYINITDEPTH;
1028
1029  /* The variables used to return semantic value and location from the
1030     action routines.  */
1031  YYSTYPE yyval;
1032
1033
1034  /* When reducing, the number of symbols on the RHS of the reduced
1035     rule.  */
1036  int yylen;
1037
1038  YYDPRINTF ((stderr, "Starting parse\n"));
1039
1040  yystate = 0;
1041  yyerrstatus = 0;
1042  yynerrs = 0;
1043  yychar = YYEMPTY;		/* Cause a token to be read.  */
1044
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.  */
1049
1050  yyssp = yyss;
1051  yyvsp = yyvs;
1052
1053  goto yysetstate;
1054
1055/*------------------------------------------------------------.
1056| yynewstate -- Push a new state, which is found in yystate.  |
1057`------------------------------------------------------------*/
1058 yynewstate:
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.
1061     */
1062  yyssp++;
1063
1064 yysetstate:
1065  *yyssp = yystate;
1066
1067  if (yyss + yystacksize - 1 <= yyssp)
1068    {
1069      /* Get the current used size of the three stacks, in elements.  */
1070      YYSIZE_T yysize = yyssp - yyss + 1;
1071
1072#ifdef yyoverflow
1073      {
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
1076	   memory.  */
1077	YYSTYPE *yyvs1 = yyvs;
1078	short int *yyss1 = yyss;
1079
1080
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),
1088
1089		    &yystacksize);
1090
1091	yyss = yyss1;
1092	yyvs = yyvs1;
1093      }
1094#else /* no yyoverflow */
1095# ifndef YYSTACK_RELOCATE
1096      goto yyexhaustedlab;
1097# else
1098      /* Extend the stack our own way.  */
1099      if (YYMAXDEPTH <= yystacksize)
1100	goto yyexhaustedlab;
1101      yystacksize *= 2;
1102      if (YYMAXDEPTH < yystacksize)
1103	yystacksize = YYMAXDEPTH;
1104
1105      {
1106	short int *yyss1 = yyss;
1107	union yyalloc *yyptr =
1108	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1109	if (! yyptr)
1110	  goto yyexhaustedlab;
1111	YYSTACK_RELOCATE (yyss);
1112	YYSTACK_RELOCATE (yyvs);
1113
1114#  undef YYSTACK_RELOCATE
1115	if (yyss1 != yyssa)
1116	  YYSTACK_FREE (yyss1);
1117      }
1118# endif
1119#endif /* no yyoverflow */
1120
1121      yyssp = yyss + yysize - 1;
1122      yyvsp = yyvs + yysize - 1;
1123
1124
1125      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1126		  (unsigned long int) yystacksize));
1127
1128      if (yyss + yystacksize - 1 <= yyssp)
1129	YYABORT;
1130    }
1131
1132  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1133
1134  goto yybackup;
1135
1136/*-----------.
1137| yybackup.  |
1138`-----------*/
1139yybackup:
1140
1141/* Do appropriate processing given the current state.  */
1142/* Read a look-ahead token if we need one and don't already have one.  */
1143/* yyresume: */
1144
1145  /* First try to decide what to do without reference to look-ahead token.  */
1146
1147  yyn = yypact[yystate];
1148  if (yyn == YYPACT_NINF)
1149    goto yydefault;
1150
1151  /* Not known => get a look-ahead token if don't already have one.  */
1152
1153  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
1154  if (yychar == YYEMPTY)
1155    {
1156      YYDPRINTF ((stderr, "Reading a token: "));
1157      yychar = YYLEX;
1158    }
1159
1160  if (yychar <= YYEOF)
1161    {
1162      yychar = yytoken = YYEOF;
1163      YYDPRINTF ((stderr, "Now at end of input.\n"));
1164    }
1165  else
1166    {
1167      yytoken = YYTRANSLATE (yychar);
1168      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1169    }
1170
1171  /* If the proper action on seeing token YYTOKEN is to reduce or to
1172     detect an error, take that action.  */
1173  yyn += yytoken;
1174  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1175    goto yydefault;
1176  yyn = yytable[yyn];
1177  if (yyn <= 0)
1178    {
1179      if (yyn == 0 || yyn == YYTABLE_NINF)
1180	goto yyerrlab;
1181      yyn = -yyn;
1182      goto yyreduce;
1183    }
1184
1185  if (yyn == YYFINAL)
1186    YYACCEPT;
1187
1188  /* Shift the look-ahead token.  */
1189  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1190
1191  /* Discard the token being shifted unless it is eof.  */
1192  if (yychar != YYEOF)
1193    yychar = YYEMPTY;
1194
1195  *++yyvsp = yylval;
1196
1197
1198  /* Count tokens shifted since error; after three, turn off error
1199     status.  */
1200  if (yyerrstatus)
1201    yyerrstatus--;
1202
1203  yystate = yyn;
1204  goto yynewstate;
1205
1206
1207/*-----------------------------------------------------------.
1208| yydefault -- do the default action for the current state.  |
1209`-----------------------------------------------------------*/
1210yydefault:
1211  yyn = yydefact[yystate];
1212  if (yyn == 0)
1213    goto yyerrlab;
1214  goto yyreduce;
1215
1216
1217/*-----------------------------.
1218| yyreduce -- Do a reduction.  |
1219`-----------------------------*/
1220yyreduce:
1221  /* yyn is the number of a rule to reduce with.  */
1222  yylen = yyr2[yyn];
1223
1224  /* If YYLEN is nonzero, implement the default value of the action:
1225     `$$ = $1'.
1226
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];
1233
1234
1235  YY_REDUCE_PRINT (yyn);
1236  switch (yyn)
1237    {
1238        case 6:
1239#line 72 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1240    {
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;
1245		   ;}
1246    break;
1247
1248  case 7:
1249#line 79 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1250    {;}
1251    break;
1252
1253  case 8:
1254#line 81 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1255    {
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;
1259		   ;}
1260    break;
1261
1262  case 9:
1263#line 87 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1264    {;}
1265    break;
1266
1267  case 10:
1268#line 91 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1269    {
1270	           note_variable ((yyvsp[-1].s), adjust_field_type ((yyvsp[-2].t), (yyvsp[-3].o)), (yyvsp[-3].o),
1271				  &lexer_line);
1272	         ;}
1273    break;
1274
1275  case 11:
1276#line 96 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1277    {
1278	           note_variable ((yyvsp[-2].s), create_array ((yyvsp[-3].t), (yyvsp[-1].s)),
1279	      		    (yyvsp[-4].o), &lexer_line);
1280	         ;}
1281    break;
1282
1283  case 12:
1284#line 101 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1285    {
1286	           note_variable ((yyvsp[-3].s), create_array (create_array ((yyvsp[-4].t), (yyvsp[-1].s)),
1287	      				      (yyvsp[-2].s)),
1288	      		    (yyvsp[-5].o), &lexer_line);
1289	         ;}
1290    break;
1291
1292  case 13:
1293#line 109 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1294    {
1295	      lexer_toplevel_done = 1;
1296	      (yyval.t) = (yyvsp[0].t);
1297	    ;}
1298    break;
1299
1300  case 16:
1301#line 121 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1302    {
1303	        note_yacc_type ((yyvsp[-4].o), (yyvsp[-3].p), (yyvsp[-1].p), &lexer_line);
1304	      ;}
1305    break;
1306
1307  case 17:
1308#line 127 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1309    { (yyval.p) = NULL; ;}
1310    break;
1311
1312  case 18:
1313#line 129 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1314    {
1315		     pair_p p;
1316		     for (p = (yyvsp[0].p); p->next != NULL; p = p->next)
1317		       {
1318		         p->name = NULL;
1319			 p->type = NULL;
1320		       }
1321		     p->name = NULL;
1322		     p->type = NULL;
1323		     p->next = (yyvsp[-2].p);
1324		     (yyval.p) = (yyvsp[0].p);
1325		   ;}
1326    break;
1327
1328  case 19:
1329#line 142 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1330    {
1331		     pair_p p;
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)
1336		       {
1337		         p->name = (yyvsp[-2].s);
1338		         p->type = newtype;
1339		       }
1340		     p->name = (yyvsp[-2].s);
1341		     p->next = (yyvsp[-5].p);
1342		     p->type = newtype;
1343		     (yyval.p) = (yyvsp[0].p);
1344		   ;}
1345    break;
1346
1347  case 20:
1348#line 160 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1349    { (yyval.p) = NULL; ;}
1350    break;
1351
1352  case 21:
1353#line 162 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1354    {
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);
1362	  (yyval.p) = p;
1363	;}
1364    break;
1365
1366  case 22:
1367#line 173 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1368    {
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));
1376	  (yyval.p) = p;
1377	;}
1378    break;
1379
1380  case 23:
1381#line 185 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1382    { (yyval.p) = NULL; ;}
1383    break;
1384
1385  case 24:
1386#line 187 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1387    {
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;
1394		    (yyval.p) = p;
1395		  ;}
1396    break;
1397
1398  case 25:
1399#line 197 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1400    {
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;
1407		    (yyval.p) = p;
1408		  ;}
1409    break;
1410
1411  case 26:
1412#line 207 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1413    {
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;
1420		    (yyval.p) = p;
1421		  ;}
1422    break;
1423
1424  case 27:
1425#line 217 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1426    { (yyval.p) = (yyvsp[0].p); ;}
1427    break;
1428
1429  case 31:
1430#line 225 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1431    { ;}
1432    break;
1433
1434  case 32:
1435#line 229 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1436    { (yyval.t) = (yyvsp[0].t); ;}
1437    break;
1438
1439  case 33:
1440#line 231 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1441    { (yyval.t) = resolve_typedef ((yyvsp[0].s), &lexer_line); ;}
1442    break;
1443
1444  case 34:
1445#line 233 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1446    { (yyval.t) = create_pointer ((yyvsp[-1].t)); ;}
1447    break;
1448
1449  case 35:
1450#line 235 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1451    {
1452	   new_structure ((yyvsp[-3].s), 0, &lexer_line, (yyvsp[-1].p), NULL);
1453           (yyval.t) = find_structure ((yyvsp[-3].s), 0);
1454	 ;}
1455    break;
1456
1457  case 36:
1458#line 240 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1459    { (yyval.t) = find_structure ((yyvsp[0].s), 0); ;}
1460    break;
1461
1462  case 37:
1463#line 242 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1464    {
1465	   new_structure ((yyvsp[-3].s), 1, &lexer_line, (yyvsp[-1].p), NULL);
1466           (yyval.t) = find_structure ((yyvsp[-3].s), 1);
1467	 ;}
1468    break;
1469
1470  case 38:
1471#line 247 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1472    { (yyval.t) = find_structure ((yyvsp[0].s), 1); ;}
1473    break;
1474
1475  case 39:
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))); ;}
1478    break;
1479
1480  case 40:
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))); ;}
1483    break;
1484
1485  case 42:
1486#line 256 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1487    { ;}
1488    break;
1489
1490  case 43:
1491#line 258 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1492    { ;}
1493    break;
1494
1495  case 44:
1496#line 260 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1497    { ;}
1498    break;
1499
1500  case 45:
1501#line 263 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1502    { (yyval.o) = NULL; ;}
1503    break;
1504
1505  case 46:
1506#line 264 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1507    { (yyval.o) = (yyvsp[0].o); ;}
1508    break;
1509
1510  case 47:
1511#line 268 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1512    { (yyval.o) = (yyvsp[-2].o); ;}
1513    break;
1514
1515  case 48:
1516#line 272 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1517    { (yyval.s) = "ptr_alias"; ;}
1518    break;
1519
1520  case 49:
1521#line 274 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1522    { (yyval.s) = (yyvsp[0].s); ;}
1523    break;
1524
1525  case 50:
1526#line 278 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1527    { (yyval.o) = create_option ((yyvsp[0].s), (void *)""); ;}
1528    break;
1529
1530  case 51:
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)); ;}
1533    break;
1534
1535  case 52:
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)); ;}
1538    break;
1539
1540  case 53:
1541#line 284 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1542    {
1543	      struct nested_ptr_data d;
1544
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)));
1550	    ;}
1551    break;
1552
1553  case 54:
1554#line 296 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1555    {
1556	        (yyvsp[0].o)->next = NULL;
1557		(yyval.o) = (yyvsp[0].o);
1558	      ;}
1559    break;
1560
1561  case 55:
1562#line 301 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1563    {
1564	        (yyvsp[0].o)->next = (yyvsp[-2].o);
1565		(yyval.o) = (yyvsp[0].o);
1566	      ;}
1567    break;
1568
1569  case 56:
1570#line 307 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1571    { (yyval.o) = NULL; ;}
1572    break;
1573
1574  case 57:
1575#line 308 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1576    { (yyval.o) = (yyvsp[0].o); ;}
1577    break;
1578
1579  case 58:
1580#line 312 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1581    { (yyval.s) = (yyvsp[0].s); ;}
1582    break;
1583
1584  case 59:
1585#line 314 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1586    {
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));
1592	       (yyval.s) = s;
1593	     ;}
1594    break;
1595
1596
1597      default: break;
1598    }
1599
1600/* Line 1126 of yacc.c.  */
1601#line 1602 "gengtype-yacc.c"
1602
1603  yyvsp -= yylen;
1604  yyssp -= yylen;
1605
1606
1607  YY_STACK_PRINT (yyss, yyssp);
1608
1609  *++yyvsp = yyval;
1610
1611
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.  */
1615
1616  yyn = yyr1[yyn];
1617
1618  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1619  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1620    yystate = yytable[yystate];
1621  else
1622    yystate = yydefgoto[yyn - YYNTOKENS];
1623
1624  goto yynewstate;
1625
1626
1627/*------------------------------------.
1628| yyerrlab -- here on detecting error |
1629`------------------------------------*/
1630yyerrlab:
1631  /* If not already recovering from an error, report this error.  */
1632  if (!yyerrstatus)
1633    {
1634      ++yynerrs;
1635#if YYERROR_VERBOSE
1636      yyn = yypact[yystate];
1637
1638      if (YYPACT_NINF < yyn && yyn < YYLAST)
1639	{
1640	  int yytype = YYTRANSLATE (yychar);
1641	  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1642	  YYSIZE_T yysize = yysize0;
1643	  YYSIZE_T yysize1;
1644	  int yysize_overflow = 0;
1645	  char *yymsg = 0;
1646#	  define YYERROR_VERBOSE_ARGS_MAXIMUM 5
1647	  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1648	  int yyx;
1649
1650#if 0
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");
1658#endif
1659	  char *yyfmt;
1660	  char const *yyf;
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;
1669
1670	  /* Start YYX at -YYN if negative to avoid negative indexes in
1671	     YYCHECK.  */
1672	  int yyxbegin = yyn < 0 ? -yyn : 0;
1673
1674	  /* Stay within bounds of both yycheck and yytname.  */
1675	  int yychecklim = YYLAST - yyn;
1676	  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1677	  int yycount = 1;
1678
1679	  yyarg[0] = yytname[yytype];
1680	  yyfmt = yystpcpy (yyformat, yyunexpected);
1681
1682	  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1683	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1684	      {
1685		if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1686		  {
1687		    yycount = 1;
1688		    yysize = yysize0;
1689		    yyformat[sizeof yyunexpected - 1] = '\0';
1690		    break;
1691		  }
1692		yyarg[yycount++] = yytname[yyx];
1693		yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1694		yysize_overflow |= yysize1 < yysize;
1695		yysize = yysize1;
1696		yyfmt = yystpcpy (yyfmt, yyprefix);
1697		yyprefix = yyor;
1698	      }
1699
1700	  yyf = YY_(yyformat);
1701	  yysize1 = yysize + yystrlen (yyf);
1702	  yysize_overflow |= yysize1 < yysize;
1703	  yysize = yysize1;
1704
1705	  if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
1706	    yymsg = (char *) YYSTACK_ALLOC (yysize);
1707	  if (yymsg)
1708	    {
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.  */
1712	      char *yyp = yymsg;
1713	      int yyi = 0;
1714	      while ((*yyp = *yyf))
1715		{
1716		  if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1717		    {
1718		      yyp += yytnamerr (yyp, yyarg[yyi++]);
1719		      yyf += 2;
1720		    }
1721		  else
1722		    {
1723		      yyp++;
1724		      yyf++;
1725		    }
1726		}
1727	      yyerror (yymsg);
1728	      YYSTACK_FREE (yymsg);
1729	    }
1730	  else
1731	    {
1732	      yyerror (YY_("syntax error"));
1733	      goto yyexhaustedlab;
1734	    }
1735	}
1736      else
1737#endif /* YYERROR_VERBOSE */
1738	yyerror (YY_("syntax error"));
1739    }
1740
1741
1742
1743  if (yyerrstatus == 3)
1744    {
1745      /* If just tried and failed to reuse look-ahead token after an
1746	 error, discard it.  */
1747
1748      if (yychar <= YYEOF)
1749        {
1750	  /* Return failure if at end of input.  */
1751	  if (yychar == YYEOF)
1752	    YYABORT;
1753        }
1754      else
1755	{
1756	  yydestruct ("Error: discarding", yytoken, &yylval);
1757	  yychar = YYEMPTY;
1758	}
1759    }
1760
1761  /* Else will try to reuse look-ahead token after shifting the error
1762     token.  */
1763  goto yyerrlab1;
1764
1765
1766/*---------------------------------------------------.
1767| yyerrorlab -- error raised explicitly by YYERROR.  |
1768`---------------------------------------------------*/
1769yyerrorlab:
1770
1771  /* Pacify compilers like GCC when the user code never invokes
1772     YYERROR and the label yyerrorlab therefore never appears in user
1773     code.  */
1774  if (0)
1775     goto yyerrorlab;
1776
1777yyvsp -= yylen;
1778  yyssp -= yylen;
1779  yystate = *yyssp;
1780  goto yyerrlab1;
1781
1782
1783/*-------------------------------------------------------------.
1784| yyerrlab1 -- common code for both syntax error and YYERROR.  |
1785`-------------------------------------------------------------*/
1786yyerrlab1:
1787  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
1788
1789  for (;;)
1790    {
1791      yyn = yypact[yystate];
1792      if (yyn != YYPACT_NINF)
1793	{
1794	  yyn += YYTERROR;
1795	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1796	    {
1797	      yyn = yytable[yyn];
1798	      if (0 < yyn)
1799		break;
1800	    }
1801	}
1802
1803      /* Pop the current state because it cannot handle the error token.  */
1804      if (yyssp == yyss)
1805	YYABORT;
1806
1807
1808      yydestruct ("Error: popping", yystos[yystate], yyvsp);
1809      YYPOPSTACK;
1810      yystate = *yyssp;
1811      YY_STACK_PRINT (yyss, yyssp);
1812    }
1813
1814  if (yyn == YYFINAL)
1815    YYACCEPT;
1816
1817  *++yyvsp = yylval;
1818
1819
1820  /* Shift the error token. */
1821  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1822
1823  yystate = yyn;
1824  goto yynewstate;
1825
1826
1827/*-------------------------------------.
1828| yyacceptlab -- YYACCEPT comes here.  |
1829`-------------------------------------*/
1830yyacceptlab:
1831  yyresult = 0;
1832  goto yyreturn;
1833
1834/*-----------------------------------.
1835| yyabortlab -- YYABORT comes here.  |
1836`-----------------------------------*/
1837yyabortlab:
1838  yyresult = 1;
1839  goto yyreturn;
1840
1841#ifndef yyoverflow
1842/*-------------------------------------------------.
1843| yyexhaustedlab -- memory exhaustion comes here.  |
1844`-------------------------------------------------*/
1845yyexhaustedlab:
1846  yyerror (YY_("memory exhausted"));
1847  yyresult = 2;
1848  /* Fall through.  */
1849#endif
1850
1851yyreturn:
1852  if (yychar != YYEOF && yychar != YYEMPTY)
1853     yydestruct ("Cleanup: discarding lookahead",
1854		 yytoken, &yylval);
1855  while (yyssp != yyss)
1856    {
1857      yydestruct ("Cleanup: popping",
1858		  yystos[*yyssp], yyvsp);
1859      YYPOPSTACK;
1860    }
1861#ifndef yyoverflow
1862  if (yyss != yyssa)
1863    YYSTACK_FREE (yyss);
1864#endif
1865  return yyresult;
1866}
1867
1868
1869#line 323 "/usr/src/tools/gcc/../../gnu/dist/gcc4/gcc/gengtype-yacc.y"
1870
1871
1872