1 /* A Bison parser, made by GNU Bison 2.4.156-d497. */
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 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.156-d497"
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. */
77 /* Line 191 of yacc.c */
78 #line 1 "parse-gram.y"
79 /* Bison Grammar Parser -*- C -*-
81 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
84 This file is part of Bison, the GNU Compiler Compiler.
86 This program is free software: you can redistribute it and/or modify
87 it under the terms of the GNU General Public License as published by
88 the Free Software Foundation, either version 3 of the License, or
89 (at your option) any later version.
91 This program is distributed in the hope that it will be useful,
92 but WITHOUT ANY WARRANTY; without even the implied warranty of
93 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
94 GNU General Public License for more details.
96 You should have received a copy of the GNU General Public License
97 along with this program. If not, see <http://www.gnu.org/licenses/>. */
102 #include "complain.h"
103 #include "conflicts.h"
107 #include "muscle_tab.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 /** Add a lex-param or a parse-param.
133 * \param type \a lex_param or \a parse_param
134 * \param decl the formal argument
135 * \param loc the location in the source.
137 static void add_param (char const *type
, char *decl
, location loc
);
140 static symbol_class current_class
= unknown_sym
;
141 static uniqstr current_type
= NULL
;
142 static symbol
*current_lhs
;
143 static location current_lhs_location
;
144 static int current_prec
= 0;
146 #define YYTYPE_INT16 int_fast16_t
147 #define YYTYPE_INT8 int_fast8_t
148 #define YYTYPE_UINT16 uint_fast16_t
149 #define YYTYPE_UINT8 uint_fast8_t
152 /* Line 191 of yacc.c */
153 #line 154 "../../src/parse-gram.c"
155 /* Enabling traces. */
160 /* Enabling verbose error messages. */
161 #ifdef YYERROR_VERBOSE
162 # undef YYERROR_VERBOSE
163 # define YYERROR_VERBOSE 1
165 # define YYERROR_VERBOSE 1
168 /* Enabling the token table. */
169 #ifndef YYTOKEN_TABLE
170 # define YYTOKEN_TABLE 0
177 /* Put the tokens into the symbol table, so that GDB and other debuggers
186 PERCENT_DESTRUCTOR
= 263,
187 PERCENT_PRINTER
= 264,
190 PERCENT_NONASSOC
= 267,
191 PERCENT_PRECEDENCE
= 268,
197 PERCENT_DEFAULT_PREC
= 274,
198 PERCENT_DEFINE
= 275,
199 PERCENT_DEFINES
= 276,
200 PERCENT_ERROR_VERBOSE
= 277,
201 PERCENT_EXPECT
= 278,
202 PERCENT_EXPECT_RR
= 279,
203 PERCENT_FILE_PREFIX
= 280,
204 PERCENT_GLR_PARSER
= 281,
205 PERCENT_INITIAL_ACTION
= 282,
206 PERCENT_LANGUAGE
= 283,
207 PERCENT_LEX_PARAM
= 284,
208 PERCENT_LOCATIONS
= 285,
209 PERCENT_NAME_PREFIX
= 286,
210 PERCENT_NO_DEFAULT_PREC
= 287,
211 PERCENT_NO_LINES
= 288,
212 PERCENT_NONDETERMINISTIC_PARSER
= 289,
213 PERCENT_OUTPUT
= 290,
214 PERCENT_PARSE_PARAM
= 291,
215 PERCENT_PURE_PARSER
= 292,
216 PERCENT_REQUIRE
= 293,
217 PERCENT_SKELETON
= 294,
219 PERCENT_TOKEN_TABLE
= 296,
220 PERCENT_VERBOSE
= 297,
228 PERCENT_PERCENT
= 305,
242 #define PERCENT_TOKEN 260
243 #define PERCENT_NTERM 261
244 #define PERCENT_TYPE 262
245 #define PERCENT_DESTRUCTOR 263
246 #define PERCENT_PRINTER 264
247 #define PERCENT_LEFT 265
248 #define PERCENT_RIGHT 266
249 #define PERCENT_NONASSOC 267
250 #define PERCENT_PRECEDENCE 268
251 #define PERCENT_PREC 269
252 #define PERCENT_DPREC 270
253 #define PERCENT_MERGE 271
254 #define PERCENT_CODE 272
255 #define PERCENT_DEBUG 273
256 #define PERCENT_DEFAULT_PREC 274
257 #define PERCENT_DEFINE 275
258 #define PERCENT_DEFINES 276
259 #define PERCENT_ERROR_VERBOSE 277
260 #define PERCENT_EXPECT 278
261 #define PERCENT_EXPECT_RR 279
262 #define PERCENT_FILE_PREFIX 280
263 #define PERCENT_GLR_PARSER 281
264 #define PERCENT_INITIAL_ACTION 282
265 #define PERCENT_LANGUAGE 283
266 #define PERCENT_LEX_PARAM 284
267 #define PERCENT_LOCATIONS 285
268 #define PERCENT_NAME_PREFIX 286
269 #define PERCENT_NO_DEFAULT_PREC 287
270 #define PERCENT_NO_LINES 288
271 #define PERCENT_NONDETERMINISTIC_PARSER 289
272 #define PERCENT_OUTPUT 290
273 #define PERCENT_PARSE_PARAM 291
274 #define PERCENT_PURE_PARSER 292
275 #define PERCENT_REQUIRE 293
276 #define PERCENT_SKELETON 294
277 #define PERCENT_START 295
278 #define PERCENT_TOKEN_TABLE 296
279 #define PERCENT_VERBOSE 297
280 #define PERCENT_YACC 298
281 #define BRACED_CODE 299
287 #define PERCENT_PERCENT 305
290 #define SEMICOLON 308
294 #define PERCENT_UNION 312
299 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
300 typedef union YYSTYPE
303 /* Line 216 of yacc.c */
304 #line 92 "parse-gram.y"
313 unsigned char character
;
317 /* Line 216 of yacc.c */
318 #line 319 "../../src/parse-gram.c"
320 # define YYSTYPE_IS_TRIVIAL 1
321 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
322 # define YYSTYPE_IS_DECLARED 1
325 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
326 typedef struct YYLTYPE
333 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
334 # define YYLTYPE_IS_DECLARED 1
335 # define YYLTYPE_IS_TRIVIAL 1
339 /* Copy the second part of user declarations. */
342 /* Line 266 of yacc.c */
343 #line 344 "../../src/parse-gram.c"
350 typedef YYTYPE_UINT8 yytype_uint8
;
352 typedef unsigned char yytype_uint8
;
356 typedef YYTYPE_INT8 yytype_int8
;
357 #elif (defined __STDC__ || defined __C99__FUNC__ \
358 || defined __cplusplus || defined _MSC_VER)
359 typedef signed char yytype_int8
;
361 typedef short int yytype_int8
;
365 typedef YYTYPE_UINT16 yytype_uint16
;
367 typedef unsigned short int yytype_uint16
;
371 typedef YYTYPE_INT16 yytype_int16
;
373 typedef short int yytype_int16
;
377 # ifdef __SIZE_TYPE__
378 # define YYSIZE_T __SIZE_TYPE__
379 # elif defined size_t
380 # define YYSIZE_T size_t
381 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
382 || defined __cplusplus || defined _MSC_VER)
383 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
384 # define YYSIZE_T size_t
386 # define YYSIZE_T unsigned int
390 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
395 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
396 # define YY_(msgid) dgettext ("bison-runtime", msgid)
400 # define YY_(msgid) msgid
404 /* Suppress unused-variable warnings by "using" E. */
405 #if ! defined lint || defined __GNUC__
406 # define YYUSE(e) ((void) (e))
408 # define YYUSE(e) /* empty */
411 /* Identity function, used to suppress warnings about constant conditions. */
415 #if (defined __STDC__ || defined __C99__FUNC__ \
416 || defined __cplusplus || defined _MSC_VER)
429 #if ! defined yyoverflow || YYERROR_VERBOSE
431 /* The parser invokes alloca or malloc; define the necessary symbols. */
433 # ifdef YYSTACK_USE_ALLOCA
434 # if YYSTACK_USE_ALLOCA
436 # define YYSTACK_ALLOC __builtin_alloca
437 # elif defined __BUILTIN_VA_ARG_INCR
438 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
440 # define YYSTACK_ALLOC __alloca
441 # elif defined _MSC_VER
442 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
443 # define alloca _alloca
445 # define YYSTACK_ALLOC alloca
446 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
447 || defined __cplusplus || defined _MSC_VER)
448 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
457 # ifdef YYSTACK_ALLOC
458 /* Pacify GCC's `empty if-body' warning. */
459 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
460 # ifndef YYSTACK_ALLOC_MAXIMUM
461 /* The OS might guarantee only one guard page at the bottom of the stack,
462 and a page size can be as small as 4096 bytes. So we cannot safely
463 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
464 to allow for a few compiler-allocated temporary stack slots. */
465 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
468 # define YYSTACK_ALLOC YYMALLOC
469 # define YYSTACK_FREE YYFREE
470 # ifndef YYSTACK_ALLOC_MAXIMUM
471 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
473 # if (defined __cplusplus && ! defined _STDLIB_H \
474 && ! ((defined YYMALLOC || defined malloc) \
475 && (defined YYFREE || defined free)))
476 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
482 # define YYMALLOC malloc
483 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
484 || defined __cplusplus || defined _MSC_VER)
485 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
490 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
491 || defined __cplusplus || defined _MSC_VER)
492 void free (void *); /* INFRINGES ON USER NAME SPACE */
496 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
499 #if (! defined yyoverflow \
500 && (! defined __cplusplus \
501 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
502 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
504 /* A type that is properly aligned for any stack member. */
507 yytype_int16 yyss_alloc
;
512 /* The size of the maximum gap between one aligned stack and the next. */
513 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
515 /* The size of an array large to enough to hold all stacks, each with
517 # define YYSTACK_BYTES(N) \
518 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
519 + 2 * YYSTACK_GAP_MAXIMUM)
521 /* Copy COUNT objects from FROM to TO. The source and destination do
524 # if defined __GNUC__ && 1 < __GNUC__
525 # define YYCOPY(To, From, Count) \
526 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
528 # define YYCOPY(To, From, Count) \
532 for (yyi = 0; yyi < (Count); yyi++) \
533 (To)[yyi] = (From)[yyi]; \
539 /* Relocate STACK from its old location to the new one. The
540 local variables YYSIZE and YYSTACKSIZE give the old and new number of
541 elements in the stack, and YYPTR gives the new location of the
542 stack. Advance YYPTR to a properly aligned location for the next
544 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
547 YYSIZE_T yynewbytes; \
548 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
549 Stack = &yyptr->Stack_alloc; \
550 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
551 yyptr += yynewbytes / sizeof (*yyptr); \
557 /* YYFINAL -- State number of the termination state. */
559 /* YYLAST -- Last index in YYTABLE. */
562 /* YYNTOKENS -- Number of terminals. */
564 /* YYNNTS -- Number of nonterminals. */
566 /* YYNRULES -- Number of rules. */
568 /* YYNSTATES -- Number of states. */
569 #define YYNSTATES 144
571 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
572 by yylex, with out-of-bounds checking. */
574 #define YYMAXUTOK 312
576 #define YYTRANSLATE(YYX) \
577 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
579 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
580 as returned by yylex, without out-of-bounds checking. */
581 static const yytype_uint8 yytranslate
[] =
583 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
584 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
585 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
586 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
587 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
588 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
589 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
590 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
591 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
592 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
593 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
594 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
595 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
596 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
597 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
598 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
599 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
600 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
601 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
602 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
603 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
604 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
605 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
606 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
607 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
608 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
609 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
610 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
611 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
612 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
613 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
618 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
620 static const yytype_uint16 yyprhs
[] =
622 0, 0, 3, 8, 9, 12, 14, 16, 18, 22,
623 24, 27, 29, 32, 35, 38, 42, 44, 47, 50,
624 53, 55, 58, 62, 64, 66, 69, 73, 76, 78,
625 81, 84, 86, 88, 90, 92, 94, 96, 99, 103,
626 107, 109, 111, 114, 118, 119, 121, 125, 126, 130,
627 131, 135, 139, 143, 145, 147, 149, 151, 152, 154,
628 156, 159, 161, 164, 166, 169, 171, 174, 176, 178,
629 180, 182, 184, 186, 189, 192, 196, 198, 201, 203,
630 206, 208, 211, 214, 215, 219, 221, 225, 228, 229,
631 232, 235, 239, 243, 247, 249, 251, 252, 254, 256,
632 258, 260, 262, 264, 266, 268, 269
635 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
636 static const yytype_int8 yyrhs
[] =
638 59, 0, -1, 60, 50, 77, 90, -1, -1, 60,
639 61, -1, 62, -1, 52, -1, 18, -1, 20, 83,
640 84, -1, 21, -1, 21, 3, -1, 22, -1, 23,
641 4, -1, 24, 4, -1, 25, 3, -1, 25, 47,
642 3, -1, 26, -1, 27, 44, -1, 28, 3, -1,
643 29, 44, -1, 30, -1, 31, 3, -1, 31, 47,
644 3, -1, 33, -1, 34, -1, 35, 3, -1, 35,
645 47, 3, -1, 36, 44, -1, 37, -1, 38, 3,
646 -1, 39, 3, -1, 41, -1, 42, -1, 43, -1,
647 53, -1, 67, -1, 64, -1, 40, 88, -1, 8,
648 44, 73, -1, 9, 44, 73, -1, 19, -1, 32,
649 -1, 17, 85, -1, 17, 48, 85, -1, -1, 48,
650 -1, 57, 63, 85, -1, -1, 6, 65, 76, -1,
651 -1, 5, 66, 76, -1, 7, 54, 72, -1, 68,
652 69, 70, -1, 10, -1, 11, -1, 12, -1, 13,
653 -1, -1, 54, -1, 71, -1, 70, 71, -1, 88,
654 -1, 88, 4, -1, 88, -1, 72, 88, -1, 74,
655 -1, 73, 74, -1, 88, -1, 54, -1, 55, -1,
656 56, -1, 54, -1, 86, -1, 86, 4, -1, 86,
657 89, -1, 86, 4, 89, -1, 75, -1, 76, 75,
658 -1, 78, -1, 77, 78, -1, 79, -1, 62, 53,
659 -1, 1, 53, -1, -1, 87, 80, 81, -1, 82,
660 -1, 81, 51, 82, -1, 81, 53, -1, -1, 82,
661 88, -1, 82, 44, -1, 82, 14, 88, -1, 82,
662 15, 4, -1, 82, 16, 54, -1, 48, -1, 3,
663 -1, -1, 3, -1, 44, -1, 48, -1, 45, -1,
664 49, -1, 86, -1, 89, -1, 3, -1, -1, 50,
668 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
669 static const yytype_uint16 yyrline
[] =
671 0, 203, 203, 211, 213, 217, 218, 228, 229, 233,
672 234, 239, 240, 241, 242, 243, 244, 249, 258, 259,
673 260, 261, 262, 263, 264, 265, 266, 267, 268, 281,
674 282, 306, 307, 308, 309, 313, 314, 315, 319, 326,
675 333, 337, 341, 348, 363, 364, 368, 380, 380, 385,
676 385, 390, 401, 416, 417, 418, 419, 423, 424, 429,
677 431, 436, 437, 442, 444, 449, 450, 454, 455, 456,
678 457, 462, 467, 472, 478, 484, 495, 496, 505, 506,
679 512, 513, 514, 521, 521, 525, 526, 527, 532, 533,
680 535, 537, 539, 541, 551, 552, 558, 561, 570, 590,
681 592, 601, 606, 607, 612, 619, 621
685 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
686 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
687 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
688 static const char *const yytname
[] =
690 "\"end of file\"", "error", "$undefined", "\"string\"", "\"integer\"",
691 "\"%token\"", "\"%nterm\"", "\"%type\"", "\"%destructor\"",
692 "\"%printer\"", "\"%left\"", "\"%right\"", "\"%nonassoc\"",
693 "\"%precedence\"", "\"%prec\"", "\"%dprec\"", "\"%merge\"", "\"%code\"",
694 "\"%debug\"", "\"%default-prec\"", "\"%define\"", "\"%defines\"",
695 "\"%error-verbose\"", "\"%expect\"", "\"%expect-rr\"",
696 "\"%file-prefix\"", "\"%glr-parser\"", "\"%initial-action\"",
697 "\"%language\"", "\"%lex-param\"", "\"%locations\"", "\"%name-prefix\"",
698 "\"%no-default-prec\"", "\"%no-lines\"", "\"%nondeterministic-parser\"",
699 "\"%output\"", "\"%parse-param\"", "\"%pure-parser\"", "\"%require\"",
700 "\"%skeleton\"", "\"%start\"", "\"%token-table\"", "\"%verbose\"",
701 "\"%yacc\"", "\"{...}\"", "\"char\"", "\"epilogue\"", "\"=\"",
702 "\"identifier\"", "\"identifier:\"", "\"%%\"", "\"|\"", "\"%{...%}\"",
703 "\";\"", "\"<tag>\"", "\"<*>\"", "\"<>\"", "\"%union\"", "$accept",
704 "input", "prologue_declarations", "prologue_declaration",
705 "grammar_declaration", "union_name", "symbol_declaration", "$@1", "$@2",
706 "precedence_declaration", "precedence_declarator", "tag.opt",
707 "symbols.prec", "symbol.prec", "symbols.1", "generic_symlist",
708 "generic_symlist_item", "symbol_def", "symbol_defs.1", "grammar",
709 "rules_or_grammar_declaration", "rules", "$@3", "rhses.1", "rhs",
710 "variable", "content.opt", "braceless", "id", "id_colon", "symbol",
711 "string_as_id", "epilogue.opt", 0
716 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
717 (internal) symbol number NUM (which must be that of a token). */
718 static const yytype_uint16 yytoknum
[] =
720 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
721 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
722 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
723 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
724 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
725 305, 306, 307, 308, 309, 310, 311, 312
729 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
730 static const yytype_uint8 yyr1
[] =
732 0, 58, 59, 60, 60, 61, 61, 61, 61, 61,
733 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
734 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
735 61, 61, 61, 61, 61, 62, 62, 62, 62, 62,
736 62, 62, 62, 62, 63, 63, 62, 65, 64, 66,
737 64, 64, 67, 68, 68, 68, 68, 69, 69, 70,
738 70, 71, 71, 72, 72, 73, 73, 74, 74, 74,
739 74, 75, 75, 75, 75, 75, 76, 76, 77, 77,
740 78, 78, 78, 80, 79, 81, 81, 81, 82, 82,
741 82, 82, 82, 82, 83, 83, 84, 84, 85, 86,
742 86, 87, 88, 88, 89, 90, 90
745 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
746 static const yytype_uint8 yyr2
[] =
748 0, 2, 4, 0, 2, 1, 1, 1, 3, 1,
749 2, 1, 2, 2, 2, 3, 1, 2, 2, 2,
750 1, 2, 3, 1, 1, 2, 3, 2, 1, 2,
751 2, 1, 1, 1, 1, 1, 1, 2, 3, 3,
752 1, 1, 2, 3, 0, 1, 3, 0, 3, 0,
753 3, 3, 3, 1, 1, 1, 1, 0, 1, 1,
754 2, 1, 2, 1, 2, 1, 2, 1, 1, 1,
755 1, 1, 1, 2, 2, 3, 1, 2, 1, 2,
756 1, 2, 2, 0, 3, 1, 3, 2, 0, 2,
757 2, 3, 3, 3, 1, 1, 0, 1, 1, 1,
761 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
762 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
763 means the default is an error. */
764 static const yytype_uint8 yydefact
[] =
766 3, 0, 0, 1, 49, 47, 0, 0, 0, 53,
767 54, 55, 56, 0, 7, 40, 0, 9, 11, 0,
768 0, 0, 16, 0, 0, 0, 20, 0, 41, 23,
769 24, 0, 0, 28, 0, 0, 0, 31, 32, 33,
770 0, 6, 34, 44, 4, 5, 36, 35, 57, 0,
771 0, 0, 0, 0, 98, 0, 42, 95, 94, 96,
772 10, 12, 13, 14, 0, 17, 18, 19, 21, 0,
773 25, 0, 27, 29, 30, 104, 100, 99, 102, 37,
774 103, 0, 101, 0, 0, 78, 80, 83, 45, 0,
775 58, 0, 71, 76, 50, 72, 48, 51, 63, 68,
776 69, 70, 38, 65, 67, 39, 43, 97, 8, 15,
777 22, 26, 82, 81, 0, 79, 2, 88, 46, 52,
778 59, 61, 77, 73, 74, 64, 66, 106, 84, 85,
779 60, 62, 75, 88, 87, 0, 0, 0, 90, 89,
783 /* YYDEFGOTO[NTERM-NUM]. */
784 static const yytype_int16 yydefgoto
[] =
786 -1, 1, 2, 44, 83, 89, 46, 50, 49, 47,
787 48, 91, 119, 120, 97, 102, 103, 93, 94, 84,
788 85, 86, 117, 128, 129, 59, 108, 56, 78, 87,
792 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
794 #define YYPACT_NINF -81
795 static const yytype_int16 yypact
[] =
797 -81, 23, 111, -81, -81, -81, -28, -12, -8, -81,
798 -81, -81, -81, -13, -81, -81, 14, 43, -81, 48,
799 49, 2, -81, 10, 53, 34, -81, 13, -81, -81,
800 -81, 26, 36, -81, 54, 78, 0, -81, -81, -81,
801 58, -81, -81, 41, -81, -81, -81, -81, 28, -24,
802 -24, 0, 31, 31, -81, 44, -81, -81, -81, 81,
803 -81, -81, -81, -81, 88, -81, -81, -81, -81, 89,
804 -81, 91, -81, -81, -81, -81, -81, -81, -81, -81,
805 -81, 42, -81, 47, 1, -81, -81, -81, -81, 44,
806 -81, 0, -81, -81, -24, 40, -24, 0, -81, -81,
807 -81, -81, 31, -81, -81, 31, -81, -81, -81, -81,
808 -81, -81, -81, -81, 50, -81, -81, -81, -81, 0,
809 -81, 93, -81, 98, -81, -81, -81, -81, -14, 155,
810 -81, -81, -81, -81, -81, 0, 99, 51, -81, -81,
814 /* YYPGOTO[NTERM-NUM]. */
815 static const yytype_int8 yypgoto
[] =
817 -81, -81, -81, -81, 100, -81, -81, -81, -81, -81,
818 -81, -81, -81, -11, -81, 56, -80, -54, 60, -81,
819 22, -81, -81, -81, -21, -81, -81, -51, -22, -81,
823 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
824 positive, shift that token. If negative, reduce the rule which
825 number is the opposite. If zero, do what YYDEFACT says.
826 If YYTABLE_NINF, syntax error. */
827 #define YYTABLE_NINF -106
828 static const yytype_int16 yytable
[] =
830 79, -105, 81, 75, 106, 63, 4, 5, 6, 7,
831 8, 9, 10, 11, 12, 98, 68, 57, 13, 124,
832 15, 76, 126, 3, 77, 126, 51, 95, 95, 70,
833 92, 54, 52, 28, 75, 55, 53, 133, 118, 134,
834 122, 36, 122, 75, 123, 76, 60, 132, 77, 64,
835 82, 114, 61, 62, 65, 121, 66, 73, 43, 81,
836 69, 125, 58, 4, 5, 6, 7, 8, 9, 10,
837 11, 12, 95, 71, 95, 13, 76, 15, 67, 77,
838 72, 74, 90, 121, 107, 99, 100, 101, 54, 88,
839 28, 109, 110, 139, 111, 112, 127, 131, 36, 141,
840 113, 75, 45, 142, 139, 143, 115, 82, 130, 105,
841 96, 0, 140, 0, 0, 43, 4, 5, 6, 7,
842 8, 9, 10, 11, 12, 0, 0, 0, 13, 14,
843 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
844 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
845 35, 36, 37, 38, 39, 0, 0, 0, 75, 0,
846 0, 40, 0, 41, 42, 0, 0, 0, 43, 135,
847 136, 137, 0, 0, 0, 0, 0, 0, 0, 0,
848 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
849 0, 0, 0, 0, 0, 0, 0, 0, 0, 138,
853 static const yytype_int16 yycheck
[] =
855 36, 0, 1, 3, 55, 3, 5, 6, 7, 8,
856 9, 10, 11, 12, 13, 51, 3, 3, 17, 95,
857 19, 45, 102, 0, 48, 105, 54, 49, 50, 3,
858 54, 44, 44, 32, 3, 48, 44, 51, 89, 53,
859 94, 40, 96, 3, 4, 45, 3, 123, 48, 47,
860 49, 50, 4, 4, 44, 91, 3, 3, 57, 1,
861 47, 97, 48, 5, 6, 7, 8, 9, 10, 11,
862 12, 13, 94, 47, 96, 17, 45, 19, 44, 48,
863 44, 3, 54, 119, 3, 54, 55, 56, 44, 48,
864 32, 3, 3, 129, 3, 53, 46, 4, 40, 135,
865 53, 3, 2, 4, 140, 54, 84, 49, 119, 53,
866 50, -1, 133, -1, -1, 57, 5, 6, 7, 8,
867 9, 10, 11, 12, 13, -1, -1, -1, 17, 18,
868 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
869 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
870 39, 40, 41, 42, 43, -1, -1, -1, 3, -1,
871 -1, 50, -1, 52, 53, -1, -1, -1, 57, 14,
872 15, 16, -1, -1, -1, -1, -1, -1, -1, -1,
873 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
874 -1, -1, -1, -1, -1, -1, -1, -1, -1, 44,
878 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
879 symbol of state STATE-NUM. */
880 static const yytype_uint8 yystos
[] =
882 0, 59, 60, 0, 5, 6, 7, 8, 9, 10,
883 11, 12, 13, 17, 18, 19, 20, 21, 22, 23,
884 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
885 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
886 50, 52, 53, 57, 61, 62, 64, 67, 68, 66,
887 65, 54, 44, 44, 44, 48, 85, 3, 48, 83,
888 3, 4, 4, 3, 47, 44, 3, 44, 3, 47,
889 3, 47, 44, 3, 3, 3, 45, 48, 86, 88,
890 89, 1, 49, 62, 77, 78, 79, 87, 48, 63,
891 54, 69, 54, 75, 76, 86, 76, 72, 88, 54,
892 55, 56, 73, 74, 88, 73, 85, 3, 84, 3,
893 3, 3, 53, 53, 50, 78, 90, 80, 85, 70,
894 71, 88, 75, 4, 89, 88, 74, 46, 81, 82,
895 71, 4, 89, 51, 53, 14, 15, 16, 44, 88,
899 #define yyerrok (yyerrstatus = 0)
900 #define yyclearin (yychar = YYEMPTY)
904 #define YYACCEPT goto yyacceptlab
905 #define YYABORT goto yyabortlab
906 #define YYERROR goto yyerrorlab
909 /* Like YYERROR except do call yyerror. This remains here temporarily
910 to ease the transition to the new meaning of YYERROR, for GCC.
911 Once GCC version 2 has supplanted version 1, this can go. */
913 #define YYFAIL goto yyerrlab
915 #define YYRECOVERING() (!!yyerrstatus)
917 #define YYBACKUP(Token, Value) \
919 if (yychar == YYEMPTY && yylen == 1) \
923 yytoken = YYTRANSLATE (yychar); \
929 yyerror (YY_("syntax error: cannot back up")); \
936 #define YYERRCODE 256
939 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
940 If N is 0, then set CURRENT to the empty location which ends
941 the previous symbol: RHS[0] (always defined). */
943 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
944 #ifndef YYLLOC_DEFAULT
945 # define YYLLOC_DEFAULT(Current, Rhs, N) \
949 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
950 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
951 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
952 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
956 (Current).first_line = (Current).last_line = \
957 YYRHSLOC (Rhs, 0).last_line; \
958 (Current).first_column = (Current).last_column = \
959 YYRHSLOC (Rhs, 0).last_column; \
965 /* YY_LOCATION_PRINT -- Print the location on the stream.
966 This macro was not mandated originally: define only if we know
967 we won't break user code: when these are the locations we know. */
969 #ifndef YY_LOCATION_PRINT
970 # if YYLTYPE_IS_TRIVIAL
971 # define YY_LOCATION_PRINT(File, Loc) \
972 fprintf (File, "%d.%d-%d.%d", \
973 (Loc).first_line, (Loc).first_column, \
974 (Loc).last_line, (Loc).last_column)
976 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
981 /* YYLEX -- calling `yylex' with the right arguments. */
984 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
986 # define YYLEX yylex (&yylval, &yylloc)
989 /* Enable debugging if requested. */
993 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
994 # define YYFPRINTF fprintf
997 # define YYDPRINTF(Args) \
1003 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1007 YYFPRINTF (stderr, "%s ", Title); \
1008 yy_symbol_print (stderr, \
1009 Type, Value, Location); \
1010 YYFPRINTF (stderr, "\n"); \
1015 /*--------------------------------.
1016 | Print this symbol on YYOUTPUT. |
1017 `--------------------------------*/
1020 #if (defined __STDC__ || defined __C99__FUNC__ \
1021 || defined __cplusplus || defined _MSC_VER)
1023 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, YYLTYPE
const * const yylocationp
)
1026 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yylocationp
)
1029 YYSTYPE
const * const yyvaluep
;
1030 YYLTYPE
const * const yylocationp
;
1035 YYUSE (yylocationp
);
1037 if (yytype
< YYNTOKENS
)
1038 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
1044 case 3: /* "\"string\"" */
1046 /* Line 719 of yacc.c */
1047 #line 181 "parse-gram.y"
1048 { fputs (quotearg_style (c_quoting_style
, ((*yyvaluep
).chars
)), stderr
); };
1050 /* Line 719 of yacc.c */
1051 #line 1052 "../../src/parse-gram.c"
1053 case 4: /* "\"integer\"" */
1055 /* Line 719 of yacc.c */
1056 #line 192 "parse-gram.y"
1057 { fprintf (stderr
, "%d", ((*yyvaluep
).integer
)); };
1059 /* Line 719 of yacc.c */
1060 #line 1061 "../../src/parse-gram.c"
1062 case 44: /* "\"{...}\"" */
1064 /* Line 719 of yacc.c */
1065 #line 183 "parse-gram.y"
1066 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).code
)); };
1068 /* Line 719 of yacc.c */
1069 #line 1070 "../../src/parse-gram.c"
1071 case 45: /* "\"char\"" */
1073 /* Line 719 of yacc.c */
1074 #line 175 "parse-gram.y"
1075 { fputs (char_name (((*yyvaluep
).character
)), stderr
); };
1077 /* Line 719 of yacc.c */
1078 #line 1079 "../../src/parse-gram.c"
1080 case 46: /* "\"epilogue\"" */
1082 /* Line 719 of yacc.c */
1083 #line 183 "parse-gram.y"
1084 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).chars
)); };
1086 /* Line 719 of yacc.c */
1087 #line 1088 "../../src/parse-gram.c"
1089 case 48: /* "\"identifier\"" */
1091 /* Line 719 of yacc.c */
1092 #line 188 "parse-gram.y"
1093 { fputs (((*yyvaluep
).uniqstr
), stderr
); };
1095 /* Line 719 of yacc.c */
1096 #line 1097 "../../src/parse-gram.c"
1098 case 49: /* "\"identifier:\"" */
1100 /* Line 719 of yacc.c */
1101 #line 189 "parse-gram.y"
1102 { fprintf (stderr
, "%s:", ((*yyvaluep
).uniqstr
)); };
1104 /* Line 719 of yacc.c */
1105 #line 1106 "../../src/parse-gram.c"
1107 case 52: /* "\"%{...%}\"" */
1109 /* Line 719 of yacc.c */
1110 #line 183 "parse-gram.y"
1111 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).chars
)); };
1113 /* Line 719 of yacc.c */
1114 #line 1115 "../../src/parse-gram.c"
1116 case 54: /* "\"<tag>\"" */
1118 /* Line 719 of yacc.c */
1119 #line 187 "parse-gram.y"
1120 { fprintf (stderr
, "<%s>", ((*yyvaluep
).uniqstr
)); };
1122 /* Line 719 of yacc.c */
1123 #line 1124 "../../src/parse-gram.c"
1125 case 83: /* "variable" */
1127 /* Line 719 of yacc.c */
1128 #line 188 "parse-gram.y"
1129 { fputs (((*yyvaluep
).uniqstr
), stderr
); };
1131 /* Line 719 of yacc.c */
1132 #line 1133 "../../src/parse-gram.c"
1134 case 84: /* "content.opt" */
1136 /* Line 719 of yacc.c */
1137 #line 183 "parse-gram.y"
1138 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).chars
)); };
1140 /* Line 719 of yacc.c */
1141 #line 1142 "../../src/parse-gram.c"
1143 case 85: /* "braceless" */
1145 /* Line 719 of yacc.c */
1146 #line 183 "parse-gram.y"
1147 { fprintf (stderr
, "{\n%s\n}", ((*yyvaluep
).chars
)); };
1149 /* Line 719 of yacc.c */
1150 #line 1151 "../../src/parse-gram.c"
1154 /* Line 719 of yacc.c */
1155 #line 195 "parse-gram.y"
1156 { fprintf (stderr
, "%s", ((*yyvaluep
).symbol
)->tag
); };
1158 /* Line 719 of yacc.c */
1159 #line 1160 "../../src/parse-gram.c"
1161 case 87: /* "id_colon" */
1163 /* Line 719 of yacc.c */
1164 #line 196 "parse-gram.y"
1165 { fprintf (stderr
, "%s:", ((*yyvaluep
).symbol
)->tag
); };
1167 /* Line 719 of yacc.c */
1168 #line 1169 "../../src/parse-gram.c"
1170 case 88: /* "symbol" */
1172 /* Line 719 of yacc.c */
1173 #line 195 "parse-gram.y"
1174 { fprintf (stderr
, "%s", ((*yyvaluep
).symbol
)->tag
); };
1176 /* Line 719 of yacc.c */
1177 #line 1178 "../../src/parse-gram.c"
1179 case 89: /* "string_as_id" */
1181 /* Line 719 of yacc.c */
1182 #line 195 "parse-gram.y"
1183 { fprintf (stderr
, "%s", ((*yyvaluep
).symbol
)->tag
); };
1185 /* Line 719 of yacc.c */
1186 #line 1187 "../../src/parse-gram.c"
1194 /*--------------------------------.
1195 | Print this symbol on YYOUTPUT. |
1196 `--------------------------------*/
1198 #if (defined __STDC__ || defined __C99__FUNC__ \
1199 || defined __cplusplus || defined _MSC_VER)
1201 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, YYLTYPE
const * const yylocationp
)
1204 yy_symbol_print (yyoutput
, yytype
, yyvaluep
, yylocationp
)
1207 YYSTYPE
const * const yyvaluep
;
1208 YYLTYPE
const * const yylocationp
;
1211 if (yytype
< YYNTOKENS
)
1212 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
1214 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
1216 YY_LOCATION_PRINT (yyoutput
, *yylocationp
);
1217 YYFPRINTF (yyoutput
, ": ");
1218 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yylocationp
);
1219 YYFPRINTF (yyoutput
, ")");
1222 /*------------------------------------------------------------------.
1223 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1225 `------------------------------------------------------------------*/
1227 #if (defined __STDC__ || defined __C99__FUNC__ \
1228 || defined __cplusplus || defined _MSC_VER)
1230 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
1233 yy_stack_print (yybottom
, yytop
)
1234 yytype_int16
*yybottom
;
1235 yytype_int16
*yytop
;
1238 YYFPRINTF (stderr
, "Stack now");
1239 for (; yybottom
<= yytop
; yybottom
++)
1241 int yybot
= *yybottom
;
1242 YYFPRINTF (stderr
, " %d", yybot
);
1244 YYFPRINTF (stderr
, "\n");
1247 # define YY_STACK_PRINT(Bottom, Top) \
1250 yy_stack_print ((Bottom), (Top)); \
1254 /*------------------------------------------------.
1255 | Report that the YYRULE is going to be reduced. |
1256 `------------------------------------------------*/
1258 #if (defined __STDC__ || defined __C99__FUNC__ \
1259 || defined __cplusplus || defined _MSC_VER)
1261 yy_reduce_print (YYSTYPE
*yyvsp
, YYLTYPE
*yylsp
, int yyrule
)
1264 yy_reduce_print (yyvsp
, yylsp
, yyrule
)
1270 int yynrhs
= yyr2
[yyrule
];
1272 unsigned long int yylno
= yyrline
[yyrule
];
1273 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
1275 /* The symbols being reduced. */
1276 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
1278 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
1279 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
1280 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
1281 , &(yylsp
[(yyi
+ 1) - (yynrhs
)]) );
1282 YYFPRINTF (stderr
, "\n");
1286 # define YY_REDUCE_PRINT(Rule) \
1289 yy_reduce_print (yyvsp, yylsp, Rule); \
1292 /* Nonzero means print parse trace. It is left uninitialized so that
1293 multiple parsers can coexist. */
1295 #else /* !YYDEBUG */
1296 # define YYDPRINTF(Args)
1297 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1298 # define YY_STACK_PRINT(Bottom, Top)
1299 # define YY_REDUCE_PRINT(Rule)
1300 #endif /* !YYDEBUG */
1303 /* YYINITDEPTH -- initial size of the parser's stacks. */
1305 # define YYINITDEPTH 200
1308 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1309 if the built-in stack extension method is used).
1311 Do not make this value too large; the results are undefined if
1312 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1313 evaluated with infinite-precision integer arithmetic. */
1316 # define YYMAXDEPTH 10000
1324 # if defined __GLIBC__ && defined _STRING_H
1325 # define yystrlen strlen
1327 /* Return the length of YYSTR. */
1328 #if (defined __STDC__ || defined __C99__FUNC__ \
1329 || defined __cplusplus || defined _MSC_VER)
1331 yystrlen (const char *yystr
)
1339 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1347 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1348 # define yystpcpy stpcpy
1350 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1352 #if (defined __STDC__ || defined __C99__FUNC__ \
1353 || defined __cplusplus || defined _MSC_VER)
1355 yystpcpy (char *yydest
, const char *yysrc
)
1358 yystpcpy (yydest
, yysrc
)
1364 const char *yys
= yysrc
;
1366 while ((*yyd
++ = *yys
++) != '\0')
1375 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1376 quotes and backslashes, so that it's suitable for yyerror. The
1377 heuristic is that double-quoting is unnecessary unless the string
1378 contains an apostrophe, a comma, or backslash (other than
1379 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1380 null, do not copy; instead, return the length of what the result
1383 yytnamerr (char *yyres
, const char *yystr
)
1388 char const *yyp
= yystr
;
1395 goto do_not_strip_quotes
;
1399 goto do_not_strip_quotes
;
1412 do_not_strip_quotes
: ;
1416 return yystrlen (yystr
);
1418 return yystpcpy (yyres
, yystr
) - yyres
;
1422 /* Copy into YYRESULT an error message about the unexpected token
1423 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1424 including the terminating null byte. If YYRESULT is null, do not
1425 copy anything; just return the number of bytes that would be
1426 copied. As a special case, return 0 if an ordinary "syntax error"
1427 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1428 size calculation. */
1430 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
1432 int yyn
= yypact
[yystate
];
1434 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
1438 int yytype
= YYTRANSLATE (yychar
);
1439 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
1440 YYSIZE_T yysize
= yysize0
;
1442 int yysize_overflow
= 0;
1443 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1444 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1448 /* This is so xgettext sees the translatable formats that are
1449 constructed on the fly. */
1450 YY_("syntax error, unexpected %s");
1451 YY_("syntax error, unexpected %s, expecting %s");
1452 YY_("syntax error, unexpected %s, expecting %s or %s");
1453 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1454 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1458 static char const yyunexpected
[] = "syntax error, unexpected %s";
1459 static char const yyexpecting
[] = ", expecting %s";
1460 static char const yyor
[] = " or %s";
1461 char yyformat
[sizeof yyunexpected
1462 + sizeof yyexpecting
- 1
1463 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
1464 * (sizeof yyor
- 1))];
1465 char const *yyprefix
= yyexpecting
;
1467 /* Start YYX at -YYN if negative to avoid negative indexes in
1469 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1471 /* Stay within bounds of both yycheck and yytname. */
1472 int yychecklim
= YYLAST
- yyn
+ 1;
1473 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1476 yyarg
[0] = yytname
[yytype
];
1477 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
1479 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1480 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1482 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1486 yyformat
[sizeof yyunexpected
- 1] = '\0';
1489 yyarg
[yycount
++] = yytname
[yyx
];
1490 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1491 yysize_overflow
|= (yysize1
< yysize
);
1493 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
1497 yyf
= YY_(yyformat
);
1498 yysize1
= yysize
+ yystrlen (yyf
);
1499 yysize_overflow
|= (yysize1
< yysize
);
1502 if (yysize_overflow
)
1503 return YYSIZE_MAXIMUM
;
1507 /* Avoid sprintf, as that infringes on the user's name space.
1508 Don't have undefined behavior even if the translation
1509 produced a string with the wrong number of "%s"s. */
1510 char *yyp
= yyresult
;
1512 while ((*yyp
= *yyf
) != '\0')
1514 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
1516 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1529 #endif /* YYERROR_VERBOSE */
1532 /*-----------------------------------------------.
1533 | Release the memory associated to this symbol. |
1534 `-----------------------------------------------*/
1537 #if (defined __STDC__ || defined __C99__FUNC__ \
1538 || defined __cplusplus || defined _MSC_VER)
1540 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
, YYLTYPE
*yylocationp
)
1543 yydestruct (yymsg
, yytype
, yyvaluep
, yylocationp
)
1547 YYLTYPE
*yylocationp
;
1551 YYUSE (yylocationp
);
1555 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1565 /* Prevent warnings from -Wmissing-prototypes. */
1566 #ifdef YYPARSE_PARAM
1567 #if defined __STDC__ || defined __cplusplus
1568 int yyparse (void *YYPARSE_PARAM
);
1572 #else /* ! YYPARSE_PARAM */
1573 #if defined __STDC__ || defined __cplusplus
1578 #endif /* ! YYPARSE_PARAM */
1584 /*-------------------------.
1585 | yyparse or yypush_parse. |
1586 `-------------------------*/
1588 #ifdef YYPARSE_PARAM
1589 #if (defined __STDC__ || defined __C99__FUNC__ \
1590 || defined __cplusplus || defined _MSC_VER)
1592 yyparse (void *YYPARSE_PARAM
)
1595 yyparse (YYPARSE_PARAM
)
1596 void *YYPARSE_PARAM
;
1598 #else /* ! YYPARSE_PARAM */
1599 #if (defined __STDC__ || defined __C99__FUNC__ \
1600 || defined __cplusplus || defined _MSC_VER)
1610 /* The lookahead symbol. */
1613 /* The semantic value of the lookahead symbol. */
1616 /* Location data for the lookahead symbol. */
1619 /* Number of syntax errors so far. */
1623 /* Number of tokens to shift before error messages enabled. */
1626 /* The stacks and their tools:
1627 `yyss': related to states.
1628 `yyvs': related to semantic values.
1629 `yyls': related to locations.
1631 Refer to the stacks thru separate pointers, to allow yyoverflow
1632 to reallocate them elsewhere. */
1634 /* The state stack. */
1635 yytype_int16 yyssa
[YYINITDEPTH
];
1637 yytype_int16
*yyssp
;
1639 /* The semantic value stack. */
1640 YYSTYPE yyvsa
[YYINITDEPTH
];
1644 /* The location stack. */
1645 YYLTYPE yylsa
[YYINITDEPTH
];
1649 /* The locations where the error started and ended. */
1650 YYLTYPE yyerror_range
[2];
1652 YYSIZE_T yystacksize
;
1656 /* Lookahead token as an internal (translated) token number. */
1658 /* The variables used to return semantic value and location from the
1664 /* Buffer for error messages, and its allocated size. */
1666 char *yymsg
= yymsgbuf
;
1667 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1670 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1672 /* The number of symbols on the RHS of the reduced rule.
1673 Keep to zero when no symbol should be popped. */
1680 yystacksize
= YYINITDEPTH
;
1682 YYDPRINTF ((stderr
, "Starting parse\n"));
1687 yychar
= YYEMPTY
; /* Cause a token to be read. */
1689 /* Initialize stack pointers.
1690 Waste one element of value and location stack
1691 so that they stay on the same level as the state stack.
1692 The wasted elements are never initialized. */
1697 #if YYLTYPE_IS_TRIVIAL
1698 /* Initialize the default location before parsing starts. */
1699 yylloc
.first_line
= yylloc
.last_line
= 1;
1700 yylloc
.first_column
= yylloc
.last_column
= 1;
1703 /* User initialization code. */
1705 /* Line 1246 of yacc.c */
1706 #line 84 "parse-gram.y"
1708 /* Bison's grammar can initial empty locations, hence a default
1709 location is needed. */
1710 boundary_set (&yylloc
.start
, current_file
, 1, 1);
1711 boundary_set (&yylloc
.end
, current_file
, 1, 1);
1714 /* Line 1246 of yacc.c */
1715 #line 1716 "../../src/parse-gram.c"
1720 /*------------------------------------------------------------.
1721 | yynewstate -- Push a new state, which is found in yystate. |
1722 `------------------------------------------------------------*/
1724 /* In all cases, when you get here, the value and location stacks
1725 have just been pushed. So pushing a state here evens the stacks. */
1731 if (yyss
+ yystacksize
- 1 <= yyssp
)
1733 /* Get the current used size of the three stacks, in elements. */
1734 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1738 /* Give user a chance to reallocate the stack. Use copies of
1739 these so that the &'s don't force the real ones into
1741 YYSTYPE
*yyvs1
= yyvs
;
1742 yytype_int16
*yyss1
= yyss
;
1743 YYLTYPE
*yyls1
= yyls
;
1745 /* Each stack pointer address is followed by the size of the
1746 data in use in that stack, in bytes. This used to be a
1747 conditional around just the two extra args, but that might
1748 be undefined if yyoverflow is a macro. */
1749 yyoverflow (YY_("memory exhausted"),
1750 &yyss1
, yysize
* sizeof (*yyssp
),
1751 &yyvs1
, yysize
* sizeof (*yyvsp
),
1752 &yyls1
, yysize
* sizeof (*yylsp
),
1759 #else /* no yyoverflow */
1760 # ifndef YYSTACK_RELOCATE
1761 goto yyexhaustedlab
;
1763 /* Extend the stack our own way. */
1764 if (YYMAXDEPTH
<= yystacksize
)
1765 goto yyexhaustedlab
;
1767 if (YYMAXDEPTH
< yystacksize
)
1768 yystacksize
= YYMAXDEPTH
;
1771 yytype_int16
*yyss1
= yyss
;
1772 union yyalloc
*yyptr
=
1773 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1775 goto yyexhaustedlab
;
1776 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
1777 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
1778 YYSTACK_RELOCATE (yyls_alloc
, yyls
);
1779 # undef YYSTACK_RELOCATE
1781 YYSTACK_FREE (yyss1
);
1784 #endif /* no yyoverflow */
1786 yyssp
= yyss
+ yysize
- 1;
1787 yyvsp
= yyvs
+ yysize
- 1;
1788 yylsp
= yyls
+ yysize
- 1;
1790 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1791 (unsigned long int) yystacksize
));
1793 if (yyss
+ yystacksize
- 1 <= yyssp
)
1797 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1799 if (yystate
== YYFINAL
)
1809 /* Do appropriate processing given the current state. Read a
1810 lookahead token if we need one and don't already have one. */
1812 /* First try to decide what to do without reference to lookahead token. */
1813 yyn
= yypact
[yystate
];
1814 if (yyn
== YYPACT_NINF
)
1817 /* Not known => get a lookahead token if don't already have one. */
1819 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1820 if (yychar
== YYEMPTY
)
1822 YYDPRINTF ((stderr
, "Reading a token: "));
1826 if (yychar
<= YYEOF
)
1828 yychar
= yytoken
= YYEOF
;
1829 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1833 yytoken
= YYTRANSLATE (yychar
);
1834 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1837 /* If the proper action on seeing token YYTOKEN is to reduce or to
1838 detect an error, take that action. */
1840 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1845 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1851 /* Count tokens shifted since error; after three, turn off error
1856 /* Shift the lookahead token. */
1857 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1859 /* Discard the shifted token. */
1868 /*-----------------------------------------------------------.
1869 | yydefault -- do the default action for the current state. |
1870 `-----------------------------------------------------------*/
1872 yyn
= yydefact
[yystate
];
1878 /*-----------------------------.
1879 | yyreduce -- Do a reduction. |
1880 `-----------------------------*/
1882 /* yyn is the number of a rule to reduce with. */
1885 /* If YYLEN is nonzero, implement the default value of the action:
1888 Otherwise, the following line sets YYVAL to garbage.
1889 This behavior is undocumented and Bison
1890 users should not rely upon it. Assigning to YYVAL
1891 unconditionally makes the parser a bit smaller, and it avoids a
1892 GCC warning that YYVAL may be used uninitialized. */
1893 yyval
= yyvsp
[1-yylen
];
1895 /* Default location. */
1896 YYLLOC_DEFAULT (yyloc
, (yylsp
- yylen
), yylen
);
1897 YY_REDUCE_PRINT (yyn
);
1902 /* Line 1459 of yacc.c */
1903 #line 219 "parse-gram.y"
1905 code_props plain_code
;
1906 code_props_plain_init (&plain_code
, (yyvsp
[(1) - (1)].chars
), (yylsp
[(1) - (1)]));
1907 code_props_translate_code (&plain_code
);
1908 gram_scanner_last_string_free ();
1909 muscle_code_grow (union_seen
? "post_prologue" : "pre_prologue",
1910 plain_code
.code
, (yylsp
[(1) - (1)]));
1911 code_scanner_last_string_free ();
1914 /* Line 1459 of yacc.c */
1915 #line 1916 "../../src/parse-gram.c"
1920 /* Line 1459 of yacc.c */
1921 #line 228 "parse-gram.y"
1922 { debug_flag
= true; }
1924 /* Line 1459 of yacc.c */
1925 #line 1926 "../../src/parse-gram.c"
1930 /* Line 1459 of yacc.c */
1931 #line 230 "parse-gram.y"
1933 muscle_percent_define_insert ((yyvsp
[(2) - (3)].uniqstr
), (yylsp
[(2) - (3)]), (yyvsp
[(3) - (3)].chars
));
1936 /* Line 1459 of yacc.c */
1937 #line 1938 "../../src/parse-gram.c"
1942 /* Line 1459 of yacc.c */
1943 #line 233 "parse-gram.y"
1944 { defines_flag
= true; }
1946 /* Line 1459 of yacc.c */
1947 #line 1948 "../../src/parse-gram.c"
1952 /* Line 1459 of yacc.c */
1953 #line 235 "parse-gram.y"
1955 defines_flag
= true;
1956 spec_defines_file
= xstrdup ((yyvsp
[(2) - (2)].chars
));
1959 /* Line 1459 of yacc.c */
1960 #line 1961 "../../src/parse-gram.c"
1965 /* Line 1459 of yacc.c */
1966 #line 239 "parse-gram.y"
1967 { error_verbose
= true; }
1969 /* Line 1459 of yacc.c */
1970 #line 1971 "../../src/parse-gram.c"
1975 /* Line 1459 of yacc.c */
1976 #line 240 "parse-gram.y"
1977 { expected_sr_conflicts
= (yyvsp
[(2) - (2)].integer
); }
1979 /* Line 1459 of yacc.c */
1980 #line 1981 "../../src/parse-gram.c"
1985 /* Line 1459 of yacc.c */
1986 #line 241 "parse-gram.y"
1987 { expected_rr_conflicts
= (yyvsp
[(2) - (2)].integer
); }
1989 /* Line 1459 of yacc.c */
1990 #line 1991 "../../src/parse-gram.c"
1995 /* Line 1459 of yacc.c */
1996 #line 242 "parse-gram.y"
1997 { spec_file_prefix
= (yyvsp
[(2) - (2)].chars
); }
1999 /* Line 1459 of yacc.c */
2000 #line 2001 "../../src/parse-gram.c"
2005 /* Line 1459 of yacc.c */
2006 #line 243 "parse-gram.y"
2007 { spec_file_prefix
= (yyvsp
[(3) - (3)].chars
); }
2009 /* Line 1459 of yacc.c */
2010 #line 2011 "../../src/parse-gram.c"
2015 /* Line 1459 of yacc.c */
2016 #line 245 "parse-gram.y"
2018 nondeterministic_parser
= true;
2022 /* Line 1459 of yacc.c */
2023 #line 2024 "../../src/parse-gram.c"
2028 /* Line 1459 of yacc.c */
2029 #line 250 "parse-gram.y"
2032 code_props_symbol_action_init (&action
, (yyvsp
[(2) - (2)].code
), (yylsp
[(2) - (2)]));
2033 code_props_translate_code (&action
);
2034 gram_scanner_last_string_free ();
2035 muscle_code_grow ("initial_action", action
.code
, (yylsp
[(2) - (2)]));
2036 code_scanner_last_string_free ();
2039 /* Line 1459 of yacc.c */
2040 #line 2041 "../../src/parse-gram.c"
2045 /* Line 1459 of yacc.c */
2046 #line 258 "parse-gram.y"
2047 { language_argmatch ((yyvsp
[(2) - (2)].chars
), grammar_prio
, (yylsp
[(1) - (2)])); }
2049 /* Line 1459 of yacc.c */
2050 #line 2051 "../../src/parse-gram.c"
2055 /* Line 1459 of yacc.c */
2056 #line 259 "parse-gram.y"
2057 { add_param ("lex_param", (yyvsp
[(2) - (2)].code
), (yylsp
[(2) - (2)])); }
2059 /* Line 1459 of yacc.c */
2060 #line 2061 "../../src/parse-gram.c"
2065 /* Line 1459 of yacc.c */
2066 #line 260 "parse-gram.y"
2067 { locations_flag
= true; }
2069 /* Line 1459 of yacc.c */
2070 #line 2071 "../../src/parse-gram.c"
2075 /* Line 1459 of yacc.c */
2076 #line 261 "parse-gram.y"
2077 { spec_name_prefix
= (yyvsp
[(2) - (2)].chars
); }
2079 /* Line 1459 of yacc.c */
2080 #line 2081 "../../src/parse-gram.c"
2085 /* Line 1459 of yacc.c */
2086 #line 262 "parse-gram.y"
2087 { spec_name_prefix
= (yyvsp
[(3) - (3)].chars
); }
2089 /* Line 1459 of yacc.c */
2090 #line 2091 "../../src/parse-gram.c"
2095 /* Line 1459 of yacc.c */
2096 #line 263 "parse-gram.y"
2097 { no_lines_flag
= true; }
2099 /* Line 1459 of yacc.c */
2100 #line 2101 "../../src/parse-gram.c"
2105 /* Line 1459 of yacc.c */
2106 #line 264 "parse-gram.y"
2107 { nondeterministic_parser
= true; }
2109 /* Line 1459 of yacc.c */
2110 #line 2111 "../../src/parse-gram.c"
2115 /* Line 1459 of yacc.c */
2116 #line 265 "parse-gram.y"
2117 { spec_outfile
= (yyvsp
[(2) - (2)].chars
); }
2119 /* Line 1459 of yacc.c */
2120 #line 2121 "../../src/parse-gram.c"
2125 /* Line 1459 of yacc.c */
2126 #line 266 "parse-gram.y"
2127 { spec_outfile
= (yyvsp
[(3) - (3)].chars
); }
2129 /* Line 1459 of yacc.c */
2130 #line 2131 "../../src/parse-gram.c"
2135 /* Line 1459 of yacc.c */
2136 #line 267 "parse-gram.y"
2137 { add_param ("parse_param", (yyvsp
[(2) - (2)].code
), (yylsp
[(2) - (2)])); }
2139 /* Line 1459 of yacc.c */
2140 #line 2141 "../../src/parse-gram.c"
2145 /* Line 1459 of yacc.c */
2146 #line 269 "parse-gram.y"
2148 /* %pure-parser is deprecated in favor of `%define api.pure', so use
2149 `%define api.pure' in a backward-compatible manner here. First, don't
2150 complain if %pure-parser is specified multiple times. */
2151 if (!muscle_find_const ("percent_define(api.pure)"))
2152 muscle_percent_define_insert ("api.pure", (yylsp
[(1) - (1)]), "");
2153 /* In all cases, use api.pure now so that the backend doesn't complain if
2154 the skeleton ignores api.pure, but do warn now if there's a previous
2155 conflicting definition from an actual %define. */
2156 if (!muscle_percent_define_flag_if ("api.pure"))
2157 muscle_percent_define_insert ("api.pure", (yylsp
[(1) - (1)]), "");
2160 /* Line 1459 of yacc.c */
2161 #line 2162 "../../src/parse-gram.c"
2166 /* Line 1459 of yacc.c */
2167 #line 281 "parse-gram.y"
2168 { version_check (&(yylsp
[(2) - (2)]), (yyvsp
[(2) - (2)].chars
)); }
2170 /* Line 1459 of yacc.c */
2171 #line 2172 "../../src/parse-gram.c"
2176 /* Line 1459 of yacc.c */
2177 #line 283 "parse-gram.y"
2179 char const *skeleton_user
= (yyvsp
[(2) - (2)].chars
);
2180 if (strchr (skeleton_user
, '/'))
2182 size_t dir_length
= strlen (current_file
);
2183 char *skeleton_build
;
2184 while (dir_length
&& current_file
[dir_length
- 1] != '/')
2186 while (dir_length
&& current_file
[dir_length
- 1] == '/')
2189 xmalloc (dir_length
+ 1 + strlen (skeleton_user
) + 1);
2192 strncpy (skeleton_build
, current_file
, dir_length
);
2193 skeleton_build
[dir_length
++] = '/';
2195 strcpy (skeleton_build
+ dir_length
, skeleton_user
);
2196 skeleton_user
= uniqstr_new (skeleton_build
);
2197 free (skeleton_build
);
2199 skeleton_arg (skeleton_user
, grammar_prio
, (yylsp
[(1) - (2)]));
2202 /* Line 1459 of yacc.c */
2203 #line 2204 "../../src/parse-gram.c"
2208 /* Line 1459 of yacc.c */
2209 #line 306 "parse-gram.y"
2210 { token_table_flag
= true; }
2212 /* Line 1459 of yacc.c */
2213 #line 2214 "../../src/parse-gram.c"
2218 /* Line 1459 of yacc.c */
2219 #line 307 "parse-gram.y"
2220 { report_flag
|= report_states
; }
2222 /* Line 1459 of yacc.c */
2223 #line 2224 "../../src/parse-gram.c"
2228 /* Line 1459 of yacc.c */
2229 #line 308 "parse-gram.y"
2230 { yacc_flag
= true; }
2232 /* Line 1459 of yacc.c */
2233 #line 2234 "../../src/parse-gram.c"
2238 /* Line 1459 of yacc.c */
2239 #line 316 "parse-gram.y"
2241 grammar_start_symbol_set ((yyvsp
[(2) - (2)].symbol
), (yylsp
[(2) - (2)]));
2244 /* Line 1459 of yacc.c */
2245 #line 2246 "../../src/parse-gram.c"
2250 /* Line 1459 of yacc.c */
2251 #line 320 "parse-gram.y"
2254 for (list
= (yyvsp
[(3) - (3)].list
); list
; list
= list
->next
)
2255 symbol_list_destructor_set (list
, (yyvsp
[(2) - (3)].code
), (yylsp
[(2) - (3)]));
2256 symbol_list_free ((yyvsp
[(3) - (3)].list
));
2259 /* Line 1459 of yacc.c */
2260 #line 2261 "../../src/parse-gram.c"
2265 /* Line 1459 of yacc.c */
2266 #line 327 "parse-gram.y"
2269 for (list
= (yyvsp
[(3) - (3)].list
); list
; list
= list
->next
)
2270 symbol_list_printer_set (list
, (yyvsp
[(2) - (3)].code
), (yylsp
[(2) - (3)]));
2271 symbol_list_free ((yyvsp
[(3) - (3)].list
));
2274 /* Line 1459 of yacc.c */
2275 #line 2276 "../../src/parse-gram.c"
2280 /* Line 1459 of yacc.c */
2281 #line 334 "parse-gram.y"
2283 default_prec
= true;
2286 /* Line 1459 of yacc.c */
2287 #line 2288 "../../src/parse-gram.c"
2292 /* Line 1459 of yacc.c */
2293 #line 338 "parse-gram.y"
2295 default_prec
= false;
2298 /* Line 1459 of yacc.c */
2299 #line 2300 "../../src/parse-gram.c"
2304 /* Line 1459 of yacc.c */
2305 #line 342 "parse-gram.y"
2307 /* Do not invoke muscle_percent_code_grow here since it invokes
2308 muscle_user_name_list_grow. */
2309 muscle_code_grow ("percent_code()", (yyvsp
[(2) - (2)].chars
), (yylsp
[(2) - (2)]));
2310 code_scanner_last_string_free ();
2313 /* Line 1459 of yacc.c */
2314 #line 2315 "../../src/parse-gram.c"
2319 /* Line 1459 of yacc.c */
2320 #line 349 "parse-gram.y"
2322 muscle_percent_code_grow ((yyvsp
[(2) - (3)].uniqstr
), (yylsp
[(2) - (3)]), (yyvsp
[(3) - (3)].chars
), (yylsp
[(3) - (3)]));
2323 code_scanner_last_string_free ();
2326 /* Line 1459 of yacc.c */
2327 #line 2328 "../../src/parse-gram.c"
2332 /* Line 1459 of yacc.c */
2333 #line 363 "parse-gram.y"
2336 /* Line 1459 of yacc.c */
2337 #line 2338 "../../src/parse-gram.c"
2342 /* Line 1459 of yacc.c */
2343 #line 364 "parse-gram.y"
2344 { muscle_code_grow ("union_name", (yyvsp
[(1) - (1)].uniqstr
), (yylsp
[(1) - (1)])); }
2346 /* Line 1459 of yacc.c */
2347 #line 2348 "../../src/parse-gram.c"
2352 /* Line 1459 of yacc.c */
2353 #line 369 "parse-gram.y"
2356 muscle_code_grow ("stype", (yyvsp
[(3) - (3)].chars
), (yylsp
[(3) - (3)]));
2357 code_scanner_last_string_free ();
2360 /* Line 1459 of yacc.c */
2361 #line 2362 "../../src/parse-gram.c"
2366 /* Line 1459 of yacc.c */
2367 #line 380 "parse-gram.y"
2368 { current_class
= nterm_sym
; }
2370 /* Line 1459 of yacc.c */
2371 #line 2372 "../../src/parse-gram.c"
2376 /* Line 1459 of yacc.c */
2377 #line 381 "parse-gram.y"
2379 current_class
= unknown_sym
;
2380 current_type
= NULL
;
2383 /* Line 1459 of yacc.c */
2384 #line 2385 "../../src/parse-gram.c"
2389 /* Line 1459 of yacc.c */
2390 #line 385 "parse-gram.y"
2391 { current_class
= token_sym
; }
2393 /* Line 1459 of yacc.c */
2394 #line 2395 "../../src/parse-gram.c"
2399 /* Line 1459 of yacc.c */
2400 #line 386 "parse-gram.y"
2402 current_class
= unknown_sym
;
2403 current_type
= NULL
;
2406 /* Line 1459 of yacc.c */
2407 #line 2408 "../../src/parse-gram.c"
2412 /* Line 1459 of yacc.c */
2413 #line 391 "parse-gram.y"
2417 for (list
= (yyvsp
[(3) - (3)].list
); list
; list
= list
->next
)
2418 symbol_type_set (list
->content
.sym
, (yyvsp
[(2) - (3)].uniqstr
), (yylsp
[(2) - (3)]));
2419 symbol_list_free ((yyvsp
[(3) - (3)].list
));
2422 /* Line 1459 of yacc.c */
2423 #line 2424 "../../src/parse-gram.c"
2428 /* Line 1459 of yacc.c */
2429 #line 402 "parse-gram.y"
2433 for (list
= (yyvsp
[(3) - (3)].list
); list
; list
= list
->next
)
2435 symbol_type_set (list
->content
.sym
, current_type
, (yylsp
[(2) - (3)]));
2436 symbol_precedence_set (list
->content
.sym
, current_prec
, (yyvsp
[(1) - (3)].assoc
), (yylsp
[(1) - (3)]));
2438 symbol_list_free ((yyvsp
[(3) - (3)].list
));
2439 current_type
= NULL
;
2442 /* Line 1459 of yacc.c */
2443 #line 2444 "../../src/parse-gram.c"
2448 /* Line 1459 of yacc.c */
2449 #line 416 "parse-gram.y"
2450 { (yyval
.assoc
) = left_assoc
; }
2452 /* Line 1459 of yacc.c */
2453 #line 2454 "../../src/parse-gram.c"
2458 /* Line 1459 of yacc.c */
2459 #line 417 "parse-gram.y"
2460 { (yyval
.assoc
) = right_assoc
; }
2462 /* Line 1459 of yacc.c */
2463 #line 2464 "../../src/parse-gram.c"
2468 /* Line 1459 of yacc.c */
2469 #line 418 "parse-gram.y"
2470 { (yyval
.assoc
) = non_assoc
; }
2472 /* Line 1459 of yacc.c */
2473 #line 2474 "../../src/parse-gram.c"
2478 /* Line 1459 of yacc.c */
2479 #line 419 "parse-gram.y"
2480 { (yyval
.assoc
) = precedence_assoc
; }
2482 /* Line 1459 of yacc.c */
2483 #line 2484 "../../src/parse-gram.c"
2488 /* Line 1459 of yacc.c */
2489 #line 423 "parse-gram.y"
2490 { current_type
= NULL
; }
2492 /* Line 1459 of yacc.c */
2493 #line 2494 "../../src/parse-gram.c"
2498 /* Line 1459 of yacc.c */
2499 #line 424 "parse-gram.y"
2500 { current_type
= (yyvsp
[(1) - (1)].uniqstr
); tag_seen
= true; }
2502 /* Line 1459 of yacc.c */
2503 #line 2504 "../../src/parse-gram.c"
2508 /* Line 1459 of yacc.c */
2509 #line 430 "parse-gram.y"
2510 { (yyval
.list
) = symbol_list_sym_new ((yyvsp
[(1) - (1)].symbol
), (yylsp
[(1) - (1)])); }
2512 /* Line 1459 of yacc.c */
2513 #line 2514 "../../src/parse-gram.c"
2518 /* Line 1459 of yacc.c */
2519 #line 432 "parse-gram.y"
2520 { (yyval
.list
) = symbol_list_prepend ((yyvsp
[(1) - (2)].list
), symbol_list_sym_new ((yyvsp
[(2) - (2)].symbol
), (yylsp
[(2) - (2)]))); }
2522 /* Line 1459 of yacc.c */
2523 #line 2524 "../../src/parse-gram.c"
2528 /* Line 1459 of yacc.c */
2529 #line 436 "parse-gram.y"
2530 { (yyval
.symbol
) = (yyvsp
[(1) - (1)].symbol
); }
2532 /* Line 1459 of yacc.c */
2533 #line 2534 "../../src/parse-gram.c"
2538 /* Line 1459 of yacc.c */
2539 #line 437 "parse-gram.y"
2540 { (yyval
.symbol
) = (yyvsp
[(1) - (2)].symbol
); symbol_user_token_number_set ((yyvsp
[(1) - (2)].symbol
), (yyvsp
[(2) - (2)].integer
), (yylsp
[(2) - (2)])); }
2542 /* Line 1459 of yacc.c */
2543 #line 2544 "../../src/parse-gram.c"
2548 /* Line 1459 of yacc.c */
2549 #line 443 "parse-gram.y"
2550 { (yyval
.list
) = symbol_list_sym_new ((yyvsp
[(1) - (1)].symbol
), (yylsp
[(1) - (1)])); }
2552 /* Line 1459 of yacc.c */
2553 #line 2554 "../../src/parse-gram.c"
2558 /* Line 1459 of yacc.c */
2559 #line 445 "parse-gram.y"
2560 { (yyval
.list
) = symbol_list_prepend ((yyvsp
[(1) - (2)].list
), symbol_list_sym_new ((yyvsp
[(2) - (2)].symbol
), (yylsp
[(2) - (2)]))); }
2562 /* Line 1459 of yacc.c */
2563 #line 2564 "../../src/parse-gram.c"
2568 /* Line 1459 of yacc.c */
2569 #line 449 "parse-gram.y"
2570 { (yyval
.list
) = (yyvsp
[(1) - (1)].list
); }
2572 /* Line 1459 of yacc.c */
2573 #line 2574 "../../src/parse-gram.c"
2578 /* Line 1459 of yacc.c */
2579 #line 450 "parse-gram.y"
2580 { (yyval
.list
) = symbol_list_prepend ((yyvsp
[(1) - (2)].list
), (yyvsp
[(2) - (2)].list
)); }
2582 /* Line 1459 of yacc.c */
2583 #line 2584 "../../src/parse-gram.c"
2588 /* Line 1459 of yacc.c */
2589 #line 454 "parse-gram.y"
2590 { (yyval
.list
) = symbol_list_sym_new ((yyvsp
[(1) - (1)].symbol
), (yylsp
[(1) - (1)])); }
2592 /* Line 1459 of yacc.c */
2593 #line 2594 "../../src/parse-gram.c"
2598 /* Line 1459 of yacc.c */
2599 #line 455 "parse-gram.y"
2600 { (yyval
.list
) = symbol_list_type_new ((yyvsp
[(1) - (1)].uniqstr
), (yylsp
[(1) - (1)])); }
2602 /* Line 1459 of yacc.c */
2603 #line 2604 "../../src/parse-gram.c"
2608 /* Line 1459 of yacc.c */
2609 #line 456 "parse-gram.y"
2610 { (yyval
.list
) = symbol_list_default_tagged_new ((yylsp
[(1) - (1)])); }
2612 /* Line 1459 of yacc.c */
2613 #line 2614 "../../src/parse-gram.c"
2618 /* Line 1459 of yacc.c */
2619 #line 457 "parse-gram.y"
2620 { (yyval
.list
) = symbol_list_default_tagless_new ((yylsp
[(1) - (1)])); }
2622 /* Line 1459 of yacc.c */
2623 #line 2624 "../../src/parse-gram.c"
2628 /* Line 1459 of yacc.c */
2629 #line 463 "parse-gram.y"
2631 current_type
= (yyvsp
[(1) - (1)].uniqstr
);
2635 /* Line 1459 of yacc.c */
2636 #line 2637 "../../src/parse-gram.c"
2641 /* Line 1459 of yacc.c */
2642 #line 468 "parse-gram.y"
2644 symbol_class_set ((yyvsp
[(1) - (1)].symbol
), current_class
, (yylsp
[(1) - (1)]), true);
2645 symbol_type_set ((yyvsp
[(1) - (1)].symbol
), current_type
, (yylsp
[(1) - (1)]));
2648 /* Line 1459 of yacc.c */
2649 #line 2650 "../../src/parse-gram.c"
2654 /* Line 1459 of yacc.c */
2655 #line 473 "parse-gram.y"
2657 symbol_class_set ((yyvsp
[(1) - (2)].symbol
), current_class
, (yylsp
[(1) - (2)]), true);
2658 symbol_type_set ((yyvsp
[(1) - (2)].symbol
), current_type
, (yylsp
[(1) - (2)]));
2659 symbol_user_token_number_set ((yyvsp
[(1) - (2)].symbol
), (yyvsp
[(2) - (2)].integer
), (yylsp
[(2) - (2)]));
2662 /* Line 1459 of yacc.c */
2663 #line 2664 "../../src/parse-gram.c"
2668 /* Line 1459 of yacc.c */
2669 #line 479 "parse-gram.y"
2671 symbol_class_set ((yyvsp
[(1) - (2)].symbol
), current_class
, (yylsp
[(1) - (2)]), true);
2672 symbol_type_set ((yyvsp
[(1) - (2)].symbol
), current_type
, (yylsp
[(1) - (2)]));
2673 symbol_make_alias ((yyvsp
[(1) - (2)].symbol
), (yyvsp
[(2) - (2)].symbol
), (yyloc
));
2676 /* Line 1459 of yacc.c */
2677 #line 2678 "../../src/parse-gram.c"
2682 /* Line 1459 of yacc.c */
2683 #line 485 "parse-gram.y"
2685 symbol_class_set ((yyvsp
[(1) - (3)].symbol
), current_class
, (yylsp
[(1) - (3)]), true);
2686 symbol_type_set ((yyvsp
[(1) - (3)].symbol
), current_type
, (yylsp
[(1) - (3)]));
2687 symbol_user_token_number_set ((yyvsp
[(1) - (3)].symbol
), (yyvsp
[(2) - (3)].integer
), (yylsp
[(2) - (3)]));
2688 symbol_make_alias ((yyvsp
[(1) - (3)].symbol
), (yyvsp
[(3) - (3)].symbol
), (yyloc
));
2691 /* Line 1459 of yacc.c */
2692 #line 2693 "../../src/parse-gram.c"
2697 /* Line 1459 of yacc.c */
2698 #line 515 "parse-gram.y"
2703 /* Line 1459 of yacc.c */
2704 #line 2705 "../../src/parse-gram.c"
2709 /* Line 1459 of yacc.c */
2710 #line 521 "parse-gram.y"
2711 { current_lhs
= (yyvsp
[(1) - (1)].symbol
); current_lhs_location
= (yylsp
[(1) - (1)]); }
2713 /* Line 1459 of yacc.c */
2714 #line 2715 "../../src/parse-gram.c"
2719 /* Line 1459 of yacc.c */
2720 #line 525 "parse-gram.y"
2721 { grammar_current_rule_end ((yylsp
[(1) - (1)])); }
2723 /* Line 1459 of yacc.c */
2724 #line 2725 "../../src/parse-gram.c"
2729 /* Line 1459 of yacc.c */
2730 #line 526 "parse-gram.y"
2731 { grammar_current_rule_end ((yylsp
[(3) - (3)])); }
2733 /* Line 1459 of yacc.c */
2734 #line 2735 "../../src/parse-gram.c"
2739 /* Line 1459 of yacc.c */
2740 #line 532 "parse-gram.y"
2741 { grammar_current_rule_begin (current_lhs
, current_lhs_location
); }
2743 /* Line 1459 of yacc.c */
2744 #line 2745 "../../src/parse-gram.c"
2749 /* Line 1459 of yacc.c */
2750 #line 534 "parse-gram.y"
2751 { grammar_current_rule_symbol_append ((yyvsp
[(2) - (2)].symbol
), (yylsp
[(2) - (2)])); }
2753 /* Line 1459 of yacc.c */
2754 #line 2755 "../../src/parse-gram.c"
2759 /* Line 1459 of yacc.c */
2760 #line 536 "parse-gram.y"
2761 { grammar_current_rule_action_append ((yyvsp
[(2) - (2)].code
), (yylsp
[(2) - (2)])); }
2763 /* Line 1459 of yacc.c */
2764 #line 2765 "../../src/parse-gram.c"
2769 /* Line 1459 of yacc.c */
2770 #line 538 "parse-gram.y"
2771 { grammar_current_rule_prec_set ((yyvsp
[(3) - (3)].symbol
), (yylsp
[(3) - (3)])); }
2773 /* Line 1459 of yacc.c */
2774 #line 2775 "../../src/parse-gram.c"
2779 /* Line 1459 of yacc.c */
2780 #line 540 "parse-gram.y"
2781 { grammar_current_rule_dprec_set ((yyvsp
[(3) - (3)].integer
), (yylsp
[(3) - (3)])); }
2783 /* Line 1459 of yacc.c */
2784 #line 2785 "../../src/parse-gram.c"
2789 /* Line 1459 of yacc.c */
2790 #line 542 "parse-gram.y"
2791 { grammar_current_rule_merge_set ((yyvsp
[(3) - (3)].uniqstr
), (yylsp
[(3) - (3)])); }
2793 /* Line 1459 of yacc.c */
2794 #line 2795 "../../src/parse-gram.c"
2799 /* Line 1459 of yacc.c */
2800 #line 552 "parse-gram.y"
2801 { (yyval
.uniqstr
) = uniqstr_new ((yyvsp
[(1) - (1)].chars
)); }
2803 /* Line 1459 of yacc.c */
2804 #line 2805 "../../src/parse-gram.c"
2809 /* Line 1459 of yacc.c */
2810 #line 558 "parse-gram.y"
2815 /* Line 1459 of yacc.c */
2816 #line 2817 "../../src/parse-gram.c"
2821 /* Line 1459 of yacc.c */
2822 #line 571 "parse-gram.y"
2824 code_props plain_code
;
2825 (yyvsp
[(1) - (1)].code
)[strlen ((yyvsp
[(1) - (1)].code
)) - 1] = '\n';
2826 code_props_plain_init (&plain_code
, (yyvsp
[(1) - (1)].code
)+1, (yylsp
[(1) - (1)]));
2827 code_props_translate_code (&plain_code
);
2828 gram_scanner_last_string_free ();
2829 (yyval
.chars
) = plain_code
.code
;
2832 /* Line 1459 of yacc.c */
2833 #line 2834 "../../src/parse-gram.c"
2838 /* Line 1459 of yacc.c */
2839 #line 591 "parse-gram.y"
2840 { (yyval
.symbol
) = symbol_from_uniqstr ((yyvsp
[(1) - (1)].uniqstr
), (yylsp
[(1) - (1)])); }
2842 /* Line 1459 of yacc.c */
2843 #line 2844 "../../src/parse-gram.c"
2848 /* Line 1459 of yacc.c */
2849 #line 593 "parse-gram.y"
2851 (yyval
.symbol
) = symbol_get (char_name ((yyvsp
[(1) - (1)].character
)), (yylsp
[(1) - (1)]));
2852 symbol_class_set ((yyval
.symbol
), token_sym
, (yylsp
[(1) - (1)]), false);
2853 symbol_user_token_number_set ((yyval
.symbol
), (yyvsp
[(1) - (1)].character
), (yylsp
[(1) - (1)]));
2856 /* Line 1459 of yacc.c */
2857 #line 2858 "../../src/parse-gram.c"
2862 /* Line 1459 of yacc.c */
2863 #line 601 "parse-gram.y"
2864 { (yyval
.symbol
) = symbol_from_uniqstr ((yyvsp
[(1) - (1)].uniqstr
), (yylsp
[(1) - (1)])); }
2866 /* Line 1459 of yacc.c */
2867 #line 2868 "../../src/parse-gram.c"
2872 /* Line 1459 of yacc.c */
2873 #line 613 "parse-gram.y"
2875 (yyval
.symbol
) = symbol_get (quotearg_style (c_quoting_style
, (yyvsp
[(1) - (1)].chars
)), (yylsp
[(1) - (1)]));
2876 symbol_class_set ((yyval
.symbol
), token_sym
, (yylsp
[(1) - (1)]), false);
2879 /* Line 1459 of yacc.c */
2880 #line 2881 "../../src/parse-gram.c"
2885 /* Line 1459 of yacc.c */
2886 #line 622 "parse-gram.y"
2888 code_props plain_code
;
2889 code_props_plain_init (&plain_code
, (yyvsp
[(2) - (2)].chars
), (yylsp
[(2) - (2)]));
2890 code_props_translate_code (&plain_code
);
2891 gram_scanner_last_string_free ();
2892 muscle_code_grow ("epilogue", plain_code
.code
, (yylsp
[(2) - (2)]));
2893 code_scanner_last_string_free ();
2896 /* Line 1459 of yacc.c */
2897 #line 2898 "../../src/parse-gram.c"
2902 /* Line 1459 of yacc.c */
2903 #line 2904 "../../src/parse-gram.c"
2906 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
2910 YY_STACK_PRINT (yyss
, yyssp
);
2915 /* Now `shift' the result of the reduction. Determine what state
2916 that goes to, based on the state we popped back to and the rule
2917 number reduced by. */
2921 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
2922 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
2923 yystate
= yytable
[yystate
];
2925 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
2930 /*------------------------------------.
2931 | yyerrlab -- here on detecting error |
2932 `------------------------------------*/
2934 /* If not already recovering from an error, report this error. */
2938 #if ! YYERROR_VERBOSE
2939 yyerror (YY_("syntax error"));
2942 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
2943 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
2945 YYSIZE_T yyalloc
= 2 * yysize
;
2946 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
2947 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
2948 if (yymsg
!= yymsgbuf
)
2949 YYSTACK_FREE (yymsg
);
2950 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
2952 yymsg_alloc
= yyalloc
;
2956 yymsg_alloc
= sizeof yymsgbuf
;
2960 if (0 < yysize
&& yysize
<= yymsg_alloc
)
2962 (void) yysyntax_error (yymsg
, yystate
, yychar
);
2967 yyerror (YY_("syntax error"));
2969 goto yyexhaustedlab
;
2975 yyerror_range
[0] = yylloc
;
2977 if (yyerrstatus
== 3)
2979 /* If just tried and failed to reuse lookahead token after an
2980 error, discard it. */
2982 if (yychar
<= YYEOF
)
2984 /* Return failure if at end of input. */
2985 if (yychar
== YYEOF
)
2990 yydestruct ("Error: discarding",
2991 yytoken
, &yylval
, &yylloc
);
2996 /* Else will try to reuse lookahead token after shifting the error
3001 /*---------------------------------------------------.
3002 | yyerrorlab -- error raised explicitly by YYERROR. |
3003 `---------------------------------------------------*/
3006 /* Pacify compilers like GCC when the user code never invokes
3007 YYERROR and the label yyerrorlab therefore never appears in user
3009 if (/*CONSTCOND*/ 0)
3012 yyerror_range
[0] = yylsp
[1-yylen
];
3013 /* Do not reclaim the symbols of the rule which action triggered
3017 YY_STACK_PRINT (yyss
, yyssp
);
3022 /*-------------------------------------------------------------.
3023 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3024 `-------------------------------------------------------------*/
3026 yyerrstatus
= 3; /* Each real token shifted decrements this. */
3030 yyn
= yypact
[yystate
];
3031 if (yyn
!= YYPACT_NINF
)
3034 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
3042 /* Pop the current state because it cannot handle the error token. */
3046 yyerror_range
[0] = *yylsp
;
3047 yydestruct ("Error: popping",
3048 yystos
[yystate
], yyvsp
, yylsp
);
3051 YY_STACK_PRINT (yyss
, yyssp
);
3056 yyerror_range
[1] = yylloc
;
3057 /* Using YYLLOC is tempting, but would change the location of
3058 the lookahead. YYLOC is available though. */
3059 YYLLOC_DEFAULT (yyloc
, (yyerror_range
- 1), 2);
3062 /* Shift the error token. */
3063 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
3069 /*-------------------------------------.
3070 | yyacceptlab -- YYACCEPT comes here. |
3071 `-------------------------------------*/
3076 /*-----------------------------------.
3077 | yyabortlab -- YYABORT comes here. |
3078 `-----------------------------------*/
3083 #if !defined(yyoverflow) || YYERROR_VERBOSE
3084 /*-------------------------------------------------.
3085 | yyexhaustedlab -- memory exhaustion comes here. |
3086 `-------------------------------------------------*/
3088 yyerror (YY_("memory exhausted"));
3094 if (yychar
!= YYEMPTY
)
3095 yydestruct ("Cleanup: discarding lookahead",
3096 yytoken
, &yylval
, &yylloc
);
3097 /* Do not reclaim the symbols of the rule which action triggered
3098 this YYABORT or YYACCEPT. */
3100 YY_STACK_PRINT (yyss
, yyssp
);
3101 while (yyssp
!= yyss
)
3103 yydestruct ("Cleanup: popping",
3104 yystos
[*yyssp
], yyvsp
, yylsp
);
3109 YYSTACK_FREE (yyss
);
3112 if (yymsg
!= yymsgbuf
)
3113 YYSTACK_FREE (yymsg
);
3115 /* Make sure YYID is used. */
3116 return YYID (yyresult
);
3121 /* Line 1679 of yacc.c */
3122 #line 632 "parse-gram.y"
3126 /* Return the location of the left-hand side of a rule whose
3127 right-hand side is RHS[1] ... RHS[N]. Ignore empty nonterminals in
3128 the right-hand side, and return an empty location equal to the end
3129 boundary of RHS[0] if the right-hand side is empty. */
3132 lloc_default (YYLTYPE
const *rhs
, int n
)
3137 /* SGI MIPSpro 7.4.1m miscompiles "loc.start = loc.end = rhs[n].end;".
3138 The bug is fixed in 7.4.2m, but play it safe for now. */
3139 loc
.start
= rhs
[n
].end
;
3140 loc
.end
= rhs
[n
].end
;
3142 /* Ignore empty nonterminals the start of the the right-hand side.
3143 Do not bother to ignore them at the end of the right-hand side,
3144 since empty nonterminals have the same end as their predecessors. */
3145 for (i
= 1; i
<= n
; i
++)
3146 if (! equal_boundaries (rhs
[i
].start
, rhs
[i
].end
))
3148 loc
.start
= rhs
[i
].start
;
3156 /* Add a lex-param or a parse-param (depending on TYPE) with
3157 declaration DECL and location LOC. */
3160 add_param (char const *type
, char *decl
, location loc
)
3162 static char const alphanum
[26 + 26 + 1 + 10] =
3163 "abcdefghijklmnopqrstuvwxyz"
3164 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
3167 char const *name_start
= NULL
;
3170 /* Stop on last actual character. */
3171 for (p
= decl
; p
[1]; p
++)
3173 || ! memchr (alphanum
, p
[-1], sizeof alphanum
))
3174 && memchr (alphanum
, p
[0], sizeof alphanum
- 10))
3177 /* Strip the surrounding '{' and '}', and any blanks just inside
3179 while (*--p
== ' ' || *p
== '\t')
3182 while (*++decl
== ' ' || *decl
== '\t')
3186 complain_at (loc
, _("missing identifier in parameter declaration"));
3193 memchr (alphanum
, name_start
[name_len
], sizeof alphanum
);
3197 name
= xmalloc (name_len
+ 1);
3198 memcpy (name
, name_start
, name_len
);
3199 name
[name_len
] = '\0';
3200 muscle_pair_list_grow (type
, decl
, name
);
3204 gram_scanner_last_string_free ();
3209 version_check (location
const *loc
, char const *version
)
3211 if (strverscmp (version
, PACKAGE_VERSION
) > 0)
3213 complain_at (*loc
, "require bison %s, but have %s",
3214 version
, PACKAGE_VERSION
);
3220 gram_error (location
const *loc
, char const *msg
)
3222 complain_at (*loc
, "%s", msg
);
3226 token_name (int type
)
3228 return yytname
[YYTRANSLATE (type
)];
3239 buf
[0] = '\''; buf
[1] = c
; buf
[2] = '\''; buf
[3] = '\0';
3240 return quotearg_style (escape_quoting_style
, buf
);