1 /* A Bison parser, made by GNU Bison 2.4.434-7439c. */
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.434-7439c"
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 202 "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,
222 PERCENT_PERCENT
= 302,
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
273 #define BRACKETED_ID 296
279 #define PERCENT_PERCENT 302
282 #define SEMICOLON 305
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 226 "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 215 "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, 251, 251, 259, 261, 265, 266, 276, 280, 285,
649 286, 291, 296, 297, 298, 299, 300, 305, 314, 315,
650 316, 317, 318, 319, 320, 321, 321, 322, 323, 347,
651 348, 349, 350, 354, 355, 364, 365, 366, 370, 377,
652 384, 388, 392, 399, 414, 415, 419, 431, 431, 436,
653 436, 441, 452, 467, 468, 469, 470, 474, 475, 480,
654 482, 487, 488, 493, 495, 500, 501, 505, 506, 507,
655 508, 513, 518, 523, 529, 535, 546, 547, 556, 557,
656 563, 564, 565, 572, 572, 577, 578, 579, 584, 586,
657 588, 590, 592, 594, 599, 601, 612, 613, 618, 619,
658 620, 629, 649, 651, 660, 665, 666, 671, 678, 680
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\"", "\"{...}\"", "\"[identifier]\"", "\"char\"", "\"epilogue\"",
678 "\"=\"", "\"identifier\"", "\"identifier:\"", "\"%%\"", "\"|\"",
679 "\"%{...%}\"", "\";\"", "\"<tag>\"", "\"<*>\"", "\"<>\"", "\"%param\"",
680 "\"%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 -137
708 #define yypact_value_is_default(yystate) \
709 ((yystate) == (-137))
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 -137, 20, 106, -137, -137, -137, 19, -1, 36, -137,
721 -137, -137, -137, 13, -137, 0, 79, -137, 89, 90,
722 -137, 41, -137, 55, 93, 46, -137, -137, -137, 47,
723 94, 95, 35, -137, -137, -137, 16, -137, -137, -137,
724 54, -137, -137, -137, -137, 49, 33, 33, 35, 12,
725 12, -137, 61, -137, -137, -137, 29, -137, -137, -137,
726 -137, 100, -137, -137, -137, 101, -137, 103, -137, -137,
727 -137, -137, -137, -137, -137, -137, 57, -137, 58, 1,
728 -137, -137, 68, 80, -137, 61, -137, 35, -137, -137,
729 33, 56, 33, 35, -137, -137, -137, -137, 12, -137,
730 -137, 12, -137, -137, -137, -137, -137, -137, -137, -137,
731 -137, 78, -137, -137, -137, -137, -137, 82, -137, 35,
732 -137, 142, -137, 144, -137, -137, -137, -137, -137, -137,
733 -137, -137, -137, 18, 27, -137, -137, 35, 145, 97,
734 68, 68, 27, -137, -137, -137, -137, -137
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_int16 yypgoto
[] =
762 -137, -137, -137, -137, -137, -137, 148, -137, -137, -137,
763 -137, -137, -137, -137, -137, 32, -137, 102, -9, -4,
764 107, -137, 83, -137, -137, -137, 22, -136, -137, -137,
765 -12, -11, -137, -32, -40, -137
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, 54, 146, 147, 4, 5, 6, 7,
783 8, 9, 10, 11, 12, 70, 94, 76, 13, 14,
784 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
785 70, 26, 103, 13, 14, 91, 91, 32, 70, 49,
786 102, 137, 138, 139, 60, 55, 26, 77, 111, 64,
787 66, 124, 32, 51, 71, 121, 40, 72, 52, 70,
788 123, 125, 77, 95, 96, 97, 135, 140, 136, 71,
789 48, 40, 72, 118, 104, 71, 50, 71, 72, 91,
790 72, 91, 57, 132, 88, 61, 122, 121, 122, 126,
791 65, 67, 126, 58, 59, 62, 63, 68, 69, 84,
792 86, 51, 141, 106, 107, 143, 108, 109, 110, 114,
793 141, 4, 5, 6, 7, 8, 9, 10, 11, 12,
794 116, 127, 129, 13, 14, 15, 16, 17, 18, 19,
795 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
796 30, 31, 32, 33, 34, 35, 131, 70, 145, 144,
797 42, 130, 101, 36, 92, 37, 38, 142, 0, 0,
801 static const yytype_int16 yycheck
[] =
803 32, 0, 1, 3, 140, 141, 5, 6, 7, 8,
804 9, 10, 11, 12, 13, 3, 48, 1, 17, 18,
805 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
806 3, 30, 3, 17, 18, 46, 47, 36, 3, 40,
807 52, 14, 15, 16, 3, 45, 30, 46, 47, 3,
808 3, 91, 36, 40, 42, 87, 55, 45, 45, 3,
809 4, 93, 46, 51, 52, 53, 48, 40, 50, 42,
810 51, 55, 45, 85, 45, 42, 40, 42, 45, 90,
811 45, 92, 3, 123, 51, 44, 90, 119, 92, 98,
812 44, 44, 101, 4, 4, 40, 3, 3, 3, 45,
813 51, 40, 134, 3, 3, 137, 3, 50, 50, 41,
814 142, 5, 6, 7, 8, 9, 10, 11, 12, 13,
815 40, 43, 40, 17, 18, 19, 20, 21, 22, 23,
816 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
817 34, 35, 36, 37, 38, 39, 4, 3, 51, 4,
818 2, 119, 50, 47, 47, 49, 50, 135, -1, -1,
822 /* STOS_[STATE-NUM] -- The (internal number of the) accessing
823 symbol of state STATE-NUM. */
824 static const yytype_uint8 yystos
[] =
826 0, 57, 58, 0, 5, 6, 7, 8, 9, 10,
827 11, 12, 13, 17, 18, 19, 20, 21, 22, 23,
828 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
829 34, 35, 36, 37, 38, 39, 47, 49, 50, 54,
830 55, 59, 62, 64, 67, 68, 66, 65, 51, 40,
831 40, 40, 45, 86, 3, 45, 84, 3, 4, 4,
832 3, 44, 40, 3, 3, 44, 3, 44, 3, 3,
833 3, 42, 45, 87, 89, 90, 1, 46, 62, 77,
834 78, 79, 88, 60, 45, 63, 51, 69, 51, 75,
835 76, 87, 76, 72, 89, 51, 52, 53, 73, 74,
836 89, 73, 86, 3, 45, 85, 3, 3, 3, 50,
837 50, 47, 78, 91, 41, 83, 40, 61, 86, 70,
838 71, 89, 75, 4, 90, 89, 74, 43, 80, 40,
839 71, 4, 90, 81, 82, 48, 50, 14, 15, 16,
840 40, 89, 82, 89, 4, 51, 83, 83
843 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
844 static const yytype_uint8 yyr1
[] =
846 0, 56, 57, 58, 58, 59, 59, 59, 59, 59,
847 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
848 59, 59, 59, 59, 59, 60, 59, 59, 59, 59,
849 59, 59, 59, 61, 61, 62, 62, 62, 62, 62,
850 62, 62, 62, 62, 63, 63, 62, 65, 64, 66,
851 64, 64, 67, 68, 68, 68, 68, 69, 69, 70,
852 70, 71, 71, 72, 72, 73, 73, 74, 74, 74,
853 74, 75, 75, 75, 75, 75, 76, 76, 77, 77,
854 78, 78, 78, 80, 79, 81, 81, 81, 82, 82,
855 82, 82, 82, 82, 83, 83, 84, 84, 85, 85,
856 85, 86, 87, 87, 88, 89, 89, 90, 91, 91
859 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
860 static const yytype_uint8 yyr2
[] =
862 0, 2, 4, 0, 2, 1, 1, 1, 3, 1,
863 2, 1, 2, 2, 2, 3, 1, 2, 2, 2,
864 3, 1, 1, 2, 3, 0, 3, 2, 2, 1,
865 1, 1, 1, 2, 1, 1, 1, 2, 3, 3,
866 1, 1, 2, 3, 0, 1, 3, 0, 3, 0,
867 3, 3, 3, 1, 1, 1, 1, 0, 1, 1,
868 2, 1, 2, 1, 2, 1, 2, 1, 1, 1,
869 1, 1, 1, 2, 2, 3, 1, 2, 1, 2,
870 1, 2, 2, 0, 4, 1, 3, 2, 0, 3,
871 3, 3, 3, 3, 0, 1, 1, 1, 0, 1,
872 1, 1, 1, 1, 1, 1, 1, 1, 0, 2
876 #define yyerrok (yyerrstatus = 0)
877 #define yyclearin (yychar = YYEMPTY)
881 #define YYACCEPT goto yyacceptlab
882 #define YYABORT goto yyabortlab
883 #define YYERROR goto yyerrorlab
886 /* Like YYERROR except do call yyerror. This remains here temporarily
887 to ease the transition to the new meaning of YYERROR, for GCC.
888 Once GCC version 2 has supplanted version 1, this can go. */
890 #define YYFAIL goto yyerrlab
892 #define YYRECOVERING() (!!yyerrstatus)
894 #define YYBACKUP(Token, Value) \
896 if (yychar == YYEMPTY && yylen == 1) \
900 yytoken = YYTRANSLATE (yychar); \
906 yyerror (YY_("syntax error: cannot back up")); \
913 #define YYERRCODE 256
916 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
917 If N is 0, then set CURRENT to the empty location which ends
918 the previous symbol: RHS[0] (always defined). */
920 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
921 #ifndef YYLLOC_DEFAULT
922 # define YYLLOC_DEFAULT(Current, Rhs, N) \
926 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
927 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
928 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
929 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
933 (Current).first_line = (Current).last_line = \
934 YYRHSLOC (Rhs, 0).last_line; \
935 (Current).first_column = (Current).last_column = \
936 YYRHSLOC (Rhs, 0).last_column; \
942 /* YY_LOCATION_PRINT -- Print the location on the stream.
943 This macro was not mandated originally: define only if we know
944 we won't break user code: when these are the locations we know. */
946 #ifndef YY_LOCATION_PRINT
947 # if YYLTYPE_IS_TRIVIAL
948 # define YY_LOCATION_PRINT(File, Loc) \
949 fprintf (File, "%d.%d-%d.%d", \
950 (Loc).first_line, (Loc).first_column, \
951 (Loc).last_line, (Loc).last_column)
953 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
958 /* YYLEX -- calling `yylex' with the right arguments. */
961 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
963 # define YYLEX yylex (&yylval, &yylloc)
966 /* Enable debugging if requested. */
970 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
971 # define YYFPRINTF fprintf
974 # define YYDPRINTF(Args) \
980 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
984 YYFPRINTF (stderr, "%s ", Title); \
985 yy_symbol_print (stderr, \
986 Type, Value, Location); \
987 YYFPRINTF (stderr, "\n"); \
992 /*--------------------------------.
993 | Print this symbol on YYOUTPUT. |
994 `--------------------------------*/
997 #if (defined __STDC__ || defined __C99__FUNC__ \
998 || defined __cplusplus || defined _MSC_VER)
1000 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, YYLTYPE
const * const yylocationp
)
1003 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yylocationp
)
1006 YYSTYPE
const * const yyvaluep
;
1007 YYLTYPE
const * const yylocationp
;
1012 YYUSE (yylocationp
);
1014 if (yytype
< YYNTOKENS
)
1015 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
1023 /* Line 715 of yacc.c */
1024 #line 175 "src/parse-gram.y"
1025 { fputs (quotearg_style (c_quoting_style
, ((*yyvaluep
).chars
)), stderr
); }
1026 /* Line 715 of yacc.c */
1027 #line 1028 "src/parse-gram.c"
1030 case 4: // "integer"
1032 /* Line 715 of yacc.c */
1033 #line 188 "src/parse-gram.y"
1034 { fprintf (stderr
, "%d", ((*yyvaluep
).integer
)); }
1035 /* Line 715 of yacc.c */
1036 #line 1037 "src/parse-gram.c"
1039 case 24: // "%<flag>"
1041 /* Line 715 of yacc.c */
1042 #line 184 "src/parse-gram.y"
1043 { fprintf (stderr
, "%%%s", ((*yyvaluep
).uniqstr
)); }
1044 /* Line 715 of yacc.c */
1045 #line 1046 "src/parse-gram.c"
1050 /* Line 715 of yacc.c */
1051 #line 177 "src/parse-gram.y"
1052 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).code
)); }
1053 /* Line 715 of yacc.c */
1054 #line 1055 "src/parse-gram.c"
1057 case 41: // "[identifier]"
1059 /* Line 715 of yacc.c */
1060 #line 182 "src/parse-gram.y"
1061 { fprintf (stderr
, "[%s]", ((*yyvaluep
).uniqstr
)); }
1062 /* Line 715 of yacc.c */
1063 #line 1064 "src/parse-gram.c"
1068 /* Line 715 of yacc.c */
1069 #line 169 "src/parse-gram.y"
1070 { fputs (char_name (((*yyvaluep
).character
)), stderr
); }
1071 /* Line 715 of yacc.c */
1072 #line 1073 "src/parse-gram.c"
1075 case 43: // "epilogue"
1077 /* Line 715 of yacc.c */
1078 #line 177 "src/parse-gram.y"
1079 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).chars
)); }
1080 /* Line 715 of yacc.c */
1081 #line 1082 "src/parse-gram.c"
1084 case 45: // "identifier"
1086 /* Line 715 of yacc.c */
1087 #line 181 "src/parse-gram.y"
1088 { fputs (((*yyvaluep
).uniqstr
), stderr
); }
1089 /* Line 715 of yacc.c */
1090 #line 1091 "src/parse-gram.c"
1093 case 46: // "identifier:"
1095 /* Line 715 of yacc.c */
1096 #line 183 "src/parse-gram.y"
1097 { fprintf (stderr
, "%s:", ((*yyvaluep
).uniqstr
)); }
1098 /* Line 715 of yacc.c */
1099 #line 1100 "src/parse-gram.c"
1102 case 49: // "%{...%}"
1104 /* Line 715 of yacc.c */
1105 #line 177 "src/parse-gram.y"
1106 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).chars
)); }
1107 /* Line 715 of yacc.c */
1108 #line 1109 "src/parse-gram.c"
1113 /* Line 715 of yacc.c */
1114 #line 185 "src/parse-gram.y"
1115 { fprintf (stderr
, "<%s>", ((*yyvaluep
).uniqstr
)); }
1116 /* Line 715 of yacc.c */
1117 #line 1118 "src/parse-gram.c"
1120 case 54: // "%param"
1122 /* Line 715 of yacc.c */
1123 #line 231 "src/parse-gram.y"
1125 switch (((*yyvaluep
).param
))
1127 #define CASE(In, Out) \
1128 case param_ ## In: fputs ("%" #Out, stderr); break
1129 CASE(lex
, lex
-param
);
1130 CASE(parse
, parse
-param
);
1133 case param_none
: aver (false); break;
1136 /* Line 715 of yacc.c */
1137 #line 1138 "src/parse-gram.c"
1140 case 71: // symbol.prec
1142 /* Line 715 of yacc.c */
1143 #line 191 "src/parse-gram.y"
1144 { fprintf (stderr
, "%s", ((*yyvaluep
).symbol
)->tag
); }
1145 /* Line 715 of yacc.c */
1146 #line 1147 "src/parse-gram.c"
1149 case 84: // variable
1151 /* Line 715 of yacc.c */
1152 #line 181 "src/parse-gram.y"
1153 { fputs (((*yyvaluep
).uniqstr
), stderr
); }
1154 /* Line 715 of yacc.c */
1155 #line 1156 "src/parse-gram.c"
1158 case 85: // content.opt
1160 /* Line 715 of yacc.c */
1161 #line 177 "src/parse-gram.y"
1162 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).chars
)); }
1163 /* Line 715 of yacc.c */
1164 #line 1165 "src/parse-gram.c"
1167 case 86: // braceless
1169 /* Line 715 of yacc.c */
1170 #line 177 "src/parse-gram.y"
1171 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).chars
)); }
1172 /* Line 715 of yacc.c */
1173 #line 1174 "src/parse-gram.c"
1178 /* Line 715 of yacc.c */
1179 #line 191 "src/parse-gram.y"
1180 { fprintf (stderr
, "%s", ((*yyvaluep
).symbol
)->tag
); }
1181 /* Line 715 of yacc.c */
1182 #line 1183 "src/parse-gram.c"
1185 case 88: // id_colon
1187 /* Line 715 of yacc.c */
1188 #line 192 "src/parse-gram.y"
1189 { fprintf (stderr
, "%s:", ((*yyvaluep
).symbol
)->tag
); }
1190 /* Line 715 of yacc.c */
1191 #line 1192 "src/parse-gram.c"
1196 /* Line 715 of yacc.c */
1197 #line 191 "src/parse-gram.y"
1198 { fprintf (stderr
, "%s", ((*yyvaluep
).symbol
)->tag
); }
1199 /* Line 715 of yacc.c */
1200 #line 1201 "src/parse-gram.c"
1203 case 90: // string_as_id
1205 /* Line 715 of yacc.c */
1206 #line 191 "src/parse-gram.y"
1207 { fprintf (stderr
, "%s", ((*yyvaluep
).symbol
)->tag
); }
1208 /* Line 715 of yacc.c */
1209 #line 1210 "src/parse-gram.c"
1218 /*--------------------------------.
1219 | Print this symbol on YYOUTPUT. |
1220 `--------------------------------*/
1222 #if (defined __STDC__ || defined __C99__FUNC__ \
1223 || defined __cplusplus || defined _MSC_VER)
1225 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, YYLTYPE
const * const yylocationp
)
1228 yy_symbol_print (yyoutput
, yytype
, yyvaluep
, yylocationp
)
1231 YYSTYPE
const * const yyvaluep
;
1232 YYLTYPE
const * const yylocationp
;
1235 if (yytype
< YYNTOKENS
)
1236 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
1238 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
1240 YY_LOCATION_PRINT (yyoutput
, *yylocationp
);
1241 YYFPRINTF (yyoutput
, ": ");
1242 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yylocationp
);
1243 YYFPRINTF (yyoutput
, ")");
1246 /*------------------------------------------------------------------.
1247 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1249 `------------------------------------------------------------------*/
1251 #if (defined __STDC__ || defined __C99__FUNC__ \
1252 || defined __cplusplus || defined _MSC_VER)
1254 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
1257 yy_stack_print (yybottom
, yytop
)
1258 yytype_int16
*yybottom
;
1259 yytype_int16
*yytop
;
1262 YYFPRINTF (stderr
, "Stack now");
1263 for (; yybottom
<= yytop
; yybottom
++)
1265 int yybot
= *yybottom
;
1266 YYFPRINTF (stderr
, " %d", yybot
);
1268 YYFPRINTF (stderr
, "\n");
1271 # define YY_STACK_PRINT(Bottom, Top) \
1274 yy_stack_print ((Bottom), (Top)); \
1278 /*------------------------------------------------.
1279 | Report that the YYRULE is going to be reduced. |
1280 `------------------------------------------------*/
1282 #if (defined __STDC__ || defined __C99__FUNC__ \
1283 || defined __cplusplus || defined _MSC_VER)
1285 yy_reduce_print (yytype_int16
*yyssp
, YYSTYPE
*yyvsp
, YYLTYPE
*yylsp
, int yyrule
)
1288 yy_reduce_print (yyssp
, yyvsp
, yylsp
, yyrule
)
1289 yytype_int16
*yyssp
;
1295 unsigned long int yylno
= yyrline
[yyrule
];
1296 int yynrhs
= yyr2
[yyrule
];
1298 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
1300 /* The symbols being reduced. */
1301 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
1303 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
1304 yy_symbol_print (stderr
,
1305 yystos
[yyssp
[yyi
+ 1 - yynrhs
]],
1306 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
1307 , &(yylsp
[(yyi
+ 1) - (yynrhs
)]) );
1308 YYFPRINTF (stderr
, "\n");
1312 # define YY_REDUCE_PRINT(Rule) \
1315 yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
1318 /* Nonzero means print parse trace. It is left uninitialized so that
1319 multiple parsers can coexist. */
1321 #else /* !YYDEBUG */
1322 # define YYDPRINTF(Args)
1323 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1324 # define YY_STACK_PRINT(Bottom, Top)
1325 # define YY_REDUCE_PRINT(Rule)
1326 #endif /* !YYDEBUG */
1329 /* YYINITDEPTH -- initial size of the parser's stacks. */
1331 # define YYINITDEPTH 200
1334 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1335 if the built-in stack extension method is used).
1337 Do not make this value too large; the results are undefined if
1338 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1339 evaluated with infinite-precision integer arithmetic. */
1342 # define YYMAXDEPTH 10000
1350 # if defined __GLIBC__ && defined _STRING_H
1351 # define yystrlen strlen
1353 /* Return the length of YYSTR. */
1354 #if (defined __STDC__ || defined __C99__FUNC__ \
1355 || defined __cplusplus || defined _MSC_VER)
1357 yystrlen (const char *yystr
)
1365 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1373 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1374 # define yystpcpy stpcpy
1376 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1378 #if (defined __STDC__ || defined __C99__FUNC__ \
1379 || defined __cplusplus || defined _MSC_VER)
1381 yystpcpy (char *yydest
, const char *yysrc
)
1384 yystpcpy (yydest
, yysrc
)
1390 const char *yys
= yysrc
;
1392 while ((*yyd
++ = *yys
++) != '\0')
1401 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1402 quotes and backslashes, so that it's suitable for yyerror. The
1403 heuristic is that double-quoting is unnecessary unless the string
1404 contains an apostrophe, a comma, or backslash (other than
1405 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1406 null, do not copy; instead, return the length of what the result
1409 yytnamerr (char *yyres
, const char *yystr
)
1414 char const *yyp
= yystr
;
1421 goto do_not_strip_quotes
;
1425 goto do_not_strip_quotes
;
1438 do_not_strip_quotes
: ;
1442 return yystrlen (yystr
);
1444 return yystpcpy (yyres
, yystr
) - yyres
;
1448 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1449 about the unexpected token YYTOKEN while in state YYSTATE.
1451 Return 0 if *YYMSG was successfully written. Return 1 if an ordinary
1452 "syntax error" message will suffice instead. Return 2 if *YYMSG is
1453 not large enough to hold the message. In the last case, also set
1454 *YYMSG_ALLOC to either (a) the required number of bytes or (b) zero
1455 if the required number of bytes is too large to store. */
1457 yysyntax_error (YYSIZE_T
*yymsg_alloc
, char **yymsg
,
1458 int yystate
, int yytoken
)
1460 int yyn
= yypact
[yystate
];
1462 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
1466 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytoken
]);
1467 YYSIZE_T yysize
= yysize0
;
1469 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1470 /* Internationalized format string. */
1471 const char *yyformat
= 0;
1472 /* Arguments of yyformat. */
1473 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1475 /* Start YYX at -YYN if negative to avoid negative indexes in
1476 YYCHECK. In other words, skip the first -YYN actions for this
1477 state because they are default actions. */
1478 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1480 /* Stay within bounds of both yycheck and yytname. */
1481 int yychecklim
= YYLAST
- yyn
+ 1;
1482 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1483 /* Number of reported tokens (one for the "unexpected", one per
1488 yyarg
[yycount
++] = yytname
[yytoken
];
1490 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1491 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
1492 && !yytable_value_is_error (yytable
[yyx
+ yyn
]))
1494 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1500 yyarg
[yycount
++] = yytname
[yyx
];
1501 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1502 if (! (yysize
<= yysize1
1503 && yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1514 #define YYCASE_(N, S) \
1518 YYCASE_(1, YY_("syntax error, unexpected %s"));
1519 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1520 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1521 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1522 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1526 yysize1
= yysize
+ yystrlen (yyformat
);
1527 if (! (yysize
<= yysize1
&& yysize1
<= YYSTACK_ALLOC_MAXIMUM
))
1535 if (*yymsg_alloc
< yysize
)
1537 *yymsg_alloc
= 2 * yysize
;
1538 if (! (yysize
<= *yymsg_alloc
1539 && *yymsg_alloc
<= YYSTACK_ALLOC_MAXIMUM
))
1540 *yymsg_alloc
= YYSTACK_ALLOC_MAXIMUM
;
1544 /* Avoid sprintf, as that infringes on the user's name space.
1545 Don't have undefined behavior even if the translation
1546 produced a string with the wrong number of "%s"s. */
1550 while ((*yyp
= *yyformat
) != '\0')
1551 if (*yyp
== '%' && yyformat
[1] == 's' && yyi
< yycount
)
1553 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1565 #endif /* YYERROR_VERBOSE */
1568 /*-----------------------------------------------.
1569 | Release the memory associated to this symbol. |
1570 `-----------------------------------------------*/
1573 #if (defined __STDC__ || defined __C99__FUNC__ \
1574 || defined __cplusplus || defined _MSC_VER)
1576 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
, YYLTYPE
*yylocationp
)
1579 yydestruct (yymsg
, yytype
, yyvaluep
, yylocationp
)
1583 YYLTYPE
*yylocationp
;
1587 YYUSE (yylocationp
);
1591 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1601 /* Prevent warnings from -Wmissing-prototypes. */
1602 #ifdef YYPARSE_PARAM
1603 #if (defined __STDC__ || defined __C99__FUNC__ \
1604 || defined __cplusplus || defined _MSC_VER)
1605 int yyparse (void *YYPARSE_PARAM
);
1609 #else /* ! YYPARSE_PARAM */
1610 #if (defined __STDC__ || defined __C99__FUNC__ \
1611 || defined __cplusplus || defined _MSC_VER)
1616 #endif /* ! YYPARSE_PARAM */
1623 #ifdef YYPARSE_PARAM
1624 #if (defined __STDC__ || defined __C99__FUNC__ \
1625 || defined __cplusplus || defined _MSC_VER)
1627 yyparse (void *YYPARSE_PARAM
)
1630 yyparse (YYPARSE_PARAM
)
1631 void *YYPARSE_PARAM
;
1633 #else /* ! YYPARSE_PARAM */
1634 #if (defined __STDC__ || defined __C99__FUNC__ \
1635 || defined __cplusplus || defined _MSC_VER)
1645 /* The lookahead symbol. */
1648 /* The semantic value of the lookahead symbol. */
1651 /* Location data for the lookahead symbol. */
1654 /* Number of syntax errors so far. */
1658 /* Number of tokens to shift before error messages enabled. */
1661 /* The stacks and their tools:
1662 `yyss': related to states.
1663 `yyvs': related to semantic values.
1664 `yyls': related to locations.
1666 Refer to the stacks thru separate pointers, to allow yyoverflow
1667 to reallocate them elsewhere. */
1669 /* The state stack. */
1670 yytype_int16 yyssa
[YYINITDEPTH
];
1672 yytype_int16
*yyssp
;
1674 /* The semantic value stack. */
1675 YYSTYPE yyvsa
[YYINITDEPTH
];
1679 /* The location stack. */
1680 YYLTYPE yylsa
[YYINITDEPTH
];
1684 /* The locations where the error started and ended. */
1685 YYLTYPE yyerror_range
[2];
1687 YYSIZE_T yystacksize
;
1691 /* Lookahead token as an internal (translated) token number. */
1693 /* The variables used to return semantic value and location from the
1699 /* Buffer for error messages, and its allocated size. */
1701 char *yymsg
= yymsgbuf
;
1702 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1705 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1707 /* The number of symbols on the RHS of the reduced rule.
1708 Keep to zero when no symbol should be popped. */
1715 yystacksize
= YYINITDEPTH
;
1717 YYDPRINTF ((stderr
, "Starting parse\n"));
1722 yychar
= YYEMPTY
; /* Cause a token to be read. */
1724 /* Initialize stack pointers.
1725 Waste one element of value and location stack
1726 so that they stay on the same level as the state stack.
1727 The wasted elements are never initialized. */
1732 #if YYLTYPE_IS_TRIVIAL
1733 /* Initialize the default location before parsing starts. */
1734 yylloc
.first_line
= yylloc
.last_line
= 1;
1735 yylloc
.first_column
= yylloc
.last_column
= 1;
1738 /* User initialization code. */
1739 /* Line 1200 of yacc.c */
1740 #line 80 "src/parse-gram.y"
1742 /* Bison's grammar can initial empty locations, hence a default
1743 location is needed. */
1744 boundary_set (&yylloc
.start
, current_file
, 1, 1);
1745 boundary_set (&yylloc
.end
, current_file
, 1, 1);
1747 /* Line 1200 of yacc.c */
1748 #line 1749 "src/parse-gram.c"
1753 /*------------------------------------------------------------.
1754 | yynewstate -- Push a new state, which is found in yystate. |
1755 `------------------------------------------------------------*/
1757 /* In all cases, when you get here, the value and location stacks
1758 have just been pushed. So pushing a state here evens the stacks. */
1764 if (yyss
+ yystacksize
- 1 <= yyssp
)
1766 /* Get the current used size of the three stacks, in elements. */
1767 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1771 /* Give user a chance to reallocate the stack. Use copies of
1772 these so that the &'s don't force the real ones into
1774 YYSTYPE
*yyvs1
= yyvs
;
1775 yytype_int16
*yyss1
= yyss
;
1776 YYLTYPE
*yyls1
= yyls
;
1778 /* Each stack pointer address is followed by the size of the
1779 data in use in that stack, in bytes. This used to be a
1780 conditional around just the two extra args, but that might
1781 be undefined if yyoverflow is a macro. */
1782 yyoverflow (YY_("memory exhausted"),
1783 &yyss1
, yysize
* sizeof (*yyssp
),
1784 &yyvs1
, yysize
* sizeof (*yyvsp
),
1785 &yyls1
, yysize
* sizeof (*yylsp
),
1792 #else /* no yyoverflow */
1793 # ifndef YYSTACK_RELOCATE
1794 goto yyexhaustedlab
;
1796 /* Extend the stack our own way. */
1797 if (YYMAXDEPTH
<= yystacksize
)
1798 goto yyexhaustedlab
;
1800 if (YYMAXDEPTH
< yystacksize
)
1801 yystacksize
= YYMAXDEPTH
;
1804 yytype_int16
*yyss1
= yyss
;
1805 union yyalloc
*yyptr
=
1806 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1808 goto yyexhaustedlab
;
1809 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
1810 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
1811 YYSTACK_RELOCATE (yyls_alloc
, yyls
);
1812 # undef YYSTACK_RELOCATE
1814 YYSTACK_FREE (yyss1
);
1817 #endif /* no yyoverflow */
1819 yyssp
= yyss
+ yysize
- 1;
1820 yyvsp
= yyvs
+ yysize
- 1;
1821 yylsp
= yyls
+ yysize
- 1;
1823 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1824 (unsigned long int) yystacksize
));
1826 if (yyss
+ yystacksize
- 1 <= yyssp
)
1830 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1832 if (yystate
== YYFINAL
)
1842 /* Do appropriate processing given the current state. Read a
1843 lookahead token if we need one and don't already have one. */
1845 /* First try to decide what to do without reference to lookahead token. */
1846 yyn
= yypact
[yystate
];
1847 if (yypact_value_is_default (yyn
))
1850 /* Not known => get a lookahead token if don't already have one. */
1852 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1853 if (yychar
== YYEMPTY
)
1855 YYDPRINTF ((stderr
, "Reading a token: "));
1859 if (yychar
<= YYEOF
)
1861 yychar
= yytoken
= YYEOF
;
1862 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1866 yytoken
= YYTRANSLATE (yychar
);
1867 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1870 /* If the proper action on seeing token YYTOKEN is to reduce or to
1871 detect an error, take that action. */
1873 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1878 if (yytable_value_is_error (yyn
))
1884 /* Count tokens shifted since error; after three, turn off error
1889 /* Shift the lookahead token. */
1890 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1892 /* Discard the shifted token. */
1901 /*-----------------------------------------------------------.
1902 | yydefault -- do the default action for the current state. |
1903 `-----------------------------------------------------------*/
1905 yyn
= yydefact
[yystate
];
1911 /*-----------------------------.
1912 | yyreduce -- Do a reduction. |
1913 `-----------------------------*/
1915 /* yyn is the number of a rule to reduce with. */
1918 /* If YYLEN is nonzero, implement the default value of the action:
1921 Otherwise, the following line sets YYVAL to garbage.
1922 This behavior is undocumented and Bison
1923 users should not rely upon it. Assigning to YYVAL
1924 unconditionally makes the parser a bit smaller, and it avoids a
1925 GCC warning that YYVAL may be used uninitialized. */
1926 yyval
= yyvsp
[1-yylen
];
1928 /* Default location. */
1929 YYLLOC_DEFAULT (yyloc
, (yylsp
- yylen
), yylen
);
1930 YY_REDUCE_PRINT (yyn
);
1934 /* Line 1413 of yacc.c */
1935 #line 267 "src/parse-gram.y"
1937 code_props plain_code
;
1938 code_props_plain_init (&plain_code
, (yyvsp
[0].chars
), (yylsp
[0]));
1939 code_props_translate_code (&plain_code
);
1940 gram_scanner_last_string_free ();
1941 muscle_code_grow (union_seen
? "post_prologue" : "pre_prologue",
1942 plain_code
.code
, (yylsp
[0]));
1943 code_scanner_last_string_free ();
1945 /* Line 1413 of yacc.c */
1946 #line 1947 "src/parse-gram.c"
1950 /* Line 1413 of yacc.c */
1951 #line 277 "src/parse-gram.y"
1953 muscle_percent_define_ensure ((yyvsp
[0].uniqstr
), (yylsp
[0]), true);
1955 /* Line 1413 of yacc.c */
1956 #line 1957 "src/parse-gram.c"
1960 /* Line 1413 of yacc.c */
1961 #line 281 "src/parse-gram.y"
1963 muscle_percent_define_insert ((yyvsp
[-1].uniqstr
), (yylsp
[-1]), (yyvsp
[0].chars
),
1964 MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE
);
1966 /* Line 1413 of yacc.c */
1967 #line 1968 "src/parse-gram.c"
1971 /* Line 1413 of yacc.c */
1972 #line 285 "src/parse-gram.y"
1973 { defines_flag
= true; }
1974 /* Line 1413 of yacc.c */
1975 #line 1976 "src/parse-gram.c"
1979 /* Line 1413 of yacc.c */
1980 #line 287 "src/parse-gram.y"
1982 defines_flag
= true;
1983 spec_defines_file
= xstrdup ((yyvsp
[0].chars
));
1985 /* Line 1413 of yacc.c */
1986 #line 1987 "src/parse-gram.c"
1990 /* Line 1413 of yacc.c */
1991 #line 292 "src/parse-gram.y"
1993 muscle_percent_define_insert ("parse.error", (yylsp
[0]), "verbose",
1994 MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE
);
1996 /* Line 1413 of yacc.c */
1997 #line 1998 "src/parse-gram.c"
2001 /* Line 1413 of yacc.c */
2002 #line 296 "src/parse-gram.y"
2003 { expected_sr_conflicts
= (yyvsp
[0].integer
); }
2004 /* Line 1413 of yacc.c */
2005 #line 2006 "src/parse-gram.c"
2009 /* Line 1413 of yacc.c */
2010 #line 297 "src/parse-gram.y"
2011 { expected_rr_conflicts
= (yyvsp
[0].integer
); }
2012 /* Line 1413 of yacc.c */
2013 #line 2014 "src/parse-gram.c"
2017 /* Line 1413 of yacc.c */
2018 #line 298 "src/parse-gram.y"
2019 { spec_file_prefix
= (yyvsp
[0].chars
); }
2020 /* Line 1413 of yacc.c */
2021 #line 2022 "src/parse-gram.c"
2025 /* Line 1413 of yacc.c */
2026 #line 299 "src/parse-gram.y"
2027 { spec_file_prefix
= (yyvsp
[0].chars
); }
2028 /* Line 1413 of yacc.c */
2029 #line 2030 "src/parse-gram.c"
2033 /* Line 1413 of yacc.c */
2034 #line 301 "src/parse-gram.y"
2036 nondeterministic_parser
= true;
2039 /* Line 1413 of yacc.c */
2040 #line 2041 "src/parse-gram.c"
2044 /* Line 1413 of yacc.c */
2045 #line 306 "src/parse-gram.y"
2048 code_props_symbol_action_init (&action
, (yyvsp
[0].code
), (yylsp
[0]));
2049 code_props_translate_code (&action
);
2050 gram_scanner_last_string_free ();
2051 muscle_code_grow ("initial_action", action
.code
, (yylsp
[0]));
2052 code_scanner_last_string_free ();
2054 /* Line 1413 of yacc.c */
2055 #line 2056 "src/parse-gram.c"
2059 /* Line 1413 of yacc.c */
2060 #line 314 "src/parse-gram.y"
2061 { language_argmatch ((yyvsp
[0].chars
), grammar_prio
, (yylsp
[-1])); }
2062 /* Line 1413 of yacc.c */
2063 #line 2064 "src/parse-gram.c"
2067 /* Line 1413 of yacc.c */
2068 #line 315 "src/parse-gram.y"
2069 { spec_name_prefix
= (yyvsp
[0].chars
); }
2070 /* Line 1413 of yacc.c */
2071 #line 2072 "src/parse-gram.c"
2075 /* Line 1413 of yacc.c */
2076 #line 316 "src/parse-gram.y"
2077 { spec_name_prefix
= (yyvsp
[0].chars
); }
2078 /* Line 1413 of yacc.c */
2079 #line 2080 "src/parse-gram.c"
2083 /* Line 1413 of yacc.c */
2084 #line 317 "src/parse-gram.y"
2085 { no_lines_flag
= true; }
2086 /* Line 1413 of yacc.c */
2087 #line 2088 "src/parse-gram.c"
2091 /* Line 1413 of yacc.c */
2092 #line 318 "src/parse-gram.y"
2093 { nondeterministic_parser
= true; }
2094 /* Line 1413 of yacc.c */
2095 #line 2096 "src/parse-gram.c"
2099 /* Line 1413 of yacc.c */
2100 #line 319 "src/parse-gram.y"
2101 { spec_outfile
= (yyvsp
[0].chars
); }
2102 /* Line 1413 of yacc.c */
2103 #line 2104 "src/parse-gram.c"
2107 /* Line 1413 of yacc.c */
2108 #line 320 "src/parse-gram.y"
2109 { spec_outfile
= (yyvsp
[0].chars
); }
2110 /* Line 1413 of yacc.c */
2111 #line 2112 "src/parse-gram.c"
2115 /* Line 1413 of yacc.c */
2116 #line 321 "src/parse-gram.y"
2117 { current_param
= (yyvsp
[0].param
); }
2118 /* Line 1413 of yacc.c */
2119 #line 2120 "src/parse-gram.c"
2123 /* Line 1413 of yacc.c */
2124 #line 321 "src/parse-gram.y"
2125 { current_param
= param_none
; }
2126 /* Line 1413 of yacc.c */
2127 #line 2128 "src/parse-gram.c"
2131 /* Line 1413 of yacc.c */
2132 #line 322 "src/parse-gram.y"
2133 { version_check (&(yylsp
[0]), (yyvsp
[0].chars
)); }
2134 /* Line 1413 of yacc.c */
2135 #line 2136 "src/parse-gram.c"
2139 /* Line 1413 of yacc.c */
2140 #line 324 "src/parse-gram.y"
2142 char const *skeleton_user
= (yyvsp
[0].chars
);
2143 if (strchr (skeleton_user
, '/'))
2145 size_t dir_length
= strlen (current_file
);
2146 char *skeleton_build
;
2147 while (dir_length
&& current_file
[dir_length
- 1] != '/')
2149 while (dir_length
&& current_file
[dir_length
- 1] == '/')
2152 xmalloc (dir_length
+ 1 + strlen (skeleton_user
) + 1);
2155 strncpy (skeleton_build
, current_file
, dir_length
);
2156 skeleton_build
[dir_length
++] = '/';
2158 strcpy (skeleton_build
+ dir_length
, skeleton_user
);
2159 skeleton_user
= uniqstr_new (skeleton_build
);
2160 free (skeleton_build
);
2162 skeleton_arg (skeleton_user
, grammar_prio
, (yylsp
[-1]));
2164 /* Line 1413 of yacc.c */
2165 #line 2166 "src/parse-gram.c"
2169 /* Line 1413 of yacc.c */
2170 #line 347 "src/parse-gram.y"
2171 { token_table_flag
= true; }
2172 /* Line 1413 of yacc.c */
2173 #line 2174 "src/parse-gram.c"
2177 /* Line 1413 of yacc.c */
2178 #line 348 "src/parse-gram.y"
2179 { report_flag
|= report_states
; }
2180 /* Line 1413 of yacc.c */
2181 #line 2182 "src/parse-gram.c"
2185 /* Line 1413 of yacc.c */
2186 #line 349 "src/parse-gram.y"
2187 { yacc_flag
= true; }
2188 /* Line 1413 of yacc.c */
2189 #line 2190 "src/parse-gram.c"
2193 /* Line 1413 of yacc.c */
2194 #line 354 "src/parse-gram.y"
2195 { add_param (current_param
, (yyvsp
[0].code
), (yylsp
[0])); }
2196 /* Line 1413 of yacc.c */
2197 #line 2198 "src/parse-gram.c"
2201 /* Line 1413 of yacc.c */
2202 #line 355 "src/parse-gram.y"
2203 { add_param (current_param
, (yyvsp
[0].code
), (yylsp
[0])); }
2204 /* Line 1413 of yacc.c */
2205 #line 2206 "src/parse-gram.c"
2209 /* Line 1413 of yacc.c */
2210 #line 367 "src/parse-gram.y"
2212 grammar_start_symbol_set ((yyvsp
[0].symbol
), (yylsp
[0]));
2214 /* Line 1413 of yacc.c */
2215 #line 2216 "src/parse-gram.c"
2219 /* Line 1413 of yacc.c */
2220 #line 371 "src/parse-gram.y"
2223 for (list
= (yyvsp
[0].list
); list
; list
= list
->next
)
2224 symbol_list_destructor_set (list
, (yyvsp
[-1].code
), (yylsp
[-1]));
2225 symbol_list_free ((yyvsp
[0].list
));
2227 /* Line 1413 of yacc.c */
2228 #line 2229 "src/parse-gram.c"
2232 /* Line 1413 of yacc.c */
2233 #line 378 "src/parse-gram.y"
2236 for (list
= (yyvsp
[0].list
); list
; list
= list
->next
)
2237 symbol_list_printer_set (list
, (yyvsp
[-1].code
), (yylsp
[-1]));
2238 symbol_list_free ((yyvsp
[0].list
));
2240 /* Line 1413 of yacc.c */
2241 #line 2242 "src/parse-gram.c"
2245 /* Line 1413 of yacc.c */
2246 #line 385 "src/parse-gram.y"
2248 default_prec
= true;
2250 /* Line 1413 of yacc.c */
2251 #line 2252 "src/parse-gram.c"
2255 /* Line 1413 of yacc.c */
2256 #line 389 "src/parse-gram.y"
2258 default_prec
= false;
2260 /* Line 1413 of yacc.c */
2261 #line 2262 "src/parse-gram.c"
2265 /* Line 1413 of yacc.c */
2266 #line 393 "src/parse-gram.y"
2268 /* Do not invoke muscle_percent_code_grow here since it invokes
2269 muscle_user_name_list_grow. */
2270 muscle_code_grow ("percent_code()", (yyvsp
[0].chars
), (yylsp
[0]));
2271 code_scanner_last_string_free ();
2273 /* Line 1413 of yacc.c */
2274 #line 2275 "src/parse-gram.c"
2278 /* Line 1413 of yacc.c */
2279 #line 400 "src/parse-gram.y"
2281 muscle_percent_code_grow ((yyvsp
[-1].uniqstr
), (yylsp
[-1]), (yyvsp
[0].chars
), (yylsp
[0]));
2282 code_scanner_last_string_free ();
2284 /* Line 1413 of yacc.c */
2285 #line 2286 "src/parse-gram.c"
2289 /* Line 1413 of yacc.c */
2290 #line 414 "src/parse-gram.y"
2292 /* Line 1413 of yacc.c */
2293 #line 2294 "src/parse-gram.c"
2297 /* Line 1413 of yacc.c */
2298 #line 415 "src/parse-gram.y"
2299 { muscle_code_grow ("union_name", (yyvsp
[0].uniqstr
), (yylsp
[0])); }
2300 /* Line 1413 of yacc.c */
2301 #line 2302 "src/parse-gram.c"
2305 /* Line 1413 of yacc.c */
2306 #line 420 "src/parse-gram.y"
2309 muscle_code_grow ("stype", (yyvsp
[0].chars
), (yylsp
[0]));
2310 code_scanner_last_string_free ();
2312 /* Line 1413 of yacc.c */
2313 #line 2314 "src/parse-gram.c"
2317 /* Line 1413 of yacc.c */
2318 #line 431 "src/parse-gram.y"
2319 { current_class
= nterm_sym
; }
2320 /* Line 1413 of yacc.c */
2321 #line 2322 "src/parse-gram.c"
2325 /* Line 1413 of yacc.c */
2326 #line 432 "src/parse-gram.y"
2328 current_class
= unknown_sym
;
2329 current_type
= NULL
;
2331 /* Line 1413 of yacc.c */
2332 #line 2333 "src/parse-gram.c"
2336 /* Line 1413 of yacc.c */
2337 #line 436 "src/parse-gram.y"
2338 { current_class
= token_sym
; }
2339 /* Line 1413 of yacc.c */
2340 #line 2341 "src/parse-gram.c"
2344 /* Line 1413 of yacc.c */
2345 #line 437 "src/parse-gram.y"
2347 current_class
= unknown_sym
;
2348 current_type
= NULL
;
2350 /* Line 1413 of yacc.c */
2351 #line 2352 "src/parse-gram.c"
2355 /* Line 1413 of yacc.c */
2356 #line 442 "src/parse-gram.y"
2360 for (list
= (yyvsp
[0].list
); list
; list
= list
->next
)
2361 symbol_type_set (list
->content
.sym
, (yyvsp
[-1].uniqstr
), (yylsp
[-1]));
2362 symbol_list_free ((yyvsp
[0].list
));
2364 /* Line 1413 of yacc.c */
2365 #line 2366 "src/parse-gram.c"
2369 /* Line 1413 of yacc.c */
2370 #line 453 "src/parse-gram.y"
2374 for (list
= (yyvsp
[0].list
); list
; list
= list
->next
)
2376 symbol_type_set (list
->content
.sym
, current_type
, (yylsp
[-1]));
2377 symbol_precedence_set (list
->content
.sym
, current_prec
, (yyvsp
[-2].assoc
), (yylsp
[-2]));
2379 symbol_list_free ((yyvsp
[0].list
));
2380 current_type
= NULL
;
2382 /* Line 1413 of yacc.c */
2383 #line 2384 "src/parse-gram.c"
2387 /* Line 1413 of yacc.c */
2388 #line 467 "src/parse-gram.y"
2389 { (yyval
.assoc
) = left_assoc
; }
2390 /* Line 1413 of yacc.c */
2391 #line 2392 "src/parse-gram.c"
2395 /* Line 1413 of yacc.c */
2396 #line 468 "src/parse-gram.y"
2397 { (yyval
.assoc
) = right_assoc
; }
2398 /* Line 1413 of yacc.c */
2399 #line 2400 "src/parse-gram.c"
2403 /* Line 1413 of yacc.c */
2404 #line 469 "src/parse-gram.y"
2405 { (yyval
.assoc
) = non_assoc
; }
2406 /* Line 1413 of yacc.c */
2407 #line 2408 "src/parse-gram.c"
2411 /* Line 1413 of yacc.c */
2412 #line 470 "src/parse-gram.y"
2413 { (yyval
.assoc
) = precedence_assoc
; }
2414 /* Line 1413 of yacc.c */
2415 #line 2416 "src/parse-gram.c"
2419 /* Line 1413 of yacc.c */
2420 #line 474 "src/parse-gram.y"
2421 { current_type
= NULL
; }
2422 /* Line 1413 of yacc.c */
2423 #line 2424 "src/parse-gram.c"
2427 /* Line 1413 of yacc.c */
2428 #line 475 "src/parse-gram.y"
2429 { current_type
= (yyvsp
[0].uniqstr
); tag_seen
= true; }
2430 /* Line 1413 of yacc.c */
2431 #line 2432 "src/parse-gram.c"
2435 /* Line 1413 of yacc.c */
2436 #line 481 "src/parse-gram.y"
2437 { (yyval
.list
) = symbol_list_sym_new ((yyvsp
[0].symbol
), (yylsp
[0])); }
2438 /* Line 1413 of yacc.c */
2439 #line 2440 "src/parse-gram.c"
2443 /* Line 1413 of yacc.c */
2444 #line 483 "src/parse-gram.y"
2445 { (yyval
.list
) = symbol_list_prepend ((yyvsp
[-1].list
), symbol_list_sym_new ((yyvsp
[0].symbol
), (yylsp
[0]))); }
2446 /* Line 1413 of yacc.c */
2447 #line 2448 "src/parse-gram.c"
2451 /* Line 1413 of yacc.c */
2452 #line 487 "src/parse-gram.y"
2453 { (yyval
.symbol
) = (yyvsp
[0].symbol
); }
2454 /* Line 1413 of yacc.c */
2455 #line 2456 "src/parse-gram.c"
2459 /* Line 1413 of yacc.c */
2460 #line 488 "src/parse-gram.y"
2461 { (yyval
.symbol
) = (yyvsp
[-1].symbol
); symbol_user_token_number_set ((yyvsp
[-1].symbol
), (yyvsp
[0].integer
), (yylsp
[0])); }
2462 /* Line 1413 of yacc.c */
2463 #line 2464 "src/parse-gram.c"
2467 /* Line 1413 of yacc.c */
2468 #line 494 "src/parse-gram.y"
2469 { (yyval
.list
) = symbol_list_sym_new ((yyvsp
[0].symbol
), (yylsp
[0])); }
2470 /* Line 1413 of yacc.c */
2471 #line 2472 "src/parse-gram.c"
2475 /* Line 1413 of yacc.c */
2476 #line 496 "src/parse-gram.y"
2477 { (yyval
.list
) = symbol_list_prepend ((yyvsp
[-1].list
), symbol_list_sym_new ((yyvsp
[0].symbol
), (yylsp
[0]))); }
2478 /* Line 1413 of yacc.c */
2479 #line 2480 "src/parse-gram.c"
2483 /* Line 1413 of yacc.c */
2484 #line 500 "src/parse-gram.y"
2485 { (yyval
.list
) = (yyvsp
[0].list
); }
2486 /* Line 1413 of yacc.c */
2487 #line 2488 "src/parse-gram.c"
2491 /* Line 1413 of yacc.c */
2492 #line 501 "src/parse-gram.y"
2493 { (yyval
.list
) = symbol_list_prepend ((yyvsp
[-1].list
), (yyvsp
[0].list
)); }
2494 /* Line 1413 of yacc.c */
2495 #line 2496 "src/parse-gram.c"
2499 /* Line 1413 of yacc.c */
2500 #line 505 "src/parse-gram.y"
2501 { (yyval
.list
) = symbol_list_sym_new ((yyvsp
[0].symbol
), (yylsp
[0])); }
2502 /* Line 1413 of yacc.c */
2503 #line 2504 "src/parse-gram.c"
2507 /* Line 1413 of yacc.c */
2508 #line 506 "src/parse-gram.y"
2509 { (yyval
.list
) = symbol_list_type_new ((yyvsp
[0].uniqstr
), (yylsp
[0])); }
2510 /* Line 1413 of yacc.c */
2511 #line 2512 "src/parse-gram.c"
2515 /* Line 1413 of yacc.c */
2516 #line 507 "src/parse-gram.y"
2517 { (yyval
.list
) = symbol_list_default_tagged_new ((yylsp
[0])); }
2518 /* Line 1413 of yacc.c */
2519 #line 2520 "src/parse-gram.c"
2523 /* Line 1413 of yacc.c */
2524 #line 508 "src/parse-gram.y"
2525 { (yyval
.list
) = symbol_list_default_tagless_new ((yylsp
[0])); }
2526 /* Line 1413 of yacc.c */
2527 #line 2528 "src/parse-gram.c"
2531 /* Line 1413 of yacc.c */
2532 #line 514 "src/parse-gram.y"
2534 current_type
= (yyvsp
[0].uniqstr
);
2537 /* Line 1413 of yacc.c */
2538 #line 2539 "src/parse-gram.c"
2542 /* Line 1413 of yacc.c */
2543 #line 519 "src/parse-gram.y"
2545 symbol_class_set ((yyvsp
[0].symbol
), current_class
, (yylsp
[0]), true);
2546 symbol_type_set ((yyvsp
[0].symbol
), current_type
, (yylsp
[0]));
2548 /* Line 1413 of yacc.c */
2549 #line 2550 "src/parse-gram.c"
2553 /* Line 1413 of yacc.c */
2554 #line 524 "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_user_token_number_set ((yyvsp
[-1].symbol
), (yyvsp
[0].integer
), (yylsp
[0]));
2560 /* Line 1413 of yacc.c */
2561 #line 2562 "src/parse-gram.c"
2565 /* Line 1413 of yacc.c */
2566 #line 530 "src/parse-gram.y"
2568 symbol_class_set ((yyvsp
[-1].symbol
), current_class
, (yylsp
[-1]), true);
2569 symbol_type_set ((yyvsp
[-1].symbol
), current_type
, (yylsp
[-1]));
2570 symbol_make_alias ((yyvsp
[-1].symbol
), (yyvsp
[0].symbol
), (yyloc
));
2572 /* Line 1413 of yacc.c */
2573 #line 2574 "src/parse-gram.c"
2577 /* Line 1413 of yacc.c */
2578 #line 536 "src/parse-gram.y"
2580 symbol_class_set ((yyvsp
[-2].symbol
), current_class
, (yylsp
[-2]), true);
2581 symbol_type_set ((yyvsp
[-2].symbol
), current_type
, (yylsp
[-2]));
2582 symbol_user_token_number_set ((yyvsp
[-2].symbol
), (yyvsp
[-1].integer
), (yylsp
[-1]));
2583 symbol_make_alias ((yyvsp
[-2].symbol
), (yyvsp
[0].symbol
), (yyloc
));
2585 /* Line 1413 of yacc.c */
2586 #line 2587 "src/parse-gram.c"
2590 /* Line 1413 of yacc.c */
2591 #line 566 "src/parse-gram.y"
2595 /* Line 1413 of yacc.c */
2596 #line 2597 "src/parse-gram.c"
2600 /* Line 1413 of yacc.c */
2601 #line 572 "src/parse-gram.y"
2602 { current_lhs
= (yyvsp
[-1].symbol
); current_lhs_location
= (yylsp
[-1]);
2603 current_lhs_named_ref
= (yyvsp
[0].named_ref
); }
2604 /* Line 1413 of yacc.c */
2605 #line 2606 "src/parse-gram.c"
2609 /* Line 1413 of yacc.c */
2610 #line 577 "src/parse-gram.y"
2611 { grammar_current_rule_end ((yylsp
[0])); }
2612 /* Line 1413 of yacc.c */
2613 #line 2614 "src/parse-gram.c"
2617 /* Line 1413 of yacc.c */
2618 #line 578 "src/parse-gram.y"
2619 { grammar_current_rule_end ((yylsp
[0])); }
2620 /* Line 1413 of yacc.c */
2621 #line 2622 "src/parse-gram.c"
2625 /* Line 1413 of yacc.c */
2626 #line 584 "src/parse-gram.y"
2627 { grammar_current_rule_begin (current_lhs
, current_lhs_location
,
2628 current_lhs_named_ref
); }
2629 /* Line 1413 of yacc.c */
2630 #line 2631 "src/parse-gram.c"
2634 /* Line 1413 of yacc.c */
2635 #line 587 "src/parse-gram.y"
2636 { grammar_current_rule_symbol_append ((yyvsp
[-1].symbol
), (yylsp
[-1]), (yyvsp
[0].named_ref
)); }
2637 /* Line 1413 of yacc.c */
2638 #line 2639 "src/parse-gram.c"
2642 /* Line 1413 of yacc.c */
2643 #line 589 "src/parse-gram.y"
2644 { grammar_current_rule_action_append ((yyvsp
[-1].code
), (yylsp
[-1]), (yyvsp
[0].named_ref
)); }
2645 /* Line 1413 of yacc.c */
2646 #line 2647 "src/parse-gram.c"
2650 /* Line 1413 of yacc.c */
2651 #line 591 "src/parse-gram.y"
2652 { grammar_current_rule_prec_set ((yyvsp
[0].symbol
), (yylsp
[0])); }
2653 /* Line 1413 of yacc.c */
2654 #line 2655 "src/parse-gram.c"
2658 /* Line 1413 of yacc.c */
2659 #line 593 "src/parse-gram.y"
2660 { grammar_current_rule_dprec_set ((yyvsp
[0].integer
), (yylsp
[0])); }
2661 /* Line 1413 of yacc.c */
2662 #line 2663 "src/parse-gram.c"
2666 /* Line 1413 of yacc.c */
2667 #line 595 "src/parse-gram.y"
2668 { grammar_current_rule_merge_set ((yyvsp
[0].uniqstr
), (yylsp
[0])); }
2669 /* Line 1413 of yacc.c */
2670 #line 2671 "src/parse-gram.c"
2674 /* Line 1413 of yacc.c */
2675 #line 599 "src/parse-gram.y"
2676 { (yyval
.named_ref
) = 0; }
2677 /* Line 1413 of yacc.c */
2678 #line 2679 "src/parse-gram.c"
2682 /* Line 1413 of yacc.c */
2683 #line 601 "src/parse-gram.y"
2684 { (yyval
.named_ref
) = named_ref_new((yyvsp
[0].uniqstr
), (yylsp
[0])); }
2685 /* Line 1413 of yacc.c */
2686 #line 2687 "src/parse-gram.c"
2690 /* Line 1413 of yacc.c */
2691 #line 613 "src/parse-gram.y"
2692 { (yyval
.uniqstr
) = uniqstr_new ((yyvsp
[0].chars
)); }
2693 /* Line 1413 of yacc.c */
2694 #line 2695 "src/parse-gram.c"
2698 /* Line 1413 of yacc.c */
2699 #line 618 "src/parse-gram.y"
2700 { (yyval
.chars
) = ""; }
2701 /* Line 1413 of yacc.c */
2702 #line 2703 "src/parse-gram.c"
2706 /* Line 1413 of yacc.c */
2707 #line 619 "src/parse-gram.y"
2708 { (yyval
.chars
) = (yyvsp
[0].uniqstr
); }
2709 /* Line 1413 of yacc.c */
2710 #line 2711 "src/parse-gram.c"
2714 /* Line 1413 of yacc.c */
2715 #line 630 "src/parse-gram.y"
2717 code_props plain_code
;
2718 (yyvsp
[0].code
)[strlen ((yyvsp
[0].code
)) - 1] = '\n';
2719 code_props_plain_init (&plain_code
, (yyvsp
[0].code
)+1, (yylsp
[0]));
2720 code_props_translate_code (&plain_code
);
2721 gram_scanner_last_string_free ();
2722 (yyval
.chars
) = plain_code
.code
;
2724 /* Line 1413 of yacc.c */
2725 #line 2726 "src/parse-gram.c"
2729 /* Line 1413 of yacc.c */
2730 #line 650 "src/parse-gram.y"
2731 { (yyval
.symbol
) = symbol_from_uniqstr ((yyvsp
[0].uniqstr
), (yylsp
[0])); }
2732 /* Line 1413 of yacc.c */
2733 #line 2734 "src/parse-gram.c"
2737 /* Line 1413 of yacc.c */
2738 #line 652 "src/parse-gram.y"
2740 (yyval
.symbol
) = symbol_get (char_name ((yyvsp
[0].character
)), (yylsp
[0]));
2741 symbol_class_set ((yyval
.symbol
), token_sym
, (yylsp
[0]), false);
2742 symbol_user_token_number_set ((yyval
.symbol
), (yyvsp
[0].character
), (yylsp
[0]));
2744 /* Line 1413 of yacc.c */
2745 #line 2746 "src/parse-gram.c"
2749 /* Line 1413 of yacc.c */
2750 #line 660 "src/parse-gram.y"
2751 { (yyval
.symbol
) = symbol_from_uniqstr ((yyvsp
[0].uniqstr
), (yylsp
[0])); }
2752 /* Line 1413 of yacc.c */
2753 #line 2754 "src/parse-gram.c"
2757 /* Line 1413 of yacc.c */
2758 #line 672 "src/parse-gram.y"
2760 (yyval
.symbol
) = symbol_get (quotearg_style (c_quoting_style
, (yyvsp
[0].chars
)), (yylsp
[0]));
2761 symbol_class_set ((yyval
.symbol
), token_sym
, (yylsp
[0]), false);
2763 /* Line 1413 of yacc.c */
2764 #line 2765 "src/parse-gram.c"
2768 /* Line 1413 of yacc.c */
2769 #line 681 "src/parse-gram.y"
2771 code_props plain_code
;
2772 code_props_plain_init (&plain_code
, (yyvsp
[0].chars
), (yylsp
[0]));
2773 code_props_translate_code (&plain_code
);
2774 gram_scanner_last_string_free ();
2775 muscle_code_grow ("epilogue", plain_code
.code
, (yylsp
[0]));
2776 code_scanner_last_string_free ();
2778 /* Line 1413 of yacc.c */
2779 #line 2780 "src/parse-gram.c"
2783 /* Line 1413 of yacc.c */
2784 #line 2785 "src/parse-gram.c"
2787 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
2791 YY_STACK_PRINT (yyss
, yyssp
);
2796 /* Now `shift' the result of the reduction. Determine what state
2797 that goes to, based on the state we popped back to and the rule
2798 number reduced by. */
2802 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
2803 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
2804 yystate
= yytable
[yystate
];
2806 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
2811 /*------------------------------------.
2812 | yyerrlab -- here on detecting error |
2813 `------------------------------------*/
2815 /* If not already recovering from an error, report this error. */
2819 #if ! YYERROR_VERBOSE
2820 yyerror (YY_("syntax error"));
2824 int yysyntax_error_status
=
2825 yysyntax_error (&yymsg_alloc
, &yymsg
, yystate
, yytoken
);
2826 if (yysyntax_error_status
== 2 && 0 < yymsg_alloc
)
2828 if (yymsg
!= yymsgbuf
)
2829 YYSTACK_FREE (yymsg
);
2830 yymsg
= (char *) YYSTACK_ALLOC (yymsg_alloc
);
2834 yymsg_alloc
= sizeof yymsgbuf
;
2836 if (yysyntax_error_status
== 0)
2839 yyerror (YY_("syntax error"));
2840 if (yysyntax_error_status
== 2)
2841 goto yyexhaustedlab
;
2847 yyerror_range
[0] = yylloc
;
2849 if (yyerrstatus
== 3)
2851 /* If just tried and failed to reuse lookahead token after an
2852 error, discard it. */
2854 if (yychar
<= YYEOF
)
2856 /* Return failure if at end of input. */
2857 if (yychar
== YYEOF
)
2862 yydestruct ("Error: discarding",
2863 yytoken
, &yylval
, &yylloc
);
2868 /* Else will try to reuse lookahead token after shifting the error
2873 /*---------------------------------------------------.
2874 | yyerrorlab -- error raised explicitly by YYERROR. |
2875 `---------------------------------------------------*/
2878 /* Pacify compilers like GCC when the user code never invokes
2879 YYERROR and the label yyerrorlab therefore never appears in user
2881 if (/*CONSTCOND*/ 0)
2884 yyerror_range
[0] = yylsp
[1-yylen
];
2885 /* Do not reclaim the symbols of the rule which action triggered
2889 YY_STACK_PRINT (yyss
, yyssp
);
2894 /*-------------------------------------------------------------.
2895 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2896 `-------------------------------------------------------------*/
2898 yyerrstatus
= 3; /* Each real token shifted decrements this. */
2902 yyn
= yypact
[yystate
];
2903 if (!yypact_value_is_default (yyn
))
2906 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
2914 /* Pop the current state because it cannot handle the error token. */
2918 yyerror_range
[0] = *yylsp
;
2919 yydestruct ("Error: popping",
2920 yystos
[yystate
], yyvsp
, yylsp
);
2923 YY_STACK_PRINT (yyss
, yyssp
);
2928 yyerror_range
[1] = yylloc
;
2929 /* Using YYLLOC is tempting, but would change the location of
2930 the lookahead. YYLOC is available though. */
2931 YYLLOC_DEFAULT (yyloc
, (yyerror_range
- 1), 2);
2934 /* Shift the error token. */
2935 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
2941 /*-------------------------------------.
2942 | yyacceptlab -- YYACCEPT comes here. |
2943 `-------------------------------------*/
2948 /*-----------------------------------.
2949 | yyabortlab -- YYABORT comes here. |
2950 `-----------------------------------*/
2955 #if !defined(yyoverflow) || YYERROR_VERBOSE
2956 /*-------------------------------------------------.
2957 | yyexhaustedlab -- memory exhaustion comes here. |
2958 `-------------------------------------------------*/
2960 yyerror (YY_("memory exhausted"));
2966 if (yychar
!= YYEMPTY
)
2967 yydestruct ("Cleanup: discarding lookahead",
2968 yytoken
, &yylval
, &yylloc
);
2969 /* Do not reclaim the symbols of the rule which action triggered
2970 this YYABORT or YYACCEPT. */
2972 YY_STACK_PRINT (yyss
, yyssp
);
2973 while (yyssp
!= yyss
)
2975 yydestruct ("Cleanup: popping",
2976 yystos
[*yyssp
], yyvsp
, yylsp
);
2981 YYSTACK_FREE (yyss
);
2984 if (yymsg
!= yymsgbuf
)
2985 YYSTACK_FREE (yymsg
);
2987 /* Make sure YYID is used. */
2988 return YYID (yyresult
);
2991 /* Line 1623 of yacc.c */
2992 #line 691 "src/parse-gram.y"
2996 /* Return the location of the left-hand side of a rule whose
2997 right-hand side is RHS[1] ... RHS[N]. Ignore empty nonterminals in
2998 the right-hand side, and return an empty location equal to the end
2999 boundary of RHS[0] if the right-hand side is empty. */
3002 lloc_default (YYLTYPE
const *rhs
, int n
)
3007 /* SGI MIPSpro 7.4.1m miscompiles "loc.start = loc.end = rhs[n].end;".
3008 The bug is fixed in 7.4.2m, but play it safe for now. */
3009 loc
.start
= rhs
[n
].end
;
3010 loc
.end
= rhs
[n
].end
;
3012 /* Ignore empty nonterminals the start of the the right-hand side.
3013 Do not bother to ignore them at the end of the right-hand side,
3014 since empty nonterminals have the same end as their predecessors. */
3015 for (i
= 1; i
<= n
; i
++)
3016 if (! equal_boundaries (rhs
[i
].start
, rhs
[i
].end
))
3018 loc
.start
= rhs
[i
].start
;
3027 add_param (param_type type
, char *decl
, location loc
)
3029 static char const alphanum
[26 + 26 + 1 + 10] =
3030 "abcdefghijklmnopqrstuvwxyz"
3031 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
3035 char const *name_start
= NULL
;
3038 /* Stop on last actual character. */
3039 for (p
= decl
; p
[1]; p
++)
3041 || ! memchr (alphanum
, p
[-1], sizeof alphanum
))
3042 && memchr (alphanum
, p
[0], sizeof alphanum
- 10))
3045 /* Strip the surrounding '{' and '}', and any blanks just inside
3047 while (*--p
== ' ' || *p
== '\t')
3050 while (*++decl
== ' ' || *decl
== '\t')
3055 complain_at (loc
, _("missing identifier in parameter declaration"));
3062 memchr (alphanum
, name_start
[name_len
], sizeof alphanum
);
3066 name
= xmalloc (name_len
+ 1);
3067 memcpy (name
, name_start
, name_len
);
3068 name
[name_len
] = '\0';
3069 if (type
& param_lex
)
3070 muscle_pair_list_grow ("lex_param", decl
, name
);
3071 if (type
& param_parse
)
3072 muscle_pair_list_grow ("parse_param", decl
, name
);
3076 gram_scanner_last_string_free ();
3081 version_check (location
const *loc
, char const *version
)
3083 if (strverscmp (version
, PACKAGE_VERSION
) > 0)
3085 complain_at (*loc
, "require bison %s, but have %s",
3086 version
, PACKAGE_VERSION
);
3092 gram_error (location
const *loc
, char const *msg
)
3094 complain_at (*loc
, "%s", msg
);
3098 token_name (int type
)
3100 return yytname
[YYTRANSLATE (type
)];
3111 buf
[0] = '\''; buf
[1] = c
; buf
[2] = '\''; buf
[3] = '\0';
3112 return quotearg_style (escape_quoting_style
, buf
);