• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/* A Bison parser, made by GNU Bison 2.3.  */
2
3/* Skeleton implementation for Bison's Yacc-like parsers in C
4
5   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6   Free Software Foundation, Inc.
7
8   This program is free software; you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation; either version 2, or (at your option)
11   any later version.
12
13   This program is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18   You should have received a copy of the GNU General Public License
19   along with this program; if not, write to the Free Software
20   Foundation, Inc., 51 Franklin Street, Fifth Floor,
21   Boston, MA 02110-1301, USA.  */
22
23/* As a special exception, you may create a larger work that contains
24   part or all of the Bison parser skeleton and distribute that work
25   under terms of your choice, so long as that work isn't itself a
26   parser generator using the skeleton or a modified version thereof
27   as a parser skeleton.  Alternatively, if you modify or redistribute
28   the parser skeleton itself, you may (at your option) remove this
29   special exception, which will cause the skeleton and the resulting
30   Bison output files to be licensed under the GNU General Public
31   License without this special exception.
32
33   This special exception was added by the Free Software Foundation in
34   version 2.2 of Bison.  */
35
36/* C LALR(1) parser skeleton written by Richard Stallman, by
37   simplifying the original so-called "semantic" parser.  */
38
39/* All symbols defined below should begin with yy or YY, to avoid
40   infringing on user name space.  This should be done even for local
41   variables, as they might otherwise be expanded by user macros.
42   There are some unavoidable exceptions within include files to
43   define necessary library symbols; they are noted "INFRINGES ON
44   USER NAME SPACE" below.  */
45
46/* Identify Bison output.  */
47#define YYBISON 1
48
49/* Bison version.  */
50#define YYBISON_VERSION "2.3"
51
52/* Skeleton name.  */
53#define YYSKELETON_NAME "yacc.c"
54
55/* Pure parsers.  */
56#define YYPURE 0
57
58/* Using locations.  */
59#define YYLSP_NEEDED 0
60
61
62
63/* Tokens.  */
64#ifndef YYTOKENTYPE
65# define YYTOKENTYPE
66   /* Put the tokens into the symbol table, so that GDB and other debuggers
67      know about them.  */
68   enum yytokentype {
69     ASM_KEYW = 258,
70     ATTRIBUTE_KEYW = 259,
71     AUTO_KEYW = 260,
72     BOOL_KEYW = 261,
73     CHAR_KEYW = 262,
74     CONST_KEYW = 263,
75     DOUBLE_KEYW = 264,
76     ENUM_KEYW = 265,
77     EXTERN_KEYW = 266,
78     EXTENSION_KEYW = 267,
79     FLOAT_KEYW = 268,
80     INLINE_KEYW = 269,
81     INT_KEYW = 270,
82     LONG_KEYW = 271,
83     REGISTER_KEYW = 272,
84     RESTRICT_KEYW = 273,
85     SHORT_KEYW = 274,
86     SIGNED_KEYW = 275,
87     STATIC_KEYW = 276,
88     STRUCT_KEYW = 277,
89     TYPEDEF_KEYW = 278,
90     UNION_KEYW = 279,
91     UNSIGNED_KEYW = 280,
92     VOID_KEYW = 281,
93     VOLATILE_KEYW = 282,
94     TYPEOF_KEYW = 283,
95     EXPORT_SYMBOL_KEYW = 284,
96     ASM_PHRASE = 285,
97     ATTRIBUTE_PHRASE = 286,
98     BRACE_PHRASE = 287,
99     BRACKET_PHRASE = 288,
100     EXPRESSION_PHRASE = 289,
101     CHAR = 290,
102     DOTS = 291,
103     IDENT = 292,
104     INT = 293,
105     REAL = 294,
106     STRING = 295,
107     TYPE = 296,
108     OTHER = 297,
109     FILENAME = 298
110   };
111#endif
112/* Tokens.  */
113#define ASM_KEYW 258
114#define ATTRIBUTE_KEYW 259
115#define AUTO_KEYW 260
116#define BOOL_KEYW 261
117#define CHAR_KEYW 262
118#define CONST_KEYW 263
119#define DOUBLE_KEYW 264
120#define ENUM_KEYW 265
121#define EXTERN_KEYW 266
122#define EXTENSION_KEYW 267
123#define FLOAT_KEYW 268
124#define INLINE_KEYW 269
125#define INT_KEYW 270
126#define LONG_KEYW 271
127#define REGISTER_KEYW 272
128#define RESTRICT_KEYW 273
129#define SHORT_KEYW 274
130#define SIGNED_KEYW 275
131#define STATIC_KEYW 276
132#define STRUCT_KEYW 277
133#define TYPEDEF_KEYW 278
134#define UNION_KEYW 279
135#define UNSIGNED_KEYW 280
136#define VOID_KEYW 281
137#define VOLATILE_KEYW 282
138#define TYPEOF_KEYW 283
139#define EXPORT_SYMBOL_KEYW 284
140#define ASM_PHRASE 285
141#define ATTRIBUTE_PHRASE 286
142#define BRACE_PHRASE 287
143#define BRACKET_PHRASE 288
144#define EXPRESSION_PHRASE 289
145#define CHAR 290
146#define DOTS 291
147#define IDENT 292
148#define INT 293
149#define REAL 294
150#define STRING 295
151#define TYPE 296
152#define OTHER 297
153#define FILENAME 298
154
155
156
157
158/* Copy the first part of user declarations.  */
159#line 24 "scripts/genksyms/parse.y"
160
161
162#include <assert.h>
163#include <malloc.h>
164#include "genksyms.h"
165
166static int is_typedef;
167static int is_extern;
168static char *current_name;
169static struct string_list *decl_spec;
170
171static void yyerror(const char *);
172
173static inline void
174remove_node(struct string_list **p)
175{
176  struct string_list *node = *p;
177  *p = node->next;
178  free_node(node);
179}
180
181static inline void
182remove_list(struct string_list **pb, struct string_list **pe)
183{
184  struct string_list *b = *pb, *e = *pe;
185  *pb = e;
186  free_list(b, e);
187}
188
189
190
191/* Enabling traces.  */
192#ifndef YYDEBUG
193# define YYDEBUG 1
194#endif
195
196/* Enabling verbose error messages.  */
197#ifdef YYERROR_VERBOSE
198# undef YYERROR_VERBOSE
199# define YYERROR_VERBOSE 1
200#else
201# define YYERROR_VERBOSE 0
202#endif
203
204/* Enabling the token table.  */
205#ifndef YYTOKEN_TABLE
206# define YYTOKEN_TABLE 0
207#endif
208
209#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
210typedef int YYSTYPE;
211# define yystype YYSTYPE /* obsolescent; will be withdrawn */
212# define YYSTYPE_IS_DECLARED 1
213# define YYSTYPE_IS_TRIVIAL 1
214#endif
215
216
217
218/* Copy the second part of user declarations.  */
219
220
221/* Line 216 of yacc.c.  */
222#line 223 "scripts/genksyms/parse.c"
223
224#ifdef short
225# undef short
226#endif
227
228#ifdef YYTYPE_UINT8
229typedef YYTYPE_UINT8 yytype_uint8;
230#else
231typedef unsigned char yytype_uint8;
232#endif
233
234#ifdef YYTYPE_INT8
235typedef YYTYPE_INT8 yytype_int8;
236#elif (defined __STDC__ || defined __C99__FUNC__ \
237     || defined __cplusplus || defined _MSC_VER)
238typedef signed char yytype_int8;
239#else
240typedef short int yytype_int8;
241#endif
242
243#ifdef YYTYPE_UINT16
244typedef YYTYPE_UINT16 yytype_uint16;
245#else
246typedef unsigned short int yytype_uint16;
247#endif
248
249#ifdef YYTYPE_INT16
250typedef YYTYPE_INT16 yytype_int16;
251#else
252typedef short int yytype_int16;
253#endif
254
255#ifndef YYSIZE_T
256# ifdef __SIZE_TYPE__
257#  define YYSIZE_T __SIZE_TYPE__
258# elif defined size_t
259#  define YYSIZE_T size_t
260# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
261     || defined __cplusplus || defined _MSC_VER)
262#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
263#  define YYSIZE_T size_t
264# else
265#  define YYSIZE_T unsigned int
266# endif
267#endif
268
269#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
270
271#ifndef YY_
272# if YYENABLE_NLS
273#  if ENABLE_NLS
274#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
275#   define YY_(msgid) dgettext ("bison-runtime", msgid)
276#  endif
277# endif
278# ifndef YY_
279#  define YY_(msgid) msgid
280# endif
281#endif
282
283/* Suppress unused-variable warnings by "using" E.  */
284#if ! defined lint || defined __GNUC__
285# define YYUSE(e) ((void) (e))
286#else
287# define YYUSE(e) /* empty */
288#endif
289
290/* Identity function, used to suppress warnings about constant conditions.  */
291#ifndef lint
292# define YYID(n) (n)
293#else
294#if (defined __STDC__ || defined __C99__FUNC__ \
295     || defined __cplusplus || defined _MSC_VER)
296static int
297YYID (int i)
298#else
299static int
300YYID (i)
301    int i;
302#endif
303{
304  return i;
305}
306#endif
307
308#if ! defined yyoverflow || YYERROR_VERBOSE
309
310/* The parser invokes alloca or malloc; define the necessary symbols.  */
311
312# ifdef YYSTACK_USE_ALLOCA
313#  if YYSTACK_USE_ALLOCA
314#   ifdef __GNUC__
315#    define YYSTACK_ALLOC __builtin_alloca
316#   elif defined __BUILTIN_VA_ARG_INCR
317#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
318#   elif defined _AIX
319#    define YYSTACK_ALLOC __alloca
320#   elif defined _MSC_VER
321#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
322#    define alloca _alloca
323#   else
324#    define YYSTACK_ALLOC alloca
325#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
326     || defined __cplusplus || defined _MSC_VER)
327#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
328#     ifndef _STDLIB_H
329#      define _STDLIB_H 1
330#     endif
331#    endif
332#   endif
333#  endif
334# endif
335
336# ifdef YYSTACK_ALLOC
337   /* Pacify GCC's `empty if-body' warning.  */
338#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
339#  ifndef YYSTACK_ALLOC_MAXIMUM
340    /* The OS might guarantee only one guard page at the bottom of the stack,
341       and a page size can be as small as 4096 bytes.  So we cannot safely
342       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
343       to allow for a few compiler-allocated temporary stack slots.  */
344#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
345#  endif
346# else
347#  define YYSTACK_ALLOC YYMALLOC
348#  define YYSTACK_FREE YYFREE
349#  ifndef YYSTACK_ALLOC_MAXIMUM
350#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
351#  endif
352#  if (defined __cplusplus && ! defined _STDLIB_H \
353       && ! ((defined YYMALLOC || defined malloc) \
354	     && (defined YYFREE || defined free)))
355#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
356#   ifndef _STDLIB_H
357#    define _STDLIB_H 1
358#   endif
359#  endif
360#  ifndef YYMALLOC
361#   define YYMALLOC malloc
362#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
363     || defined __cplusplus || defined _MSC_VER)
364void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
365#   endif
366#  endif
367#  ifndef YYFREE
368#   define YYFREE free
369#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
370     || defined __cplusplus || defined _MSC_VER)
371void free (void *); /* INFRINGES ON USER NAME SPACE */
372#   endif
373#  endif
374# endif
375#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
376
377
378#if (! defined yyoverflow \
379     && (! defined __cplusplus \
380	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
381
382/* A type that is properly aligned for any stack member.  */
383union yyalloc
384{
385  yytype_int16 yyss;
386  YYSTYPE yyvs;
387  };
388
389/* The size of the maximum gap between one aligned stack and the next.  */
390# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
391
392/* The size of an array large to enough to hold all stacks, each with
393   N elements.  */
394# define YYSTACK_BYTES(N) \
395     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
396      + YYSTACK_GAP_MAXIMUM)
397
398/* Copy COUNT objects from FROM to TO.  The source and destination do
399   not overlap.  */
400# ifndef YYCOPY
401#  if defined __GNUC__ && 1 < __GNUC__
402#   define YYCOPY(To, From, Count) \
403      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
404#  else
405#   define YYCOPY(To, From, Count)		\
406      do					\
407	{					\
408	  YYSIZE_T yyi;				\
409	  for (yyi = 0; yyi < (Count); yyi++)	\
410	    (To)[yyi] = (From)[yyi];		\
411	}					\
412      while (YYID (0))
413#  endif
414# endif
415
416/* Relocate STACK from its old location to the new one.  The
417   local variables YYSIZE and YYSTACKSIZE give the old and new number of
418   elements in the stack, and YYPTR gives the new location of the
419   stack.  Advance YYPTR to a properly aligned location for the next
420   stack.  */
421# define YYSTACK_RELOCATE(Stack)					\
422    do									\
423      {									\
424	YYSIZE_T yynewbytes;						\
425	YYCOPY (&yyptr->Stack, Stack, yysize);				\
426	Stack = &yyptr->Stack;						\
427	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
428	yyptr += yynewbytes / sizeof (*yyptr);				\
429      }									\
430    while (YYID (0))
431
432#endif
433
434/* YYFINAL -- State number of the termination state.  */
435#define YYFINAL  4
436/* YYLAST -- Last index in YYTABLE.  */
437#define YYLAST   523
438
439/* YYNTOKENS -- Number of terminals.  */
440#define YYNTOKENS  53
441/* YYNNTS -- Number of nonterminals.  */
442#define YYNNTS  46
443/* YYNRULES -- Number of rules.  */
444#define YYNRULES  126
445/* YYNRULES -- Number of states.  */
446#define YYNSTATES  178
447
448/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
449#define YYUNDEFTOK  2
450#define YYMAXUTOK   298
451
452#define YYTRANSLATE(YYX)						\
453  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
454
455/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
456static const yytype_uint8 yytranslate[] =
457{
458       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
459       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
460       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
461       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
462      47,    49,    48,     2,    46,     2,     2,     2,     2,     2,
463       2,     2,     2,     2,     2,     2,     2,     2,    52,    44,
464       2,    50,     2,     2,     2,     2,     2,     2,     2,     2,
465       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
466       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
467       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
468       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
469       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
470       2,     2,     2,    51,     2,    45,     2,     2,     2,     2,
471       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
472       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
473       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
474       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
475       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
476       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
477       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
478       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
479       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
480       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
481       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
482       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
483       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
484       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
485      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
486      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
487      35,    36,    37,    38,    39,    40,    41,    42,    43
488};
489
490#if YYDEBUG
491/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
492   YYRHS.  */
493static const yytype_uint16 yyprhs[] =
494{
495       0,     0,     3,     5,     8,     9,    12,    13,    18,    19,
496      23,    25,    27,    29,    31,    34,    37,    41,    42,    44,
497      46,    50,    55,    56,    58,    60,    63,    65,    67,    69,
498      71,    73,    75,    77,    79,    81,    87,    92,    95,    98,
499     101,   105,   109,   113,   116,   119,   122,   124,   126,   128,
500     130,   132,   134,   136,   138,   140,   142,   144,   147,   148,
501     150,   152,   155,   157,   159,   161,   163,   166,   168,   170,
502     175,   180,   183,   187,   191,   194,   196,   198,   200,   205,
503     210,   213,   217,   221,   224,   226,   230,   231,   233,   235,
504     239,   242,   245,   247,   248,   250,   252,   257,   262,   265,
505     269,   273,   277,   278,   280,   283,   287,   291,   292,   294,
506     296,   299,   303,   306,   307,   309,   311,   315,   318,   321,
507     323,   326,   327,   330,   333,   334,   336
508};
509
510/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
511static const yytype_int8 yyrhs[] =
512{
513      54,     0,    -1,    55,    -1,    54,    55,    -1,    -1,    56,
514      57,    -1,    -1,    12,    23,    58,    60,    -1,    -1,    23,
515      59,    60,    -1,    60,    -1,    84,    -1,    96,    -1,    98,
516      -1,     1,    44,    -1,     1,    45,    -1,    64,    61,    44,
517      -1,    -1,    62,    -1,    63,    -1,    62,    46,    63,    -1,
518      74,    97,    95,    85,    -1,    -1,    65,    -1,    66,    -1,
519      65,    66,    -1,    67,    -1,    68,    -1,     5,    -1,    17,
520      -1,    21,    -1,    11,    -1,    14,    -1,    69,    -1,    73,
521      -1,    28,    47,    65,    48,    49,    -1,    28,    47,    65,
522      49,    -1,    22,    37,    -1,    24,    37,    -1,    10,    37,
523      -1,    22,    37,    87,    -1,    24,    37,    87,    -1,    10,
524      37,    32,    -1,    10,    32,    -1,    22,    87,    -1,    24,
525      87,    -1,     7,    -1,    19,    -1,    15,    -1,    16,    -1,
526      20,    -1,    25,    -1,    13,    -1,     9,    -1,    26,    -1,
527       6,    -1,    41,    -1,    48,    71,    -1,    -1,    72,    -1,
528      73,    -1,    72,    73,    -1,     8,    -1,    27,    -1,    31,
529      -1,    18,    -1,    70,    74,    -1,    75,    -1,    37,    -1,
530      75,    47,    78,    49,    -1,    75,    47,     1,    49,    -1,
531      75,    33,    -1,    47,    74,    49,    -1,    47,     1,    49,
532      -1,    70,    76,    -1,    77,    -1,    37,    -1,    41,    -1,
533      77,    47,    78,    49,    -1,    77,    47,     1,    49,    -1,
534      77,    33,    -1,    47,    76,    49,    -1,    47,     1,    49,
535      -1,    79,    36,    -1,    79,    -1,    80,    46,    36,    -1,
536      -1,    80,    -1,    81,    -1,    80,    46,    81,    -1,    65,
537      82,    -1,    70,    82,    -1,    83,    -1,    -1,    37,    -1,
538      41,    -1,    83,    47,    78,    49,    -1,    83,    47,     1,
539      49,    -1,    83,    33,    -1,    47,    82,    49,    -1,    47,
540       1,    49,    -1,    64,    74,    32,    -1,    -1,    86,    -1,
541      50,    34,    -1,    51,    88,    45,    -1,    51,     1,    45,
542      -1,    -1,    89,    -1,    90,    -1,    89,    90,    -1,    64,
543      91,    44,    -1,     1,    44,    -1,    -1,    92,    -1,    93,
544      -1,    92,    46,    93,    -1,    76,    95,    -1,    37,    94,
545      -1,    94,    -1,    52,    34,    -1,    -1,    95,    31,    -1,
546      30,    44,    -1,    -1,    30,    -1,    29,    47,    37,    49,
547      44,    -1
548};
549
550/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
551static const yytype_uint16 yyrline[] =
552{
553       0,   103,   103,   104,   108,   108,   114,   114,   116,   116,
554     118,   119,   120,   121,   122,   123,   127,   141,   142,   146,
555     154,   167,   173,   174,   178,   179,   183,   189,   193,   194,
556     195,   196,   197,   201,   202,   203,   204,   208,   210,   212,
557     216,   223,   230,   239,   240,   241,   245,   246,   247,   248,
558     249,   250,   251,   252,   253,   254,   255,   259,   264,   265,
559     269,   270,   274,   274,   274,   275,   283,   284,   288,   297,
560     299,   301,   303,   305,   312,   313,   317,   318,   319,   321,
561     323,   325,   327,   332,   333,   334,   338,   339,   343,   344,
562     349,   354,   356,   360,   361,   369,   373,   375,   377,   379,
563     381,   386,   395,   396,   401,   406,   407,   411,   412,   416,
564     417,   421,   423,   428,   429,   433,   434,   438,   439,   440,
565     444,   448,   449,   453,   457,   458,   462
566};
567#endif
568
569#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
570/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
571   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
572static const char *const yytname[] =
573{
574  "$end", "error", "$undefined", "ASM_KEYW", "ATTRIBUTE_KEYW",
575  "AUTO_KEYW", "BOOL_KEYW", "CHAR_KEYW", "CONST_KEYW", "DOUBLE_KEYW",
576  "ENUM_KEYW", "EXTERN_KEYW", "EXTENSION_KEYW", "FLOAT_KEYW",
577  "INLINE_KEYW", "INT_KEYW", "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW",
578  "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW",
579  "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW",
580  "VOLATILE_KEYW", "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE",
581  "ATTRIBUTE_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE",
582  "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT", "REAL", "STRING",
583  "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "'*'", "')'",
584  "'='", "'{'", "':'", "$accept", "declaration_seq", "declaration", "@1",
585  "declaration1", "@2", "@3", "simple_declaration",
586  "init_declarator_list_opt", "init_declarator_list", "init_declarator",
587  "decl_specifier_seq_opt", "decl_specifier_seq", "decl_specifier",
588  "storage_class_specifier", "type_specifier", "simple_type_specifier",
589  "ptr_operator", "cvar_qualifier_seq_opt", "cvar_qualifier_seq",
590  "cvar_qualifier", "declarator", "direct_declarator", "nested_declarator",
591  "direct_nested_declarator", "parameter_declaration_clause",
592  "parameter_declaration_list_opt", "parameter_declaration_list",
593  "parameter_declaration", "m_abstract_declarator",
594  "direct_m_abstract_declarator", "function_definition", "initializer_opt",
595  "initializer", "class_body", "member_specification_opt",
596  "member_specification", "member_declaration",
597  "member_declarator_list_opt", "member_declarator_list",
598  "member_declarator", "member_bitfield_declarator", "attribute_opt",
599  "asm_definition", "asm_phrase_opt", "export_definition", 0
600};
601#endif
602
603# ifdef YYPRINT
604/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
605   token YYLEX-NUM.  */
606static const yytype_uint16 yytoknum[] =
607{
608       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
609     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
610     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
611     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
612     295,   296,   297,   298,    59,   125,    44,    40,    42,    41,
613      61,   123,    58
614};
615# endif
616
617/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
618static const yytype_uint8 yyr1[] =
619{
620       0,    53,    54,    54,    56,    55,    58,    57,    59,    57,
621      57,    57,    57,    57,    57,    57,    60,    61,    61,    62,
622      62,    63,    64,    64,    65,    65,    66,    66,    67,    67,
623      67,    67,    67,    68,    68,    68,    68,    68,    68,    68,
624      68,    68,    68,    68,    68,    68,    69,    69,    69,    69,
625      69,    69,    69,    69,    69,    69,    69,    70,    71,    71,
626      72,    72,    73,    73,    73,    73,    74,    74,    75,    75,
627      75,    75,    75,    75,    76,    76,    77,    77,    77,    77,
628      77,    77,    77,    78,    78,    78,    79,    79,    80,    80,
629      81,    82,    82,    83,    83,    83,    83,    83,    83,    83,
630      83,    84,    85,    85,    86,    87,    87,    88,    88,    89,
631      89,    90,    90,    91,    91,    92,    92,    93,    93,    93,
632      94,    95,    95,    96,    97,    97,    98
633};
634
635/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
636static const yytype_uint8 yyr2[] =
637{
638       0,     2,     1,     2,     0,     2,     0,     4,     0,     3,
639       1,     1,     1,     1,     2,     2,     3,     0,     1,     1,
640       3,     4,     0,     1,     1,     2,     1,     1,     1,     1,
641       1,     1,     1,     1,     1,     5,     4,     2,     2,     2,
642       3,     3,     3,     2,     2,     2,     1,     1,     1,     1,
643       1,     1,     1,     1,     1,     1,     1,     2,     0,     1,
644       1,     2,     1,     1,     1,     1,     2,     1,     1,     4,
645       4,     2,     3,     3,     2,     1,     1,     1,     4,     4,
646       2,     3,     3,     2,     1,     3,     0,     1,     1,     3,
647       2,     2,     1,     0,     1,     1,     4,     4,     2,     3,
648       3,     3,     0,     1,     2,     3,     3,     0,     1,     1,
649       2,     3,     2,     0,     1,     1,     3,     2,     2,     1,
650       2,     0,     2,     2,     0,     1,     5
651};
652
653/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
654   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
655   means the default is an error.  */
656static const yytype_uint8 yydefact[] =
657{
658       4,     4,     2,     0,     1,     3,     0,    28,    55,    46,
659      62,    53,     0,    31,     0,    52,    32,    48,    49,    29,
660      65,    47,    50,    30,     0,     8,     0,    51,    54,    63,
661       0,     0,     0,    64,    56,     5,    10,    17,    23,    24,
662      26,    27,    33,    34,    11,    12,    13,    14,    15,    43,
663      39,     6,    37,     0,    44,    22,    38,    45,     0,     0,
664     123,    68,     0,    58,     0,    18,    19,     0,   124,    67,
665      25,    42,    22,    40,     0,   113,     0,     0,   109,     9,
666      17,    41,     0,     0,     0,     0,    57,    59,    60,    16,
667       0,    66,   125,   101,   121,    71,     0,     7,   112,   106,
668      76,    77,     0,     0,     0,   121,    75,     0,   114,   115,
669     119,   105,     0,   110,   124,     0,    36,     0,    73,    72,
670      61,    20,   102,     0,    93,     0,    84,    87,    88,   118,
671       0,    76,     0,   120,    74,   117,    80,     0,   111,     0,
672      35,   126,   122,     0,    21,   103,    70,    94,    56,     0,
673      93,    90,    92,    69,    83,     0,    82,    81,     0,     0,
674     116,   104,     0,    95,     0,    91,    98,     0,    85,    89,
675      79,    78,   100,    99,     0,     0,    97,    96
676};
677
678/* YYDEFGOTO[NTERM-NUM].  */
679static const yytype_int16 yydefgoto[] =
680{
681      -1,     1,     2,     3,    35,    72,    55,    36,    64,    65,
682      66,    75,    38,    39,    40,    41,    42,    67,    86,    87,
683      43,   114,    69,   105,   106,   125,   126,   127,   128,   151,
684     152,    44,   144,   145,    54,    76,    77,    78,   107,   108,
685     109,   110,   122,    45,    94,    46
686};
687
688/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
689   STATE-NUM.  */
690#define YYPACT_NINF -134
691static const yytype_int16 yypact[] =
692{
693    -134,    16,  -134,   312,  -134,  -134,    20,  -134,  -134,  -134,
694    -134,  -134,   -18,  -134,    -3,  -134,  -134,  -134,  -134,  -134,
695    -134,  -134,  -134,  -134,   -26,  -134,   -25,  -134,  -134,  -134,
696      -7,     5,    27,  -134,  -134,  -134,  -134,    46,   482,  -134,
697    -134,  -134,  -134,  -134,  -134,  -134,  -134,  -134,  -134,  -134,
698      -8,  -134,    30,    97,  -134,   482,    30,  -134,   482,     7,
699    -134,  -134,    12,    10,    42,    55,  -134,    46,   -15,    15,
700    -134,  -134,   482,  -134,    25,    26,    47,   145,  -134,  -134,
701      46,  -134,   356,    39,    71,    77,  -134,    10,  -134,  -134,
702      46,  -134,  -134,  -134,  -134,  -134,   193,  -134,  -134,  -134,
703      75,  -134,     6,    95,    43,  -134,    28,    86,    85,  -134,
704    -134,  -134,    88,  -134,   103,    87,  -134,    91,  -134,  -134,
705    -134,  -134,   -23,    90,   401,    94,   101,   102,  -134,  -134,
706      98,  -134,   108,  -134,  -134,   109,  -134,   230,  -134,    26,
707    -134,  -134,  -134,   134,  -134,  -134,  -134,  -134,  -134,     9,
708      48,  -134,    35,  -134,  -134,   445,  -134,  -134,   125,   126,
709    -134,  -134,   128,  -134,   129,  -134,  -134,   267,  -134,  -134,
710    -134,  -134,  -134,  -134,   130,   131,  -134,  -134
711};
712
713/* YYPGOTO[NTERM-NUM].  */
714static const yytype_int16 yypgoto[] =
715{
716    -134,  -134,   180,  -134,  -134,  -134,  -134,   -33,  -134,  -134,
717      93,     0,   -58,   -37,  -134,  -134,  -134,   -73,  -134,  -134,
718     -54,   -32,  -134,   -81,  -134,  -133,  -134,  -134,    29,   -50,
719    -134,  -134,  -134,  -134,   -20,  -134,  -134,   110,  -134,  -134,
720      49,    96,    80,  -134,  -134,  -134
721};
722
723/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
724   positive, shift that token.  If negative, reduce the rule which
725   number is the opposite.  If zero, do what YYDEFACT says.
726   If YYTABLE_NINF, syntax error.  */
727#define YYTABLE_NINF -109
728static const yytype_int16 yytable[] =
729{
730      82,    70,   104,    37,   159,    68,    57,   130,   142,    88,
731     162,    52,    56,    84,    49,    92,     4,    93,    10,    50,
732      51,   132,    79,   134,    71,    53,    53,   143,    20,   104,
733      85,   104,    73,   120,   175,    91,    81,    29,   124,    97,
734      58,    33,   -93,   131,    83,    70,   147,   101,    95,    61,
735     163,   150,    59,   102,    63,    80,   149,    63,   -93,    62,
736      63,   136,    96,   100,    47,    48,   104,   101,   166,    98,
737      99,    60,    80,   102,    63,   137,   150,   150,   103,   124,
738     131,    53,   167,    61,   101,   147,    89,    70,   117,   163,
739     102,    63,   111,    62,    63,   149,    63,   124,    74,   164,
740     165,    90,     7,     8,     9,    10,    11,    12,    13,   124,
741      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
742     118,    26,    27,    28,    29,    30,   119,   103,    33,   133,
743     138,   139,    98,    92,   -22,   141,   140,   154,    34,   146,
744     142,   -22,  -107,   153,   -22,   -22,   112,   156,   155,   -22,
745       7,     8,     9,    10,    11,    12,    13,   157,    15,    16,
746      17,    18,    19,    20,    21,    22,    23,    24,   161,    26,
747      27,    28,    29,    30,   170,   171,    33,   172,   173,   176,
748     177,     5,   -22,   121,   169,   135,    34,   113,   160,   -22,
749    -108,     0,   -22,   -22,   123,     0,   129,   -22,     7,     8,
750       9,    10,    11,    12,    13,     0,    15,    16,    17,    18,
751      19,    20,    21,    22,    23,    24,     0,    26,    27,    28,
752      29,    30,     0,     0,    33,     0,     0,     0,     0,   -86,
753       0,   158,     0,     0,    34,     7,     8,     9,    10,    11,
754      12,    13,   -86,    15,    16,    17,    18,    19,    20,    21,
755      22,    23,    24,     0,    26,    27,    28,    29,    30,     0,
756       0,    33,     0,     0,     0,     0,   -86,     0,   174,     0,
757       0,    34,     7,     8,     9,    10,    11,    12,    13,   -86,
758      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
759       0,    26,    27,    28,    29,    30,     0,     0,    33,     0,
760       0,     0,     0,   -86,     0,     0,     0,     0,    34,     0,
761       0,     0,     0,     6,     0,     0,   -86,     7,     8,     9,
762      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
763      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
764      30,    31,    32,    33,     0,     0,     0,     0,     0,   -22,
765       0,     0,     0,    34,     0,     0,   -22,     0,     0,   -22,
766     -22,     7,     8,     9,    10,    11,    12,    13,     0,    15,
767      16,    17,    18,    19,    20,    21,    22,    23,    24,     0,
768      26,    27,    28,    29,    30,     0,     0,    33,     0,     0,
769       0,     0,     0,     0,     0,     0,     0,    34,     0,     0,
770       0,     0,     0,     0,   115,   116,     7,     8,     9,    10,
771      11,    12,    13,     0,    15,    16,    17,    18,    19,    20,
772      21,    22,    23,    24,     0,    26,    27,    28,    29,    30,
773       0,     0,    33,     0,     0,     0,     0,     0,   147,     0,
774       0,     0,   148,     0,     0,     0,     0,     0,   149,    63,
775       7,     8,     9,    10,    11,    12,    13,     0,    15,    16,
776      17,    18,    19,    20,    21,    22,    23,    24,     0,    26,
777      27,    28,    29,    30,     0,     0,    33,     0,     0,     0,
778       0,   168,     0,     0,     0,     0,    34,     7,     8,     9,
779      10,    11,    12,    13,     0,    15,    16,    17,    18,    19,
780      20,    21,    22,    23,    24,     0,    26,    27,    28,    29,
781      30,     0,     0,    33,     0,     0,     0,     0,     0,     0,
782       0,     0,     0,    34
783};
784
785static const yytype_int16 yycheck[] =
786{
787      58,    38,    75,     3,   137,    37,    26,     1,    31,    63,
788       1,    37,    37,     1,    32,    30,     0,    32,     8,    37,
789      23,   102,    55,   104,    32,    51,    51,    50,    18,   102,
790      62,   104,    52,    87,   167,    67,    56,    27,    96,    72,
791      47,    31,    33,    37,    37,    82,    37,    41,    33,    37,
792      41,   124,    47,    47,    48,    55,    47,    48,    49,    47,
793      48,    33,    47,    37,    44,    45,   139,    41,    33,    44,
794      45,    44,    72,    47,    48,    47,   149,   150,    52,   137,
795      37,    51,    47,    37,    41,    37,    44,   124,    49,    41,
796      47,    48,    45,    47,    48,    47,    48,   155,     1,   149,
797     150,    46,     5,     6,     7,     8,     9,    10,    11,   167,
798      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
799      49,    24,    25,    26,    27,    28,    49,    52,    31,    34,
800      44,    46,    44,    30,    37,    44,    49,    36,    41,    49,
801      31,    44,    45,    49,    47,    48,     1,    49,    46,    52,
802       5,     6,     7,     8,     9,    10,    11,    49,    13,    14,
803      15,    16,    17,    18,    19,    20,    21,    22,    34,    24,
804      25,    26,    27,    28,    49,    49,    31,    49,    49,    49,
805      49,     1,    37,    90,   155,   105,    41,    77,   139,    44,
806      45,    -1,    47,    48,     1,    -1,   100,    52,     5,     6,
807       7,     8,     9,    10,    11,    -1,    13,    14,    15,    16,
808      17,    18,    19,    20,    21,    22,    -1,    24,    25,    26,
809      27,    28,    -1,    -1,    31,    -1,    -1,    -1,    -1,    36,
810      -1,     1,    -1,    -1,    41,     5,     6,     7,     8,     9,
811      10,    11,    49,    13,    14,    15,    16,    17,    18,    19,
812      20,    21,    22,    -1,    24,    25,    26,    27,    28,    -1,
813      -1,    31,    -1,    -1,    -1,    -1,    36,    -1,     1,    -1,
814      -1,    41,     5,     6,     7,     8,     9,    10,    11,    49,
815      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
816      -1,    24,    25,    26,    27,    28,    -1,    -1,    31,    -1,
817      -1,    -1,    -1,    36,    -1,    -1,    -1,    -1,    41,    -1,
818      -1,    -1,    -1,     1,    -1,    -1,    49,     5,     6,     7,
819       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
820      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
821      28,    29,    30,    31,    -1,    -1,    -1,    -1,    -1,    37,
822      -1,    -1,    -1,    41,    -1,    -1,    44,    -1,    -1,    47,
823      48,     5,     6,     7,     8,     9,    10,    11,    -1,    13,
824      14,    15,    16,    17,    18,    19,    20,    21,    22,    -1,
825      24,    25,    26,    27,    28,    -1,    -1,    31,    -1,    -1,
826      -1,    -1,    -1,    -1,    -1,    -1,    -1,    41,    -1,    -1,
827      -1,    -1,    -1,    -1,    48,    49,     5,     6,     7,     8,
828       9,    10,    11,    -1,    13,    14,    15,    16,    17,    18,
829      19,    20,    21,    22,    -1,    24,    25,    26,    27,    28,
830      -1,    -1,    31,    -1,    -1,    -1,    -1,    -1,    37,    -1,
831      -1,    -1,    41,    -1,    -1,    -1,    -1,    -1,    47,    48,
832       5,     6,     7,     8,     9,    10,    11,    -1,    13,    14,
833      15,    16,    17,    18,    19,    20,    21,    22,    -1,    24,
834      25,    26,    27,    28,    -1,    -1,    31,    -1,    -1,    -1,
835      -1,    36,    -1,    -1,    -1,    -1,    41,     5,     6,     7,
836       8,     9,    10,    11,    -1,    13,    14,    15,    16,    17,
837      18,    19,    20,    21,    22,    -1,    24,    25,    26,    27,
838      28,    -1,    -1,    31,    -1,    -1,    -1,    -1,    -1,    -1,
839      -1,    -1,    -1,    41
840};
841
842/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
843   symbol of state STATE-NUM.  */
844static const yytype_uint8 yystos[] =
845{
846       0,    54,    55,    56,     0,    55,     1,     5,     6,     7,
847       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
848      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
849      28,    29,    30,    31,    41,    57,    60,    64,    65,    66,
850      67,    68,    69,    73,    84,    96,    98,    44,    45,    32,
851      37,    23,    37,    51,    87,    59,    37,    87,    47,    47,
852      44,    37,    47,    48,    61,    62,    63,    70,    74,    75,
853      66,    32,    58,    87,     1,    64,    88,    89,    90,    60,
854      64,    87,    65,    37,     1,    74,    71,    72,    73,    44,
855      46,    74,    30,    32,    97,    33,    47,    60,    44,    45,
856      37,    41,    47,    52,    70,    76,    77,    91,    92,    93,
857      94,    45,     1,    90,    74,    48,    49,    49,    49,    49,
858      73,    63,    95,     1,    65,    78,    79,    80,    81,    94,
859       1,    37,    76,    34,    76,    95,    33,    47,    44,    46,
860      49,    44,    31,    50,    85,    86,    49,    37,    41,    47,
861      70,    82,    83,    49,    36,    46,    49,    49,     1,    78,
862      93,    34,     1,    41,    82,    82,    33,    47,    36,    81,
863      49,    49,    49,    49,     1,    78,    49,    49
864};
865
866#define yyerrok		(yyerrstatus = 0)
867#define yyclearin	(yychar = YYEMPTY)
868#define YYEMPTY		(-2)
869#define YYEOF		0
870
871#define YYACCEPT	goto yyacceptlab
872#define YYABORT		goto yyabortlab
873#define YYERROR		goto yyerrorlab
874
875
876/* Like YYERROR except do call yyerror.  This remains here temporarily
877   to ease the transition to the new meaning of YYERROR, for GCC.
878   Once GCC version 2 has supplanted version 1, this can go.  */
879
880#define YYFAIL		goto yyerrlab
881
882#define YYRECOVERING()  (!!yyerrstatus)
883
884#define YYBACKUP(Token, Value)					\
885do								\
886  if (yychar == YYEMPTY && yylen == 1)				\
887    {								\
888      yychar = (Token);						\
889      yylval = (Value);						\
890      yytoken = YYTRANSLATE (yychar);				\
891      YYPOPSTACK (1);						\
892      goto yybackup;						\
893    }								\
894  else								\
895    {								\
896      yyerror (YY_("syntax error: cannot back up")); \
897      YYERROR;							\
898    }								\
899while (YYID (0))
900
901
902#define YYTERROR	1
903#define YYERRCODE	256
904
905
906/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
907   If N is 0, then set CURRENT to the empty location which ends
908   the previous symbol: RHS[0] (always defined).  */
909
910#define YYRHSLOC(Rhs, K) ((Rhs)[K])
911#ifndef YYLLOC_DEFAULT
912# define YYLLOC_DEFAULT(Current, Rhs, N)				\
913    do									\
914      if (YYID (N))                                                    \
915	{								\
916	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
917	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
918	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
919	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
920	}								\
921      else								\
922	{								\
923	  (Current).first_line   = (Current).last_line   =		\
924	    YYRHSLOC (Rhs, 0).last_line;				\
925	  (Current).first_column = (Current).last_column =		\
926	    YYRHSLOC (Rhs, 0).last_column;				\
927	}								\
928    while (YYID (0))
929#endif
930
931
932/* YY_LOCATION_PRINT -- Print the location on the stream.
933   This macro was not mandated originally: define only if we know
934   we won't break user code: when these are the locations we know.  */
935
936#ifndef YY_LOCATION_PRINT
937# if YYLTYPE_IS_TRIVIAL
938#  define YY_LOCATION_PRINT(File, Loc)			\
939     fprintf (File, "%d.%d-%d.%d",			\
940	      (Loc).first_line, (Loc).first_column,	\
941	      (Loc).last_line,  (Loc).last_column)
942# else
943#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
944# endif
945#endif
946
947
948/* YYLEX -- calling `yylex' with the right arguments.  */
949
950#ifdef YYLEX_PARAM
951# define YYLEX yylex (YYLEX_PARAM)
952#else
953# define YYLEX yylex ()
954#endif
955
956/* Enable debugging if requested.  */
957#if YYDEBUG
958
959# ifndef YYFPRINTF
960#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
961#  define YYFPRINTF fprintf
962# endif
963
964# define YYDPRINTF(Args)			\
965do {						\
966  if (yydebug)					\
967    YYFPRINTF Args;				\
968} while (YYID (0))
969
970# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
971do {									  \
972  if (yydebug)								  \
973    {									  \
974      YYFPRINTF (stderr, "%s ", Title);					  \
975      yy_symbol_print (stderr,						  \
976		  Type, Value); \
977      YYFPRINTF (stderr, "\n");						  \
978    }									  \
979} while (YYID (0))
980
981
982/*--------------------------------.
983| Print this symbol on YYOUTPUT.  |
984`--------------------------------*/
985
986/*ARGSUSED*/
987#if (defined __STDC__ || defined __C99__FUNC__ \
988     || defined __cplusplus || defined _MSC_VER)
989static void
990yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
991#else
992static void
993yy_symbol_value_print (yyoutput, yytype, yyvaluep)
994    FILE *yyoutput;
995    int yytype;
996    YYSTYPE const * const yyvaluep;
997#endif
998{
999  if (!yyvaluep)
1000    return;
1001# ifdef YYPRINT
1002  if (yytype < YYNTOKENS)
1003    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1004# else
1005  YYUSE (yyoutput);
1006# endif
1007  switch (yytype)
1008    {
1009      default:
1010	break;
1011    }
1012}
1013
1014
1015/*--------------------------------.
1016| Print this symbol on YYOUTPUT.  |
1017`--------------------------------*/
1018
1019#if (defined __STDC__ || defined __C99__FUNC__ \
1020     || defined __cplusplus || defined _MSC_VER)
1021static void
1022yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1023#else
1024static void
1025yy_symbol_print (yyoutput, yytype, yyvaluep)
1026    FILE *yyoutput;
1027    int yytype;
1028    YYSTYPE const * const yyvaluep;
1029#endif
1030{
1031  if (yytype < YYNTOKENS)
1032    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1033  else
1034    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1035
1036  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1037  YYFPRINTF (yyoutput, ")");
1038}
1039
1040/*------------------------------------------------------------------.
1041| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1042| TOP (included).                                                   |
1043`------------------------------------------------------------------*/
1044
1045#if (defined __STDC__ || defined __C99__FUNC__ \
1046     || defined __cplusplus || defined _MSC_VER)
1047static void
1048yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1049#else
1050static void
1051yy_stack_print (bottom, top)
1052    yytype_int16 *bottom;
1053    yytype_int16 *top;
1054#endif
1055{
1056  YYFPRINTF (stderr, "Stack now");
1057  for (; bottom <= top; ++bottom)
1058    YYFPRINTF (stderr, " %d", *bottom);
1059  YYFPRINTF (stderr, "\n");
1060}
1061
1062# define YY_STACK_PRINT(Bottom, Top)				\
1063do {								\
1064  if (yydebug)							\
1065    yy_stack_print ((Bottom), (Top));				\
1066} while (YYID (0))
1067
1068
1069/*------------------------------------------------.
1070| Report that the YYRULE is going to be reduced.  |
1071`------------------------------------------------*/
1072
1073#if (defined __STDC__ || defined __C99__FUNC__ \
1074     || defined __cplusplus || defined _MSC_VER)
1075static void
1076yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1077#else
1078static void
1079yy_reduce_print (yyvsp, yyrule)
1080    YYSTYPE *yyvsp;
1081    int yyrule;
1082#endif
1083{
1084  int yynrhs = yyr2[yyrule];
1085  int yyi;
1086  unsigned long int yylno = yyrline[yyrule];
1087  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1088	     yyrule - 1, yylno);
1089  /* The symbols being reduced.  */
1090  for (yyi = 0; yyi < yynrhs; yyi++)
1091    {
1092      fprintf (stderr, "   $%d = ", yyi + 1);
1093      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1094		       &(yyvsp[(yyi + 1) - (yynrhs)])
1095		       		       );
1096      fprintf (stderr, "\n");
1097    }
1098}
1099
1100# define YY_REDUCE_PRINT(Rule)		\
1101do {					\
1102  if (yydebug)				\
1103    yy_reduce_print (yyvsp, Rule); \
1104} while (YYID (0))
1105
1106/* Nonzero means print parse trace.  It is left uninitialized so that
1107   multiple parsers can coexist.  */
1108int yydebug;
1109#else /* !YYDEBUG */
1110# define YYDPRINTF(Args)
1111# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1112# define YY_STACK_PRINT(Bottom, Top)
1113# define YY_REDUCE_PRINT(Rule)
1114#endif /* !YYDEBUG */
1115
1116
1117/* YYINITDEPTH -- initial size of the parser's stacks.  */
1118#ifndef	YYINITDEPTH
1119# define YYINITDEPTH 200
1120#endif
1121
1122/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1123   if the built-in stack extension method is used).
1124
1125   Do not make this value too large; the results are undefined if
1126   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1127   evaluated with infinite-precision integer arithmetic.  */
1128
1129#ifndef YYMAXDEPTH
1130# define YYMAXDEPTH 10000
1131#endif
1132
1133
1134
1135#if YYERROR_VERBOSE
1136
1137# ifndef yystrlen
1138#  if defined __GLIBC__ && defined _STRING_H
1139#   define yystrlen strlen
1140#  else
1141/* Return the length of YYSTR.  */
1142#if (defined __STDC__ || defined __C99__FUNC__ \
1143     || defined __cplusplus || defined _MSC_VER)
1144static YYSIZE_T
1145yystrlen (const char *yystr)
1146#else
1147static YYSIZE_T
1148yystrlen (yystr)
1149    const char *yystr;
1150#endif
1151{
1152  YYSIZE_T yylen;
1153  for (yylen = 0; yystr[yylen]; yylen++)
1154    continue;
1155  return yylen;
1156}
1157#  endif
1158# endif
1159
1160# ifndef yystpcpy
1161#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1162#   define yystpcpy stpcpy
1163#  else
1164/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1165   YYDEST.  */
1166#if (defined __STDC__ || defined __C99__FUNC__ \
1167     || defined __cplusplus || defined _MSC_VER)
1168static char *
1169yystpcpy (char *yydest, const char *yysrc)
1170#else
1171static char *
1172yystpcpy (yydest, yysrc)
1173    char *yydest;
1174    const char *yysrc;
1175#endif
1176{
1177  char *yyd = yydest;
1178  const char *yys = yysrc;
1179
1180  while ((*yyd++ = *yys++) != '\0')
1181    continue;
1182
1183  return yyd - 1;
1184}
1185#  endif
1186# endif
1187
1188# ifndef yytnamerr
1189/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1190   quotes and backslashes, so that it's suitable for yyerror.  The
1191   heuristic is that double-quoting is unnecessary unless the string
1192   contains an apostrophe, a comma, or backslash (other than
1193   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1194   null, do not copy; instead, return the length of what the result
1195   would have been.  */
1196static YYSIZE_T
1197yytnamerr (char *yyres, const char *yystr)
1198{
1199  if (*yystr == '"')
1200    {
1201      YYSIZE_T yyn = 0;
1202      char const *yyp = yystr;
1203
1204      for (;;)
1205	switch (*++yyp)
1206	  {
1207	  case '\'':
1208	  case ',':
1209	    goto do_not_strip_quotes;
1210
1211	  case '\\':
1212	    if (*++yyp != '\\')
1213	      goto do_not_strip_quotes;
1214	    /* Fall through.  */
1215	  default:
1216	    if (yyres)
1217	      yyres[yyn] = *yyp;
1218	    yyn++;
1219	    break;
1220
1221	  case '"':
1222	    if (yyres)
1223	      yyres[yyn] = '\0';
1224	    return yyn;
1225	  }
1226    do_not_strip_quotes: ;
1227    }
1228
1229  if (! yyres)
1230    return yystrlen (yystr);
1231
1232  return yystpcpy (yyres, yystr) - yyres;
1233}
1234# endif
1235
1236/* Copy into YYRESULT an error message about the unexpected token
1237   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
1238   including the terminating null byte.  If YYRESULT is null, do not
1239   copy anything; just return the number of bytes that would be
1240   copied.  As a special case, return 0 if an ordinary "syntax error"
1241   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
1242   size calculation.  */
1243static YYSIZE_T
1244yysyntax_error (char *yyresult, int yystate, int yychar)
1245{
1246  int yyn = yypact[yystate];
1247
1248  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1249    return 0;
1250  else
1251    {
1252      int yytype = YYTRANSLATE (yychar);
1253      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1254      YYSIZE_T yysize = yysize0;
1255      YYSIZE_T yysize1;
1256      int yysize_overflow = 0;
1257      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1258      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1259      int yyx;
1260
1261# if 0
1262      /* This is so xgettext sees the translatable formats that are
1263	 constructed on the fly.  */
1264      YY_("syntax error, unexpected %s");
1265      YY_("syntax error, unexpected %s, expecting %s");
1266      YY_("syntax error, unexpected %s, expecting %s or %s");
1267      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1268      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1269# endif
1270      char *yyfmt;
1271      char const *yyf;
1272      static char const yyunexpected[] = "syntax error, unexpected %s";
1273      static char const yyexpecting[] = ", expecting %s";
1274      static char const yyor[] = " or %s";
1275      char yyformat[sizeof yyunexpected
1276		    + sizeof yyexpecting - 1
1277		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1278		       * (sizeof yyor - 1))];
1279      char const *yyprefix = yyexpecting;
1280
1281      /* Start YYX at -YYN if negative to avoid negative indexes in
1282	 YYCHECK.  */
1283      int yyxbegin = yyn < 0 ? -yyn : 0;
1284
1285      /* Stay within bounds of both yycheck and yytname.  */
1286      int yychecklim = YYLAST - yyn + 1;
1287      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1288      int yycount = 1;
1289
1290      yyarg[0] = yytname[yytype];
1291      yyfmt = yystpcpy (yyformat, yyunexpected);
1292
1293      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1294	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1295	  {
1296	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1297	      {
1298		yycount = 1;
1299		yysize = yysize0;
1300		yyformat[sizeof yyunexpected - 1] = '\0';
1301		break;
1302	      }
1303	    yyarg[yycount++] = yytname[yyx];
1304	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1305	    yysize_overflow |= (yysize1 < yysize);
1306	    yysize = yysize1;
1307	    yyfmt = yystpcpy (yyfmt, yyprefix);
1308	    yyprefix = yyor;
1309	  }
1310
1311      yyf = YY_(yyformat);
1312      yysize1 = yysize + yystrlen (yyf);
1313      yysize_overflow |= (yysize1 < yysize);
1314      yysize = yysize1;
1315
1316      if (yysize_overflow)
1317	return YYSIZE_MAXIMUM;
1318
1319      if (yyresult)
1320	{
1321	  /* Avoid sprintf, as that infringes on the user's name space.
1322	     Don't have undefined behavior even if the translation
1323	     produced a string with the wrong number of "%s"s.  */
1324	  char *yyp = yyresult;
1325	  int yyi = 0;
1326	  while ((*yyp = *yyf) != '\0')
1327	    {
1328	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1329		{
1330		  yyp += yytnamerr (yyp, yyarg[yyi++]);
1331		  yyf += 2;
1332		}
1333	      else
1334		{
1335		  yyp++;
1336		  yyf++;
1337		}
1338	    }
1339	}
1340      return yysize;
1341    }
1342}
1343#endif /* YYERROR_VERBOSE */
1344
1345
1346/*-----------------------------------------------.
1347| Release the memory associated to this symbol.  |
1348`-----------------------------------------------*/
1349
1350/*ARGSUSED*/
1351#if (defined __STDC__ || defined __C99__FUNC__ \
1352     || defined __cplusplus || defined _MSC_VER)
1353static void
1354yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1355#else
1356static void
1357yydestruct (yymsg, yytype, yyvaluep)
1358    const char *yymsg;
1359    int yytype;
1360    YYSTYPE *yyvaluep;
1361#endif
1362{
1363  YYUSE (yyvaluep);
1364
1365  if (!yymsg)
1366    yymsg = "Deleting";
1367  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1368
1369  switch (yytype)
1370    {
1371
1372      default:
1373	break;
1374    }
1375}
1376
1377
1378/* Prevent warnings from -Wmissing-prototypes.  */
1379
1380#ifdef YYPARSE_PARAM
1381#if defined __STDC__ || defined __cplusplus
1382int yyparse (void *YYPARSE_PARAM);
1383#else
1384int yyparse ();
1385#endif
1386#else /* ! YYPARSE_PARAM */
1387#if defined __STDC__ || defined __cplusplus
1388int yyparse (void);
1389#else
1390int yyparse ();
1391#endif
1392#endif /* ! YYPARSE_PARAM */
1393
1394
1395
1396/* The look-ahead symbol.  */
1397int yychar;
1398
1399/* The semantic value of the look-ahead symbol.  */
1400YYSTYPE yylval;
1401
1402/* Number of syntax errors so far.  */
1403int yynerrs;
1404
1405
1406
1407/*----------.
1408| yyparse.  |
1409`----------*/
1410
1411#ifdef YYPARSE_PARAM
1412#if (defined __STDC__ || defined __C99__FUNC__ \
1413     || defined __cplusplus || defined _MSC_VER)
1414int
1415yyparse (void *YYPARSE_PARAM)
1416#else
1417int
1418yyparse (YYPARSE_PARAM)
1419    void *YYPARSE_PARAM;
1420#endif
1421#else /* ! YYPARSE_PARAM */
1422#if (defined __STDC__ || defined __C99__FUNC__ \
1423     || defined __cplusplus || defined _MSC_VER)
1424int
1425yyparse (void)
1426#else
1427int
1428yyparse ()
1429
1430#endif
1431#endif
1432{
1433
1434  int yystate;
1435  int yyn;
1436  int yyresult;
1437  /* Number of tokens to shift before error messages enabled.  */
1438  int yyerrstatus;
1439  /* Look-ahead token as an internal (translated) token number.  */
1440  int yytoken = 0;
1441#if YYERROR_VERBOSE
1442  /* Buffer for error messages, and its allocated size.  */
1443  char yymsgbuf[128];
1444  char *yymsg = yymsgbuf;
1445  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1446#endif
1447
1448  /* Three stacks and their tools:
1449     `yyss': related to states,
1450     `yyvs': related to semantic values,
1451     `yyls': related to locations.
1452
1453     Refer to the stacks thru separate pointers, to allow yyoverflow
1454     to reallocate them elsewhere.  */
1455
1456  /* The state stack.  */
1457  yytype_int16 yyssa[YYINITDEPTH];
1458  yytype_int16 *yyss = yyssa;
1459  yytype_int16 *yyssp;
1460
1461  /* The semantic value stack.  */
1462  YYSTYPE yyvsa[YYINITDEPTH];
1463  YYSTYPE *yyvs = yyvsa;
1464  YYSTYPE *yyvsp;
1465
1466
1467
1468#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1469
1470  YYSIZE_T yystacksize = YYINITDEPTH;
1471
1472  /* The variables used to return semantic value and location from the
1473     action routines.  */
1474  YYSTYPE yyval;
1475
1476
1477  /* The number of symbols on the RHS of the reduced rule.
1478     Keep to zero when no symbol should be popped.  */
1479  int yylen = 0;
1480
1481  YYDPRINTF ((stderr, "Starting parse\n"));
1482
1483  yystate = 0;
1484  yyerrstatus = 0;
1485  yynerrs = 0;
1486  yychar = YYEMPTY;		/* Cause a token to be read.  */
1487
1488  /* Initialize stack pointers.
1489     Waste one element of value and location stack
1490     so that they stay on the same level as the state stack.
1491     The wasted elements are never initialized.  */
1492
1493  yyssp = yyss;
1494  yyvsp = yyvs;
1495
1496  goto yysetstate;
1497
1498/*------------------------------------------------------------.
1499| yynewstate -- Push a new state, which is found in yystate.  |
1500`------------------------------------------------------------*/
1501 yynewstate:
1502  /* In all cases, when you get here, the value and location stacks
1503     have just been pushed.  So pushing a state here evens the stacks.  */
1504  yyssp++;
1505
1506 yysetstate:
1507  *yyssp = yystate;
1508
1509  if (yyss + yystacksize - 1 <= yyssp)
1510    {
1511      /* Get the current used size of the three stacks, in elements.  */
1512      YYSIZE_T yysize = yyssp - yyss + 1;
1513
1514#ifdef yyoverflow
1515      {
1516	/* Give user a chance to reallocate the stack.  Use copies of
1517	   these so that the &'s don't force the real ones into
1518	   memory.  */
1519	YYSTYPE *yyvs1 = yyvs;
1520	yytype_int16 *yyss1 = yyss;
1521
1522
1523	/* Each stack pointer address is followed by the size of the
1524	   data in use in that stack, in bytes.  This used to be a
1525	   conditional around just the two extra args, but that might
1526	   be undefined if yyoverflow is a macro.  */
1527	yyoverflow (YY_("memory exhausted"),
1528		    &yyss1, yysize * sizeof (*yyssp),
1529		    &yyvs1, yysize * sizeof (*yyvsp),
1530
1531		    &yystacksize);
1532
1533	yyss = yyss1;
1534	yyvs = yyvs1;
1535      }
1536#else /* no yyoverflow */
1537# ifndef YYSTACK_RELOCATE
1538      goto yyexhaustedlab;
1539# else
1540      /* Extend the stack our own way.  */
1541      if (YYMAXDEPTH <= yystacksize)
1542	goto yyexhaustedlab;
1543      yystacksize *= 2;
1544      if (YYMAXDEPTH < yystacksize)
1545	yystacksize = YYMAXDEPTH;
1546
1547      {
1548	yytype_int16 *yyss1 = yyss;
1549	union yyalloc *yyptr =
1550	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1551	if (! yyptr)
1552	  goto yyexhaustedlab;
1553	YYSTACK_RELOCATE (yyss);
1554	YYSTACK_RELOCATE (yyvs);
1555
1556#  undef YYSTACK_RELOCATE
1557	if (yyss1 != yyssa)
1558	  YYSTACK_FREE (yyss1);
1559      }
1560# endif
1561#endif /* no yyoverflow */
1562
1563      yyssp = yyss + yysize - 1;
1564      yyvsp = yyvs + yysize - 1;
1565
1566
1567      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1568		  (unsigned long int) yystacksize));
1569
1570      if (yyss + yystacksize - 1 <= yyssp)
1571	YYABORT;
1572    }
1573
1574  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1575
1576  goto yybackup;
1577
1578/*-----------.
1579| yybackup.  |
1580`-----------*/
1581yybackup:
1582
1583  /* Do appropriate processing given the current state.  Read a
1584     look-ahead token if we need one and don't already have one.  */
1585
1586  /* First try to decide what to do without reference to look-ahead token.  */
1587  yyn = yypact[yystate];
1588  if (yyn == YYPACT_NINF)
1589    goto yydefault;
1590
1591  /* Not known => get a look-ahead token if don't already have one.  */
1592
1593  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
1594  if (yychar == YYEMPTY)
1595    {
1596      YYDPRINTF ((stderr, "Reading a token: "));
1597      yychar = YYLEX;
1598    }
1599
1600  if (yychar <= YYEOF)
1601    {
1602      yychar = yytoken = YYEOF;
1603      YYDPRINTF ((stderr, "Now at end of input.\n"));
1604    }
1605  else
1606    {
1607      yytoken = YYTRANSLATE (yychar);
1608      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1609    }
1610
1611  /* If the proper action on seeing token YYTOKEN is to reduce or to
1612     detect an error, take that action.  */
1613  yyn += yytoken;
1614  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1615    goto yydefault;
1616  yyn = yytable[yyn];
1617  if (yyn <= 0)
1618    {
1619      if (yyn == 0 || yyn == YYTABLE_NINF)
1620	goto yyerrlab;
1621      yyn = -yyn;
1622      goto yyreduce;
1623    }
1624
1625  if (yyn == YYFINAL)
1626    YYACCEPT;
1627
1628  /* Count tokens shifted since error; after three, turn off error
1629     status.  */
1630  if (yyerrstatus)
1631    yyerrstatus--;
1632
1633  /* Shift the look-ahead token.  */
1634  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1635
1636  /* Discard the shifted token unless it is eof.  */
1637  if (yychar != YYEOF)
1638    yychar = YYEMPTY;
1639
1640  yystate = yyn;
1641  *++yyvsp = yylval;
1642
1643  goto yynewstate;
1644
1645
1646/*-----------------------------------------------------------.
1647| yydefault -- do the default action for the current state.  |
1648`-----------------------------------------------------------*/
1649yydefault:
1650  yyn = yydefact[yystate];
1651  if (yyn == 0)
1652    goto yyerrlab;
1653  goto yyreduce;
1654
1655
1656/*-----------------------------.
1657| yyreduce -- Do a reduction.  |
1658`-----------------------------*/
1659yyreduce:
1660  /* yyn is the number of a rule to reduce with.  */
1661  yylen = yyr2[yyn];
1662
1663  /* If YYLEN is nonzero, implement the default value of the action:
1664     `$$ = $1'.
1665
1666     Otherwise, the following line sets YYVAL to garbage.
1667     This behavior is undocumented and Bison
1668     users should not rely upon it.  Assigning to YYVAL
1669     unconditionally makes the parser a bit smaller, and it avoids a
1670     GCC warning that YYVAL may be used uninitialized.  */
1671  yyval = yyvsp[1-yylen];
1672
1673
1674  YY_REDUCE_PRINT (yyn);
1675  switch (yyn)
1676    {
1677        case 4:
1678#line 108 "scripts/genksyms/parse.y"
1679    { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; ;}
1680    break;
1681
1682  case 5:
1683#line 110 "scripts/genksyms/parse.y"
1684    { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; ;}
1685    break;
1686
1687  case 6:
1688#line 114 "scripts/genksyms/parse.y"
1689    { is_typedef = 1; ;}
1690    break;
1691
1692  case 7:
1693#line 115 "scripts/genksyms/parse.y"
1694    { (yyval) = (yyvsp[(4) - (4)]); ;}
1695    break;
1696
1697  case 8:
1698#line 116 "scripts/genksyms/parse.y"
1699    { is_typedef = 1; ;}
1700    break;
1701
1702  case 9:
1703#line 117 "scripts/genksyms/parse.y"
1704    { (yyval) = (yyvsp[(3) - (3)]); ;}
1705    break;
1706
1707  case 14:
1708#line 122 "scripts/genksyms/parse.y"
1709    { (yyval) = (yyvsp[(2) - (2)]); ;}
1710    break;
1711
1712  case 15:
1713#line 123 "scripts/genksyms/parse.y"
1714    { (yyval) = (yyvsp[(2) - (2)]); ;}
1715    break;
1716
1717  case 16:
1718#line 128 "scripts/genksyms/parse.y"
1719    { if (current_name) {
1720		    struct string_list *decl = (*(yyvsp[(3) - (3)]))->next;
1721		    (*(yyvsp[(3) - (3)]))->next = NULL;
1722		    add_symbol(current_name,
1723			       is_typedef ? SYM_TYPEDEF : SYM_NORMAL,
1724			       decl, is_extern);
1725		    current_name = NULL;
1726		  }
1727		  (yyval) = (yyvsp[(3) - (3)]);
1728		;}
1729    break;
1730
1731  case 17:
1732#line 141 "scripts/genksyms/parse.y"
1733    { (yyval) = NULL; ;}
1734    break;
1735
1736  case 19:
1737#line 147 "scripts/genksyms/parse.y"
1738    { struct string_list *decl = *(yyvsp[(1) - (1)]);
1739		  *(yyvsp[(1) - (1)]) = NULL;
1740		  add_symbol(current_name,
1741			     is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
1742		  current_name = NULL;
1743		  (yyval) = (yyvsp[(1) - (1)]);
1744		;}
1745    break;
1746
1747  case 20:
1748#line 155 "scripts/genksyms/parse.y"
1749    { struct string_list *decl = *(yyvsp[(3) - (3)]);
1750		  *(yyvsp[(3) - (3)]) = NULL;
1751		  free_list(*(yyvsp[(2) - (3)]), NULL);
1752		  *(yyvsp[(2) - (3)]) = decl_spec;
1753		  add_symbol(current_name,
1754			     is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
1755		  current_name = NULL;
1756		  (yyval) = (yyvsp[(3) - (3)]);
1757		;}
1758    break;
1759
1760  case 21:
1761#line 168 "scripts/genksyms/parse.y"
1762    { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); ;}
1763    break;
1764
1765  case 22:
1766#line 173 "scripts/genksyms/parse.y"
1767    { decl_spec = NULL; ;}
1768    break;
1769
1770  case 24:
1771#line 178 "scripts/genksyms/parse.y"
1772    { decl_spec = *(yyvsp[(1) - (1)]); ;}
1773    break;
1774
1775  case 25:
1776#line 179 "scripts/genksyms/parse.y"
1777    { decl_spec = *(yyvsp[(2) - (2)]); ;}
1778    break;
1779
1780  case 26:
1781#line 184 "scripts/genksyms/parse.y"
1782    { /* Version 2 checksumming ignores storage class, as that
1783		     is really irrelevant to the linkage.  */
1784		  remove_node((yyvsp[(1) - (1)]));
1785		  (yyval) = (yyvsp[(1) - (1)]);
1786		;}
1787    break;
1788
1789  case 31:
1790#line 196 "scripts/genksyms/parse.y"
1791    { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); ;}
1792    break;
1793
1794  case 32:
1795#line 197 "scripts/genksyms/parse.y"
1796    { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); ;}
1797    break;
1798
1799  case 37:
1800#line 209 "scripts/genksyms/parse.y"
1801    { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); ;}
1802    break;
1803
1804  case 38:
1805#line 211 "scripts/genksyms/parse.y"
1806    { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); ;}
1807    break;
1808
1809  case 39:
1810#line 213 "scripts/genksyms/parse.y"
1811    { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); ;}
1812    break;
1813
1814  case 40:
1815#line 217 "scripts/genksyms/parse.y"
1816    { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
1817		  r = copy_node(i); r->tag = SYM_STRUCT;
1818		  r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
1819		  add_symbol(i->string, SYM_STRUCT, s, is_extern);
1820		  (yyval) = (yyvsp[(3) - (3)]);
1821		;}
1822    break;
1823
1824  case 41:
1825#line 224 "scripts/genksyms/parse.y"
1826    { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
1827		  r = copy_node(i); r->tag = SYM_UNION;
1828		  r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
1829		  add_symbol(i->string, SYM_UNION, s, is_extern);
1830		  (yyval) = (yyvsp[(3) - (3)]);
1831		;}
1832    break;
1833
1834  case 42:
1835#line 231 "scripts/genksyms/parse.y"
1836    { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
1837		  r = copy_node(i); r->tag = SYM_ENUM;
1838		  r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
1839		  add_symbol(i->string, SYM_ENUM, s, is_extern);
1840		  (yyval) = (yyvsp[(3) - (3)]);
1841		;}
1842    break;
1843
1844  case 43:
1845#line 239 "scripts/genksyms/parse.y"
1846    { (yyval) = (yyvsp[(2) - (2)]); ;}
1847    break;
1848
1849  case 44:
1850#line 240 "scripts/genksyms/parse.y"
1851    { (yyval) = (yyvsp[(2) - (2)]); ;}
1852    break;
1853
1854  case 45:
1855#line 241 "scripts/genksyms/parse.y"
1856    { (yyval) = (yyvsp[(2) - (2)]); ;}
1857    break;
1858
1859  case 56:
1860#line 255 "scripts/genksyms/parse.y"
1861    { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); ;}
1862    break;
1863
1864  case 57:
1865#line 260 "scripts/genksyms/parse.y"
1866    { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
1867    break;
1868
1869  case 58:
1870#line 264 "scripts/genksyms/parse.y"
1871    { (yyval) = NULL; ;}
1872    break;
1873
1874  case 61:
1875#line 270 "scripts/genksyms/parse.y"
1876    { (yyval) = (yyvsp[(2) - (2)]); ;}
1877    break;
1878
1879  case 65:
1880#line 276 "scripts/genksyms/parse.y"
1881    { /* restrict has no effect in prototypes so ignore it */
1882		  remove_node((yyvsp[(1) - (1)]));
1883		  (yyval) = (yyvsp[(1) - (1)]);
1884		;}
1885    break;
1886
1887  case 66:
1888#line 283 "scripts/genksyms/parse.y"
1889    { (yyval) = (yyvsp[(2) - (2)]); ;}
1890    break;
1891
1892  case 68:
1893#line 289 "scripts/genksyms/parse.y"
1894    { if (current_name != NULL) {
1895		    error_with_pos("unexpected second declaration name");
1896		    YYERROR;
1897		  } else {
1898		    current_name = (*(yyvsp[(1) - (1)]))->string;
1899		    (yyval) = (yyvsp[(1) - (1)]);
1900		  }
1901		;}
1902    break;
1903
1904  case 69:
1905#line 298 "scripts/genksyms/parse.y"
1906    { (yyval) = (yyvsp[(4) - (4)]); ;}
1907    break;
1908
1909  case 70:
1910#line 300 "scripts/genksyms/parse.y"
1911    { (yyval) = (yyvsp[(4) - (4)]); ;}
1912    break;
1913
1914  case 71:
1915#line 302 "scripts/genksyms/parse.y"
1916    { (yyval) = (yyvsp[(2) - (2)]); ;}
1917    break;
1918
1919  case 72:
1920#line 304 "scripts/genksyms/parse.y"
1921    { (yyval) = (yyvsp[(3) - (3)]); ;}
1922    break;
1923
1924  case 73:
1925#line 306 "scripts/genksyms/parse.y"
1926    { (yyval) = (yyvsp[(3) - (3)]); ;}
1927    break;
1928
1929  case 74:
1930#line 312 "scripts/genksyms/parse.y"
1931    { (yyval) = (yyvsp[(2) - (2)]); ;}
1932    break;
1933
1934  case 78:
1935#line 320 "scripts/genksyms/parse.y"
1936    { (yyval) = (yyvsp[(4) - (4)]); ;}
1937    break;
1938
1939  case 79:
1940#line 322 "scripts/genksyms/parse.y"
1941    { (yyval) = (yyvsp[(4) - (4)]); ;}
1942    break;
1943
1944  case 80:
1945#line 324 "scripts/genksyms/parse.y"
1946    { (yyval) = (yyvsp[(2) - (2)]); ;}
1947    break;
1948
1949  case 81:
1950#line 326 "scripts/genksyms/parse.y"
1951    { (yyval) = (yyvsp[(3) - (3)]); ;}
1952    break;
1953
1954  case 82:
1955#line 328 "scripts/genksyms/parse.y"
1956    { (yyval) = (yyvsp[(3) - (3)]); ;}
1957    break;
1958
1959  case 83:
1960#line 332 "scripts/genksyms/parse.y"
1961    { (yyval) = (yyvsp[(2) - (2)]); ;}
1962    break;
1963
1964  case 85:
1965#line 334 "scripts/genksyms/parse.y"
1966    { (yyval) = (yyvsp[(3) - (3)]); ;}
1967    break;
1968
1969  case 86:
1970#line 338 "scripts/genksyms/parse.y"
1971    { (yyval) = NULL; ;}
1972    break;
1973
1974  case 89:
1975#line 345 "scripts/genksyms/parse.y"
1976    { (yyval) = (yyvsp[(3) - (3)]); ;}
1977    break;
1978
1979  case 90:
1980#line 350 "scripts/genksyms/parse.y"
1981    { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
1982    break;
1983
1984  case 91:
1985#line 355 "scripts/genksyms/parse.y"
1986    { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
1987    break;
1988
1989  case 93:
1990#line 360 "scripts/genksyms/parse.y"
1991    { (yyval) = NULL; ;}
1992    break;
1993
1994  case 94:
1995#line 362 "scripts/genksyms/parse.y"
1996    { /* For version 2 checksums, we don't want to remember
1997		     private parameter names.  */
1998		  remove_node((yyvsp[(1) - (1)]));
1999		  (yyval) = (yyvsp[(1) - (1)]);
2000		;}
2001    break;
2002
2003  case 95:
2004#line 370 "scripts/genksyms/parse.y"
2005    { remove_node((yyvsp[(1) - (1)]));
2006		  (yyval) = (yyvsp[(1) - (1)]);
2007		;}
2008    break;
2009
2010  case 96:
2011#line 374 "scripts/genksyms/parse.y"
2012    { (yyval) = (yyvsp[(4) - (4)]); ;}
2013    break;
2014
2015  case 97:
2016#line 376 "scripts/genksyms/parse.y"
2017    { (yyval) = (yyvsp[(4) - (4)]); ;}
2018    break;
2019
2020  case 98:
2021#line 378 "scripts/genksyms/parse.y"
2022    { (yyval) = (yyvsp[(2) - (2)]); ;}
2023    break;
2024
2025  case 99:
2026#line 380 "scripts/genksyms/parse.y"
2027    { (yyval) = (yyvsp[(3) - (3)]); ;}
2028    break;
2029
2030  case 100:
2031#line 382 "scripts/genksyms/parse.y"
2032    { (yyval) = (yyvsp[(3) - (3)]); ;}
2033    break;
2034
2035  case 101:
2036#line 387 "scripts/genksyms/parse.y"
2037    { struct string_list *decl = *(yyvsp[(2) - (3)]);
2038		  *(yyvsp[(2) - (3)]) = NULL;
2039		  add_symbol(current_name, SYM_NORMAL, decl, is_extern);
2040		  (yyval) = (yyvsp[(3) - (3)]);
2041		;}
2042    break;
2043
2044  case 102:
2045#line 395 "scripts/genksyms/parse.y"
2046    { (yyval) = NULL; ;}
2047    break;
2048
2049  case 104:
2050#line 402 "scripts/genksyms/parse.y"
2051    { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); ;}
2052    break;
2053
2054  case 105:
2055#line 406 "scripts/genksyms/parse.y"
2056    { (yyval) = (yyvsp[(3) - (3)]); ;}
2057    break;
2058
2059  case 106:
2060#line 407 "scripts/genksyms/parse.y"
2061    { (yyval) = (yyvsp[(3) - (3)]); ;}
2062    break;
2063
2064  case 107:
2065#line 411 "scripts/genksyms/parse.y"
2066    { (yyval) = NULL; ;}
2067    break;
2068
2069  case 110:
2070#line 417 "scripts/genksyms/parse.y"
2071    { (yyval) = (yyvsp[(2) - (2)]); ;}
2072    break;
2073
2074  case 111:
2075#line 422 "scripts/genksyms/parse.y"
2076    { (yyval) = (yyvsp[(3) - (3)]); ;}
2077    break;
2078
2079  case 112:
2080#line 424 "scripts/genksyms/parse.y"
2081    { (yyval) = (yyvsp[(2) - (2)]); ;}
2082    break;
2083
2084  case 113:
2085#line 428 "scripts/genksyms/parse.y"
2086    { (yyval) = NULL; ;}
2087    break;
2088
2089  case 116:
2090#line 434 "scripts/genksyms/parse.y"
2091    { (yyval) = (yyvsp[(3) - (3)]); ;}
2092    break;
2093
2094  case 117:
2095#line 438 "scripts/genksyms/parse.y"
2096    { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
2097    break;
2098
2099  case 118:
2100#line 439 "scripts/genksyms/parse.y"
2101    { (yyval) = (yyvsp[(2) - (2)]); ;}
2102    break;
2103
2104  case 120:
2105#line 444 "scripts/genksyms/parse.y"
2106    { (yyval) = (yyvsp[(2) - (2)]); ;}
2107    break;
2108
2109  case 121:
2110#line 448 "scripts/genksyms/parse.y"
2111    { (yyval) = NULL; ;}
2112    break;
2113
2114  case 123:
2115#line 453 "scripts/genksyms/parse.y"
2116    { (yyval) = (yyvsp[(2) - (2)]); ;}
2117    break;
2118
2119  case 124:
2120#line 457 "scripts/genksyms/parse.y"
2121    { (yyval) = NULL; ;}
2122    break;
2123
2124  case 126:
2125#line 463 "scripts/genksyms/parse.y"
2126    { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); ;}
2127    break;
2128
2129
2130/* Line 1267 of yacc.c.  */
2131#line 2132 "scripts/genksyms/parse.c"
2132      default: break;
2133    }
2134  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2135
2136  YYPOPSTACK (yylen);
2137  yylen = 0;
2138  YY_STACK_PRINT (yyss, yyssp);
2139
2140  *++yyvsp = yyval;
2141
2142
2143  /* Now `shift' the result of the reduction.  Determine what state
2144     that goes to, based on the state we popped back to and the rule
2145     number reduced by.  */
2146
2147  yyn = yyr1[yyn];
2148
2149  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2150  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2151    yystate = yytable[yystate];
2152  else
2153    yystate = yydefgoto[yyn - YYNTOKENS];
2154
2155  goto yynewstate;
2156
2157
2158/*------------------------------------.
2159| yyerrlab -- here on detecting error |
2160`------------------------------------*/
2161yyerrlab:
2162  /* If not already recovering from an error, report this error.  */
2163  if (!yyerrstatus)
2164    {
2165      ++yynerrs;
2166#if ! YYERROR_VERBOSE
2167      yyerror (YY_("syntax error"));
2168#else
2169      {
2170	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2171	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2172	  {
2173	    YYSIZE_T yyalloc = 2 * yysize;
2174	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2175	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
2176	    if (yymsg != yymsgbuf)
2177	      YYSTACK_FREE (yymsg);
2178	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2179	    if (yymsg)
2180	      yymsg_alloc = yyalloc;
2181	    else
2182	      {
2183		yymsg = yymsgbuf;
2184		yymsg_alloc = sizeof yymsgbuf;
2185	      }
2186	  }
2187
2188	if (0 < yysize && yysize <= yymsg_alloc)
2189	  {
2190	    (void) yysyntax_error (yymsg, yystate, yychar);
2191	    yyerror (yymsg);
2192	  }
2193	else
2194	  {
2195	    yyerror (YY_("syntax error"));
2196	    if (yysize != 0)
2197	      goto yyexhaustedlab;
2198	  }
2199      }
2200#endif
2201    }
2202
2203
2204
2205  if (yyerrstatus == 3)
2206    {
2207      /* If just tried and failed to reuse look-ahead token after an
2208	 error, discard it.  */
2209
2210      if (yychar <= YYEOF)
2211	{
2212	  /* Return failure if at end of input.  */
2213	  if (yychar == YYEOF)
2214	    YYABORT;
2215	}
2216      else
2217	{
2218	  yydestruct ("Error: discarding",
2219		      yytoken, &yylval);
2220	  yychar = YYEMPTY;
2221	}
2222    }
2223
2224  /* Else will try to reuse look-ahead token after shifting the error
2225     token.  */
2226  goto yyerrlab1;
2227
2228
2229/*---------------------------------------------------.
2230| yyerrorlab -- error raised explicitly by YYERROR.  |
2231`---------------------------------------------------*/
2232yyerrorlab:
2233
2234  /* Pacify compilers like GCC when the user code never invokes
2235     YYERROR and the label yyerrorlab therefore never appears in user
2236     code.  */
2237  if (/*CONSTCOND*/ 0)
2238     goto yyerrorlab;
2239
2240  /* Do not reclaim the symbols of the rule which action triggered
2241     this YYERROR.  */
2242  YYPOPSTACK (yylen);
2243  yylen = 0;
2244  YY_STACK_PRINT (yyss, yyssp);
2245  yystate = *yyssp;
2246  goto yyerrlab1;
2247
2248
2249/*-------------------------------------------------------------.
2250| yyerrlab1 -- common code for both syntax error and YYERROR.  |
2251`-------------------------------------------------------------*/
2252yyerrlab1:
2253  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
2254
2255  for (;;)
2256    {
2257      yyn = yypact[yystate];
2258      if (yyn != YYPACT_NINF)
2259	{
2260	  yyn += YYTERROR;
2261	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2262	    {
2263	      yyn = yytable[yyn];
2264	      if (0 < yyn)
2265		break;
2266	    }
2267	}
2268
2269      /* Pop the current state because it cannot handle the error token.  */
2270      if (yyssp == yyss)
2271	YYABORT;
2272
2273
2274      yydestruct ("Error: popping",
2275		  yystos[yystate], yyvsp);
2276      YYPOPSTACK (1);
2277      yystate = *yyssp;
2278      YY_STACK_PRINT (yyss, yyssp);
2279    }
2280
2281  if (yyn == YYFINAL)
2282    YYACCEPT;
2283
2284  *++yyvsp = yylval;
2285
2286
2287  /* Shift the error token.  */
2288  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2289
2290  yystate = yyn;
2291  goto yynewstate;
2292
2293
2294/*-------------------------------------.
2295| yyacceptlab -- YYACCEPT comes here.  |
2296`-------------------------------------*/
2297yyacceptlab:
2298  yyresult = 0;
2299  goto yyreturn;
2300
2301/*-----------------------------------.
2302| yyabortlab -- YYABORT comes here.  |
2303`-----------------------------------*/
2304yyabortlab:
2305  yyresult = 1;
2306  goto yyreturn;
2307
2308#ifndef yyoverflow
2309/*-------------------------------------------------.
2310| yyexhaustedlab -- memory exhaustion comes here.  |
2311`-------------------------------------------------*/
2312yyexhaustedlab:
2313  yyerror (YY_("memory exhausted"));
2314  yyresult = 2;
2315  /* Fall through.  */
2316#endif
2317
2318yyreturn:
2319  if (yychar != YYEOF && yychar != YYEMPTY)
2320     yydestruct ("Cleanup: discarding lookahead",
2321		 yytoken, &yylval);
2322  /* Do not reclaim the symbols of the rule which action triggered
2323     this YYABORT or YYACCEPT.  */
2324  YYPOPSTACK (yylen);
2325  YY_STACK_PRINT (yyss, yyssp);
2326  while (yyssp != yyss)
2327    {
2328      yydestruct ("Cleanup: popping",
2329		  yystos[*yyssp], yyvsp);
2330      YYPOPSTACK (1);
2331    }
2332#ifndef yyoverflow
2333  if (yyss != yyssa)
2334    YYSTACK_FREE (yyss);
2335#endif
2336#if YYERROR_VERBOSE
2337  if (yymsg != yymsgbuf)
2338    YYSTACK_FREE (yymsg);
2339#endif
2340  /* Make sure YYID is used.  */
2341  return YYID (yyresult);
2342}
2343
2344
2345#line 467 "scripts/genksyms/parse.y"
2346
2347
2348static void
2349yyerror(const char *e)
2350{
2351  error_with_pos("%s", e);
2352}
2353
2354