1 /* A Bison parser, made by GNU Bison 3.0.4. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
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.
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.
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/>. */
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.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
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. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "3.0.4"
50 #define YYSKELETON_NAME "yacc.c"
64 /* Copy the first part of user declarations. */
65 #line 24 "parse.y" /* yacc.c:339 */
73 static int is_typedef;
75 static char *current_name;
76 static struct string_list *decl_spec;
78 static void yyerror(const char *);
81 remove_node(struct string_list **p)
83 struct string_list *node = *p;
89 remove_list(struct string_list **pb, struct string_list **pe)
91 struct string_list *b = *pb, *e = *pe;
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)
102 struct string_list *b = *body, *i = *ident, *r;
104 if (i->in_source_file) {
106 (*ident)->tag = type;
107 remove_list(body, ident);
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);
116 #line 117 "parse.tab.c" /* yacc.c:339 */
119 # if defined __cplusplus && 201103L <= __cplusplus
120 # define YY_NULLPTR nullptr
122 # define YY_NULLPTR 0
126 /* Enabling verbose error messages. */
127 #ifdef YYERROR_VERBOSE
128 # undef YYERROR_VERBOSE
129 # define YYERROR_VERBOSE 1
131 # define YYERROR_VERBOSE 0
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
152 ATTRIBUTE_KEYW = 259,
160 EXTENSION_KEYW = 267,
177 EXPORT_SYMBOL_KEYW = 284,
179 ATTRIBUTE_PHRASE = 286,
182 BRACKET_PHRASE = 289,
183 EXPRESSION_PHRASE = 290,
197 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
199 # define YYSTYPE_IS_TRIVIAL 1
200 # define YYSTYPE_IS_DECLARED 1
204 extern YYSTYPE yylval;
208 #endif /* !YY_YY_PARSE_TAB_H_INCLUDED */
210 /* Copy the second part of user declarations. */
212 #line 213 "parse.tab.c" /* yacc.c:358 */
219 typedef YYTYPE_UINT8 yytype_uint8;
221 typedef unsigned char yytype_uint8;
225 typedef YYTYPE_INT8 yytype_int8;
227 typedef signed char yytype_int8;
231 typedef YYTYPE_UINT16 yytype_uint16;
233 typedef unsigned short int yytype_uint16;
237 typedef YYTYPE_INT16 yytype_int16;
239 typedef short int yytype_int16;
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
251 # define YYSIZE_T unsigned int
255 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
258 # if defined YYENABLE_NLS && YYENABLE_NLS
260 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
261 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
265 # define YY_(Msgid) Msgid
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)
275 # define YY_ATTRIBUTE(Spec) /* empty */
279 #ifndef YY_ATTRIBUTE_PURE
280 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
283 #ifndef YY_ATTRIBUTE_UNUSED
284 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
287 #if !defined _Noreturn \
288 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
289 # if defined _MSC_VER && 1200 <= _MSC_VER
290 # define _Noreturn __declspec (noreturn)
292 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
296 /* Suppress unused-variable warnings by "using" E. */
297 #if ! defined lint || defined __GNUC__
298 # define YYUSE(E) ((void) (E))
300 # define YYUSE(E) /* empty */
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")
312 # define YY_INITIAL_VALUE(Value) Value
314 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
315 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
316 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
318 #ifndef YY_INITIAL_VALUE
319 # define YY_INITIAL_VALUE(Value) /* Nothing. */
323 #if ! defined yyoverflow || YYERROR_VERBOSE
325 /* The parser invokes alloca or malloc; define the necessary symbols. */
327 # ifdef YYSTACK_USE_ALLOCA
328 # if YYSTACK_USE_ALLOCA
330 # define YYSTACK_ALLOC __builtin_alloca
331 # elif defined __BUILTIN_VA_ARG_INCR
332 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
334 # define YYSTACK_ALLOC __alloca
335 # elif defined _MSC_VER
336 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
337 # define alloca _alloca
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
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 */
362 # define YYSTACK_ALLOC YYMALLOC
363 # define YYSTACK_FREE YYFREE
364 # ifndef YYSTACK_ALLOC_MAXIMUM
365 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
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
376 # define YYMALLOC malloc
377 # if ! defined malloc && ! defined EXIT_SUCCESS
378 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
383 # if ! defined free && ! defined EXIT_SUCCESS
384 void free (void *); /* INFRINGES ON USER NAME SPACE */
388 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
391 #if (! defined yyoverflow \
392 && (! defined __cplusplus \
393 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
395 /* A type that is properly aligned for any stack member. */
398 yytype_int16 yyss_alloc;
402 /* The size of the maximum gap between one aligned stack and the next. */
403 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
405 /* The size of an array large to enough to hold all stacks, each with
407 # define YYSTACK_BYTES(N) \
408 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
409 + YYSTACK_GAP_MAXIMUM)
411 # define YYCOPY_NEEDED 1
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
418 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
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); \
431 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
432 /* Copy COUNT objects from SRC to DST. The source and destination do
435 # if defined __GNUC__ && 1 < __GNUC__
436 # define YYCOPY(Dst, Src, Count) \
437 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
439 # define YYCOPY(Dst, Src, Count) \
443 for (yyi = 0; yyi < (Count); yyi++) \
444 (Dst)[yyi] = (Src)[yyi]; \
449 #endif /* !YYCOPY_NEEDED */
451 /* YYFINAL -- State number of the termination state. */
453 /* YYLAST -- Last index in YYTABLE. */
456 /* YYNTOKENS -- Number of terminals. */
458 /* YYNNTS -- Number of nonterminals. */
460 /* YYNRULES -- Number of rules. */
462 /* YYNSTATES -- Number of states. */
463 #define YYNSTATES 186
465 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
466 by yylex, with out-of-bounds checking. */
468 #define YYMAXUTOK 299
470 #define YYTRANSLATE(YYX) \
471 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
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[] =
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
510 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
511 static const yytype_uint16 yyrline[] =
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,
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[] =
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
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[] =
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,
579 #define YYPACT_NINF -135
581 #define yypact_value_is_default(Yystate) \
582 (!!((Yystate) == (-135)))
584 #define YYTABLE_NINF -109
586 #define yytable_value_is_error(Yytable_value) \
589 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
591 static const yytype_int16 yypact[] =
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
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[] =
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
640 /* YYPGOTO[NTERM-NUM]. */
641 static const yytype_int16 yypgoto[] =
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
650 /* YYDEFGOTO[NTERM-NUM]. */
651 static const yytype_int16 yydefgoto[] =
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
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[] =
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,
719 static const yytype_int16 yycheck[] =
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,
775 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
776 symbol of state STATE-NUM. */
777 static const yytype_uint8 yystos[] =
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
800 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
801 static const yytype_uint8 yyr1[] =
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,
819 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
820 static const yytype_uint8 yyr2[] =
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,
839 #define yyerrok (yyerrstatus = 0)
840 #define yyclearin (yychar = YYEMPTY)
844 #define YYACCEPT goto yyacceptlab
845 #define YYABORT goto yyabortlab
846 #define YYERROR goto yyerrorlab
849 #define YYRECOVERING() (!!yyerrstatus)
851 #define YYBACKUP(Token, Value) \
853 if (yychar == YYEMPTY) \
857 YYPOPSTACK (yylen); \
863 yyerror (YY_("syntax error: cannot back up")); \
868 /* Error token number */
870 #define YYERRCODE 256
874 /* Enable debugging if requested. */
878 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
879 # define YYFPRINTF fprintf
882 # define YYDPRINTF(Args) \
888 /* This macro is provided for backward compatibility. */
889 #ifndef YY_LOCATION_PRINT
890 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
894 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
898 YYFPRINTF (stderr, "%s ", Title); \
899 yy_symbol_print (stderr, \
901 YYFPRINTF (stderr, "\n"); \
906 /*----------------------------------------.
907 | Print this symbol's value on YYOUTPUT. |
908 `----------------------------------------*/
911 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
913 FILE *yyo = yyoutput;
918 if (yytype < YYNTOKENS)
919 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
925 /*--------------------------------.
926 | Print this symbol on YYOUTPUT. |
927 `--------------------------------*/
930 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
932 YYFPRINTF (yyoutput, "%s %s (",
933 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
935 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
936 YYFPRINTF (yyoutput, ")");
939 /*------------------------------------------------------------------.
940 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
942 `------------------------------------------------------------------*/
945 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
947 YYFPRINTF (stderr, "Stack now");
948 for (; yybottom <= yytop; yybottom++)
950 int yybot = *yybottom;
951 YYFPRINTF (stderr, " %d", yybot);
953 YYFPRINTF (stderr, "\n");
956 # define YY_STACK_PRINT(Bottom, Top) \
959 yy_stack_print ((Bottom), (Top)); \
963 /*------------------------------------------------.
964 | Report that the YYRULE is going to be reduced. |
965 `------------------------------------------------*/
968 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
970 unsigned long int yylno = yyrline[yyrule];
971 int yynrhs = yyr2[yyrule];
973 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
975 /* The symbols being reduced. */
976 for (yyi = 0; yyi < yynrhs; yyi++)
978 YYFPRINTF (stderr, " $%d = ", yyi + 1);
979 yy_symbol_print (stderr,
980 yystos[yyssp[yyi + 1 - yynrhs]],
981 &(yyvsp[(yyi + 1) - (yynrhs)])
983 YYFPRINTF (stderr, "\n");
987 # define YY_REDUCE_PRINT(Rule) \
990 yy_reduce_print (yyssp, yyvsp, Rule); \
993 /* Nonzero means print parse trace. It is left uninitialized so that
994 multiple parsers can coexist. */
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 */
1004 /* YYINITDEPTH -- initial size of the parser's stacks. */
1006 # define YYINITDEPTH 200
1009 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1010 if the built-in stack extension method is used).
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. */
1017 # define YYMAXDEPTH 10000
1024 # if defined __GLIBC__ && defined _STRING_H
1025 # define yystrlen strlen
1027 /* Return the length of YYSTR. */
1029 yystrlen (const char *yystr)
1032 for (yylen = 0; yystr[yylen]; yylen++)
1040 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1041 # define yystpcpy stpcpy
1043 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1046 yystpcpy (char *yydest, const char *yysrc)
1049 const char *yys = yysrc;
1051 while ((*yyd++ = *yys++) != '\0')
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
1068 yytnamerr (char *yyres, const char *yystr)
1073 char const *yyp = yystr;
1080 goto do_not_strip_quotes;
1084 goto do_not_strip_quotes;
1097 do_not_strip_quotes: ;
1101 return yystrlen (yystr);
1103 return yystpcpy (yyres, yystr) - yyres;
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
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. */
1116 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1117 yytype_int16 *yyssp, int yytoken)
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
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.
1153 if (yytoken != YYEMPTY)
1155 int yyn = yypact[*yyssp];
1156 yyarg[yycount++] = yytname[yytoken];
1157 if (!yypact_value_is_default (yyn))
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;
1168 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1169 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1170 && !yytable_value_is_error (yytable[yyx + yyn]))
1172 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1178 yyarg[yycount++] = yytname[yyx];
1180 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1181 if (! (yysize <= yysize1
1182 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1192 # define YYCASE_(N, S) \
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"));
1206 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1207 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1212 if (*yymsg_alloc < yysize)
1214 *yymsg_alloc = 2 * yysize;
1215 if (! (yysize <= *yymsg_alloc
1216 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1217 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
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. */
1227 while ((*yyp = *yyformat) != '\0')
1228 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1230 yyp += yytnamerr (yyp, yyarg[yyi++]);
1241 #endif /* YYERROR_VERBOSE */
1243 /*-----------------------------------------------.
1244 | Release the memory associated to this symbol. |
1245 `-----------------------------------------------*/
1248 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1253 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1255 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1257 YY_IGNORE_MAYBE_UNINITIALIZED_END
1263 /* The lookahead symbol. */
1266 /* The semantic value of the lookahead symbol. */
1268 /* Number of syntax errors so far. */
1280 /* Number of tokens to shift before error messages enabled. */
1283 /* The stacks and their tools:
1284 'yyss': related to states.
1285 'yyvs': related to semantic values.
1287 Refer to the stacks through separate pointers, to allow yyoverflow
1288 to reallocate them elsewhere. */
1290 /* The state stack. */
1291 yytype_int16 yyssa[YYINITDEPTH];
1293 yytype_int16 *yyssp;
1295 /* The semantic value stack. */
1296 YYSTYPE yyvsa[YYINITDEPTH];
1300 YYSIZE_T yystacksize;
1304 /* Lookahead token as an internal (translated) token number. */
1306 /* The variables used to return semantic value and location from the
1311 /* Buffer for error messages, and its allocated size. */
1313 char *yymsg = yymsgbuf;
1314 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1317 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1319 /* The number of symbols on the RHS of the reduced rule.
1320 Keep to zero when no symbol should be popped. */
1323 yyssp = yyss = yyssa;
1324 yyvsp = yyvs = yyvsa;
1325 yystacksize = YYINITDEPTH;
1327 YYDPRINTF ((stderr, "Starting parse\n"));
1332 yychar = YYEMPTY; /* Cause a token to be read. */
1335 /*------------------------------------------------------------.
1336 | yynewstate -- Push a new state, which is found in yystate. |
1337 `------------------------------------------------------------*/
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. */
1346 if (yyss + yystacksize - 1 <= yyssp)
1348 /* Get the current used size of the three stacks, in elements. */
1349 YYSIZE_T yysize = yyssp - yyss + 1;
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
1356 YYSTYPE *yyvs1 = yyvs;
1357 yytype_int16 *yyss1 = yyss;
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),
1371 #else /* no yyoverflow */
1372 # ifndef YYSTACK_RELOCATE
1373 goto yyexhaustedlab;
1375 /* Extend the stack our own way. */
1376 if (YYMAXDEPTH <= yystacksize)
1377 goto yyexhaustedlab;
1379 if (YYMAXDEPTH < yystacksize)
1380 yystacksize = YYMAXDEPTH;
1383 yytype_int16 *yyss1 = yyss;
1384 union yyalloc *yyptr =
1385 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1387 goto yyexhaustedlab;
1388 YYSTACK_RELOCATE (yyss_alloc, yyss);
1389 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1390 # undef YYSTACK_RELOCATE
1392 YYSTACK_FREE (yyss1);
1395 #endif /* no yyoverflow */
1397 yyssp = yyss + yysize - 1;
1398 yyvsp = yyvs + yysize - 1;
1400 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1401 (unsigned long int) yystacksize));
1403 if (yyss + yystacksize - 1 <= yyssp)
1407 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1409 if (yystate == YYFINAL)
1419 /* Do appropriate processing given the current state. Read a
1420 lookahead token if we need one and don't already have one. */
1422 /* First try to decide what to do without reference to lookahead token. */
1423 yyn = yypact[yystate];
1424 if (yypact_value_is_default (yyn))
1427 /* Not known => get a lookahead token if don't already have one. */
1429 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1430 if (yychar == YYEMPTY)
1432 YYDPRINTF ((stderr, "Reading a token: "));
1436 if (yychar <= YYEOF)
1438 yychar = yytoken = YYEOF;
1439 YYDPRINTF ((stderr, "Now at end of input.\n"));
1443 yytoken = YYTRANSLATE (yychar);
1444 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1447 /* If the proper action on seeing token YYTOKEN is to reduce or to
1448 detect an error, take that action. */
1450 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1455 if (yytable_value_is_error (yyn))
1461 /* Count tokens shifted since error; after three, turn off error
1466 /* Shift the lookahead token. */
1467 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1469 /* Discard the shifted token. */
1473 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1475 YY_IGNORE_MAYBE_UNINITIALIZED_END
1480 /*-----------------------------------------------------------.
1481 | yydefault -- do the default action for the current state. |
1482 `-----------------------------------------------------------*/
1484 yyn = yydefact[yystate];
1490 /*-----------------------------.
1491 | yyreduce -- Do a reduction. |
1492 `-----------------------------*/
1494 /* yyn is the number of a rule to reduce with. */
1497 /* If YYLEN is nonzero, implement the default value of the action:
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];
1508 YY_REDUCE_PRINT (yyn);
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 */
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 */
1524 #line 135 "parse.y" /* yacc.c:1646 */
1526 #line 1527 "parse.tab.c" /* yacc.c:1646 */
1530 #line 136 "parse.y" /* yacc.c:1646 */
1531 { (yyval) = (yyvsp[0]); }
1532 #line 1533 "parse.tab.c" /* yacc.c:1646 */
1536 #line 137 "parse.y" /* yacc.c:1646 */
1538 #line 1539 "parse.tab.c" /* yacc.c:1646 */
1542 #line 138 "parse.y" /* yacc.c:1646 */
1543 { (yyval) = (yyvsp[0]); }
1544 #line 1545 "parse.tab.c" /* yacc.c:1646 */
1548 #line 143 "parse.y" /* yacc.c:1646 */
1549 { (yyval) = (yyvsp[0]); }
1550 #line 1551 "parse.tab.c" /* yacc.c:1646 */
1554 #line 144 "parse.y" /* yacc.c:1646 */
1555 { (yyval) = (yyvsp[0]); }
1556 #line 1557 "parse.tab.c" /* yacc.c:1646 */
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,
1567 current_name = NULL;
1569 (yyval) = (yyvsp[0]);
1571 #line 1572 "parse.tab.c" /* yacc.c:1646 */
1575 #line 162 "parse.y" /* yacc.c:1646 */
1577 #line 1578 "parse.tab.c" /* yacc.c:1646 */
1581 #line 168 "parse.y" /* yacc.c:1646 */
1582 { struct string_list *decl = *(yyvsp[0]);
1584 add_symbol(current_name,
1585 is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
1586 current_name = NULL;
1587 (yyval) = (yyvsp[0]);
1589 #line 1590 "parse.tab.c" /* yacc.c:1646 */
1593 #line 176 "parse.y" /* yacc.c:1646 */
1594 { struct string_list *decl = *(yyvsp[0]);
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]);
1603 #line 1604 "parse.tab.c" /* yacc.c:1646 */
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 */
1613 #line 194 "parse.y" /* yacc.c:1646 */
1614 { decl_spec = NULL; }
1615 #line 1616 "parse.tab.c" /* yacc.c:1646 */
1619 #line 199 "parse.y" /* yacc.c:1646 */
1620 { decl_spec = *(yyvsp[0]); }
1621 #line 1622 "parse.tab.c" /* yacc.c:1646 */
1625 #line 200 "parse.y" /* yacc.c:1646 */
1626 { decl_spec = *(yyvsp[0]); }
1627 #line 1628 "parse.tab.c" /* yacc.c:1646 */
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]);
1637 #line 1638 "parse.tab.c" /* yacc.c:1646 */
1641 #line 217 "parse.y" /* yacc.c:1646 */
1642 { is_extern = 1; (yyval) = (yyvsp[0]); }
1643 #line 1644 "parse.tab.c" /* yacc.c:1646 */
1647 #line 218 "parse.y" /* yacc.c:1646 */
1648 { is_extern = 0; (yyval) = (yyvsp[0]); }
1649 #line 1650 "parse.tab.c" /* yacc.c:1646 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
1695 #line 249 "parse.y" /* yacc.c:1646 */
1696 { (yyval) = (yyvsp[0]); }
1697 #line 1698 "parse.tab.c" /* yacc.c:1646 */
1701 #line 250 "parse.y" /* yacc.c:1646 */
1702 { (yyval) = (yyvsp[0]); }
1703 #line 1704 "parse.tab.c" /* yacc.c:1646 */
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 */
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 */
1719 #line 273 "parse.y" /* yacc.c:1646 */
1721 #line 1722 "parse.tab.c" /* yacc.c:1646 */
1725 #line 279 "parse.y" /* yacc.c:1646 */
1726 { (yyval) = (yyvsp[0]); }
1727 #line 1728 "parse.tab.c" /* yacc.c:1646 */
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]);
1736 #line 1737 "parse.tab.c" /* yacc.c:1646 */
1740 #line 292 "parse.y" /* yacc.c:1646 */
1741 { (yyval) = (yyvsp[0]); }
1742 #line 1743 "parse.tab.c" /* yacc.c:1646 */
1746 #line 298 "parse.y" /* yacc.c:1646 */
1747 { if (current_name != NULL) {
1748 error_with_pos("unexpected second declaration name");
1751 current_name = (*(yyvsp[0]))->string;
1752 (yyval) = (yyvsp[0]);
1755 #line 1756 "parse.tab.c" /* yacc.c:1646 */
1759 #line 307 "parse.y" /* yacc.c:1646 */
1760 { if (current_name != NULL) {
1761 error_with_pos("unexpected second declaration name");
1764 current_name = (*(yyvsp[0]))->string;
1765 (yyval) = (yyvsp[0]);
1768 #line 1769 "parse.tab.c" /* yacc.c:1646 */
1772 #line 316 "parse.y" /* yacc.c:1646 */
1773 { (yyval) = (yyvsp[0]); }
1774 #line 1775 "parse.tab.c" /* yacc.c:1646 */
1778 #line 318 "parse.y" /* yacc.c:1646 */
1779 { (yyval) = (yyvsp[0]); }
1780 #line 1781 "parse.tab.c" /* yacc.c:1646 */
1784 #line 320 "parse.y" /* yacc.c:1646 */
1785 { (yyval) = (yyvsp[0]); }
1786 #line 1787 "parse.tab.c" /* yacc.c:1646 */
1790 #line 322 "parse.y" /* yacc.c:1646 */
1791 { (yyval) = (yyvsp[0]); }
1792 #line 1793 "parse.tab.c" /* yacc.c:1646 */
1796 #line 328 "parse.y" /* yacc.c:1646 */
1797 { (yyval) = (yyvsp[0]); }
1798 #line 1799 "parse.tab.c" /* yacc.c:1646 */
1802 #line 336 "parse.y" /* yacc.c:1646 */
1803 { (yyval) = (yyvsp[0]); }
1804 #line 1805 "parse.tab.c" /* yacc.c:1646 */
1808 #line 338 "parse.y" /* yacc.c:1646 */
1809 { (yyval) = (yyvsp[0]); }
1810 #line 1811 "parse.tab.c" /* yacc.c:1646 */
1814 #line 340 "parse.y" /* yacc.c:1646 */
1815 { (yyval) = (yyvsp[0]); }
1816 #line 1817 "parse.tab.c" /* yacc.c:1646 */
1820 #line 342 "parse.y" /* yacc.c:1646 */
1821 { (yyval) = (yyvsp[0]); }
1822 #line 1823 "parse.tab.c" /* yacc.c:1646 */
1826 #line 344 "parse.y" /* yacc.c:1646 */
1827 { (yyval) = (yyvsp[0]); }
1828 #line 1829 "parse.tab.c" /* yacc.c:1646 */
1832 #line 348 "parse.y" /* yacc.c:1646 */
1833 { (yyval) = (yyvsp[0]); }
1834 #line 1835 "parse.tab.c" /* yacc.c:1646 */
1838 #line 350 "parse.y" /* yacc.c:1646 */
1839 { (yyval) = (yyvsp[0]); }
1840 #line 1841 "parse.tab.c" /* yacc.c:1646 */
1844 #line 354 "parse.y" /* yacc.c:1646 */
1846 #line 1847 "parse.tab.c" /* yacc.c:1646 */
1850 #line 361 "parse.y" /* yacc.c:1646 */
1851 { (yyval) = (yyvsp[0]); }
1852 #line 1853 "parse.tab.c" /* yacc.c:1646 */
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 */
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 */
1868 #line 376 "parse.y" /* yacc.c:1646 */
1870 #line 1871 "parse.tab.c" /* yacc.c:1646 */
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]);
1880 #line 1881 "parse.tab.c" /* yacc.c:1646 */
1884 #line 386 "parse.y" /* yacc.c:1646 */
1885 { remove_node((yyvsp[0]));
1886 (yyval) = (yyvsp[0]);
1888 #line 1889 "parse.tab.c" /* yacc.c:1646 */
1892 #line 390 "parse.y" /* yacc.c:1646 */
1893 { (yyval) = (yyvsp[0]); }
1894 #line 1895 "parse.tab.c" /* yacc.c:1646 */
1898 #line 392 "parse.y" /* yacc.c:1646 */
1899 { (yyval) = (yyvsp[0]); }
1900 #line 1901 "parse.tab.c" /* yacc.c:1646 */
1904 #line 394 "parse.y" /* yacc.c:1646 */
1905 { (yyval) = (yyvsp[0]); }
1906 #line 1907 "parse.tab.c" /* yacc.c:1646 */
1910 #line 396 "parse.y" /* yacc.c:1646 */
1911 { (yyval) = (yyvsp[0]); }
1912 #line 1913 "parse.tab.c" /* yacc.c:1646 */
1916 #line 398 "parse.y" /* yacc.c:1646 */
1917 { (yyval) = (yyvsp[0]); }
1918 #line 1919 "parse.tab.c" /* yacc.c:1646 */
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]);
1928 #line 1929 "parse.tab.c" /* yacc.c:1646 */
1932 #line 411 "parse.y" /* yacc.c:1646 */
1934 #line 1935 "parse.tab.c" /* yacc.c:1646 */
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 */
1944 #line 422 "parse.y" /* yacc.c:1646 */
1945 { (yyval) = (yyvsp[0]); }
1946 #line 1947 "parse.tab.c" /* yacc.c:1646 */
1950 #line 423 "parse.y" /* yacc.c:1646 */
1951 { (yyval) = (yyvsp[0]); }
1952 #line 1953 "parse.tab.c" /* yacc.c:1646 */
1956 #line 427 "parse.y" /* yacc.c:1646 */
1958 #line 1959 "parse.tab.c" /* yacc.c:1646 */
1962 #line 433 "parse.y" /* yacc.c:1646 */
1963 { (yyval) = (yyvsp[0]); }
1964 #line 1965 "parse.tab.c" /* yacc.c:1646 */
1968 #line 438 "parse.y" /* yacc.c:1646 */
1969 { (yyval) = (yyvsp[0]); }
1970 #line 1971 "parse.tab.c" /* yacc.c:1646 */
1974 #line 440 "parse.y" /* yacc.c:1646 */
1975 { (yyval) = (yyvsp[0]); }
1976 #line 1977 "parse.tab.c" /* yacc.c:1646 */
1980 #line 444 "parse.y" /* yacc.c:1646 */
1982 #line 1983 "parse.tab.c" /* yacc.c:1646 */
1986 #line 450 "parse.y" /* yacc.c:1646 */
1987 { (yyval) = (yyvsp[0]); }
1988 #line 1989 "parse.tab.c" /* yacc.c:1646 */
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 */
1998 #line 455 "parse.y" /* yacc.c:1646 */
1999 { (yyval) = (yyvsp[0]); }
2000 #line 2001 "parse.tab.c" /* yacc.c:1646 */
2004 #line 460 "parse.y" /* yacc.c:1646 */
2005 { (yyval) = (yyvsp[0]); }
2006 #line 2007 "parse.tab.c" /* yacc.c:1646 */
2010 #line 464 "parse.y" /* yacc.c:1646 */
2012 #line 2013 "parse.tab.c" /* yacc.c:1646 */
2016 #line 469 "parse.y" /* yacc.c:1646 */
2017 { (yyval) = (yyvsp[0]); }
2018 #line 2019 "parse.tab.c" /* yacc.c:1646 */
2022 #line 470 "parse.y" /* yacc.c:1646 */
2023 { (yyval) = (yyvsp[0]); }
2024 #line 2025 "parse.tab.c" /* yacc.c:1646 */
2028 #line 479 "parse.y" /* yacc.c:1646 */
2030 const char *name = strdup((*(yyvsp[0]))->string);
2031 add_symbol(name, SYM_ENUM_CONST, NULL, 0);
2033 #line 2034 "parse.tab.c" /* yacc.c:1646 */
2037 #line 484 "parse.y" /* yacc.c:1646 */
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);
2043 #line 2044 "parse.tab.c" /* yacc.c:1646 */
2047 #line 491 "parse.y" /* yacc.c:1646 */
2048 { (yyval) = (yyvsp[0]); }
2049 #line 2050 "parse.tab.c" /* yacc.c:1646 */
2053 #line 495 "parse.y" /* yacc.c:1646 */
2055 #line 2056 "parse.tab.c" /* yacc.c:1646 */
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 */
2065 #line 2066 "parse.tab.c" /* yacc.c:1646 */
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);
2083 YY_STACK_PRINT (yyss, yyssp);
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. */
2093 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2094 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2095 yystate = yytable[yystate];
2097 yystate = yydefgoto[yyn - YYNTOKENS];
2102 /*--------------------------------------.
2103 | yyerrlab -- here on detecting error. |
2104 `--------------------------------------*/
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);
2110 /* If not already recovering from an error, report this error. */
2114 #if ! YYERROR_VERBOSE
2115 yyerror (YY_("syntax error"));
2117 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2120 char const *yymsgp = YY_("syntax error");
2121 int yysyntax_error_status;
2122 yysyntax_error_status = YYSYNTAX_ERROR;
2123 if (yysyntax_error_status == 0)
2125 else if (yysyntax_error_status == 1)
2127 if (yymsg != yymsgbuf)
2128 YYSTACK_FREE (yymsg);
2129 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2133 yymsg_alloc = sizeof yymsgbuf;
2134 yysyntax_error_status = 2;
2138 yysyntax_error_status = YYSYNTAX_ERROR;
2143 if (yysyntax_error_status == 2)
2144 goto yyexhaustedlab;
2146 # undef YYSYNTAX_ERROR
2152 if (yyerrstatus == 3)
2154 /* If just tried and failed to reuse lookahead token after an
2155 error, discard it. */
2157 if (yychar <= YYEOF)
2159 /* Return failure if at end of input. */
2160 if (yychar == YYEOF)
2165 yydestruct ("Error: discarding",
2171 /* Else will try to reuse lookahead token after shifting the error
2176 /*---------------------------------------------------.
2177 | yyerrorlab -- error raised explicitly by YYERROR. |
2178 `---------------------------------------------------*/
2181 /* Pacify compilers like GCC when the user code never invokes
2182 YYERROR and the label yyerrorlab therefore never appears in user
2184 if (/*CONSTCOND*/ 0)
2187 /* Do not reclaim the symbols of the rule whose action triggered
2191 YY_STACK_PRINT (yyss, yyssp);
2196 /*-------------------------------------------------------------.
2197 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2198 `-------------------------------------------------------------*/
2200 yyerrstatus = 3; /* Each real token shifted decrements this. */
2204 yyn = yypact[yystate];
2205 if (!yypact_value_is_default (yyn))
2208 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2216 /* Pop the current state because it cannot handle the error token. */
2221 yydestruct ("Error: popping",
2222 yystos[yystate], yyvsp);
2225 YY_STACK_PRINT (yyss, yyssp);
2228 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2230 YY_IGNORE_MAYBE_UNINITIALIZED_END
2233 /* Shift the error token. */
2234 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2240 /*-------------------------------------.
2241 | yyacceptlab -- YYACCEPT comes here. |
2242 `-------------------------------------*/
2247 /*-----------------------------------.
2248 | yyabortlab -- YYABORT comes here. |
2249 `-----------------------------------*/
2254 #if !defined yyoverflow || YYERROR_VERBOSE
2255 /*-------------------------------------------------.
2256 | yyexhaustedlab -- memory exhaustion comes here. |
2257 `-------------------------------------------------*/
2259 yyerror (YY_("memory exhausted"));
2265 if (yychar != YYEMPTY)
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",
2273 /* Do not reclaim the symbols of the rule whose action triggered
2274 this YYABORT or YYACCEPT. */
2276 YY_STACK_PRINT (yyss, yyssp);
2277 while (yyssp != yyss)
2279 yydestruct ("Cleanup: popping",
2280 yystos[*yyssp], yyvsp);
2285 YYSTACK_FREE (yyss);
2288 if (yymsg != yymsgbuf)
2289 YYSTACK_FREE (yymsg);
2293 #line 505 "parse.y" /* yacc.c:1906 */
2297 yyerror(const char *e)
2299 error_with_pos("%s", e);