1 /* A Bison parser, made by GNU Bison 2.4.425-305c-dirty. */
3 /* Implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
6 2007, 2008, 2009 Free Software Foundation, Inc.
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
37 /* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
44 /* Identify Bison output. */
48 #define YYBISON_VERSION "2.4.425-305c-dirty"
51 #define YYSKELETON_NAME "yacc.c"
62 /* Using locations. */
63 #define YYLSP_NEEDED 1
65 /* Substitute the variable and function names. */
66 #define yyparse gram_parse
67 #define yylex gram_lex
68 #define yyerror gram_error
69 #define yylval gram_lval
70 #define yychar gram_char
71 #define yydebug gram_debug
72 #define yynerrs gram_nerrs
73 #define yylloc gram_lloc
75 /* Copy the first part of user declarations. */
76 /* Line 253 of yacc.c */
77 #line 1 "src/parse-gram.y"
78 /* Bison Grammar Parser -*- C -*-
80 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
83 This file is part of Bison, the GNU Compiler Compiler.
85 This program is free software: you can redistribute it and/or modify
86 it under the terms of the GNU General Public License as published by
87 the Free Software Foundation, either version 3 of the License, or
88 (at your option) any later version.
90 This program is distributed in the hope that it will be useful,
91 but WITHOUT ANY WARRANTY; without even the implied warranty of
92 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
93 GNU General Public License for more details.
95 You should have received a copy of the GNU General Public License
96 along with this program. If not, see <http://www.gnu.org/licenses/>. */
101 #include "complain.h"
102 #include "conflicts.h"
106 #include "muscle-tab.h"
107 #include "named-ref.h"
108 #include "quotearg.h"
111 #include "scan-gram.h"
112 #include "scan-code.h"
114 #define YYLLOC_DEFAULT(Current, Rhs, N) (Current) = lloc_default (Rhs, N)
115 static YYLTYPE
lloc_default (YYLTYPE
const *, int);
117 #define YY_LOCATION_PRINT(File, Loc) \
118 location_print (File, Loc)
120 static void version_check (location
const *loc
, char const *version
);
122 /* Request detailed syntax error messages, and pass them to GRAM_ERROR.
123 FIXME: depends on the undocumented availability of YYLLOC. */
125 #define yyerror(Msg) \
126 gram_error (&yylloc, Msg)
127 static void gram_error (location
const *, char const *);
129 static char const *char_name (char);
131 /* Line 253 of yacc.c */
132 #line 133 "src/parse-gram.c"
134 /* Enabling traces. */
139 /* Enabling verbose error messages. */
140 #ifdef YYERROR_VERBOSE
141 # undef YYERROR_VERBOSE
142 # define YYERROR_VERBOSE 1
144 # define YYERROR_VERBOSE 1
147 /* Enabling the token table. */
148 #ifndef YYTOKEN_TABLE
149 # define YYTOKEN_TABLE 0
152 /* "%code requires" blocks. */
153 /* Line 273 of yacc.c */
154 #line 201 "src/parse-gram.y"
162 param_parse
= 1 << 1,
163 param_both
= param_lex
| param_parse
168 /* Line 273 of yacc.c */
169 #line 170 "src/parse-gram.c"
174 /* Put the tokens into the symbol table, so that GDB and other debuggers
183 PERCENT_DESTRUCTOR
= 263,
184 PERCENT_PRINTER
= 264,
187 PERCENT_NONASSOC
= 267,
188 PERCENT_PRECEDENCE
= 268,
193 PERCENT_DEFAULT_PREC
= 273,
194 PERCENT_DEFINE
= 274,
195 PERCENT_DEFINES
= 275,
196 PERCENT_ERROR_VERBOSE
= 276,
197 PERCENT_EXPECT
= 277,
198 PERCENT_EXPECT_RR
= 278,
200 PERCENT_FILE_PREFIX
= 280,
201 PERCENT_GLR_PARSER
= 281,
202 PERCENT_INITIAL_ACTION
= 282,
203 PERCENT_LANGUAGE
= 283,
204 PERCENT_NAME_PREFIX
= 284,
205 PERCENT_NO_DEFAULT_PREC
= 285,
206 PERCENT_NO_LINES
= 286,
207 PERCENT_NONDETERMINISTIC_PARSER
= 287,
208 PERCENT_OUTPUT
= 288,
209 PERCENT_REQUIRE
= 289,
210 PERCENT_SKELETON
= 290,
212 PERCENT_TOKEN_TABLE
= 292,
213 PERCENT_VERBOSE
= 293,
221 PERCENT_PERCENT
= 301,
237 #define PERCENT_TOKEN 260
238 #define PERCENT_NTERM 261
239 #define PERCENT_TYPE 262
240 #define PERCENT_DESTRUCTOR 263
241 #define PERCENT_PRINTER 264
242 #define PERCENT_LEFT 265
243 #define PERCENT_RIGHT 266
244 #define PERCENT_NONASSOC 267
245 #define PERCENT_PRECEDENCE 268
246 #define PERCENT_PREC 269
247 #define PERCENT_DPREC 270
248 #define PERCENT_MERGE 271
249 #define PERCENT_CODE 272
250 #define PERCENT_DEFAULT_PREC 273
251 #define PERCENT_DEFINE 274
252 #define PERCENT_DEFINES 275
253 #define PERCENT_ERROR_VERBOSE 276
254 #define PERCENT_EXPECT 277
255 #define PERCENT_EXPECT_RR 278
256 #define PERCENT_FLAG 279
257 #define PERCENT_FILE_PREFIX 280
258 #define PERCENT_GLR_PARSER 281
259 #define PERCENT_INITIAL_ACTION 282
260 #define PERCENT_LANGUAGE 283
261 #define PERCENT_NAME_PREFIX 284
262 #define PERCENT_NO_DEFAULT_PREC 285
263 #define PERCENT_NO_LINES 286
264 #define PERCENT_NONDETERMINISTIC_PARSER 287
265 #define PERCENT_OUTPUT 288
266 #define PERCENT_REQUIRE 289
267 #define PERCENT_SKELETON 290
268 #define PERCENT_START 291
269 #define PERCENT_TOKEN_TABLE 292
270 #define PERCENT_VERBOSE 293
271 #define PERCENT_YACC 294
272 #define BRACED_CODE 295
278 #define PERCENT_PERCENT 301
281 #define SEMICOLON 304
285 #define BRACKETED_ID 308
286 #define PERCENT_PARAM 309
287 #define PERCENT_UNION 310
292 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
293 typedef union YYSTYPE
295 /* Line 278 of yacc.c */
296 #line 88 "src/parse-gram.y"
302 named_ref
*named_ref
;
306 unsigned char character
;
308 /* Line 278 of yacc.c */
309 #line 225 "src/parse-gram.y"
314 /* Line 278 of yacc.c */
315 #line 316 "src/parse-gram.c"
317 # define YYSTYPE_IS_TRIVIAL 1
318 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
319 # define YYSTYPE_IS_DECLARED 1
322 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
323 typedef struct YYLTYPE
330 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
331 # define YYLTYPE_IS_DECLARED 1
332 # define YYLTYPE_IS_TRIVIAL 1
336 /* Copy the second part of user declarations. */
338 /* Line 328 of yacc.c */
339 #line 340 "src/parse-gram.c"
340 /* Unqualified %code blocks. */
341 /* Line 329 of yacc.c */
342 #line 56 "src/parse-gram.y"
344 static int current_prec
= 0;
345 static location current_lhs_location
;
346 static named_ref
*current_lhs_named_ref
;
347 static symbol
*current_lhs
;
348 static symbol_class current_class
= unknown_sym
;
349 static uniqstr current_type
= NULL
;
351 #define YYTYPE_INT16 int_fast16_t
352 #define YYTYPE_INT8 int_fast8_t
353 #define YYTYPE_UINT16 uint_fast16_t
354 #define YYTYPE_UINT8 uint_fast8_t
356 /* Line 329 of yacc.c */
357 #line 214 "src/parse-gram.y"
359 /** Add a lex-param and/or a parse-param.
361 * \param type where to push this formal argument.
362 * \param decl the formal argument. Destroyed.
363 * \param loc the location in the source.
365 static void add_param (param_type type
, char *decl
, location loc
);
366 static param_type current_param
= param_none
;
369 /* Line 329 of yacc.c */
370 #line 371 "src/parse-gram.c"
377 typedef YYTYPE_UINT8 yytype_uint8
;
379 typedef unsigned char yytype_uint8
;
383 typedef YYTYPE_INT8 yytype_int8
;
384 #elif (defined __STDC__ || defined __C99__FUNC__ \
385 || defined __cplusplus || defined _MSC_VER)
386 typedef signed char yytype_int8
;
388 typedef short int yytype_int8
;
392 typedef YYTYPE_UINT16 yytype_uint16
;
394 typedef unsigned short int yytype_uint16
;
398 typedef YYTYPE_INT16 yytype_int16
;
400 typedef short int yytype_int16
;
404 # ifdef __SIZE_TYPE__
405 # define YYSIZE_T __SIZE_TYPE__
406 # elif defined size_t
407 # define YYSIZE_T size_t
408 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
409 || defined __cplusplus || defined _MSC_VER)
410 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
411 # define YYSIZE_T size_t
413 # define YYSIZE_T unsigned int
417 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
422 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
423 # define YY_(msgid) dgettext ("bison-runtime", msgid)
427 # define YY_(msgid) msgid
431 /* Suppress unused-variable warnings by "using" E. */
432 #if ! defined lint || defined __GNUC__
433 # define YYUSE(e) ((void) (e))
435 # define YYUSE(e) /* empty */
438 /* Identity function, used to suppress warnings about constant conditions. */
442 #if (defined __STDC__ || defined __C99__FUNC__ \
443 || defined __cplusplus || defined _MSC_VER)
456 #if ! defined yyoverflow || YYERROR_VERBOSE
458 /* The parser invokes alloca or malloc; define the necessary symbols. */
460 # ifdef YYSTACK_USE_ALLOCA
461 # if YYSTACK_USE_ALLOCA
463 # define YYSTACK_ALLOC __builtin_alloca
464 # elif defined __BUILTIN_VA_ARG_INCR
465 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
467 # define YYSTACK_ALLOC __alloca
468 # elif defined _MSC_VER
469 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
470 # define alloca _alloca
472 # define YYSTACK_ALLOC alloca
473 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
474 || defined __cplusplus || defined _MSC_VER)
475 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
484 # ifdef YYSTACK_ALLOC
485 /* Pacify GCC's `empty if-body' warning. */
486 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
487 # ifndef YYSTACK_ALLOC_MAXIMUM
488 /* The OS might guarantee only one guard page at the bottom of the stack,
489 and a page size can be as small as 4096 bytes. So we cannot safely
490 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
491 to allow for a few compiler-allocated temporary stack slots. */
492 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
495 # define YYSTACK_ALLOC YYMALLOC
496 # define YYSTACK_FREE YYFREE
497 # ifndef YYSTACK_ALLOC_MAXIMUM
498 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
500 # if (defined __cplusplus && ! defined _STDLIB_H \
501 && ! ((defined YYMALLOC || defined malloc) \
502 && (defined YYFREE || defined free)))
503 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
509 # define YYMALLOC malloc
510 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
511 || defined __cplusplus || defined _MSC_VER)
512 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
517 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
518 || defined __cplusplus || defined _MSC_VER)
519 void free (void *); /* INFRINGES ON USER NAME SPACE */
523 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
526 #if (! defined yyoverflow \
527 && (! defined __cplusplus \
528 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
529 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
531 /* A type that is properly aligned for any stack member. */
534 yytype_int16 yyss_alloc
;
539 /* The size of the maximum gap between one aligned stack and the next. */
540 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
542 /* The size of an array large to enough to hold all stacks, each with
544 # define YYSTACK_BYTES(N) \
545 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
546 + 2 * YYSTACK_GAP_MAXIMUM)
548 /* Copy COUNT objects from FROM to TO. The source and destination do
551 # if defined __GNUC__ && 1 < __GNUC__
552 # define YYCOPY(To, From, Count) \
553 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
555 # define YYCOPY(To, From, Count) \
559 for (yyi = 0; yyi < (Count); yyi++) \
560 (To)[yyi] = (From)[yyi]; \
566 /* Relocate STACK from its old location to the new one. The
567 local variables YYSIZE and YYSTACKSIZE give the old and new number of
568 elements in the stack, and YYPTR gives the new location of the
569 stack. Advance YYPTR to a properly aligned location for the next
571 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
574 YYSIZE_T yynewbytes; \
575 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
576 Stack = &yyptr->Stack_alloc; \
577 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
578 yyptr += yynewbytes / sizeof (*yyptr); \
584 /* YYFINAL -- State number of the termination state. */
586 /* YYLAST -- Last index in YYTABLE. */
589 /* YYNTOKENS -- Number of terminals. */
591 /* YYNNTS -- Number of nonterminals. */
593 /* YYNRULES -- Number of rules. */
595 /* YYNSTATES -- Number of states. */
596 #define YYNSTATES 148
598 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
599 by yylex, with out-of-bounds checking. */
601 #define YYMAXUTOK 310
603 #define YYTRANSLATE(YYX) \
604 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
606 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
607 as returned by yylex, without out-of-bounds checking. */
608 static const yytype_uint8 yytranslate
[] =
610 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
611 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
612 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
613 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
614 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
615 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
616 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
617 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
618 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
619 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
620 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
621 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
622 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
623 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
624 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
625 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
626 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
627 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
628 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
629 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
630 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
631 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
632 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
633 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
634 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
635 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
636 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
637 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
638 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
639 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
640 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
645 /* YYRLINEYYN -- Source line where rule number YYN was defined. */
646 static const yytype_uint16 yyrline
[] =
648 0, 250, 250, 258, 260, 264, 265, 275, 279, 284,
649 285, 290, 295, 296, 297, 298, 299, 304, 313, 314,
650 315, 316, 317, 318, 319, 320, 320, 321, 322, 346,
651 347, 348, 349, 353, 354, 363, 364, 365, 369, 376,
652 383, 387, 391, 398, 413, 414, 418, 430, 430, 435,
653 435, 440, 451, 466, 467, 468, 469, 473, 474, 479,
654 481, 486, 487, 492, 494, 499, 500, 504, 505, 506,
655 507, 512, 517, 522, 528, 534, 545, 546, 555, 556,
656 562, 563, 564, 571, 571, 576, 577, 578, 583, 585,
657 587, 589, 591, 593, 598, 600, 611, 612, 617, 618,
658 619, 628, 648, 650, 659, 664, 665, 670, 677, 679
662 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
663 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
664 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
665 static const char *const yytname
[] =
667 "\"end of file\"", "error", "$undefined", "\"string\"", "\"integer\"",
668 "\"%token\"", "\"%nterm\"", "\"%type\"", "\"%destructor\"",
669 "\"%printer\"", "\"%left\"", "\"%right\"", "\"%nonassoc\"",
670 "\"%precedence\"", "\"%prec\"", "\"%dprec\"", "\"%merge\"", "\"%code\"",
671 "\"%default-prec\"", "\"%define\"", "\"%defines\"", "\"%error-verbose\"",
672 "\"%expect\"", "\"%expect-rr\"", "\"%<flag>\"", "\"%file-prefix\"",
673 "\"%glr-parser\"", "\"%initial-action\"", "\"%language\"",
674 "\"%name-prefix\"", "\"%no-default-prec\"", "\"%no-lines\"",
675 "\"%nondeterministic-parser\"", "\"%output\"", "\"%require\"",
676 "\"%skeleton\"", "\"%start\"", "\"%token-table\"", "\"%verbose\"",
677 "\"%yacc\"", "\"{...}\"", "\"char\"", "\"epilogue\"", "\"=\"",
678 "\"identifier\"", "\"identifier:\"", "\"%%\"", "\"|\"", "\"%{...%}\"",
679 "\";\"", "\"<tag>\"", "\"<*>\"", "\"<>\"", "\"[identifier]\"",
680 "\"%param\"", "\"%union\"", "$accept", "input", "prologue_declarations",
681 "prologue_declaration", "$@1", "params", "grammar_declaration",
682 "union_name", "symbol_declaration", "$@2", "$@3",
683 "precedence_declaration", "precedence_declarator", "tag.opt",
684 "symbols.prec", "symbol.prec", "symbols.1", "generic_symlist",
685 "generic_symlist_item", "symbol_def", "symbol_defs.1", "grammar",
686 "rules_or_grammar_declaration", "rules", "$@4", "rhses.1", "rhs",
687 "named_ref.opt", "variable", "content.opt", "braceless", "id",
688 "id_colon", "symbol", "string_as_id", "epilogue.opt", 0
693 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
694 (internal) symbol number NUM (which must be that of a token). */
695 static const yytype_uint16 yytoknum
[] =
697 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
698 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
699 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
700 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
701 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
702 305, 306, 307, 308, 309, 310
706 #define YYPACT_NINF -88
708 #define yypact_value_is_default(yystate) \
711 #define YYTABLE_NINF -109
713 #define yytable_value_is_error(yytable_value) \
716 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
718 static const yytype_int16 yypact
[] =
720 -88, 38, 109, -88, -88, -88, -8, 13, 41, -88,
721 -88, -88, -88, -17, -88, 14, 51, -88, 53, 78,
722 -88, 2, -88, 43, 81, 17, -88, -88, -88, 30,
723 82, 83, 36, -88, -88, -88, 58, -88, -88, -88,
724 45, -88, -88, -88, -88, 40, -1, -1, 36, 0,
725 0, -88, 52, -88, -88, -88, 18, -88, -88, -88,
726 -88, 88, -88, -88, -88, 90, -88, 92, -88, -88,
727 -88, -88, -88, -88, -88, -88, 47, -88, 48, 1,
728 -88, -88, 46, 60, -88, 52, -88, 36, -88, -88,
729 -1, 31, -1, 36, -88, -88, -88, -88, 0, -88,
730 -88, 0, -88, -88, -88, -88, -88, -88, -88, -88,
731 -88, 56, -88, -88, -88, -88, -88, 61, -88, 36,
732 -88, 100, -88, 103, -88, -88, -88, -88, -88, -88,
733 -88, -88, -88, -23, 146, -88, -88, 36, 104, 57,
734 46, 46, 146, -88, -88, -88, -88, -88
737 /* YYDEFACT[S] -- default reduction number in state S. Performed when
738 YYTABLE does not specify something else to do. Zero means the default
740 static const yytype_uint8 yydefact
[] =
742 3, 0, 0, 1, 49, 47, 0, 0, 0, 53,
743 54, 55, 56, 0, 40, 0, 9, 11, 0, 0,
744 7, 0, 16, 0, 0, 0, 41, 21, 22, 0,
745 0, 0, 0, 29, 30, 31, 0, 6, 32, 25,
746 44, 4, 5, 36, 35, 57, 0, 0, 0, 0,
747 0, 101, 0, 42, 97, 96, 98, 10, 12, 13,
748 14, 0, 17, 18, 19, 0, 23, 0, 27, 28,
749 107, 103, 102, 105, 37, 106, 0, 104, 0, 0,
750 78, 80, 94, 0, 45, 0, 58, 0, 71, 76,
751 50, 72, 48, 51, 63, 68, 69, 70, 38, 65,
752 67, 39, 43, 100, 99, 8, 15, 20, 24, 82,
753 81, 0, 79, 2, 95, 83, 34, 26, 46, 52,
754 59, 61, 77, 73, 74, 64, 66, 109, 88, 33,
755 60, 62, 75, 84, 85, 88, 87, 0, 0, 0,
756 94, 94, 86, 91, 92, 93, 90, 89
759 /* YYPGOTO[NTERM-NUM]. */
760 static const yytype_int8 yypgoto
[] =
762 -88, -88, -88, -88, -88, -88, 107, -88, -88, -88,
763 -88, -88, -88, -88, -88, -7, -88, 73, -76, -60,
764 64, -88, 71, -88, -88, -88, -11, -62, -88, -88,
765 -37, -18, -88, -32, -87, -88
768 /* YYDEFGOTO[NTERM-NUM]. */
769 static const yytype_int16 yydefgoto
[] =
771 -1, 1, 2, 41, 83, 117, 78, 85, 43, 47,
772 46, 44, 45, 87, 119, 120, 93, 98, 99, 89,
773 90, 79, 80, 81, 128, 133, 134, 115, 56, 105,
774 53, 73, 82, 100, 75, 113
777 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
778 positive, shift that token. If negative, reduce the rule which
779 number is the opposite. If YYTABLE_NINF, syntax error. */
780 static const yytype_int16 yytable
[] =
782 74, -108, 76, 70, 124, 60, 4, 5, 6, 7,
783 8, 9, 10, 11, 12, 102, 94, 54, 13, 14,
784 64, 103, 126, 51, 135, 126, 136, 52, 91, 91,
785 122, 26, 122, 66, 70, 123, 132, 32, 3, 70,
786 71, 71, 48, 72, 72, 61, 77, 111, 118, 88,
787 95, 96, 97, 49, 57, 121, 40, 58, 55, 76,
788 65, 125, 104, 4, 5, 6, 7, 8, 9, 10,
789 11, 12, 91, 67, 91, 13, 14, 71, 146, 147,
790 72, 50, 59, 62, 63, 68, 69, 121, 26, 84,
791 86, 106, 51, 107, 32, 108, 109, 110, 127, 114,
792 116, 129, 141, 77, 131, 143, 70, 145, 144, 42,
793 141, 92, 130, 40, 4, 5, 6, 7, 8, 9,
794 10, 11, 12, 101, 142, 0, 13, 14, 15, 16,
795 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
796 27, 28, 29, 30, 31, 32, 33, 34, 35, 70,
797 112, 0, 0, 0, 0, 36, 0, 37, 38, 0,
798 137, 138, 139, 39, 40, 0, 0, 0, 0, 0,
799 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
800 0, 0, 0, 0, 0, 0, 140, 71, 0, 0,
804 static const yytype_int16 yycheck
[] =
806 32, 0, 1, 3, 91, 3, 5, 6, 7, 8,
807 9, 10, 11, 12, 13, 52, 48, 3, 17, 18,
808 3, 3, 98, 40, 47, 101, 49, 44, 46, 47,
809 90, 30, 92, 3, 3, 4, 123, 36, 0, 3,
810 41, 41, 50, 44, 44, 43, 45, 46, 85, 50,
811 50, 51, 52, 40, 3, 87, 55, 4, 44, 1,
812 43, 93, 44, 5, 6, 7, 8, 9, 10, 11,
813 12, 13, 90, 43, 92, 17, 18, 41, 140, 141,
814 44, 40, 4, 40, 3, 3, 3, 119, 30, 44,
815 50, 3, 40, 3, 36, 3, 49, 49, 42, 53,
816 40, 40, 134, 45, 4, 137, 3, 50, 4, 2,
817 142, 47, 119, 55, 5, 6, 7, 8, 9, 10,
818 11, 12, 13, 50, 135, -1, 17, 18, 19, 20,
819 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
820 31, 32, 33, 34, 35, 36, 37, 38, 39, 3,
821 79, -1, -1, -1, -1, 46, -1, 48, 49, -1,
822 14, 15, 16, 54, 55, -1, -1, -1, -1, -1,
823 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
824 -1, -1, -1, -1, -1, -1, 40, 41, -1, -1,
828 /* STOS_[STATE-NUM] -- The (internal number of the) accessing
829 symbol of state STATE-NUM. */
830 static const yytype_uint8 yystos
[] =
832 0, 57, 58, 0, 5, 6, 7, 8, 9, 10,
833 11, 12, 13, 17, 18, 19, 20, 21, 22, 23,
834 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
835 34, 35, 36, 37, 38, 39, 46, 48, 49, 54,
836 55, 59, 62, 64, 67, 68, 66, 65, 50, 40,
837 40, 40, 44, 86, 3, 44, 84, 3, 4, 4,
838 3, 43, 40, 3, 3, 43, 3, 43, 3, 3,
839 3, 41, 44, 87, 89, 90, 1, 45, 62, 77,
840 78, 79, 88, 60, 44, 63, 50, 69, 50, 75,
841 76, 87, 76, 72, 89, 50, 51, 52, 73, 74,
842 89, 73, 86, 3, 44, 85, 3, 3, 3, 49,
843 49, 46, 78, 91, 53, 83, 40, 61, 86, 70,
844 71, 89, 75, 4, 90, 89, 74, 42, 80, 40,
845 71, 4, 90, 81, 82, 47, 49, 14, 15, 16,
846 40, 89, 82, 89, 4, 50, 83, 83
849 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
850 static const yytype_uint8 yyr1
[] =
852 0, 56, 57, 58, 58, 59, 59, 59, 59, 59,
853 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
854 59, 59, 59, 59, 59, 60, 59, 59, 59, 59,
855 59, 59, 59, 61, 61, 62, 62, 62, 62, 62,
856 62, 62, 62, 62, 63, 63, 62, 65, 64, 66,
857 64, 64, 67, 68, 68, 68, 68, 69, 69, 70,
858 70, 71, 71, 72, 72, 73, 73, 74, 74, 74,
859 74, 75, 75, 75, 75, 75, 76, 76, 77, 77,
860 78, 78, 78, 80, 79, 81, 81, 81, 82, 82,
861 82, 82, 82, 82, 83, 83, 84, 84, 85, 85,
862 85, 86, 87, 87, 88, 89, 89, 90, 91, 91
865 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
866 static const yytype_uint8 yyr2
[] =
868 0, 2, 4, 0, 2, 1, 1, 1, 3, 1,
869 2, 1, 2, 2, 2, 3, 1, 2, 2, 2,
870 3, 1, 1, 2, 3, 0, 3, 2, 2, 1,
871 1, 1, 1, 2, 1, 1, 1, 2, 3, 3,
872 1, 1, 2, 3, 0, 1, 3, 0, 3, 0,
873 3, 3, 3, 1, 1, 1, 1, 0, 1, 1,
874 2, 1, 2, 1, 2, 1, 2, 1, 1, 1,
875 1, 1, 1, 2, 2, 3, 1, 2, 1, 2,
876 1, 2, 2, 0, 4, 1, 3, 2, 0, 3,
877 3, 3, 3, 3, 0, 1, 1, 1, 0, 1,
878 1, 1, 1, 1, 1, 1, 1, 1, 0, 2
882 #define yyerrok (yyerrstatus = 0)
883 #define yyclearin (yychar = YYEMPTY)
887 #define YYACCEPT goto yyacceptlab
888 #define YYABORT goto yyabortlab
889 #define YYERROR goto yyerrorlab
892 /* Like YYERROR except do call yyerror. This remains here temporarily
893 to ease the transition to the new meaning of YYERROR, for GCC.
894 Once GCC version 2 has supplanted version 1, this can go. */
896 #define YYFAIL goto yyerrlab
898 #define YYRECOVERING() (!!yyerrstatus)
900 #define YYBACKUP(Token, Value) \
902 if (yychar == YYEMPTY && yylen == 1) \
906 yytoken = YYTRANSLATE (yychar); \
912 yyerror (YY_("syntax error: cannot back up")); \
919 #define YYERRCODE 256
922 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
923 If N is 0, then set CURRENT to the empty location which ends
924 the previous symbol: RHS[0] (always defined). */
926 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
927 #ifndef YYLLOC_DEFAULT
928 # define YYLLOC_DEFAULT(Current, Rhs, N) \
932 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
933 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
934 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
935 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
939 (Current).first_line = (Current).last_line = \
940 YYRHSLOC (Rhs, 0).last_line; \
941 (Current).first_column = (Current).last_column = \
942 YYRHSLOC (Rhs, 0).last_column; \
948 /* YY_LOCATION_PRINT -- Print the location on the stream.
949 This macro was not mandated originally: define only if we know
950 we won't break user code: when these are the locations we know. */
952 #ifndef YY_LOCATION_PRINT
953 # if YYLTYPE_IS_TRIVIAL
954 # define YY_LOCATION_PRINT(File, Loc) \
955 fprintf (File, "%d.%d-%d.%d", \
956 (Loc).first_line, (Loc).first_column, \
957 (Loc).last_line, (Loc).last_column)
959 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
964 /* YYLEX -- calling `yylex' with the right arguments. */
967 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
969 # define YYLEX yylex (&yylval, &yylloc)
972 /* Enable debugging if requested. */
976 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
977 # define YYFPRINTF fprintf
980 # define YYDPRINTF(Args) \
986 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
990 YYFPRINTF (stderr, "%s ", Title); \
991 yy_symbol_print (stderr, \
992 Type, Value, Location); \
993 YYFPRINTF (stderr, "\n"); \
998 /*--------------------------------.
999 | Print this symbol on YYOUTPUT. |
1000 `--------------------------------*/
1003 #if (defined __STDC__ || defined __C99__FUNC__ \
1004 || defined __cplusplus || defined _MSC_VER)
1006 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, YYLTYPE
const * const yylocationp
)
1009 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yylocationp
)
1012 YYSTYPE
const * const yyvaluep
;
1013 YYLTYPE
const * const yylocationp
;
1018 YYUSE (yylocationp
);
1020 if (yytype
< YYNTOKENS
)
1021 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
1029 /* Line 715 of yacc.c */
1030 #line 175 "src/parse-gram.y"
1031 { fputs (quotearg_style (c_quoting_style
, ((*yyvaluep
).chars
)), stderr
); }
1032 /* Line 715 of yacc.c */
1033 #line 1034 "src/parse-gram.c"
1036 case 4: // "integer"
1038 /* Line 715 of yacc.c */
1039 #line 188 "src/parse-gram.y"
1040 { fprintf (stderr
, "%d", ((*yyvaluep
).integer
)); }
1041 /* Line 715 of yacc.c */
1042 #line 1043 "src/parse-gram.c"
1045 case 24: // "%<flag>"
1047 /* Line 715 of yacc.c */
1048 #line 184 "src/parse-gram.y"
1049 { fprintf (stderr
, "%%%s", ((*yyvaluep
).uniqstr
)); }
1050 /* Line 715 of yacc.c */
1051 #line 1052 "src/parse-gram.c"
1056 /* Line 715 of yacc.c */
1057 #line 177 "src/parse-gram.y"
1058 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).code
)); }
1059 /* Line 715 of yacc.c */
1060 #line 1061 "src/parse-gram.c"
1065 /* Line 715 of yacc.c */
1066 #line 169 "src/parse-gram.y"
1067 { fputs (char_name (((*yyvaluep
).character
)), stderr
); }
1068 /* Line 715 of yacc.c */
1069 #line 1070 "src/parse-gram.c"
1072 case 42: // "epilogue"
1074 /* Line 715 of yacc.c */
1075 #line 177 "src/parse-gram.y"
1076 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).chars
)); }
1077 /* Line 715 of yacc.c */
1078 #line 1079 "src/parse-gram.c"
1081 case 44: // "identifier"
1083 /* Line 715 of yacc.c */
1084 #line 182 "src/parse-gram.y"
1085 { fputs (((*yyvaluep
).uniqstr
), stderr
); }
1086 /* Line 715 of yacc.c */
1087 #line 1088 "src/parse-gram.c"
1090 case 45: // "identifier:"
1092 /* Line 715 of yacc.c */
1093 #line 183 "src/parse-gram.y"
1094 { fprintf (stderr
, "%s:", ((*yyvaluep
).uniqstr
)); }
1095 /* Line 715 of yacc.c */
1096 #line 1097 "src/parse-gram.c"
1099 case 48: // "%{...%}"
1101 /* Line 715 of yacc.c */
1102 #line 177 "src/parse-gram.y"
1103 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).chars
)); }
1104 /* Line 715 of yacc.c */
1105 #line 1106 "src/parse-gram.c"
1110 /* Line 715 of yacc.c */
1111 #line 185 "src/parse-gram.y"
1112 { fprintf (stderr
, "<%s>", ((*yyvaluep
).uniqstr
)); }
1113 /* Line 715 of yacc.c */
1114 #line 1115 "src/parse-gram.c"
1117 case 54: // "%param"
1119 /* Line 715 of yacc.c */
1120 #line 230 "src/parse-gram.y"
1122 switch (((*yyvaluep
).param
))
1124 #define CASE(In, Out) \
1125 case param_ ## In: fputs ("%" #Out, stderr); break
1126 CASE(lex
, lex
-param
);
1127 CASE(parse
, parse
-param
);
1130 case param_none
: aver (false); break;
1133 /* Line 715 of yacc.c */
1134 #line 1135 "src/parse-gram.c"
1137 case 84: // variable
1139 /* Line 715 of yacc.c */
1140 #line 182 "src/parse-gram.y"
1141 { fputs (((*yyvaluep
).uniqstr
), stderr
); }
1142 /* Line 715 of yacc.c */
1143 #line 1144 "src/parse-gram.c"
1146 case 85: // content.opt
1148 /* Line 715 of yacc.c */
1149 #line 177 "src/parse-gram.y"
1150 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).chars
)); }
1151 /* Line 715 of yacc.c */
1152 #line 1153 "src/parse-gram.c"
1155 case 86: // braceless
1157 /* Line 715 of yacc.c */
1158 #line 177 "src/parse-gram.y"
1159 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).chars
)); }
1160 /* Line 715 of yacc.c */
1161 #line 1162 "src/parse-gram.c"
1166 /* Line 715 of yacc.c */
1167 #line 191 "src/parse-gram.y"
1168 { fprintf (stderr
, "%s", ((*yyvaluep
).symbol
)->tag
); }
1169 /* Line 715 of yacc.c */
1170 #line 1171 "src/parse-gram.c"
1173 case 88: // id_colon
1175 /* Line 715 of yacc.c */
1176 #line 192 "src/parse-gram.y"
1177 { fprintf (stderr
, "%s:", ((*yyvaluep
).symbol
)->tag
); }
1178 /* Line 715 of yacc.c */
1179 #line 1180 "src/parse-gram.c"
1184 /* Line 715 of yacc.c */
1185 #line 191 "src/parse-gram.y"
1186 { fprintf (stderr
, "%s", ((*yyvaluep
).symbol
)->tag
); }
1187 /* Line 715 of yacc.c */
1188 #line 1189 "src/parse-gram.c"
1191 case 90: // string_as_id
1193 /* Line 715 of yacc.c */
1194 #line 191 "src/parse-gram.y"
1195 { fprintf (stderr
, "%s", ((*yyvaluep
).symbol
)->tag
); }
1196 /* Line 715 of yacc.c */
1197 #line 1198 "src/parse-gram.c"
1206 /*--------------------------------.
1207 | Print this symbol on YYOUTPUT. |
1208 `--------------------------------*/
1210 #if (defined __STDC__ || defined __C99__FUNC__ \
1211 || defined __cplusplus || defined _MSC_VER)
1213 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, YYLTYPE
const * const yylocationp
)
1216 yy_symbol_print (yyoutput
, yytype
, yyvaluep
, yylocationp
)
1219 YYSTYPE
const * const yyvaluep
;
1220 YYLTYPE
const * const yylocationp
;
1223 if (yytype
< YYNTOKENS
)
1224 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
1226 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
1228 YY_LOCATION_PRINT (yyoutput
, *yylocationp
);
1229 YYFPRINTF (yyoutput
, ": ");
1230 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yylocationp
);
1231 YYFPRINTF (yyoutput
, ")");
1234 /*------------------------------------------------------------------.
1235 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1237 `------------------------------------------------------------------*/
1239 #if (defined __STDC__ || defined __C99__FUNC__ \
1240 || defined __cplusplus || defined _MSC_VER)
1242 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
1245 yy_stack_print (yybottom
, yytop
)
1246 yytype_int16
*yybottom
;
1247 yytype_int16
*yytop
;
1250 YYFPRINTF (stderr
, "Stack now");
1251 for (; yybottom
<= yytop
; yybottom
++)
1253 int yybot
= *yybottom
;
1254 YYFPRINTF (stderr
, " %d", yybot
);
1256 YYFPRINTF (stderr
, "\n");
1259 # define YY_STACK_PRINT(Bottom, Top) \
1262 yy_stack_print ((Bottom), (Top)); \
1266 /*------------------------------------------------.
1267 | Report that the YYRULE is going to be reduced. |
1268 `------------------------------------------------*/
1270 #if (defined __STDC__ || defined __C99__FUNC__ \
1271 || defined __cplusplus || defined _MSC_VER)
1273 yy_reduce_print (yytype_int16
*yyssp
, YYSTYPE
*yyvsp
, YYLTYPE
*yylsp
, int yyrule
)
1276 yy_reduce_print (yyssp
, yyvsp
, yylsp
, yyrule
)
1277 yytype_int16
*yyssp
;
1283 unsigned long int yylno
= yyrline
[yyrule
];
1284 int yynrhs
= yyr2
[yyrule
];
1286 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
1288 /* The symbols being reduced. */
1289 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
1291 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
1292 yy_symbol_print (stderr
,
1293 yystos
[yyssp
[yyi
+ 1 - yynrhs
]],
1294 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
1295 , &(yylsp
[(yyi
+ 1) - (yynrhs
)]) );
1296 YYFPRINTF (stderr
, "\n");
1300 # define YY_REDUCE_PRINT(Rule) \
1303 yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
1306 /* Nonzero means print parse trace. It is left uninitialized so that
1307 multiple parsers can coexist. */
1309 #else /* !YYDEBUG */
1310 # define YYDPRINTF(Args)
1311 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1312 # define YY_STACK_PRINT(Bottom, Top)
1313 # define YY_REDUCE_PRINT(Rule)
1314 #endif /* !YYDEBUG */
1317 /* YYINITDEPTH -- initial size of the parser's stacks. */
1319 # define YYINITDEPTH 200
1322 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1323 if the built-in stack extension method is used).
1325 Do not make this value too large; the results are undefined if
1326 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1327 evaluated with infinite-precision integer arithmetic. */
1330 # define YYMAXDEPTH 10000
1338 # if defined __GLIBC__ && defined _STRING_H
1339 # define yystrlen strlen
1341 /* Return the length of YYSTR. */
1342 #if (defined __STDC__ || defined __C99__FUNC__ \
1343 || defined __cplusplus || defined _MSC_VER)
1345 yystrlen (const char *yystr
)
1353 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1361 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1362 # define yystpcpy stpcpy
1364 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1366 #if (defined __STDC__ || defined __C99__FUNC__ \
1367 || defined __cplusplus || defined _MSC_VER)
1369 yystpcpy (char *yydest
, const char *yysrc
)
1372 yystpcpy (yydest
, yysrc
)
1378 const char *yys
= yysrc
;
1380 while ((*yyd
++ = *yys
++) != '\0')
1389 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1390 quotes and backslashes, so that it's suitable for yyerror. The
1391 heuristic is that double-quoting is unnecessary unless the string
1392 contains an apostrophe, a comma, or backslash (other than
1393 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1394 null, do not copy; instead, return the length of what the result
1397 yytnamerr (char *yyres
, const char *yystr
)
1402 char const *yyp
= yystr
;
1409 goto do_not_strip_quotes
;
1413 goto do_not_strip_quotes
;
1426 do_not_strip_quotes
: ;
1430 return yystrlen (yystr
);
1432 return yystpcpy (yyres
, yystr
) - yyres
;
1436 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1437 about the unexpected token YYTOKEN while in state YYSTATE.
1439 Return 0 if *YYMSG was successfully written. Return 1 if an ordinary
1440 "syntax error" message will suffice instead. Return 2 if *YYMSG is
1441 not large enough to hold the message. In the last case, also set
1442 *YYMSG_ALLOC to either (a) the required number of bytes or (b) zero
1443 if the required number of bytes is too large to store. */
1445 yysyntax_error (YYSIZE_T
*yymsg_alloc
, char **yymsg
,
1446 int yystate
, int yytoken
)
1448 int yyn
= yypact
[yystate
];
1450 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
1454 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytoken
]);
1455 YYSIZE_T yysize
= yysize0
;
1457 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1458 /* Internationalized format string. */
1459 const char *yyformat
= 0;
1460 /* Arguments of yyformat. */
1461 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1463 /* Start YYX at -YYN if negative to avoid negative indexes in
1464 YYCHECK. In other words, skip the first -YYN actions for this
1465 state because they are default actions. */
1466 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1468 /* Stay within bounds of both yycheck and yytname. */
1469 int yychecklim
= YYLAST
- yyn
+ 1;
1470 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1471 /* Number of reported tokens (one for the "unexpected", one per
1476 yyarg
[yycount
++] = yytname
[yytoken
];
1478 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1479 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
1480 && !yytable_value_is_error (yytable
[yyx
+ yyn
]))
1482 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1488 yyarg
[yycount
++] = yytname
[yyx
];
1489 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1490 if (! (yysize
<= yysize1
1491 && yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1502 #define YYCASE_(N, S) \
1506 YYCASE_(1, YY_("syntax error, unexpected %s"));
1507 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1508 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1509 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1510 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1514 yysize1
= yysize
+ yystrlen (yyformat
);
1515 if (! (yysize
<= yysize1
&& yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1523 if (*yymsg_alloc
< yysize
)
1525 *yymsg_alloc
= 2 * yysize
;
1526 if (! (yysize
<= *yymsg_alloc
1527 && *yymsg_alloc
<= YYSTACK_ALLOC_MAXIMUM
))
1528 *yymsg_alloc
= YYSTACK_ALLOC_MAXIMUM
;
1532 /* Avoid sprintf, as that infringes on the user's name space.
1533 Don't have undefined behavior even if the translation
1534 produced a string with the wrong number of "%s"s. */
1538 while ((*yyp
= *yyformat
) != '\0')
1539 if (*yyp
== '%' && yyformat
[1] == 's' && yyi
< yycount
)
1541 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1553 #endif /* YYERROR_VERBOSE */
1556 /*-----------------------------------------------.
1557 | Release the memory associated to this symbol. |
1558 `-----------------------------------------------*/
1561 #if (defined __STDC__ || defined __C99__FUNC__ \
1562 || defined __cplusplus || defined _MSC_VER)
1564 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
, YYLTYPE
*yylocationp
)
1567 yydestruct (yymsg
, yytype
, yyvaluep
, yylocationp
)
1571 YYLTYPE
*yylocationp
;
1575 YYUSE (yylocationp
);
1579 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1589 /* Prevent warnings from -Wmissing-prototypes. */
1590 #ifdef YYPARSE_PARAM
1591 #if (defined __STDC__ || defined __C99__FUNC__ \
1592 || defined __cplusplus || defined _MSC_VER)
1593 int yyparse (void *YYPARSE_PARAM
);
1597 #else /* ! YYPARSE_PARAM */
1598 #if (defined __STDC__ || defined __C99__FUNC__ \
1599 || defined __cplusplus || defined _MSC_VER)
1604 #endif /* ! YYPARSE_PARAM */
1611 #ifdef YYPARSE_PARAM
1612 #if (defined __STDC__ || defined __C99__FUNC__ \
1613 || defined __cplusplus || defined _MSC_VER)
1615 yyparse (void *YYPARSE_PARAM
)
1618 yyparse (YYPARSE_PARAM
)
1619 void *YYPARSE_PARAM
;
1621 #else /* ! YYPARSE_PARAM */
1622 #if (defined __STDC__ || defined __C99__FUNC__ \
1623 || defined __cplusplus || defined _MSC_VER)
1633 /* The lookahead symbol. */
1636 /* The semantic value of the lookahead symbol. */
1639 /* Location data for the lookahead symbol. */
1642 /* Number of syntax errors so far. */
1646 /* Number of tokens to shift before error messages enabled. */
1649 /* The stacks and their tools:
1650 `yyss': related to states.
1651 `yyvs': related to semantic values.
1652 `yyls': related to locations.
1654 Refer to the stacks thru separate pointers, to allow yyoverflow
1655 to reallocate them elsewhere. */
1657 /* The state stack. */
1658 yytype_int16 yyssa
[YYINITDEPTH
];
1660 yytype_int16
*yyssp
;
1662 /* The semantic value stack. */
1663 YYSTYPE yyvsa
[YYINITDEPTH
];
1667 /* The location stack. */
1668 YYLTYPE yylsa
[YYINITDEPTH
];
1672 /* The locations where the error started and ended. */
1673 YYLTYPE yyerror_range
[2];
1675 YYSIZE_T yystacksize
;
1679 /* Lookahead token as an internal (translated) token number. */
1681 /* The variables used to return semantic value and location from the
1687 /* Buffer for error messages, and its allocated size. */
1689 char *yymsg
= yymsgbuf
;
1690 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1693 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1695 /* The number of symbols on the RHS of the reduced rule.
1696 Keep to zero when no symbol should be popped. */
1703 yystacksize
= YYINITDEPTH
;
1705 YYDPRINTF ((stderr
, "Starting parse\n"));
1710 yychar
= YYEMPTY
; /* Cause a token to be read. */
1712 /* Initialize stack pointers.
1713 Waste one element of value and location stack
1714 so that they stay on the same level as the state stack.
1715 The wasted elements are never initialized. */
1720 #if YYLTYPE_IS_TRIVIAL
1721 /* Initialize the default location before parsing starts. */
1722 yylloc
.first_line
= yylloc
.last_line
= 1;
1723 yylloc
.first_column
= yylloc
.last_column
= 1;
1726 /* User initialization code. */
1727 /* Line 1200 of yacc.c */
1728 #line 80 "src/parse-gram.y"
1730 /* Bison's grammar can initial empty locations, hence a default
1731 location is needed. */
1732 boundary_set (&yylloc
.start
, current_file
, 1, 1);
1733 boundary_set (&yylloc
.end
, current_file
, 1, 1);
1735 /* Line 1200 of yacc.c */
1736 #line 1737 "src/parse-gram.c"
1741 /*------------------------------------------------------------.
1742 | yynewstate -- Push a new state, which is found in yystate. |
1743 `------------------------------------------------------------*/
1745 /* In all cases, when you get here, the value and location stacks
1746 have just been pushed. So pushing a state here evens the stacks. */
1752 if (yyss
+ yystacksize
- 1 <= yyssp
)
1754 /* Get the current used size of the three stacks, in elements. */
1755 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1759 /* Give user a chance to reallocate the stack. Use copies of
1760 these so that the &'s don't force the real ones into
1762 YYSTYPE
*yyvs1
= yyvs
;
1763 yytype_int16
*yyss1
= yyss
;
1764 YYLTYPE
*yyls1
= yyls
;
1766 /* Each stack pointer address is followed by the size of the
1767 data in use in that stack, in bytes. This used to be a
1768 conditional around just the two extra args, but that might
1769 be undefined if yyoverflow is a macro. */
1770 yyoverflow (YY_("memory exhausted"),
1771 &yyss1
, yysize
* sizeof (*yyssp
),
1772 &yyvs1
, yysize
* sizeof (*yyvsp
),
1773 &yyls1
, yysize
* sizeof (*yylsp
),
1780 #else /* no yyoverflow */
1781 # ifndef YYSTACK_RELOCATE
1782 goto yyexhaustedlab
;
1784 /* Extend the stack our own way. */
1785 if (YYMAXDEPTH
<= yystacksize
)
1786 goto yyexhaustedlab
;
1788 if (YYMAXDEPTH
< yystacksize
)
1789 yystacksize
= YYMAXDEPTH
;
1792 yytype_int16
*yyss1
= yyss
;
1793 union yyalloc
*yyptr
=
1794 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1796 goto yyexhaustedlab
;
1797 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
1798 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
1799 YYSTACK_RELOCATE (yyls_alloc
, yyls
);
1800 # undef YYSTACK_RELOCATE
1802 YYSTACK_FREE (yyss1
);
1805 #endif /* no yyoverflow */
1807 yyssp
= yyss
+ yysize
- 1;
1808 yyvsp
= yyvs
+ yysize
- 1;
1809 yylsp
= yyls
+ yysize
- 1;
1811 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1812 (unsigned long int) yystacksize
));
1814 if (yyss
+ yystacksize
- 1 <= yyssp
)
1818 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1820 if (yystate
== YYFINAL
)
1830 /* Do appropriate processing given the current state. Read a
1831 lookahead token if we need one and don't already have one. */
1833 /* First try to decide what to do without reference to lookahead token. */
1834 yyn
= yypact
[yystate
];
1835 if (yypact_value_is_default (yyn
))
1838 /* Not known => get a lookahead token if don't already have one. */
1840 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1841 if (yychar
== YYEMPTY
)
1843 YYDPRINTF ((stderr
, "Reading a token: "));
1847 if (yychar
<= YYEOF
)
1849 yychar
= yytoken
= YYEOF
;
1850 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1854 yytoken
= YYTRANSLATE (yychar
);
1855 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1858 /* If the proper action on seeing token YYTOKEN is to reduce or to
1859 detect an error, take that action. */
1861 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1866 if (yytable_value_is_error (yyn
))
1872 /* Count tokens shifted since error; after three, turn off error
1877 /* Shift the lookahead token. */
1878 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1880 /* Discard the shifted token. */
1889 /*-----------------------------------------------------------.
1890 | yydefault -- do the default action for the current state. |
1891 `-----------------------------------------------------------*/
1893 yyn
= yydefact
[yystate
];
1899 /*-----------------------------.
1900 | yyreduce -- Do a reduction. |
1901 `-----------------------------*/
1903 /* yyn is the number of a rule to reduce with. */
1906 /* If YYLEN is nonzero, implement the default value of the action:
1909 Otherwise, the following line sets YYVAL to garbage.
1910 This behavior is undocumented and Bison
1911 users should not rely upon it. Assigning to YYVAL
1912 unconditionally makes the parser a bit smaller, and it avoids a
1913 GCC warning that YYVAL may be used uninitialized. */
1914 yyval
= yyvsp
[1-yylen
];
1916 /* Default location. */
1917 YYLLOC_DEFAULT (yyloc
, (yylsp
- yylen
), yylen
);
1918 YY_REDUCE_PRINT (yyn
);
1922 /* Line 1413 of yacc.c */
1923 #line 266 "src/parse-gram.y"
1925 code_props plain_code
;
1926 code_props_plain_init (&plain_code
, (yyvsp
[0].chars
), (yylsp
[0]));
1927 code_props_translate_code (&plain_code
);
1928 gram_scanner_last_string_free ();
1929 muscle_code_grow (union_seen
? "post_prologue" : "pre_prologue",
1930 plain_code
.code
, (yylsp
[0]));
1931 code_scanner_last_string_free ();
1933 /* Line 1413 of yacc.c */
1934 #line 1935 "src/parse-gram.c"
1938 /* Line 1413 of yacc.c */
1939 #line 276 "src/parse-gram.y"
1941 muscle_percent_define_ensure ((yyvsp
[0].uniqstr
), (yylsp
[0]), true);
1943 /* Line 1413 of yacc.c */
1944 #line 1945 "src/parse-gram.c"
1948 /* Line 1413 of yacc.c */
1949 #line 280 "src/parse-gram.y"
1951 muscle_percent_define_insert ((yyvsp
[-1].uniqstr
), (yylsp
[-1]), (yyvsp
[0].chars
),
1952 MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE
);
1954 /* Line 1413 of yacc.c */
1955 #line 1956 "src/parse-gram.c"
1959 /* Line 1413 of yacc.c */
1960 #line 284 "src/parse-gram.y"
1961 { defines_flag
= true; }
1962 /* Line 1413 of yacc.c */
1963 #line 1964 "src/parse-gram.c"
1967 /* Line 1413 of yacc.c */
1968 #line 286 "src/parse-gram.y"
1970 defines_flag
= true;
1971 spec_defines_file
= xstrdup ((yyvsp
[0].chars
));
1973 /* Line 1413 of yacc.c */
1974 #line 1975 "src/parse-gram.c"
1978 /* Line 1413 of yacc.c */
1979 #line 291 "src/parse-gram.y"
1981 muscle_percent_define_insert ("parse.error", (yylsp
[0]), "verbose",
1982 MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE
);
1984 /* Line 1413 of yacc.c */
1985 #line 1986 "src/parse-gram.c"
1989 /* Line 1413 of yacc.c */
1990 #line 295 "src/parse-gram.y"
1991 { expected_sr_conflicts
= (yyvsp
[0].integer
); }
1992 /* Line 1413 of yacc.c */
1993 #line 1994 "src/parse-gram.c"
1997 /* Line 1413 of yacc.c */
1998 #line 296 "src/parse-gram.y"
1999 { expected_rr_conflicts
= (yyvsp
[0].integer
); }
2000 /* Line 1413 of yacc.c */
2001 #line 2002 "src/parse-gram.c"
2005 /* Line 1413 of yacc.c */
2006 #line 297 "src/parse-gram.y"
2007 { spec_file_prefix
= (yyvsp
[0].chars
); }
2008 /* Line 1413 of yacc.c */
2009 #line 2010 "src/parse-gram.c"
2013 /* Line 1413 of yacc.c */
2014 #line 298 "src/parse-gram.y"
2015 { spec_file_prefix
= (yyvsp
[0].chars
); }
2016 /* Line 1413 of yacc.c */
2017 #line 2018 "src/parse-gram.c"
2021 /* Line 1413 of yacc.c */
2022 #line 300 "src/parse-gram.y"
2024 nondeterministic_parser
= true;
2027 /* Line 1413 of yacc.c */
2028 #line 2029 "src/parse-gram.c"
2032 /* Line 1413 of yacc.c */
2033 #line 305 "src/parse-gram.y"
2036 code_props_symbol_action_init (&action
, (yyvsp
[0].code
), (yylsp
[0]));
2037 code_props_translate_code (&action
);
2038 gram_scanner_last_string_free ();
2039 muscle_code_grow ("initial_action", action
.code
, (yylsp
[0]));
2040 code_scanner_last_string_free ();
2042 /* Line 1413 of yacc.c */
2043 #line 2044 "src/parse-gram.c"
2047 /* Line 1413 of yacc.c */
2048 #line 313 "src/parse-gram.y"
2049 { language_argmatch ((yyvsp
[0].chars
), grammar_prio
, (yylsp
[-1])); }
2050 /* Line 1413 of yacc.c */
2051 #line 2052 "src/parse-gram.c"
2055 /* Line 1413 of yacc.c */
2056 #line 314 "src/parse-gram.y"
2057 { spec_name_prefix
= (yyvsp
[0].chars
); }
2058 /* Line 1413 of yacc.c */
2059 #line 2060 "src/parse-gram.c"
2063 /* Line 1413 of yacc.c */
2064 #line 315 "src/parse-gram.y"
2065 { spec_name_prefix
= (yyvsp
[0].chars
); }
2066 /* Line 1413 of yacc.c */
2067 #line 2068 "src/parse-gram.c"
2071 /* Line 1413 of yacc.c */
2072 #line 316 "src/parse-gram.y"
2073 { no_lines_flag
= true; }
2074 /* Line 1413 of yacc.c */
2075 #line 2076 "src/parse-gram.c"
2079 /* Line 1413 of yacc.c */
2080 #line 317 "src/parse-gram.y"
2081 { nondeterministic_parser
= true; }
2082 /* Line 1413 of yacc.c */
2083 #line 2084 "src/parse-gram.c"
2087 /* Line 1413 of yacc.c */
2088 #line 318 "src/parse-gram.y"
2089 { spec_outfile
= (yyvsp
[0].chars
); }
2090 /* Line 1413 of yacc.c */
2091 #line 2092 "src/parse-gram.c"
2095 /* Line 1413 of yacc.c */
2096 #line 319 "src/parse-gram.y"
2097 { spec_outfile
= (yyvsp
[0].chars
); }
2098 /* Line 1413 of yacc.c */
2099 #line 2100 "src/parse-gram.c"
2103 /* Line 1413 of yacc.c */
2104 #line 320 "src/parse-gram.y"
2105 { current_param
= (yyvsp
[0].param
); }
2106 /* Line 1413 of yacc.c */
2107 #line 2108 "src/parse-gram.c"
2111 /* Line 1413 of yacc.c */
2112 #line 320 "src/parse-gram.y"
2113 { current_param
= param_none
; }
2114 /* Line 1413 of yacc.c */
2115 #line 2116 "src/parse-gram.c"
2119 /* Line 1413 of yacc.c */
2120 #line 321 "src/parse-gram.y"
2121 { version_check (&(yylsp
[0]), (yyvsp
[0].chars
)); }
2122 /* Line 1413 of yacc.c */
2123 #line 2124 "src/parse-gram.c"
2127 /* Line 1413 of yacc.c */
2128 #line 323 "src/parse-gram.y"
2130 char const *skeleton_user
= (yyvsp
[0].chars
);
2131 if (strchr (skeleton_user
, '/'))
2133 size_t dir_length
= strlen (current_file
);
2134 char *skeleton_build
;
2135 while (dir_length
&& current_file
[dir_length
- 1] != '/')
2137 while (dir_length
&& current_file
[dir_length
- 1] == '/')
2140 xmalloc (dir_length
+ 1 + strlen (skeleton_user
) + 1);
2143 strncpy (skeleton_build
, current_file
, dir_length
);
2144 skeleton_build
[dir_length
++] = '/';
2146 strcpy (skeleton_build
+ dir_length
, skeleton_user
);
2147 skeleton_user
= uniqstr_new (skeleton_build
);
2148 free (skeleton_build
);
2150 skeleton_arg (skeleton_user
, grammar_prio
, (yylsp
[-1]));
2152 /* Line 1413 of yacc.c */
2153 #line 2154 "src/parse-gram.c"
2157 /* Line 1413 of yacc.c */
2158 #line 346 "src/parse-gram.y"
2159 { token_table_flag
= true; }
2160 /* Line 1413 of yacc.c */
2161 #line 2162 "src/parse-gram.c"
2165 /* Line 1413 of yacc.c */
2166 #line 347 "src/parse-gram.y"
2167 { report_flag
|= report_states
; }
2168 /* Line 1413 of yacc.c */
2169 #line 2170 "src/parse-gram.c"
2173 /* Line 1413 of yacc.c */
2174 #line 348 "src/parse-gram.y"
2175 { yacc_flag
= true; }
2176 /* Line 1413 of yacc.c */
2177 #line 2178 "src/parse-gram.c"
2181 /* Line 1413 of yacc.c */
2182 #line 353 "src/parse-gram.y"
2183 { add_param (current_param
, (yyvsp
[0].code
), (yylsp
[0])); }
2184 /* Line 1413 of yacc.c */
2185 #line 2186 "src/parse-gram.c"
2189 /* Line 1413 of yacc.c */
2190 #line 354 "src/parse-gram.y"
2191 { add_param (current_param
, (yyvsp
[0].code
), (yylsp
[0])); }
2192 /* Line 1413 of yacc.c */
2193 #line 2194 "src/parse-gram.c"
2197 /* Line 1413 of yacc.c */
2198 #line 366 "src/parse-gram.y"
2200 grammar_start_symbol_set ((yyvsp
[0].symbol
), (yylsp
[0]));
2202 /* Line 1413 of yacc.c */
2203 #line 2204 "src/parse-gram.c"
2207 /* Line 1413 of yacc.c */
2208 #line 370 "src/parse-gram.y"
2211 for (list
= (yyvsp
[0].list
); list
; list
= list
->next
)
2212 symbol_list_destructor_set (list
, (yyvsp
[-1].code
), (yylsp
[-1]));
2213 symbol_list_free ((yyvsp
[0].list
));
2215 /* Line 1413 of yacc.c */
2216 #line 2217 "src/parse-gram.c"
2220 /* Line 1413 of yacc.c */
2221 #line 377 "src/parse-gram.y"
2224 for (list
= (yyvsp
[0].list
); list
; list
= list
->next
)
2225 symbol_list_printer_set (list
, (yyvsp
[-1].code
), (yylsp
[-1]));
2226 symbol_list_free ((yyvsp
[0].list
));
2228 /* Line 1413 of yacc.c */
2229 #line 2230 "src/parse-gram.c"
2233 /* Line 1413 of yacc.c */
2234 #line 384 "src/parse-gram.y"
2236 default_prec
= true;
2238 /* Line 1413 of yacc.c */
2239 #line 2240 "src/parse-gram.c"
2243 /* Line 1413 of yacc.c */
2244 #line 388 "src/parse-gram.y"
2246 default_prec
= false;
2248 /* Line 1413 of yacc.c */
2249 #line 2250 "src/parse-gram.c"
2253 /* Line 1413 of yacc.c */
2254 #line 392 "src/parse-gram.y"
2256 /* Do not invoke muscle_percent_code_grow here since it invokes
2257 muscle_user_name_list_grow. */
2258 muscle_code_grow ("percent_code()", (yyvsp
[0].chars
), (yylsp
[0]));
2259 code_scanner_last_string_free ();
2261 /* Line 1413 of yacc.c */
2262 #line 2263 "src/parse-gram.c"
2266 /* Line 1413 of yacc.c */
2267 #line 399 "src/parse-gram.y"
2269 muscle_percent_code_grow ((yyvsp
[-1].uniqstr
), (yylsp
[-1]), (yyvsp
[0].chars
), (yylsp
[0]));
2270 code_scanner_last_string_free ();
2272 /* Line 1413 of yacc.c */
2273 #line 2274 "src/parse-gram.c"
2277 /* Line 1413 of yacc.c */
2278 #line 413 "src/parse-gram.y"
2280 /* Line 1413 of yacc.c */
2281 #line 2282 "src/parse-gram.c"
2285 /* Line 1413 of yacc.c */
2286 #line 414 "src/parse-gram.y"
2287 { muscle_code_grow ("union_name", (yyvsp
[0].uniqstr
), (yylsp
[0])); }
2288 /* Line 1413 of yacc.c */
2289 #line 2290 "src/parse-gram.c"
2293 /* Line 1413 of yacc.c */
2294 #line 419 "src/parse-gram.y"
2297 muscle_code_grow ("stype", (yyvsp
[0].chars
), (yylsp
[0]));
2298 code_scanner_last_string_free ();
2300 /* Line 1413 of yacc.c */
2301 #line 2302 "src/parse-gram.c"
2305 /* Line 1413 of yacc.c */
2306 #line 430 "src/parse-gram.y"
2307 { current_class
= nterm_sym
; }
2308 /* Line 1413 of yacc.c */
2309 #line 2310 "src/parse-gram.c"
2313 /* Line 1413 of yacc.c */
2314 #line 431 "src/parse-gram.y"
2316 current_class
= unknown_sym
;
2317 current_type
= NULL
;
2319 /* Line 1413 of yacc.c */
2320 #line 2321 "src/parse-gram.c"
2324 /* Line 1413 of yacc.c */
2325 #line 435 "src/parse-gram.y"
2326 { current_class
= token_sym
; }
2327 /* Line 1413 of yacc.c */
2328 #line 2329 "src/parse-gram.c"
2332 /* Line 1413 of yacc.c */
2333 #line 436 "src/parse-gram.y"
2335 current_class
= unknown_sym
;
2336 current_type
= NULL
;
2338 /* Line 1413 of yacc.c */
2339 #line 2340 "src/parse-gram.c"
2343 /* Line 1413 of yacc.c */
2344 #line 441 "src/parse-gram.y"
2348 for (list
= (yyvsp
[0].list
); list
; list
= list
->next
)
2349 symbol_type_set (list
->content
.sym
, (yyvsp
[-1].uniqstr
), (yylsp
[-1]));
2350 symbol_list_free ((yyvsp
[0].list
));
2352 /* Line 1413 of yacc.c */
2353 #line 2354 "src/parse-gram.c"
2357 /* Line 1413 of yacc.c */
2358 #line 452 "src/parse-gram.y"
2362 for (list
= (yyvsp
[0].list
); list
; list
= list
->next
)
2364 symbol_type_set (list
->content
.sym
, current_type
, (yylsp
[-1]));
2365 symbol_precedence_set (list
->content
.sym
, current_prec
, (yyvsp
[-2].assoc
), (yylsp
[-2]));
2367 symbol_list_free ((yyvsp
[0].list
));
2368 current_type
= NULL
;
2370 /* Line 1413 of yacc.c */
2371 #line 2372 "src/parse-gram.c"
2375 /* Line 1413 of yacc.c */
2376 #line 466 "src/parse-gram.y"
2377 { (yyval
.assoc
) = left_assoc
; }
2378 /* Line 1413 of yacc.c */
2379 #line 2380 "src/parse-gram.c"
2383 /* Line 1413 of yacc.c */
2384 #line 467 "src/parse-gram.y"
2385 { (yyval
.assoc
) = right_assoc
; }
2386 /* Line 1413 of yacc.c */
2387 #line 2388 "src/parse-gram.c"
2391 /* Line 1413 of yacc.c */
2392 #line 468 "src/parse-gram.y"
2393 { (yyval
.assoc
) = non_assoc
; }
2394 /* Line 1413 of yacc.c */
2395 #line 2396 "src/parse-gram.c"
2399 /* Line 1413 of yacc.c */
2400 #line 469 "src/parse-gram.y"
2401 { (yyval
.assoc
) = precedence_assoc
; }
2402 /* Line 1413 of yacc.c */
2403 #line 2404 "src/parse-gram.c"
2407 /* Line 1413 of yacc.c */
2408 #line 473 "src/parse-gram.y"
2409 { current_type
= NULL
; }
2410 /* Line 1413 of yacc.c */
2411 #line 2412 "src/parse-gram.c"
2415 /* Line 1413 of yacc.c */
2416 #line 474 "src/parse-gram.y"
2417 { current_type
= (yyvsp
[0].uniqstr
); tag_seen
= true; }
2418 /* Line 1413 of yacc.c */
2419 #line 2420 "src/parse-gram.c"
2423 /* Line 1413 of yacc.c */
2424 #line 480 "src/parse-gram.y"
2425 { (yyval
.list
) = symbol_list_sym_new ((yyvsp
[0].symbol
), (yylsp
[0])); }
2426 /* Line 1413 of yacc.c */
2427 #line 2428 "src/parse-gram.c"
2431 /* Line 1413 of yacc.c */
2432 #line 482 "src/parse-gram.y"
2433 { (yyval
.list
) = symbol_list_prepend ((yyvsp
[-1].list
), symbol_list_sym_new ((yyvsp
[0].symbol
), (yylsp
[0]))); }
2434 /* Line 1413 of yacc.c */
2435 #line 2436 "src/parse-gram.c"
2439 /* Line 1413 of yacc.c */
2440 #line 486 "src/parse-gram.y"
2441 { (yyval
.symbol
) = (yyvsp
[0].symbol
); }
2442 /* Line 1413 of yacc.c */
2443 #line 2444 "src/parse-gram.c"
2447 /* Line 1413 of yacc.c */
2448 #line 487 "src/parse-gram.y"
2449 { (yyval
.symbol
) = (yyvsp
[-1].symbol
); symbol_user_token_number_set ((yyvsp
[-1].symbol
), (yyvsp
[0].integer
), (yylsp
[0])); }
2450 /* Line 1413 of yacc.c */
2451 #line 2452 "src/parse-gram.c"
2455 /* Line 1413 of yacc.c */
2456 #line 493 "src/parse-gram.y"
2457 { (yyval
.list
) = symbol_list_sym_new ((yyvsp
[0].symbol
), (yylsp
[0])); }
2458 /* Line 1413 of yacc.c */
2459 #line 2460 "src/parse-gram.c"
2463 /* Line 1413 of yacc.c */
2464 #line 495 "src/parse-gram.y"
2465 { (yyval
.list
) = symbol_list_prepend ((yyvsp
[-1].list
), symbol_list_sym_new ((yyvsp
[0].symbol
), (yylsp
[0]))); }
2466 /* Line 1413 of yacc.c */
2467 #line 2468 "src/parse-gram.c"
2471 /* Line 1413 of yacc.c */
2472 #line 499 "src/parse-gram.y"
2473 { (yyval
.list
) = (yyvsp
[0].list
); }
2474 /* Line 1413 of yacc.c */
2475 #line 2476 "src/parse-gram.c"
2479 /* Line 1413 of yacc.c */
2480 #line 500 "src/parse-gram.y"
2481 { (yyval
.list
) = symbol_list_prepend ((yyvsp
[-1].list
), (yyvsp
[0].list
)); }
2482 /* Line 1413 of yacc.c */
2483 #line 2484 "src/parse-gram.c"
2487 /* Line 1413 of yacc.c */
2488 #line 504 "src/parse-gram.y"
2489 { (yyval
.list
) = symbol_list_sym_new ((yyvsp
[0].symbol
), (yylsp
[0])); }
2490 /* Line 1413 of yacc.c */
2491 #line 2492 "src/parse-gram.c"
2495 /* Line 1413 of yacc.c */
2496 #line 505 "src/parse-gram.y"
2497 { (yyval
.list
) = symbol_list_type_new ((yyvsp
[0].uniqstr
), (yylsp
[0])); }
2498 /* Line 1413 of yacc.c */
2499 #line 2500 "src/parse-gram.c"
2503 /* Line 1413 of yacc.c */
2504 #line 506 "src/parse-gram.y"
2505 { (yyval
.list
) = symbol_list_default_tagged_new ((yylsp
[0])); }
2506 /* Line 1413 of yacc.c */
2507 #line 2508 "src/parse-gram.c"
2511 /* Line 1413 of yacc.c */
2512 #line 507 "src/parse-gram.y"
2513 { (yyval
.list
) = symbol_list_default_tagless_new ((yylsp
[0])); }
2514 /* Line 1413 of yacc.c */
2515 #line 2516 "src/parse-gram.c"
2519 /* Line 1413 of yacc.c */
2520 #line 513 "src/parse-gram.y"
2522 current_type
= (yyvsp
[0].uniqstr
);
2525 /* Line 1413 of yacc.c */
2526 #line 2527 "src/parse-gram.c"
2530 /* Line 1413 of yacc.c */
2531 #line 518 "src/parse-gram.y"
2533 symbol_class_set ((yyvsp
[0].symbol
), current_class
, (yylsp
[0]), true);
2534 symbol_type_set ((yyvsp
[0].symbol
), current_type
, (yylsp
[0]));
2536 /* Line 1413 of yacc.c */
2537 #line 2538 "src/parse-gram.c"
2541 /* Line 1413 of yacc.c */
2542 #line 523 "src/parse-gram.y"
2544 symbol_class_set ((yyvsp
[-1].symbol
), current_class
, (yylsp
[-1]), true);
2545 symbol_type_set ((yyvsp
[-1].symbol
), current_type
, (yylsp
[-1]));
2546 symbol_user_token_number_set ((yyvsp
[-1].symbol
), (yyvsp
[0].integer
), (yylsp
[0]));
2548 /* Line 1413 of yacc.c */
2549 #line 2550 "src/parse-gram.c"
2553 /* Line 1413 of yacc.c */
2554 #line 529 "src/parse-gram.y"
2556 symbol_class_set ((yyvsp
[-1].symbol
), current_class
, (yylsp
[-1]), true);
2557 symbol_type_set ((yyvsp
[-1].symbol
), current_type
, (yylsp
[-1]));
2558 symbol_make_alias ((yyvsp
[-1].symbol
), (yyvsp
[0].symbol
), (yyloc
));
2560 /* Line 1413 of yacc.c */
2561 #line 2562 "src/parse-gram.c"
2565 /* Line 1413 of yacc.c */
2566 #line 535 "src/parse-gram.y"
2568 symbol_class_set ((yyvsp
[-2].symbol
), current_class
, (yylsp
[-2]), true);
2569 symbol_type_set ((yyvsp
[-2].symbol
), current_type
, (yylsp
[-2]));
2570 symbol_user_token_number_set ((yyvsp
[-2].symbol
), (yyvsp
[-1].integer
), (yylsp
[-1]));
2571 symbol_make_alias ((yyvsp
[-2].symbol
), (yyvsp
[0].symbol
), (yyloc
));
2573 /* Line 1413 of yacc.c */
2574 #line 2575 "src/parse-gram.c"
2578 /* Line 1413 of yacc.c */
2579 #line 565 "src/parse-gram.y"
2583 /* Line 1413 of yacc.c */
2584 #line 2585 "src/parse-gram.c"
2588 /* Line 1413 of yacc.c */
2589 #line 571 "src/parse-gram.y"
2590 { current_lhs
= (yyvsp
[-1].symbol
); current_lhs_location
= (yylsp
[-1]);
2591 current_lhs_named_ref
= (yyvsp
[0].named_ref
); }
2592 /* Line 1413 of yacc.c */
2593 #line 2594 "src/parse-gram.c"
2597 /* Line 1413 of yacc.c */
2598 #line 576 "src/parse-gram.y"
2599 { grammar_current_rule_end ((yylsp
[0])); }
2600 /* Line 1413 of yacc.c */
2601 #line 2602 "src/parse-gram.c"
2605 /* Line 1413 of yacc.c */
2606 #line 577 "src/parse-gram.y"
2607 { grammar_current_rule_end ((yylsp
[0])); }
2608 /* Line 1413 of yacc.c */
2609 #line 2610 "src/parse-gram.c"
2613 /* Line 1413 of yacc.c */
2614 #line 583 "src/parse-gram.y"
2615 { grammar_current_rule_begin (current_lhs
, current_lhs_location
,
2616 current_lhs_named_ref
); }
2617 /* Line 1413 of yacc.c */
2618 #line 2619 "src/parse-gram.c"
2622 /* Line 1413 of yacc.c */
2623 #line 586 "src/parse-gram.y"
2624 { grammar_current_rule_symbol_append ((yyvsp
[-1].symbol
), (yylsp
[-1]), (yyvsp
[0].named_ref
)); }
2625 /* Line 1413 of yacc.c */
2626 #line 2627 "src/parse-gram.c"
2630 /* Line 1413 of yacc.c */
2631 #line 588 "src/parse-gram.y"
2632 { grammar_current_rule_action_append ((yyvsp
[-1].code
), (yylsp
[-1]), (yyvsp
[0].named_ref
)); }
2633 /* Line 1413 of yacc.c */
2634 #line 2635 "src/parse-gram.c"
2638 /* Line 1413 of yacc.c */
2639 #line 590 "src/parse-gram.y"
2640 { grammar_current_rule_prec_set ((yyvsp
[0].symbol
), (yylsp
[0])); }
2641 /* Line 1413 of yacc.c */
2642 #line 2643 "src/parse-gram.c"
2646 /* Line 1413 of yacc.c */
2647 #line 592 "src/parse-gram.y"
2648 { grammar_current_rule_dprec_set ((yyvsp
[0].integer
), (yylsp
[0])); }
2649 /* Line 1413 of yacc.c */
2650 #line 2651 "src/parse-gram.c"
2654 /* Line 1413 of yacc.c */
2655 #line 594 "src/parse-gram.y"
2656 { grammar_current_rule_merge_set ((yyvsp
[0].uniqstr
), (yylsp
[0])); }
2657 /* Line 1413 of yacc.c */
2658 #line 2659 "src/parse-gram.c"
2662 /* Line 1413 of yacc.c */
2663 #line 598 "src/parse-gram.y"
2664 { (yyval
.named_ref
) = 0; }
2665 /* Line 1413 of yacc.c */
2666 #line 2667 "src/parse-gram.c"
2670 /* Line 1413 of yacc.c */
2671 #line 600 "src/parse-gram.y"
2672 { (yyval
.named_ref
) = named_ref_new((yyvsp
[0].uniqstr
), (yylsp
[0])); }
2673 /* Line 1413 of yacc.c */
2674 #line 2675 "src/parse-gram.c"
2678 /* Line 1413 of yacc.c */
2679 #line 612 "src/parse-gram.y"
2680 { (yyval
.uniqstr
) = uniqstr_new ((yyvsp
[0].chars
)); }
2681 /* Line 1413 of yacc.c */
2682 #line 2683 "src/parse-gram.c"
2686 /* Line 1413 of yacc.c */
2687 #line 617 "src/parse-gram.y"
2688 { (yyval
.chars
) = ""; }
2689 /* Line 1413 of yacc.c */
2690 #line 2691 "src/parse-gram.c"
2694 /* Line 1413 of yacc.c */
2695 #line 618 "src/parse-gram.y"
2696 { (yyval
.chars
) = (yyvsp
[0].uniqstr
); }
2697 /* Line 1413 of yacc.c */
2698 #line 2699 "src/parse-gram.c"
2702 /* Line 1413 of yacc.c */
2703 #line 629 "src/parse-gram.y"
2705 code_props plain_code
;
2706 (yyvsp
[0].code
)[strlen ((yyvsp
[0].code
)) - 1] = '\n';
2707 code_props_plain_init (&plain_code
, (yyvsp
[0].code
)+1, (yylsp
[0]));
2708 code_props_translate_code (&plain_code
);
2709 gram_scanner_last_string_free ();
2710 (yyval
.chars
) = plain_code
.code
;
2712 /* Line 1413 of yacc.c */
2713 #line 2714 "src/parse-gram.c"
2717 /* Line 1413 of yacc.c */
2718 #line 649 "src/parse-gram.y"
2719 { (yyval
.symbol
) = symbol_from_uniqstr ((yyvsp
[0].uniqstr
), (yylsp
[0])); }
2720 /* Line 1413 of yacc.c */
2721 #line 2722 "src/parse-gram.c"
2725 /* Line 1413 of yacc.c */
2726 #line 651 "src/parse-gram.y"
2728 (yyval
.symbol
) = symbol_get (char_name ((yyvsp
[0].character
)), (yylsp
[0]));
2729 symbol_class_set ((yyval
.symbol
), token_sym
, (yylsp
[0]), false);
2730 symbol_user_token_number_set ((yyval
.symbol
), (yyvsp
[0].character
), (yylsp
[0]));
2732 /* Line 1413 of yacc.c */
2733 #line 2734 "src/parse-gram.c"
2737 /* Line 1413 of yacc.c */
2738 #line 659 "src/parse-gram.y"
2739 { (yyval
.symbol
) = symbol_from_uniqstr ((yyvsp
[0].uniqstr
), (yylsp
[0])); }
2740 /* Line 1413 of yacc.c */
2741 #line 2742 "src/parse-gram.c"
2745 /* Line 1413 of yacc.c */
2746 #line 671 "src/parse-gram.y"
2748 (yyval
.symbol
) = symbol_get (quotearg_style (c_quoting_style
, (yyvsp
[0].chars
)), (yylsp
[0]));
2749 symbol_class_set ((yyval
.symbol
), token_sym
, (yylsp
[0]), false);
2751 /* Line 1413 of yacc.c */
2752 #line 2753 "src/parse-gram.c"
2756 /* Line 1413 of yacc.c */
2757 #line 680 "src/parse-gram.y"
2759 code_props plain_code
;
2760 code_props_plain_init (&plain_code
, (yyvsp
[0].chars
), (yylsp
[0]));
2761 code_props_translate_code (&plain_code
);
2762 gram_scanner_last_string_free ();
2763 muscle_code_grow ("epilogue", plain_code
.code
, (yylsp
[0]));
2764 code_scanner_last_string_free ();
2766 /* Line 1413 of yacc.c */
2767 #line 2768 "src/parse-gram.c"
2771 /* Line 1413 of yacc.c */
2772 #line 2773 "src/parse-gram.c"
2775 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
2779 YY_STACK_PRINT (yyss
, yyssp
);
2784 /* Now `shift' the result of the reduction. Determine what state
2785 that goes to, based on the state we popped back to and the rule
2786 number reduced by. */
2790 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
2791 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
2792 yystate
= yytable
[yystate
];
2794 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
2799 /*------------------------------------.
2800 | yyerrlab -- here on detecting error |
2801 `------------------------------------*/
2803 /* If not already recovering from an error, report this error. */
2807 #if ! YYERROR_VERBOSE
2808 yyerror (YY_("syntax error"));
2812 int yysyntax_error_status
=
2813 yysyntax_error (&yymsg_alloc
, &yymsg
, yystate
, yytoken
);
2814 if (yysyntax_error_status
== 2 && 0 < yymsg_alloc
)
2816 if (yymsg
!= yymsgbuf
)
2817 YYSTACK_FREE (yymsg
);
2818 yymsg
= (char *) YYSTACK_ALLOC (yymsg_alloc
);
2822 yymsg_alloc
= sizeof yymsgbuf
;
2824 if (yysyntax_error_status
== 0)
2827 yyerror (YY_("syntax error"));
2828 if (yysyntax_error_status
== 2)
2829 goto yyexhaustedlab
;
2835 yyerror_range
[0] = yylloc
;
2837 if (yyerrstatus
== 3)
2839 /* If just tried and failed to reuse lookahead token after an
2840 error, discard it. */
2842 if (yychar
<= YYEOF
)
2844 /* Return failure if at end of input. */
2845 if (yychar
== YYEOF
)
2850 yydestruct ("Error: discarding",
2851 yytoken
, &yylval
, &yylloc
);
2856 /* Else will try to reuse lookahead token after shifting the error
2861 /*---------------------------------------------------.
2862 | yyerrorlab -- error raised explicitly by YYERROR. |
2863 `---------------------------------------------------*/
2866 /* Pacify compilers like GCC when the user code never invokes
2867 YYERROR and the label yyerrorlab therefore never appears in user
2869 if (/*CONSTCOND*/ 0)
2872 yyerror_range
[0] = yylsp
[1-yylen
];
2873 /* Do not reclaim the symbols of the rule which action triggered
2877 YY_STACK_PRINT (yyss
, yyssp
);
2882 /*-------------------------------------------------------------.
2883 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2884 `-------------------------------------------------------------*/
2886 yyerrstatus
= 3; /* Each real token shifted decrements this. */
2890 yyn
= yypact
[yystate
];
2891 if (!yypact_value_is_default (yyn
))
2894 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
2902 /* Pop the current state because it cannot handle the error token. */
2906 yyerror_range
[0] = *yylsp
;
2907 yydestruct ("Error: popping",
2908 yystos
[yystate
], yyvsp
, yylsp
);
2911 YY_STACK_PRINT (yyss
, yyssp
);
2916 yyerror_range
[1] = yylloc
;
2917 /* Using YYLLOC is tempting, but would change the location of
2918 the lookahead. YYLOC is available though. */
2919 YYLLOC_DEFAULT (yyloc
, (yyerror_range
- 1), 2);
2922 /* Shift the error token. */
2923 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
2929 /*-------------------------------------.
2930 | yyacceptlab -- YYACCEPT comes here. |
2931 `-------------------------------------*/
2936 /*-----------------------------------.
2937 | yyabortlab -- YYABORT comes here. |
2938 `-----------------------------------*/
2943 #if !defined(yyoverflow) || YYERROR_VERBOSE
2944 /*-------------------------------------------------.
2945 | yyexhaustedlab -- memory exhaustion comes here. |
2946 `-------------------------------------------------*/
2948 yyerror (YY_("memory exhausted"));
2954 if (yychar
!= YYEMPTY
)
2955 yydestruct ("Cleanup: discarding lookahead",
2956 yytoken
, &yylval
, &yylloc
);
2957 /* Do not reclaim the symbols of the rule which action triggered
2958 this YYABORT or YYACCEPT. */
2960 YY_STACK_PRINT (yyss
, yyssp
);
2961 while (yyssp
!= yyss
)
2963 yydestruct ("Cleanup: popping",
2964 yystos
[*yyssp
], yyvsp
, yylsp
);
2969 YYSTACK_FREE (yyss
);
2972 if (yymsg
!= yymsgbuf
)
2973 YYSTACK_FREE (yymsg
);
2975 /* Make sure YYID is used. */
2976 return YYID (yyresult
);
2979 /* Line 1623 of yacc.c */
2980 #line 690 "src/parse-gram.y"
2984 /* Return the location of the left-hand side of a rule whose
2985 right-hand side is RHS[1] ... RHS[N]. Ignore empty nonterminals in
2986 the right-hand side, and return an empty location equal to the end
2987 boundary of RHS[0] if the right-hand side is empty. */
2990 lloc_default (YYLTYPE
const *rhs
, int n
)
2995 /* SGI MIPSpro 7.4.1m miscompiles "loc.start = loc.end = rhs[n].end;".
2996 The bug is fixed in 7.4.2m, but play it safe for now. */
2997 loc
.start
= rhs
[n
].end
;
2998 loc
.end
= rhs
[n
].end
;
3000 /* Ignore empty nonterminals the start of the the right-hand side.
3001 Do not bother to ignore them at the end of the right-hand side,
3002 since empty nonterminals have the same end as their predecessors. */
3003 for (i
= 1; i
<= n
; i
++)
3004 if (! equal_boundaries (rhs
[i
].start
, rhs
[i
].end
))
3006 loc
.start
= rhs
[i
].start
;
3015 add_param (param_type type
, char *decl
, location loc
)
3017 static char const alphanum
[26 + 26 + 1 + 10] =
3018 "abcdefghijklmnopqrstuvwxyz"
3019 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
3023 char const *name_start
= NULL
;
3026 /* Stop on last actual character. */
3027 for (p
= decl
; p
[1]; p
++)
3029 || ! memchr (alphanum
, p
[-1], sizeof alphanum
))
3030 && memchr (alphanum
, p
[0], sizeof alphanum
- 10))
3033 /* Strip the surrounding '{' and '}', and any blanks just inside
3035 while (*--p
== ' ' || *p
== '\t')
3038 while (*++decl
== ' ' || *decl
== '\t')
3043 complain_at (loc
, _("missing identifier in parameter declaration"));
3050 memchr (alphanum
, name_start
[name_len
], sizeof alphanum
);
3054 name
= xmalloc (name_len
+ 1);
3055 memcpy (name
, name_start
, name_len
);
3056 name
[name_len
] = '\0';
3057 if (type
& param_lex
)
3058 muscle_pair_list_grow ("lex_param", decl
, name
);
3059 if (type
& param_parse
)
3060 muscle_pair_list_grow ("parse_param", decl
, name
);
3064 gram_scanner_last_string_free ();
3069 version_check (location
const *loc
, char const *version
)
3071 if (strverscmp (version
, PACKAGE_VERSION
) > 0)
3073 complain_at (*loc
, "require bison %s, but have %s",
3074 version
, PACKAGE_VERSION
);
3080 gram_error (location
const *loc
, char const *msg
)
3082 complain_at (*loc
, "%s", msg
);
3086 token_name (int type
)
3088 return yytname
[YYTRANSLATE (type
)];
3099 buf
[0] = '\''; buf
[1] = c
; buf
[2] = '\''; buf
[3] = '\0';
3100 return quotearg_style (escape_quoting_style
, buf
);