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