]> git.saurik.com Git - bison.git/blame - src/parse-gram.c
Locations are no longer required by lalr1.cc.
[bison.git] / src / parse-gram.c
CommitLineData
f7398526 1/* A Bison parser, made by GNU Bison 2.4.79-c85be. */
1c7b7e1d 2
ccde1f98 3/* Implementation for Bison's Yacc-like parsers in C
21db118b 4
ccde1f98
AD
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
6 2007, 2008 Free Software Foundation, Inc.
21db118b 7
f16b0819 8 This program is free software: you can redistribute it and/or modify
1921f1d7 9 it under the terms of the GNU General Public License as published by
f16b0819
PE
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
21db118b 12
1921f1d7
AD
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.
21db118b 17
1921f1d7 18 You should have received a copy of the GNU General Public License
f16b0819 19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
1921f1d7 20
04c12cb8
PE
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.
21db118b 30
04c12cb8
PE
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
1921f1d7 33
66809587
PE
34/* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
1921f1d7
AD
36
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. */
43
44/* Identify Bison output. */
62ddaef6
PE
45#define YYBISON 1
46
f5109f5a 47/* Bison version. */
f7398526 48#define YYBISON_VERSION "2.4.79-c85be"
f5109f5a 49
62ddaef6
PE
50/* Skeleton name. */
51#define YYSKELETON_NAME "yacc.c"
1921f1d7
AD
52
53/* Pure parsers. */
62ddaef6 54#define YYPURE 1
1921f1d7 55
e021811a
JD
56/* Push parsers. */
57#define YYPUSH 0
58
59/* Pull parsers. */
60#define YYPULL 1
61
1921f1d7
AD
62/* Using locations. */
63#define YYLSP_NEEDED 1
e96c9728 64
76dcf299 65/* Substitute the variable and function names. */
e021811a
JD
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
e9955c83 74
1921f1d7 75/* Copy the first part of user declarations. */
136a0f76 76
ccde1f98 77/* Line 191 of yacc.c */
0bf92491 78#line 1 "parse-gram.y"
a76ca263
PE
79/* Bison Grammar Parser -*- C -*-
80
ab7f29f8
JD
81 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
82 Foundation, Inc.
a76ca263
PE
83
84 This file is part of Bison, the GNU Compiler Compiler.
85
f16b0819 86 This program is free software: you can redistribute it and/or modify
a76ca263 87 it under the terms of the GNU General Public License as published by
f16b0819 88 the Free Software Foundation, either version 3 of the License, or
a76ca263
PE
89 (at your option) any later version.
90
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.
95
96 You should have received a copy of the GNU General Public License
f16b0819 97 along with this program. If not, see <http://www.gnu.org/licenses/>. */
e9955c83 98
72c4d336 99#include <config.h>
e9955c83 100#include "system.h"
05d18c24 101
b275314e 102#include "complain.h"
05d18c24 103#include "conflicts.h"
e9955c83
AD
104#include "files.h"
105#include "getargs.h"
e9955c83 106#include "gram.h"
05d18c24 107#include "muscle_tab.h"
2ce37586 108#include "quotearg.h"
e9955c83 109#include "reader.h"
05d18c24 110#include "symlist.h"
e9071366
AD
111#include "scan-gram.h"
112#include "scan-code.h"
e9955c83 113
05d18c24
PE
114#define YYLLOC_DEFAULT(Current, Rhs, N) (Current) = lloc_default (Rhs, N)
115static YYLTYPE lloc_default (YYLTYPE const *, int);
e9955c83 116
8a8dc872 117#define YY_LOCATION_PRINT(File, Loc) \
bf8b3d98 118 location_print (File, Loc)
8a8dc872 119
b50d2359
AD
120static void version_check (location const *loc, char const *version);
121
f0616f0b 122/* Request detailed syntax error messages, and pass them to GRAM_ERROR.
05d18c24 123 FIXME: depends on the undocumented availability of YYLLOC. */
e9955c83
AD
124#undef yyerror
125#define yyerror(Msg) \
bf8b3d98 126 gram_error (&yylloc, Msg)
05d18c24 127static void gram_error (location const *, char const *);
e9955c83 128
d2a1a60a
PE
129static char const *char_name (char);
130
2ce4ed68
AD
131/** Add a lex-param or a parse-param.
132 *
133 * \param type \a lex_param or \a parse_param
134 * \param decl the formal argument
135 * \param loc the location in the source.
136 */
137static void add_param (char const *type, char *decl, location loc);
138
e9955c83 139
5f3df396 140static symbol_class current_class = unknown_sym;
1f4cc0f4 141static uniqstr current_type = NULL;
7029f892
PE
142static symbol *current_lhs;
143static location current_lhs_location;
5f3df396 144static int current_prec = 0;
e9955c83 145
b3d9b5ba
PE
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
bf8b3d98 150
1921f1d7 151
ccde1f98 152/* Line 191 of yacc.c */
f7398526 153#line 154 "../../../src/parse-gram.c"
136a0f76 154
1921f1d7
AD
155/* Enabling traces. */
156#ifndef YYDEBUG
157# define YYDEBUG 1
158#endif
159
160/* Enabling verbose error messages. */
161#ifdef YYERROR_VERBOSE
162# undef YYERROR_VERBOSE
163# define YYERROR_VERBOSE 1
164#else
cd3684cf 165# define YYERROR_VERBOSE 1
1921f1d7
AD
166#endif
167
5f3df396
PE
168/* Enabling the token table. */
169#ifndef YYTOKEN_TABLE
170# define YYTOKEN_TABLE 0
171#endif
172
9bc0dd67
JD
173
174/* Tokens. */
175#ifndef YYTOKENTYPE
176# define YYTOKENTYPE
177 /* Put the tokens into the symbol table, so that GDB and other debuggers
178 know about them. */
179 enum yytokentype {
180 GRAM_EOF = 0,
181 STRING = 258,
182 INT = 259,
183 PERCENT_TOKEN = 260,
184 PERCENT_NTERM = 261,
185 PERCENT_TYPE = 262,
186 PERCENT_DESTRUCTOR = 263,
187 PERCENT_PRINTER = 264,
12e35840
JD
188 PERCENT_LEFT = 265,
189 PERCENT_RIGHT = 266,
190 PERCENT_NONASSOC = 267,
f7398526
AD
191 PERCENT_PRECEDENCE = 268,
192 PERCENT_PREC = 269,
193 PERCENT_DPREC = 270,
194 PERCENT_MERGE = 271,
195 PERCENT_CODE = 272,
196 PERCENT_DEBUG = 273,
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,
218 PERCENT_START = 295,
219 PERCENT_TOKEN_TABLE = 296,
220 PERCENT_VERBOSE = 297,
221 PERCENT_YACC = 298,
222 BRACED_CODE = 299,
223 CHAR = 300,
224 EPILOGUE = 301,
225 EQUAL = 302,
226 ID = 303,
227 ID_COLON = 304,
228 PERCENT_PERCENT = 305,
229 PIPE = 306,
230 PROLOGUE = 307,
231 SEMICOLON = 308,
232 TYPE = 309,
233 TYPE_TAG_ANY = 310,
234 TYPE_TAG_NONE = 311,
235 PERCENT_UNION = 312
9bc0dd67
JD
236 };
237#endif
8f7ebfc8
JD
238/* Tokens. */
239#define GRAM_EOF 0
240#define STRING 258
241#define INT 259
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
f7398526
AD
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
282#define CHAR 300
283#define EPILOGUE 301
284#define EQUAL 302
285#define ID 303
286#define ID_COLON 304
287#define PERCENT_PERCENT 305
288#define PIPE 306
289#define PROLOGUE 307
290#define SEMICOLON 308
291#define TYPE 309
292#define TYPE_TAG_ANY 310
293#define TYPE_TAG_NONE 311
294#define PERCENT_UNION 312
8f7ebfc8 295
9bc0dd67
JD
296
297
298
bf8b3d98
PE
299#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
300typedef union YYSTYPE
136a0f76 301{
7ecec4dd 302
f7398526 303/* Line 216 of yacc.c */
88511166 304#line 92 "parse-gram.y"
50a33993 305
05d18c24
PE
306 symbol *symbol;
307 symbol_list *list;
e9955c83 308 int integer;
ff8d8df2
PE
309 char const *chars;
310 char *code;
05d18c24
PE
311 assoc assoc;
312 uniqstr uniqstr;
58d7a1a1 313 unsigned char character;
136a0f76 314
7ecec4dd
JD
315
316
f7398526
AD
317/* Line 216 of yacc.c */
318#line 319 "../../../src/parse-gram.c"
7ecec4dd 319} YYSTYPE;
1f4cc0f4 320# define YYSTYPE_IS_TRIVIAL 1
73521d9f
PE
321# define yystype YYSTYPE /* obsolescent; will be withdrawn */
322# define YYSTYPE_IS_DECLARED 1
e9955c83
AD
323#endif
324
bf8b3d98 325#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
73521d9f 326typedef struct YYLTYPE
e9955c83
AD
327{
328 int first_line;
329 int first_column;
330 int last_line;
331 int last_column;
73521d9f
PE
332} YYLTYPE;
333# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
334# define YYLTYPE_IS_DECLARED 1
e9955c83
AD
335# define YYLTYPE_IS_TRIVIAL 1
336#endif
337
73521d9f 338
1921f1d7 339/* Copy the second part of user declarations. */
0c15323d 340
136a0f76 341
ccde1f98 342/* Line 266 of yacc.c */
f7398526 343#line 344 "../../../src/parse-gram.c"
bf8b3d98
PE
344
345#ifdef short
346# undef short
347#endif
348
349#ifdef YYTYPE_UINT8
350typedef YYTYPE_UINT8 yytype_uint8;
351#else
352typedef unsigned char yytype_uint8;
353#endif
354
355#ifdef YYTYPE_INT8
356typedef YYTYPE_INT8 yytype_int8;
357#elif (defined __STDC__ || defined __C99__FUNC__ \
358 || defined __cplusplus || defined _MSC_VER)
359typedef signed char yytype_int8;
360#else
361typedef short int yytype_int8;
362#endif
363
364#ifdef YYTYPE_UINT16
365typedef YYTYPE_UINT16 yytype_uint16;
366#else
367typedef unsigned short int yytype_uint16;
368#endif
369
370#ifdef YYTYPE_INT16
371typedef YYTYPE_INT16 yytype_int16;
372#else
373typedef short int yytype_int16;
374#endif
2ed28444 375
ac243428 376#ifndef YYSIZE_T
bf8b3d98 377# ifdef __SIZE_TYPE__
ac243428 378# define YYSIZE_T __SIZE_TYPE__
bf8b3d98 379# elif defined size_t
ac243428 380# define YYSIZE_T size_t
bf8b3d98
PE
381# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
382 || defined __cplusplus || defined _MSC_VER)
ac243428
PE
383# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
384# define YYSIZE_T size_t
385# else
386# define YYSIZE_T unsigned int
387# endif
4b43d402 388#endif
e9955c83 389
2abdfeef
PE
390#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
391
6088a2a0
PE
392#ifndef YY_
393# if YYENABLE_NLS
394# if ENABLE_NLS
395# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
396# define YY_(msgid) dgettext ("bison-runtime", msgid)
397# endif
398# endif
399# ifndef YY_
400# define YY_(msgid) msgid
401# endif
402#endif
403
e764d4df 404/* Suppress unused-variable warnings by "using" E. */
bf8b3d98 405#if ! defined lint || defined __GNUC__
7029f892
PE
406# define YYUSE(e) ((void) (e))
407#else
408# define YYUSE(e) /* empty */
409#endif
410
411/* Identity function, used to suppress warnings about constant conditions. */
412#ifndef lint
413# define YYID(n) (n)
414#else
bf8b3d98
PE
415#if (defined __STDC__ || defined __C99__FUNC__ \
416 || defined __cplusplus || defined _MSC_VER)
7029f892 417static int
3b452f4e 418YYID (int yyi)
7029f892
PE
419#else
420static int
3b452f4e
JD
421YYID (yyi)
422 int yyi;
7029f892
PE
423#endif
424{
3b452f4e 425 return yyi;
7029f892
PE
426}
427#endif
e764d4df 428
bf8b3d98 429#if ! defined yyoverflow || YYERROR_VERBOSE
cd3684cf 430
e9955c83
AD
431/* The parser invokes alloca or malloc; define the necessary symbols. */
432
eae34f44
PE
433# ifdef YYSTACK_USE_ALLOCA
434# if YYSTACK_USE_ALLOCA
eae34f44
PE
435# ifdef __GNUC__
436# define YYSTACK_ALLOC __builtin_alloca
bf8b3d98 437# elif defined __BUILTIN_VA_ARG_INCR
ac243428 438# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
bf8b3d98 439# elif defined _AIX
ac243428 440# define YYSTACK_ALLOC __alloca
bf8b3d98 441# elif defined _MSC_VER
ac243428
PE
442# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
443# define alloca _alloca
da436e43
PE
444# else
445# define YYSTACK_ALLOC alloca
bf8b3d98
PE
446# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
447 || defined __cplusplus || defined _MSC_VER)
4b43d402 448# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
ac243428
PE
449# ifndef _STDLIB_H
450# define _STDLIB_H 1
451# endif
4b43d402 452# endif
e9955c83
AD
453# endif
454# endif
455# endif
456
457# ifdef YYSTACK_ALLOC
3b0ffc7e 458 /* Pacify GCC's `empty if-body' warning. */
7029f892 459# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
2ce37586 460# ifndef YYSTACK_ALLOC_MAXIMUM
7768896a
PE
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. */
f52b276c 465# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2ce37586 466# endif
e9955c83 467# else
cd3684cf
AD
468# define YYSTACK_ALLOC YYMALLOC
469# define YYSTACK_FREE YYFREE
2ce37586 470# ifndef YYSTACK_ALLOC_MAXIMUM
2abdfeef 471# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2ce37586 472# endif
765f22f0
PE
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 */
477# ifndef _STDLIB_H
478# define _STDLIB_H 1
479# endif
0925ebb4 480# endif
4b43d402
PE
481# ifndef YYMALLOC
482# define YYMALLOC malloc
bf8b3d98
PE
483# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
484 || defined __cplusplus || defined _MSC_VER)
4b43d402
PE
485void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
486# endif
487# endif
488# ifndef YYFREE
489# define YYFREE free
bf8b3d98
PE
490# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
491 || defined __cplusplus || defined _MSC_VER)
4b43d402
PE
492void free (void *); /* INFRINGES ON USER NAME SPACE */
493# endif
494# endif
e9955c83 495# endif
bf8b3d98 496#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
e9955c83
AD
497
498
bf8b3d98
PE
499#if (! defined yyoverflow \
500 && (! defined __cplusplus \
501 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
502 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
e9955c83
AD
503
504/* A type that is properly aligned for any stack member. */
505union yyalloc
506{
e021811a
JD
507 yytype_int16 yyss_alloc;
508 YYSTYPE yyvs_alloc;
509 YYLTYPE yyls_alloc;
e9955c83
AD
510};
511
512/* The size of the maximum gap between one aligned stack and the next. */
05d18c24 513# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
e9955c83
AD
514
515/* The size of an array large to enough to hold all stacks, each with
516 N elements. */
366eea36 517# define YYSTACK_BYTES(N) \
bf8b3d98 518 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
05d18c24 519 + 2 * YYSTACK_GAP_MAXIMUM)
e9955c83
AD
520
521/* Copy COUNT objects from FROM to TO. The source and destination do
522 not overlap. */
523# ifndef YYCOPY
bf8b3d98 524# if defined __GNUC__ && 1 < __GNUC__
e9955c83
AD
525# define YYCOPY(To, From, Count) \
526 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
527# else
528# define YYCOPY(To, From, Count) \
529 do \
530 { \
b4fb989f 531 YYSIZE_T yyi; \
e9955c83 532 for (yyi = 0; yyi < (Count); yyi++) \
f0616f0b 533 (To)[yyi] = (From)[yyi]; \
e9955c83 534 } \
7029f892 535 while (YYID (0))
e9955c83
AD
536# endif
537# endif
538
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
543 stack. */
e021811a 544# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
e9955c83
AD
545 do \
546 { \
547 YYSIZE_T yynewbytes; \
e021811a
JD
548 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
549 Stack = &yyptr->Stack_alloc; \
05d18c24 550 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
e9955c83
AD
551 yyptr += yynewbytes / sizeof (*yyptr); \
552 } \
7029f892 553 while (YYID (0))
e9955c83
AD
554
555#endif
556
3b0ffc7e 557/* YYFINAL -- State number of the termination state. */
1921f1d7 558#define YYFINAL 3
d33cb3ae 559/* YYLAST -- Last index in YYTABLE. */
f7398526 560#define YYLAST 203
1921f1d7 561
3b0ffc7e 562/* YYNTOKENS -- Number of terminals. */
f7398526 563#define YYNTOKENS 58
3b0ffc7e 564/* YYNNTS -- Number of nonterminals. */
ab7f29f8 565#define YYNNTS 33
3b0ffc7e 566/* YYNRULES -- Number of rules. */
f7398526 567#define YYNRULES 106
3b0ffc7e 568/* YYNRULES -- Number of states. */
f7398526 569#define YYNSTATES 144
1921f1d7
AD
570
571/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
572#define YYUNDEFTOK 2
f7398526 573#define YYMAXUTOK 312
1921f1d7 574
5f3df396 575#define YYTRANSLATE(YYX) \
73521d9f 576 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1921f1d7
AD
577
578/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
bf8b3d98 579static const yytype_uint8 yytranslate[] =
1921f1d7
AD
580{
581 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
582 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
583 2, 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, 1, 2, 3, 4,
607 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
608 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
609 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
ae7453f2 610 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
34f98f46 611 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
f7398526 612 55, 56, 57
1921f1d7
AD
613};
614
615#if YYDEBUG
616/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
617 YYRHS. */
02975b9a 618static const yytype_uint16 yyprhs[] =
1921f1d7 619{
2cbe6b7f 620 0, 0, 3, 8, 9, 12, 14, 16, 18, 22,
02975b9a 621 24, 27, 29, 32, 35, 38, 42, 44, 47, 50,
5e6feb86 622 53, 55, 58, 62, 64, 66, 69, 73, 76, 78,
d782395d
JD
623 81, 84, 86, 88, 90, 92, 94, 96, 99, 103,
624 107, 109, 111, 114, 118, 119, 121, 125, 126, 130,
f7398526
AD
625 131, 135, 139, 143, 145, 147, 149, 151, 152, 154,
626 156, 159, 161, 164, 166, 169, 171, 174, 176, 178,
627 180, 182, 184, 186, 189, 192, 196, 198, 201, 203,
628 206, 208, 211, 214, 215, 219, 221, 225, 228, 229,
629 232, 235, 239, 243, 247, 249, 251, 252, 254, 256,
630 258, 260, 262, 264, 266, 268, 269
1921f1d7
AD
631};
632
3b0ffc7e 633/* YYRHS -- A `-1'-separated list of the rules' RHS. */
bf8b3d98 634static const yytype_int8 yyrhs[] =
1921f1d7 635{
f7398526
AD
636 59, 0, -1, 60, 50, 77, 90, -1, -1, 60,
637 61, -1, 62, -1, 52, -1, 18, -1, 20, 83,
638 84, -1, 21, -1, 21, 3, -1, 22, -1, 23,
639 4, -1, 24, 4, -1, 25, 3, -1, 25, 47,
640 3, -1, 26, -1, 27, 44, -1, 28, 3, -1,
641 29, 44, -1, 30, -1, 31, 3, -1, 31, 47,
642 3, -1, 33, -1, 34, -1, 35, 3, -1, 35,
643 47, 3, -1, 36, 44, -1, 37, -1, 38, 3,
644 -1, 39, 3, -1, 41, -1, 42, -1, 43, -1,
645 53, -1, 67, -1, 64, -1, 40, 88, -1, 8,
646 44, 73, -1, 9, 44, 73, -1, 19, -1, 32,
647 -1, 17, 85, -1, 17, 48, 85, -1, -1, 48,
648 -1, 57, 63, 85, -1, -1, 6, 65, 76, -1,
649 -1, 5, 66, 76, -1, 7, 54, 72, -1, 68,
650 69, 70, -1, 10, -1, 11, -1, 12, -1, 13,
651 -1, -1, 54, -1, 71, -1, 70, 71, -1, 88,
652 -1, 88, 4, -1, 88, -1, 72, 88, -1, 74,
653 -1, 73, 74, -1, 88, -1, 54, -1, 55, -1,
654 56, -1, 54, -1, 86, -1, 86, 4, -1, 86,
655 89, -1, 86, 4, 89, -1, 75, -1, 76, 75,
656 -1, 78, -1, 77, 78, -1, 79, -1, 62, 53,
657 -1, 1, 53, -1, -1, 87, 80, 81, -1, 82,
658 -1, 81, 51, 82, -1, 81, 53, -1, -1, 82,
659 88, -1, 82, 44, -1, 82, 14, 88, -1, 82,
660 15, 4, -1, 82, 16, 54, -1, 48, -1, 3,
661 -1, -1, 3, -1, 44, -1, 48, -1, 45, -1,
662 49, -1, 86, -1, 89, -1, 3, -1, -1, 50,
663 46, -1
1921f1d7
AD
664};
665
666/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
bf8b3d98 667static const yytype_uint16 yyrline[] =
1921f1d7 668{
f7398526
AD
669 0, 203, 203, 211, 213, 217, 218, 228, 229, 233,
670 234, 239, 240, 241, 242, 243, 244, 249, 258, 259,
671 260, 261, 262, 263, 264, 265, 266, 267, 268, 281,
672 282, 306, 307, 308, 309, 313, 314, 315, 319, 326,
673 333, 337, 341, 348, 363, 364, 368, 380, 380, 385,
674 385, 390, 401, 416, 417, 418, 419, 423, 424, 429,
675 431, 436, 437, 442, 444, 449, 450, 454, 455, 456,
676 457, 462, 467, 472, 478, 484, 495, 496, 505, 506,
677 512, 513, 514, 521, 521, 525, 526, 527, 532, 533,
678 535, 537, 539, 541, 551, 552, 558, 561, 570, 590,
679 592, 601, 606, 607, 612, 619, 621
1921f1d7
AD
680};
681#endif
682
5f3df396 683#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
9cbfdc9e 684/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3b0ffc7e 685 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1921f1d7
AD
686static const char *const yytname[] =
687{
9cbfdc9e 688 "\"end of file\"", "error", "$undefined", "\"string\"", "\"integer\"",
e9071366 689 "\"%token\"", "\"%nterm\"", "\"%type\"", "\"%destructor\"",
f7398526
AD
690 "\"%printer\"", "\"%left\"", "\"%right\"", "\"%nonassoc\"",
691 "\"%precedence\"", "\"%prec\"", "\"%dprec\"", "\"%merge\"", "\"%code\"",
692 "\"%debug\"", "\"%default-prec\"", "\"%define\"", "\"%defines\"",
693 "\"%error-verbose\"", "\"%expect\"", "\"%expect-rr\"",
694 "\"%file-prefix\"", "\"%glr-parser\"", "\"%initial-action\"",
695 "\"%language\"", "\"%lex-param\"", "\"%locations\"", "\"%name-prefix\"",
696 "\"%no-default-prec\"", "\"%no-lines\"", "\"%nondeterministic-parser\"",
697 "\"%output\"", "\"%parse-param\"", "\"%pure-parser\"", "\"%require\"",
698 "\"%skeleton\"", "\"%start\"", "\"%token-table\"", "\"%verbose\"",
699 "\"%yacc\"", "\"{...}\"", "\"char\"", "\"epilogue\"", "\"=\"",
700 "\"identifier\"", "\"identifier:\"", "\"%%\"", "\"|\"", "\"%{...%}\"",
701 "\";\"", "\"type\"", "\"<*>\"", "\"<>\"", "\"%union\"", "$accept",
702 "input", "prologue_declarations", "prologue_declaration",
703 "grammar_declaration", "union_name", "symbol_declaration", "$@1", "$@2",
d782395d 704 "precedence_declaration", "precedence_declarator", "type.opt",
ab7f29f8
JD
705 "symbols.prec", "symbol.prec", "symbols.1", "generic_symlist",
706 "generic_symlist_item", "symbol_def", "symbol_defs.1", "grammar",
707 "rules_or_grammar_declaration", "rules", "$@3", "rhses.1", "rhs",
708 "variable", "content.opt", "braceless", "id", "id_colon", "symbol",
709 "string_as_id", "epilogue.opt", 0
1921f1d7
AD
710};
711#endif
712
3d38c03a 713# ifdef YYPRINT
1921f1d7
AD
714/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
715 token YYLEX-NUM. */
bf8b3d98 716static const yytype_uint16 yytoknum[] =
1921f1d7
AD
717{
718 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
719 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
720 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
721 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
d6328241 722 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
f7398526 723 305, 306, 307, 308, 309, 310, 311, 312
1921f1d7 724};
3d38c03a 725# endif
1921f1d7
AD
726
727/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
bf8b3d98 728static const yytype_uint8 yyr1[] =
1921f1d7 729{
f7398526
AD
730 0, 58, 59, 60, 60, 61, 61, 61, 61, 61,
731 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
732 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
733 61, 61, 61, 61, 61, 62, 62, 62, 62, 62,
734 62, 62, 62, 62, 63, 63, 62, 65, 64, 66,
735 64, 64, 67, 68, 68, 68, 68, 69, 69, 70,
736 70, 71, 71, 72, 72, 73, 73, 74, 74, 74,
737 74, 75, 75, 75, 75, 75, 76, 76, 77, 77,
738 78, 78, 78, 80, 79, 81, 81, 81, 82, 82,
739 82, 82, 82, 82, 83, 83, 84, 84, 85, 86,
740 86, 87, 88, 88, 89, 90, 90
1921f1d7
AD
741};
742
743/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
bf8b3d98 744static const yytype_uint8 yyr2[] =
1921f1d7 745{
2cbe6b7f 746 0, 2, 4, 0, 2, 1, 1, 1, 3, 1,
5e6feb86 747 2, 1, 2, 2, 2, 3, 1, 2, 2, 2,
d782395d
JD
748 1, 2, 3, 1, 1, 2, 3, 2, 1, 2,
749 2, 1, 1, 1, 1, 1, 1, 2, 3, 3,
750 1, 1, 2, 3, 0, 1, 3, 0, 3, 0,
f7398526
AD
751 3, 3, 3, 1, 1, 1, 1, 0, 1, 1,
752 2, 1, 2, 1, 2, 1, 2, 1, 1, 1,
753 1, 1, 1, 2, 2, 3, 1, 2, 1, 2,
754 1, 2, 2, 0, 3, 1, 3, 2, 0, 2,
755 2, 3, 3, 3, 1, 1, 0, 1, 1, 1,
756 1, 1, 1, 1, 1, 0, 2
1921f1d7
AD
757};
758
759/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
760 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
761 means the default is an error. */
bf8b3d98 762static const yytype_uint8 yydefact[] =
1921f1d7 763{
d782395d 764 3, 0, 0, 1, 49, 47, 0, 0, 0, 53,
f7398526
AD
765 54, 55, 56, 0, 7, 40, 0, 9, 11, 0,
766 0, 0, 16, 0, 0, 0, 20, 0, 41, 23,
767 24, 0, 0, 28, 0, 0, 0, 31, 32, 33,
768 0, 6, 34, 44, 4, 5, 36, 35, 57, 0,
769 0, 0, 0, 0, 98, 0, 42, 95, 94, 96,
770 10, 12, 13, 14, 0, 17, 18, 19, 21, 0,
771 25, 0, 27, 29, 30, 104, 100, 99, 102, 37,
772 103, 0, 101, 0, 0, 78, 80, 83, 45, 0,
773 58, 0, 71, 76, 50, 72, 48, 51, 63, 68,
774 69, 70, 38, 65, 67, 39, 43, 97, 8, 15,
775 22, 26, 82, 81, 0, 79, 2, 88, 46, 52,
776 59, 61, 77, 73, 74, 64, 66, 106, 84, 85,
777 60, 62, 75, 88, 87, 0, 0, 0, 90, 89,
778 86, 91, 92, 93
1921f1d7
AD
779};
780
3b0ffc7e 781/* YYDEFGOTO[NTERM-NUM]. */
ab7f29f8 782static const yytype_int16 yydefgoto[] =
1921f1d7 783{
f7398526
AD
784 -1, 1, 2, 44, 83, 89, 46, 50, 49, 47,
785 48, 91, 119, 120, 97, 102, 103, 93, 94, 84,
786 85, 86, 117, 128, 129, 59, 108, 56, 78, 87,
787 104, 80, 116
1921f1d7
AD
788};
789
790/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
791 STATE-NUM. */
f7398526 792#define YYPACT_NINF -81
7172e23e 793static const yytype_int16 yypact[] =
1921f1d7 794{
f7398526
AD
795 -81, 23, 111, -81, -81, -81, -28, -12, -8, -81,
796 -81, -81, -81, -13, -81, -81, 14, 43, -81, 48,
797 49, 2, -81, 10, 53, 34, -81, 13, -81, -81,
798 -81, 26, 36, -81, 54, 78, 0, -81, -81, -81,
799 58, -81, -81, 41, -81, -81, -81, -81, 28, -24,
800 -24, 0, 31, 31, -81, 44, -81, -81, -81, 81,
801 -81, -81, -81, -81, 88, -81, -81, -81, -81, 89,
802 -81, 91, -81, -81, -81, -81, -81, -81, -81, -81,
803 -81, 42, -81, 47, 1, -81, -81, -81, -81, 44,
804 -81, 0, -81, -81, -24, 40, -24, 0, -81, -81,
805 -81, -81, 31, -81, -81, 31, -81, -81, -81, -81,
806 -81, -81, -81, -81, 50, -81, -81, -81, -81, 0,
807 -81, 93, -81, 98, -81, -81, -81, -81, -14, 155,
808 -81, -81, -81, -81, -81, 0, 99, 51, -81, -81,
809 155, -81, -81, -81
1921f1d7
AD
810};
811
812/* YYPGOTO[NTERM-NUM]. */
f7398526 813static const yytype_int8 yypgoto[] =
1921f1d7 814{
f7398526
AD
815 -81, -81, -81, -81, 100, -81, -81, -81, -81, -81,
816 -81, -81, -81, -11, -81, 56, -80, -54, 60, -81,
817 22, -81, -81, -81, -21, -81, -81, -51, -22, -81,
818 -36, -76, -81
1921f1d7
AD
819};
820
821/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
822 positive, shift that token. If negative, reduce the rule which
ae7453f2 823 number is the opposite. If zero, do what YYDEFACT says.
f0616f0b 824 If YYTABLE_NINF, syntax error. */
f7398526 825#define YYTABLE_NINF -106
2ce4ed68 826static const yytype_int16 yytable[] =
1921f1d7 827{
f7398526
AD
828 79, -105, 81, 75, 106, 63, 4, 5, 6, 7,
829 8, 9, 10, 11, 12, 98, 68, 57, 13, 124,
830 15, 76, 126, 3, 77, 126, 51, 95, 95, 70,
831 92, 54, 52, 28, 75, 55, 53, 133, 118, 134,
832 122, 36, 122, 75, 123, 76, 60, 132, 77, 64,
833 82, 114, 61, 62, 65, 121, 66, 73, 43, 81,
834 69, 125, 58, 4, 5, 6, 7, 8, 9, 10,
835 11, 12, 95, 71, 95, 13, 76, 15, 67, 77,
836 72, 74, 90, 121, 107, 99, 100, 101, 54, 88,
837 28, 109, 110, 139, 111, 112, 127, 131, 36, 141,
838 113, 75, 45, 142, 139, 143, 115, 82, 130, 105,
839 96, 0, 140, 0, 0, 43, 4, 5, 6, 7,
840 8, 9, 10, 11, 12, 0, 0, 0, 13, 14,
841 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
842 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
843 35, 36, 37, 38, 39, 0, 0, 0, 75, 0,
844 0, 40, 0, 41, 42, 0, 0, 0, 43, 135,
845 136, 137, 0, 0, 0, 0, 0, 0, 0, 0,
846 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
847 0, 0, 0, 0, 0, 0, 0, 0, 0, 138,
848 76, 0, 0, 77
1921f1d7
AD
849};
850
f7398526 851static const yytype_int16 yycheck[] =
1921f1d7 852{
f7398526
AD
853 36, 0, 1, 3, 55, 3, 5, 6, 7, 8,
854 9, 10, 11, 12, 13, 51, 3, 3, 17, 95,
855 19, 45, 102, 0, 48, 105, 54, 49, 50, 3,
856 54, 44, 44, 32, 3, 48, 44, 51, 89, 53,
857 94, 40, 96, 3, 4, 45, 3, 123, 48, 47,
858 49, 50, 4, 4, 44, 91, 3, 3, 57, 1,
859 47, 97, 48, 5, 6, 7, 8, 9, 10, 11,
860 12, 13, 94, 47, 96, 17, 45, 19, 44, 48,
861 44, 3, 54, 119, 3, 54, 55, 56, 44, 48,
862 32, 3, 3, 129, 3, 53, 46, 4, 40, 135,
863 53, 3, 2, 4, 140, 54, 84, 49, 119, 53,
864 50, -1, 133, -1, -1, 57, 5, 6, 7, 8,
865 9, 10, 11, 12, 13, -1, -1, -1, 17, 18,
866 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
867 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
868 39, 40, 41, 42, 43, -1, -1, -1, 3, -1,
869 -1, 50, -1, 52, 53, -1, -1, -1, 57, 14,
870 15, 16, -1, -1, -1, -1, -1, -1, -1, -1,
871 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
872 -1, -1, -1, -1, -1, -1, -1, -1, -1, 44,
873 45, -1, -1, 48
1921f1d7
AD
874};
875
1921f1d7
AD
876/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
877 symbol of state STATE-NUM. */
bf8b3d98 878static const yytype_uint8 yystos[] =
1921f1d7 879{
f7398526
AD
880 0, 59, 60, 0, 5, 6, 7, 8, 9, 10,
881 11, 12, 13, 17, 18, 19, 20, 21, 22, 23,
12e35840 882 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
f7398526
AD
883 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
884 50, 52, 53, 57, 61, 62, 64, 67, 68, 66,
885 65, 54, 44, 44, 44, 48, 85, 3, 48, 83,
886 3, 4, 4, 3, 47, 44, 3, 44, 3, 47,
887 3, 47, 44, 3, 3, 3, 45, 48, 86, 88,
888 89, 1, 49, 62, 77, 78, 79, 87, 48, 63,
889 54, 69, 54, 75, 76, 86, 76, 72, 88, 54,
890 55, 56, 73, 74, 88, 73, 85, 3, 84, 3,
891 3, 3, 53, 53, 50, 78, 90, 80, 85, 70,
892 71, 88, 75, 4, 89, 88, 74, 46, 81, 82,
893 71, 4, 89, 51, 53, 14, 15, 16, 44, 88,
894 82, 88, 4, 54
1921f1d7 895};
e9955c83 896
e9955c83 897#define yyerrok (yyerrstatus = 0)
73521d9f
PE
898#define yyclearin (yychar = YYEMPTY)
899#define YYEMPTY (-2)
e9955c83 900#define YYEOF 0
1921f1d7 901
e9955c83 902#define YYACCEPT goto yyacceptlab
1921f1d7 903#define YYABORT goto yyabortlab
465b4444 904#define YYERROR goto yyerrorlab
6d5aa694 905
1921f1d7 906
e9955c83
AD
907/* Like YYERROR except do call yyerror. This remains here temporarily
908 to ease the transition to the new meaning of YYERROR, for GCC.
909 Once GCC version 2 has supplanted version 1, this can go. */
1921f1d7 910
e9955c83 911#define YYFAIL goto yyerrlab
1921f1d7 912
e9955c83 913#define YYRECOVERING() (!!yyerrstatus)
1921f1d7 914
e9955c83
AD
915#define YYBACKUP(Token, Value) \
916do \
73521d9f 917 if (yychar == YYEMPTY && yylen == 1) \
e9955c83
AD
918 { \
919 yychar = (Token); \
920 yylval = (Value); \
886b69d1 921 yytoken = YYTRANSLATE (yychar); \
3b0ffc7e 922 YYPOPSTACK (1); \
e9955c83
AD
923 goto yybackup; \
924 } \
925 else \
5f3df396 926 { \
6088a2a0 927 yyerror (YY_("syntax error: cannot back up")); \
e9955c83
AD
928 YYERROR; \
929 } \
7029f892 930while (YYID (0))
e9955c83 931
8a8dc872 932
e9955c83
AD
933#define YYTERROR 1
934#define YYERRCODE 256
935
8a8dc872
AD
936
937/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
938 If N is 0, then set CURRENT to the empty location which ends
939 the previous symbol: RHS[0] (always defined). */
e9955c83 940
bbd3fa0c 941#define YYRHSLOC(Rhs, K) ((Rhs)[K])
e9955c83 942#ifndef YYLLOC_DEFAULT
bbd3fa0c
PE
943# define YYLLOC_DEFAULT(Current, Rhs, N) \
944 do \
3b0ffc7e 945 if (YYID (N)) \
bbd3fa0c 946 { \
da436e43
PE
947 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
948 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
949 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
950 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
bbd3fa0c
PE
951 } \
952 else \
953 { \
954 (Current).first_line = (Current).last_line = \
da436e43 955 YYRHSLOC (Rhs, 0).last_line; \
bbd3fa0c 956 (Current).first_column = (Current).last_column = \
da436e43 957 YYRHSLOC (Rhs, 0).last_column; \
bbd3fa0c 958 } \
7029f892 959 while (YYID (0))
8a8dc872
AD
960#endif
961
962
963/* YY_LOCATION_PRINT -- Print the location on the stream.
964 This macro was not mandated originally: define only if we know
965 we won't break user code: when these are the locations we know. */
966
967#ifndef YY_LOCATION_PRINT
968# if YYLTYPE_IS_TRIVIAL
969# define YY_LOCATION_PRINT(File, Loc) \
970 fprintf (File, "%d.%d-%d.%d", \
bf8b3d98
PE
971 (Loc).first_line, (Loc).first_column, \
972 (Loc).last_line, (Loc).last_column)
8a8dc872
AD
973# else
974# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
975# endif
e9955c83
AD
976#endif
977
8a8dc872 978
e9955c83
AD
979/* YYLEX -- calling `yylex' with the right arguments. */
980
366eea36 981#ifdef YYLEX_PARAM
d33cb3ae 982# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
366eea36 983#else
d33cb3ae 984# define YYLEX yylex (&yylval, &yylloc)
366eea36 985#endif
e9955c83
AD
986
987/* Enable debugging if requested. */
988#if YYDEBUG
989
74e543d2 990# ifndef YYFPRINTF
e9955c83
AD
991# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
992# define YYFPRINTF fprintf
993# endif
994
995# define YYDPRINTF(Args) \
996do { \
997 if (yydebug) \
998 YYFPRINTF Args; \
7029f892 999} while (YYID (0))
05d18c24 1000
4b367315
AD
1001# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1002do { \
1003 if (yydebug) \
1004 { \
1005 YYFPRINTF (stderr, "%s ", Title); \
3b0ffc7e 1006 yy_symbol_print (stderr, \
bf8b3d98 1007 Type, Value, Location); \
4b367315
AD
1008 YYFPRINTF (stderr, "\n"); \
1009 } \
7029f892 1010} while (YYID (0))
f0616f0b 1011
3b0ffc7e 1012
66809587
PE
1013/*--------------------------------.
1014| Print this symbol on YYOUTPUT. |
1015`--------------------------------*/
1016
7029f892 1017/*ARGSUSED*/
bf8b3d98
PE
1018#if (defined __STDC__ || defined __C99__FUNC__ \
1019 || defined __cplusplus || defined _MSC_VER)
66809587 1020static void
d2a1a60a 1021yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
66809587
PE
1022#else
1023static void
3b0ffc7e 1024yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
66809587
PE
1025 FILE *yyoutput;
1026 int yytype;
d2a1a60a
PE
1027 YYSTYPE const * const yyvaluep;
1028 YYLTYPE const * const yylocationp;
66809587
PE
1029#endif
1030{
bf8b3d98
PE
1031 if (!yyvaluep)
1032 return;
66809587 1033 YYUSE (yylocationp);
66809587
PE
1034# ifdef YYPRINT
1035 if (yytype < YYNTOKENS)
1036 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
bf8b3d98
PE
1037# else
1038 YYUSE (yyoutput);
66809587
PE
1039# endif
1040 switch (yytype)
1041 {
1042 case 3: /* "\"string\"" */
136a0f76 1043
ccde1f98 1044/* Line 717 of yacc.c */
f7398526 1045#line 181 "parse-gram.y"
ccde1f98 1046 { fputs (quotearg_style (c_quoting_style, ((*yyvaluep).chars)), stderr); };
136a0f76 1047
ccde1f98 1048/* Line 717 of yacc.c */
f7398526 1049#line 1050 "../../../src/parse-gram.c"
bf8b3d98
PE
1050 break;
1051 case 4: /* "\"integer\"" */
136a0f76 1052
ccde1f98 1053/* Line 717 of yacc.c */
f7398526 1054#line 192 "parse-gram.y"
ccde1f98 1055 { fprintf (stderr, "%d", ((*yyvaluep).integer)); };
136a0f76 1056
ccde1f98 1057/* Line 717 of yacc.c */
f7398526 1058#line 1059 "../../../src/parse-gram.c"
bf8b3d98 1059 break;
f7398526 1060 case 44: /* "\"{...}\"" */
136a0f76 1061
ccde1f98 1062/* Line 717 of yacc.c */
f7398526 1063#line 183 "parse-gram.y"
ccde1f98 1064 { fprintf (stderr, "{\n%s\n}", ((*yyvaluep).code)); };
136a0f76 1065
ccde1f98 1066/* Line 717 of yacc.c */
f7398526 1067#line 1068 "../../../src/parse-gram.c"
bf8b3d98 1068 break;
f7398526 1069 case 45: /* "\"char\"" */
136a0f76 1070
ccde1f98 1071/* Line 717 of yacc.c */
f7398526 1072#line 175 "parse-gram.y"
ccde1f98 1073 { fputs (char_name (((*yyvaluep).character)), stderr); };
136a0f76 1074
ccde1f98 1075/* Line 717 of yacc.c */
f7398526 1076#line 1077 "../../../src/parse-gram.c"
bf8b3d98 1077 break;
f7398526 1078 case 46: /* "\"epilogue\"" */
136a0f76 1079
ccde1f98 1080/* Line 717 of yacc.c */
f7398526 1081#line 183 "parse-gram.y"
ccde1f98 1082 { fprintf (stderr, "{\n%s\n}", ((*yyvaluep).chars)); };
136a0f76 1083
ccde1f98 1084/* Line 717 of yacc.c */
f7398526 1085#line 1086 "../../../src/parse-gram.c"
bf8b3d98 1086 break;
f7398526 1087 case 48: /* "\"identifier\"" */
136a0f76 1088
ccde1f98 1089/* Line 717 of yacc.c */
f7398526 1090#line 188 "parse-gram.y"
ccde1f98 1091 { fputs (((*yyvaluep).uniqstr), stderr); };
136a0f76 1092
ccde1f98 1093/* Line 717 of yacc.c */
f7398526 1094#line 1095 "../../../src/parse-gram.c"
58d7a1a1 1095 break;
f7398526 1096 case 49: /* "\"identifier:\"" */
136a0f76 1097
ccde1f98 1098/* Line 717 of yacc.c */
f7398526 1099#line 189 "parse-gram.y"
ccde1f98 1100 { fprintf (stderr, "%s:", ((*yyvaluep).uniqstr)); };
136a0f76 1101
ccde1f98 1102/* Line 717 of yacc.c */
f7398526 1103#line 1104 "../../../src/parse-gram.c"
bf8b3d98 1104 break;
f7398526 1105 case 52: /* "\"%{...%}\"" */
136a0f76 1106
ccde1f98 1107/* Line 717 of yacc.c */
f7398526 1108#line 183 "parse-gram.y"
ccde1f98 1109 { fprintf (stderr, "{\n%s\n}", ((*yyvaluep).chars)); };
136a0f76 1110
ccde1f98 1111/* Line 717 of yacc.c */
f7398526 1112#line 1113 "../../../src/parse-gram.c"
bf8b3d98 1113 break;
f7398526 1114 case 54: /* "\"type\"" */
136a0f76 1115
ccde1f98 1116/* Line 717 of yacc.c */
f7398526 1117#line 187 "parse-gram.y"
ccde1f98 1118 { fprintf (stderr, "<%s>", ((*yyvaluep).uniqstr)); };
136a0f76 1119
ccde1f98 1120/* Line 717 of yacc.c */
f7398526 1121#line 1122 "../../../src/parse-gram.c"
bf8b3d98 1122 break;
f7398526 1123 case 83: /* "variable" */
136a0f76 1124
ccde1f98 1125/* Line 717 of yacc.c */
f7398526 1126#line 188 "parse-gram.y"
ccde1f98 1127 { fputs (((*yyvaluep).uniqstr), stderr); };
136a0f76 1128
ccde1f98 1129/* Line 717 of yacc.c */
f7398526 1130#line 1131 "../../../src/parse-gram.c"
58d7a1a1 1131 break;
f7398526 1132 case 84: /* "content.opt" */
136a0f76 1133
ccde1f98 1134/* Line 717 of yacc.c */
f7398526 1135#line 183 "parse-gram.y"
ccde1f98 1136 { fprintf (stderr, "{\n%s\n}", ((*yyvaluep).chars)); };
136a0f76 1137
ccde1f98 1138/* Line 717 of yacc.c */
f7398526 1139#line 1140 "../../../src/parse-gram.c"
2ce4ed68 1140 break;
f7398526 1141 case 85: /* "braceless" */
16dc6a9e 1142
ccde1f98 1143/* Line 717 of yacc.c */
f7398526 1144#line 183 "parse-gram.y"
ccde1f98 1145 { fprintf (stderr, "{\n%s\n}", ((*yyvaluep).chars)); };
16dc6a9e 1146
ccde1f98 1147/* Line 717 of yacc.c */
f7398526 1148#line 1149 "../../../src/parse-gram.c"
16dc6a9e 1149 break;
f7398526 1150 case 86: /* "id" */
136a0f76 1151
ccde1f98 1152/* Line 717 of yacc.c */
f7398526 1153#line 195 "parse-gram.y"
ccde1f98 1154 { fprintf (stderr, "%s", ((*yyvaluep).symbol)->tag); };
136a0f76 1155
ccde1f98 1156/* Line 717 of yacc.c */
f7398526 1157#line 1158 "../../../src/parse-gram.c"
2ce4ed68 1158 break;
f7398526 1159 case 87: /* "id_colon" */
136a0f76 1160
ccde1f98 1161/* Line 717 of yacc.c */
f7398526 1162#line 196 "parse-gram.y"
ccde1f98 1163 { fprintf (stderr, "%s:", ((*yyvaluep).symbol)->tag); };
136a0f76 1164
ccde1f98 1165/* Line 717 of yacc.c */
f7398526 1166#line 1167 "../../../src/parse-gram.c"
bf8b3d98 1167 break;
f7398526 1168 case 88: /* "symbol" */
136a0f76 1169
ccde1f98 1170/* Line 717 of yacc.c */
f7398526 1171#line 195 "parse-gram.y"
ccde1f98 1172 { fprintf (stderr, "%s", ((*yyvaluep).symbol)->tag); };
136a0f76 1173
ccde1f98 1174/* Line 717 of yacc.c */
f7398526 1175#line 1176 "../../../src/parse-gram.c"
bf8b3d98 1176 break;
f7398526 1177 case 89: /* "string_as_id" */
136a0f76 1178
ccde1f98 1179/* Line 717 of yacc.c */
f7398526 1180#line 195 "parse-gram.y"
ccde1f98 1181 { fprintf (stderr, "%s", ((*yyvaluep).symbol)->tag); };
136a0f76 1182
ccde1f98 1183/* Line 717 of yacc.c */
f7398526 1184#line 1185 "../../../src/parse-gram.c"
bf8b3d98 1185 break;
66809587 1186 default:
bf8b3d98 1187 break;
66809587 1188 }
3b0ffc7e
PE
1189}
1190
1191
1192/*--------------------------------.
1193| Print this symbol on YYOUTPUT. |
1194`--------------------------------*/
1195
bf8b3d98
PE
1196#if (defined __STDC__ || defined __C99__FUNC__ \
1197 || defined __cplusplus || defined _MSC_VER)
3b0ffc7e 1198static void
d2a1a60a 1199yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
3b0ffc7e
PE
1200#else
1201static void
1202yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
1203 FILE *yyoutput;
1204 int yytype;
d2a1a60a
PE
1205 YYSTYPE const * const yyvaluep;
1206 YYLTYPE const * const yylocationp;
3b0ffc7e
PE
1207#endif
1208{
1209 if (yytype < YYNTOKENS)
1210 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1211 else
1212 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1213
1214 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1215 YYFPRINTF (yyoutput, ": ");
1216 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
66809587
PE
1217 YYFPRINTF (yyoutput, ")");
1218}
1219
05d18c24
PE
1220/*------------------------------------------------------------------.
1221| yy_stack_print -- Print the state stack from its BOTTOM up to its |
cd3684cf 1222| TOP (included). |
05d18c24
PE
1223`------------------------------------------------------------------*/
1224
bf8b3d98
PE
1225#if (defined __STDC__ || defined __C99__FUNC__ \
1226 || defined __cplusplus || defined _MSC_VER)
05d18c24 1227static void
3b452f4e 1228yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
05d18c24
PE
1229#else
1230static void
3b452f4e
JD
1231yy_stack_print (yybottom, yytop)
1232 yytype_int16 *yybottom;
1233 yytype_int16 *yytop;
05d18c24
PE
1234#endif
1235{
74e543d2 1236 YYFPRINTF (stderr, "Stack now");
3b452f4e
JD
1237 for (; yybottom <= yytop; yybottom++)
1238 {
1239 int yybot = *yybottom;
1240 YYFPRINTF (stderr, " %d", yybot);
1241 }
74e543d2 1242 YYFPRINTF (stderr, "\n");
05d18c24
PE
1243}
1244
1245# define YY_STACK_PRINT(Bottom, Top) \
1246do { \
1247 if (yydebug) \
1248 yy_stack_print ((Bottom), (Top)); \
7029f892 1249} while (YYID (0))
05d18c24
PE
1250
1251
1252/*------------------------------------------------.
1253| Report that the YYRULE is going to be reduced. |
1254`------------------------------------------------*/
1255
bf8b3d98
PE
1256#if (defined __STDC__ || defined __C99__FUNC__ \
1257 || defined __cplusplus || defined _MSC_VER)
05d18c24 1258static void
66809587 1259yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
05d18c24
PE
1260#else
1261static void
d2a1a60a 1262yy_reduce_print (yyvsp, yylsp, yyrule)
66809587
PE
1263 YYSTYPE *yyvsp;
1264 YYLTYPE *yylsp;
05d18c24
PE
1265 int yyrule;
1266#endif
1267{
66809587 1268 int yynrhs = yyr2[yyrule];
05d18c24 1269 int yyi;
6088a2a0 1270 unsigned long int yylno = yyrline[yyrule];
66809587 1271 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
bf8b3d98 1272 yyrule - 1, yylno);
66809587
PE
1273 /* The symbols being reduced. */
1274 for (yyi = 0; yyi < yynrhs; yyi++)
1275 {
0bf92491 1276 YYFPRINTF (stderr, " $%d = ", yyi + 1);
3b0ffc7e 1277 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
bf8b3d98
PE
1278 &(yyvsp[(yyi + 1) - (yynrhs)])
1279 , &(yylsp[(yyi + 1) - (yynrhs)]) );
0bf92491 1280 YYFPRINTF (stderr, "\n");
66809587 1281 }
05d18c24
PE
1282}
1283
1284# define YY_REDUCE_PRINT(Rule) \
1285do { \
1286 if (yydebug) \
66809587 1287 yy_reduce_print (yyvsp, yylsp, Rule); \
7029f892 1288} while (YYID (0))
05d18c24 1289
e9955c83
AD
1290/* Nonzero means print parse trace. It is left uninitialized so that
1291 multiple parsers can coexist. */
1292int yydebug;
1293#else /* !YYDEBUG */
1294# define YYDPRINTF(Args)
8a8dc872 1295# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
05d18c24
PE
1296# define YY_STACK_PRINT(Bottom, Top)
1297# define YY_REDUCE_PRINT(Rule)
e9955c83
AD
1298#endif /* !YYDEBUG */
1299
05d18c24 1300
e9955c83
AD
1301/* YYINITDEPTH -- initial size of the parser's stacks. */
1302#ifndef YYINITDEPTH
1303# define YYINITDEPTH 200
1304#endif
1305
1306/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1307 if the built-in stack extension method is used).
1308
1309 Do not make this value too large; the results are undefined if
2ce37586 1310 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
e9955c83
AD
1311 evaluated with infinite-precision integer arithmetic. */
1312
e9955c83
AD
1313#ifndef YYMAXDEPTH
1314# define YYMAXDEPTH 10000
1315#endif
1921f1d7 1316
e9955c83 1317\f
1921f1d7
AD
1318
1319#if YYERROR_VERBOSE
e9955c83
AD
1320
1321# ifndef yystrlen
bf8b3d98 1322# if defined __GLIBC__ && defined _STRING_H
e9955c83
AD
1323# define yystrlen strlen
1324# else
1325/* Return the length of YYSTR. */
bf8b3d98
PE
1326#if (defined __STDC__ || defined __C99__FUNC__ \
1327 || defined __cplusplus || defined _MSC_VER)
e9955c83 1328static YYSIZE_T
e9955c83 1329yystrlen (const char *yystr)
2e4c30fa
PE
1330#else
1331static YYSIZE_T
e9955c83 1332yystrlen (yystr)
2e4c30fa
PE
1333 const char *yystr;
1334#endif
e9955c83 1335{
7029f892
PE
1336 YYSIZE_T yylen;
1337 for (yylen = 0; yystr[yylen]; yylen++)
e9955c83 1338 continue;
7029f892 1339 return yylen;
e9955c83
AD
1340}
1341# endif
1342# endif
1343
1344# ifndef yystpcpy
bf8b3d98 1345# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
e9955c83
AD
1346# define yystpcpy stpcpy
1347# else
1348/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1349 YYDEST. */
bf8b3d98
PE
1350#if (defined __STDC__ || defined __C99__FUNC__ \
1351 || defined __cplusplus || defined _MSC_VER)
e9955c83 1352static char *
e9955c83 1353yystpcpy (char *yydest, const char *yysrc)
2e4c30fa
PE
1354#else
1355static char *
e9955c83 1356yystpcpy (yydest, yysrc)
2e4c30fa
PE
1357 char *yydest;
1358 const char *yysrc;
1359#endif
e9955c83 1360{
b4fb989f
PE
1361 char *yyd = yydest;
1362 const char *yys = yysrc;
e9955c83
AD
1363
1364 while ((*yyd++ = *yys++) != '\0')
1365 continue;
1366
1367 return yyd - 1;
1368}
1369# endif
1370# endif
0c15323d 1371
9cbfdc9e
PE
1372# ifndef yytnamerr
1373/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1374 quotes and backslashes, so that it's suitable for yyerror. The
1375 heuristic is that double-quoting is unnecessary unless the string
1376 contains an apostrophe, a comma, or backslash (other than
1377 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1378 null, do not copy; instead, return the length of what the result
1379 would have been. */
1380static YYSIZE_T
1381yytnamerr (char *yyres, const char *yystr)
1382{
1383 if (*yystr == '"')
1384 {
d2a1a60a 1385 YYSIZE_T yyn = 0;
9cbfdc9e
PE
1386 char const *yyp = yystr;
1387
1388 for (;;)
1389 switch (*++yyp)
1390 {
1391 case '\'':
1392 case ',':
1393 goto do_not_strip_quotes;
1394
1395 case '\\':
1396 if (*++yyp != '\\')
1397 goto do_not_strip_quotes;
1398 /* Fall through. */
1399 default:
1400 if (yyres)
1401 yyres[yyn] = *yyp;
1402 yyn++;
1403 break;
1404
1405 case '"':
1406 if (yyres)
1407 yyres[yyn] = '\0';
1408 return yyn;
1409 }
1410 do_not_strip_quotes: ;
1411 }
1412
1413 if (! yyres)
1414 return yystrlen (yystr);
1415
1416 return yystpcpy (yyres, yystr) - yyres;
1417}
1418# endif
1419
2abdfeef
PE
1420/* Copy into YYRESULT an error message about the unexpected token
1421 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1422 including the terminating null byte. If YYRESULT is null, do not
1423 copy anything; just return the number of bytes that would be
1424 copied. As a special case, return 0 if an ordinary "syntax error"
1425 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1426 size calculation. */
1427static YYSIZE_T
1428yysyntax_error (char *yyresult, int yystate, int yychar)
1429{
1430 int yyn = yypact[yystate];
1921f1d7 1431
d2a1a60a 1432 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
2abdfeef
PE
1433 return 0;
1434 else
1435 {
1436 int yytype = YYTRANSLATE (yychar);
1437 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1438 YYSIZE_T yysize = yysize0;
1439 YYSIZE_T yysize1;
1440 int yysize_overflow = 0;
1441 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1442 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1443 int yyx;
1444
1445# if 0
1446 /* This is so xgettext sees the translatable formats that are
bf8b3d98 1447 constructed on the fly. */
2abdfeef
PE
1448 YY_("syntax error, unexpected %s");
1449 YY_("syntax error, unexpected %s, expecting %s");
1450 YY_("syntax error, unexpected %s, expecting %s or %s");
1451 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1452 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1453# endif
1454 char *yyfmt;
1455 char const *yyf;
1456 static char const yyunexpected[] = "syntax error, unexpected %s";
1457 static char const yyexpecting[] = ", expecting %s";
1458 static char const yyor[] = " or %s";
1459 char yyformat[sizeof yyunexpected
bf8b3d98
PE
1460 + sizeof yyexpecting - 1
1461 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1462 * (sizeof yyor - 1))];
2abdfeef
PE
1463 char const *yyprefix = yyexpecting;
1464
1465 /* Start YYX at -YYN if negative to avoid negative indexes in
bf8b3d98 1466 YYCHECK. */
2abdfeef
PE
1467 int yyxbegin = yyn < 0 ? -yyn : 0;
1468
1469 /* Stay within bounds of both yycheck and yytname. */
d2a1a60a 1470 int yychecklim = YYLAST - yyn + 1;
2abdfeef
PE
1471 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1472 int yycount = 1;
1473
1474 yyarg[0] = yytname[yytype];
1475 yyfmt = yystpcpy (yyformat, yyunexpected);
1476
1477 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
219741d8 1478 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
bf8b3d98
PE
1479 {
1480 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1481 {
1482 yycount = 1;
1483 yysize = yysize0;
1484 yyformat[sizeof yyunexpected - 1] = '\0';
1485 break;
1486 }
1487 yyarg[yycount++] = yytname[yyx];
1488 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1489 yysize_overflow |= (yysize1 < yysize);
1490 yysize = yysize1;
1491 yyfmt = yystpcpy (yyfmt, yyprefix);
1492 yyprefix = yyor;
1493 }
2abdfeef
PE
1494
1495 yyf = YY_(yyformat);
1496 yysize1 = yysize + yystrlen (yyf);
7029f892 1497 yysize_overflow |= (yysize1 < yysize);
2abdfeef
PE
1498 yysize = yysize1;
1499
1500 if (yysize_overflow)
1501 return YYSIZE_MAXIMUM;
1502
1503 if (yyresult)
1504 {
bf8b3d98
PE
1505 /* Avoid sprintf, as that infringes on the user's name space.
1506 Don't have undefined behavior even if the translation
1507 produced a string with the wrong number of "%s"s. */
1508 char *yyp = yyresult;
1509 int yyi = 0;
1510 while ((*yyp = *yyf) != '\0')
1511 {
1512 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1513 {
1514 yyp += yytnamerr (yyp, yyarg[yyi++]);
1515 yyf += 2;
1516 }
1517 else
1518 {
1519 yyp++;
1520 yyf++;
1521 }
1522 }
1523 }
2abdfeef
PE
1524 return yysize;
1525 }
1526}
1527#endif /* YYERROR_VERBOSE */
1921f1d7 1528\f
e9955c83 1529
04b6e11e
PE
1530/*-----------------------------------------------.
1531| Release the memory associated to this symbol. |
1532`-----------------------------------------------*/
1533
7029f892 1534/*ARGSUSED*/
bf8b3d98
PE
1535#if (defined __STDC__ || defined __C99__FUNC__ \
1536 || defined __cplusplus || defined _MSC_VER)
d33cb3ae 1537static void
8a8dc872 1538yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
04b6e11e 1539#else
d33cb3ae 1540static void
8a8dc872
AD
1541yydestruct (yymsg, yytype, yyvaluep, yylocationp)
1542 const char *yymsg;
04b6e11e 1543 int yytype;
886b69d1
AD
1544 YYSTYPE *yyvaluep;
1545 YYLTYPE *yylocationp;
04b6e11e
PE
1546#endif
1547{
e764d4df
PE
1548 YYUSE (yyvaluep);
1549 YYUSE (yylocationp);
04b6e11e 1550
8a8dc872
AD
1551 if (!yymsg)
1552 yymsg = "Deleting";
1553 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1554
04b6e11e
PE
1555 switch (yytype)
1556 {
886b69d1 1557
04b6e11e 1558 default:
bf8b3d98 1559 break;
04b6e11e
PE
1560 }
1561}
04b6e11e 1562
d33cb3ae 1563/* Prevent warnings from -Wmissing-prototypes. */
e9955c83 1564#ifdef YYPARSE_PARAM
bf8b3d98 1565#if defined __STDC__ || defined __cplusplus
d33cb3ae 1566int yyparse (void *YYPARSE_PARAM);
2e4c30fa 1567#else
d33cb3ae 1568int yyparse ();
2e4c30fa 1569#endif
d33cb3ae 1570#else /* ! YYPARSE_PARAM */
bf8b3d98 1571#if defined __STDC__ || defined __cplusplus
e9955c83 1572int yyparse (void);
d33cb3ae
PE
1573#else
1574int yyparse ();
1575#endif
05d18c24 1576#endif /* ! YYPARSE_PARAM */
e776192e 1577
e9955c83 1578
e9955c83 1579
e9955c83 1580
d33cb3ae 1581
e021811a
JD
1582/*-------------------------.
1583| yyparse or yypush_parse. |
1584`-------------------------*/
d33cb3ae
PE
1585
1586#ifdef YYPARSE_PARAM
bf8b3d98
PE
1587#if (defined __STDC__ || defined __C99__FUNC__ \
1588 || defined __cplusplus || defined _MSC_VER)
2e4c30fa
PE
1589int
1590yyparse (void *YYPARSE_PARAM)
1591#else
1592int
1593yyparse (YYPARSE_PARAM)
1594 void *YYPARSE_PARAM;
1595#endif
d33cb3ae 1596#else /* ! YYPARSE_PARAM */
bf8b3d98
PE
1597#if (defined __STDC__ || defined __C99__FUNC__ \
1598 || defined __cplusplus || defined _MSC_VER)
d33cb3ae
PE
1599int
1600yyparse (void)
1601#else
e9955c83 1602int
d33cb3ae 1603yyparse ()
74e543d2 1604
d33cb3ae
PE
1605#endif
1606#endif
e9955c83 1607{
e021811a 1608/* The lookahead symbol. */
366eea36
AD
1609int yychar;
1610
9bc0dd67 1611/* The semantic value of the lookahead symbol. */
366eea36
AD
1612YYSTYPE yylval;
1613
9bc0dd67 1614/* Location data for the lookahead symbol. */
366eea36 1615YYLTYPE yylloc;
e9955c83 1616
e021811a
JD
1617 /* Number of syntax errors so far. */
1618 int yynerrs;
e9955c83 1619
e021811a
JD
1620 int yystate;
1621 /* Number of tokens to shift before error messages enabled. */
1622 int yyerrstatus;
e9955c83 1623
e021811a
JD
1624 /* The stacks and their tools:
1625 `yyss': related to states.
1626 `yyvs': related to semantic values.
1627 `yyls': related to locations.
e9955c83 1628
e021811a
JD
1629 Refer to the stacks thru separate pointers, to allow yyoverflow
1630 to reallocate them elsewhere. */
e9955c83 1631
e021811a
JD
1632 /* The state stack. */
1633 yytype_int16 yyssa[YYINITDEPTH];
1634 yytype_int16 *yyss;
1635 yytype_int16 *yyssp;
e9955c83 1636
e021811a
JD
1637 /* The semantic value stack. */
1638 YYSTYPE yyvsa[YYINITDEPTH];
1639 YYSTYPE *yyvs;
1640 YYSTYPE *yyvsp;
e9955c83 1641
e021811a
JD
1642 /* The location stack. */
1643 YYLTYPE yylsa[YYINITDEPTH];
1644 YYLTYPE *yyls;
1645 YYLTYPE *yylsp;
1646
1647 /* The locations where the error started and ended. */
1648 YYLTYPE yyerror_range[2];
e9955c83 1649
e021811a 1650 YYSIZE_T yystacksize;
e9955c83 1651
e021811a
JD
1652 int yyn;
1653 int yyresult;
1654 /* Lookahead token as an internal (translated) token number. */
1655 int yytoken;
e9955c83
AD
1656 /* The variables used to return semantic value and location from the
1657 action routines. */
1658 YYSTYPE yyval;
e9955c83 1659 YYLTYPE yyloc;
e9955c83 1660
e021811a
JD
1661#if YYERROR_VERBOSE
1662 /* Buffer for error messages, and its allocated size. */
1663 char yymsgbuf[128];
1664 char *yymsg = yymsgbuf;
1665 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1666#endif
1667
1668#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1669
3b0ffc7e
PE
1670 /* The number of symbols on the RHS of the reduced rule.
1671 Keep to zero when no symbol should be popped. */
1672 int yylen = 0;
e9955c83 1673
e021811a
JD
1674 yytoken = 0;
1675 yyss = yyssa;
1676 yyvs = yyvsa;
1677 yyls = yylsa;
e021811a
JD
1678 yystacksize = YYINITDEPTH;
1679
74e543d2 1680 YYDPRINTF ((stderr, "Starting parse\n"));
e9955c83
AD
1681
1682 yystate = 0;
1683 yyerrstatus = 0;
1684 yynerrs = 0;
e021811a 1685 yychar = YYEMPTY; /* Cause a token to be read. */
e9955c83
AD
1686
1687 /* Initialize stack pointers.
1688 Waste one element of value and location stack
1689 so that they stay on the same level as the state stack.
1690 The wasted elements are never initialized. */
e9955c83
AD
1691 yyssp = yyss;
1692 yyvsp = yyvs;
e9955c83 1693 yylsp = yyls;
e021811a 1694
8a8dc872
AD
1695#if YYLTYPE_IS_TRIVIAL
1696 /* Initialize the default location before parsing starts. */
1697 yylloc.first_line = yylloc.last_line = 1;
b3d9b5ba 1698 yylloc.first_column = yylloc.last_column = 1;
8a8dc872
AD
1699#endif
1700
e021811a 1701/* User initialization code. */
cd3684cf 1702
f7398526 1703/* Line 1244 of yacc.c */
88511166 1704#line 84 "parse-gram.y"
cd3684cf
AD
1705{
1706 /* Bison's grammar can initial empty locations, hence a default
1707 location is needed. */
4a678af8
JD
1708 boundary_set (&yylloc.start, current_file, 1, 1);
1709 boundary_set (&yylloc.end, current_file, 1, 1);
cd3684cf 1710}
136a0f76 1711
f7398526
AD
1712/* Line 1244 of yacc.c */
1713#line 1714 "../../../src/parse-gram.c"
5f6da1c0 1714 yylsp[0] = yylloc;
e021811a 1715
e9955c83
AD
1716 goto yysetstate;
1717
1718/*------------------------------------------------------------.
1719| yynewstate -- Push a new state, which is found in yystate. |
1720`------------------------------------------------------------*/
1721 yynewstate:
1722 /* In all cases, when you get here, the value and location stacks
3b0ffc7e 1723 have just been pushed. So pushing a state here evens the stacks. */
e9955c83
AD
1724 yyssp++;
1725
1726 yysetstate:
1727 *yyssp = yystate;
1728
d33cb3ae 1729 if (yyss + yystacksize - 1 <= yyssp)
e9955c83
AD
1730 {
1731 /* Get the current used size of the three stacks, in elements. */
1732 YYSIZE_T yysize = yyssp - yyss + 1;
1733
1734#ifdef yyoverflow
1735 {
3b0ffc7e 1736 /* Give user a chance to reallocate the stack. Use copies of
e9955c83
AD
1737 these so that the &'s don't force the real ones into
1738 memory. */
1739 YYSTYPE *yyvs1 = yyvs;
bf8b3d98 1740 yytype_int16 *yyss1 = yyss;
366eea36 1741 YYLTYPE *yyls1 = yyls;
e9955c83
AD
1742
1743 /* Each stack pointer address is followed by the size of the
366eea36
AD
1744 data in use in that stack, in bytes. This used to be a
1745 conditional around just the two extra args, but that might
1746 be undefined if yyoverflow is a macro. */
6088a2a0 1747 yyoverflow (YY_("memory exhausted"),
e9955c83
AD
1748 &yyss1, yysize * sizeof (*yyssp),
1749 &yyvs1, yysize * sizeof (*yyvsp),
1750 &yyls1, yysize * sizeof (*yylsp),
1751 &yystacksize);
e021811a 1752
e9955c83 1753 yyls = yyls1;
e9955c83
AD
1754 yyss = yyss1;
1755 yyvs = yyvs1;
1756 }
1757#else /* no yyoverflow */
1758# ifndef YYSTACK_RELOCATE
6088a2a0 1759 goto yyexhaustedlab;
e9955c83
AD
1760# else
1761 /* Extend the stack our own way. */
d33cb3ae 1762 if (YYMAXDEPTH <= yystacksize)
6088a2a0 1763 goto yyexhaustedlab;
e9955c83 1764 yystacksize *= 2;
d33cb3ae 1765 if (YYMAXDEPTH < yystacksize)
e9955c83
AD
1766 yystacksize = YYMAXDEPTH;
1767
1768 {
bf8b3d98 1769 yytype_int16 *yyss1 = yyss;
e9955c83
AD
1770 union yyalloc *yyptr =
1771 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1772 if (! yyptr)
6088a2a0 1773 goto yyexhaustedlab;
e021811a
JD
1774 YYSTACK_RELOCATE (yyss_alloc, yyss);
1775 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1776 YYSTACK_RELOCATE (yyls_alloc, yyls);
1921f1d7 1777# undef YYSTACK_RELOCATE
e9955c83
AD
1778 if (yyss1 != yyssa)
1779 YYSTACK_FREE (yyss1);
1780 }
1781# endif
1782#endif /* no yyoverflow */
1783
1784 yyssp = yyss + yysize - 1;
1785 yyvsp = yyvs + yysize - 1;
e9955c83 1786 yylsp = yyls + yysize - 1;
e9955c83 1787
6088a2a0 1788 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
e9955c83
AD
1789 (unsigned long int) yystacksize));
1790
d33cb3ae 1791 if (yyss + yystacksize - 1 <= yyssp)
e9955c83
AD
1792 YYABORT;
1793 }
1794
6088a2a0 1795 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
e9955c83 1796
ec5479ce
JD
1797 if (yystate == YYFINAL)
1798 YYACCEPT;
1799
e9955c83
AD
1800 goto yybackup;
1801
1802/*-----------.
1803| yybackup. |
1804`-----------*/
1805yybackup:
1806
3b0ffc7e 1807 /* Do appropriate processing given the current state. Read a
9bc0dd67 1808 lookahead token if we need one and don't already have one. */
e9955c83 1809
9bc0dd67 1810 /* First try to decide what to do without reference to lookahead token. */
e9955c83 1811 yyn = yypact[yystate];
04b6e11e 1812 if (yyn == YYPACT_NINF)
e9955c83
AD
1813 goto yydefault;
1814
9bc0dd67 1815 /* Not known => get a lookahead token if don't already have one. */
e9955c83 1816
9bc0dd67 1817 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
73521d9f 1818 if (yychar == YYEMPTY)
e9955c83 1819 {
74e543d2 1820 YYDPRINTF ((stderr, "Reading a token: "));
e9955c83
AD
1821 yychar = YYLEX;
1822 }
1823
73521d9f 1824 if (yychar <= YYEOF)
e9955c83 1825 {
73521d9f 1826 yychar = yytoken = YYEOF;
74e543d2 1827 YYDPRINTF ((stderr, "Now at end of input.\n"));
e9955c83
AD
1828 }
1829 else
1830 {
73521d9f 1831 yytoken = YYTRANSLATE (yychar);
6088a2a0 1832 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
e9955c83
AD
1833 }
1834
886b69d1 1835 /* If the proper action on seeing token YYTOKEN is to reduce or to
ae7453f2 1836 detect an error, take that action. */
886b69d1 1837 yyn += yytoken;
219741d8 1838 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
e9955c83 1839 goto yydefault;
e9955c83 1840 yyn = yytable[yyn];
ae7453f2 1841 if (yyn <= 0)
e9955c83 1842 {
ae7453f2 1843 if (yyn == 0 || yyn == YYTABLE_NINF)
e9955c83
AD
1844 goto yyerrlab;
1845 yyn = -yyn;
1846 goto yyreduce;
1847 }
e9955c83 1848
3b0ffc7e
PE
1849 /* Count tokens shifted since error; after three, turn off error
1850 status. */
1851 if (yyerrstatus)
1852 yyerrstatus--;
1853
9bc0dd67 1854 /* Shift the lookahead token. */
6088a2a0 1855 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
e9955c83 1856
ec5479ce
JD
1857 /* Discard the shifted token. */
1858 yychar = YYEMPTY;
e9955c83 1859
3b0ffc7e 1860 yystate = yyn;
e9955c83 1861 *++yyvsp = yylval;
e9955c83 1862 *++yylsp = yylloc;
e9955c83
AD
1863 goto yynewstate;
1864
1865
1866/*-----------------------------------------------------------.
1867| yydefault -- do the default action for the current state. |
1868`-----------------------------------------------------------*/
1869yydefault:
1870 yyn = yydefact[yystate];
1871 if (yyn == 0)
1872 goto yyerrlab;
1873 goto yyreduce;
1874
1875
1876/*-----------------------------.
1877| yyreduce -- Do a reduction. |
1878`-----------------------------*/
1879yyreduce:
1880 /* yyn is the number of a rule to reduce with. */
1881 yylen = yyr2[yyn];
1882
1883 /* If YYLEN is nonzero, implement the default value of the action:
1884 `$$ = $1'.
1885
04b6e11e
PE
1886 Otherwise, the following line sets YYVAL to garbage.
1887 This behavior is undocumented and Bison
e9955c83
AD
1888 users should not rely upon it. Assigning to YYVAL
1889 unconditionally makes the parser a bit smaller, and it avoids a
1890 GCC warning that YYVAL may be used uninitialized. */
1891 yyval = yyvsp[1-yylen];
1892
3b0ffc7e 1893 /* Default location. */
bf8b3d98 1894 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
05d18c24 1895 YY_REDUCE_PRINT (yyn);
1921f1d7
AD
1896 switch (yyn)
1897 {
05d18c24 1898 case 6:
136a0f76 1899
ccde1f98 1900/* Line 1457 of yacc.c */
f7398526 1901#line 219 "parse-gram.y"
7c0c6181
JD
1902 {
1903 code_props plain_code;
1904 code_props_plain_init (&plain_code, (yyvsp[(1) - (1)].chars), (yylsp[(1) - (1)]));
1905 code_props_translate_code (&plain_code);
1906 gram_scanner_last_string_free ();
7ecec4dd
JD
1907 muscle_code_grow (union_seen ? "post_prologue" : "pre_prologue",
1908 plain_code.code, (yylsp[(1) - (1)]));
7c0c6181
JD
1909 code_scanner_last_string_free ();
1910 }
ccde1f98
AD
1911
1912/* Line 1457 of yacc.c */
f7398526 1913#line 1914 "../../../src/parse-gram.c"
1921f1d7
AD
1914 break;
1915
8efe435c 1916 case 7:
136a0f76 1917
ccde1f98 1918/* Line 1457 of yacc.c */
f7398526 1919#line 228 "parse-gram.y"
9bc0dd67 1920 { debug_flag = true; }
ccde1f98
AD
1921
1922/* Line 1457 of yacc.c */
f7398526 1923#line 1924 "../../../src/parse-gram.c"
9bc0dd67
JD
1924 break;
1925
2cbe6b7f 1926 case 8:
136a0f76 1927
ccde1f98 1928/* Line 1457 of yacc.c */
f7398526 1929#line 230 "parse-gram.y"
7eb8a0bc 1930 {
9611cfa2 1931 muscle_percent_define_insert ((yyvsp[(2) - (3)].uniqstr), (yylsp[(2) - (3)]), (yyvsp[(3) - (3)].chars));
7eb8a0bc 1932 }
ccde1f98
AD
1933
1934/* Line 1457 of yacc.c */
f7398526 1935#line 1936 "../../../src/parse-gram.c"
1921f1d7
AD
1936 break;
1937
2cbe6b7f 1938 case 9:
136a0f76 1939
ccde1f98 1940/* Line 1457 of yacc.c */
f7398526 1941#line 233 "parse-gram.y"
2ce4ed68 1942 { defines_flag = true; }
ccde1f98
AD
1943
1944/* Line 1457 of yacc.c */
f7398526 1945#line 1946 "../../../src/parse-gram.c"
e9955c83 1946 break;
1921f1d7 1947
2cbe6b7f 1948 case 10:
1921f1d7 1949
ccde1f98 1950/* Line 1457 of yacc.c */
f7398526 1951#line 235 "parse-gram.y"
02975b9a
JD
1952 {
1953 defines_flag = true;
1954 spec_defines_file = xstrdup ((yyvsp[(2) - (2)].chars));
1955 }
ccde1f98
AD
1956
1957/* Line 1457 of yacc.c */
f7398526 1958#line 1959 "../../../src/parse-gram.c"
e9955c83 1959 break;
1921f1d7 1960
2cbe6b7f 1961 case 11:
136a0f76 1962
ccde1f98 1963/* Line 1457 of yacc.c */
f7398526 1964#line 239 "parse-gram.y"
02975b9a 1965 { error_verbose = true; }
ccde1f98
AD
1966
1967/* Line 1457 of yacc.c */
f7398526 1968#line 1969 "../../../src/parse-gram.c"
d6328241
PH
1969 break;
1970
2cbe6b7f 1971 case 12:
136a0f76 1972
ccde1f98 1973/* Line 1457 of yacc.c */
f7398526 1974#line 240 "parse-gram.y"
02975b9a 1975 { expected_sr_conflicts = (yyvsp[(2) - (2)].integer); }
ccde1f98
AD
1976
1977/* Line 1457 of yacc.c */
f7398526 1978#line 1979 "../../../src/parse-gram.c"
fb9712a9
AD
1979 break;
1980
2cbe6b7f 1981 case 13:
136a0f76 1982
ccde1f98 1983/* Line 1457 of yacc.c */
f7398526 1984#line 241 "parse-gram.y"
02975b9a 1985 { expected_rr_conflicts = (yyvsp[(2) - (2)].integer); }
ccde1f98
AD
1986
1987/* Line 1457 of yacc.c */
f7398526 1988#line 1989 "../../../src/parse-gram.c"
34f98f46
JD
1989 break;
1990
2cbe6b7f 1991 case 14:
136a0f76 1992
ccde1f98 1993/* Line 1457 of yacc.c */
f7398526 1994#line 242 "parse-gram.y"
02975b9a 1995 { spec_file_prefix = (yyvsp[(2) - (2)].chars); }
ccde1f98
AD
1996
1997/* Line 1457 of yacc.c */
f7398526 1998#line 1999 "../../../src/parse-gram.c"
02975b9a
JD
1999 break;
2000
2001 case 15:
2002
ccde1f98 2003/* Line 1457 of yacc.c */
f7398526 2004#line 243 "parse-gram.y"
02975b9a 2005 { spec_file_prefix = (yyvsp[(3) - (3)].chars); }
ccde1f98
AD
2006
2007/* Line 1457 of yacc.c */
f7398526 2008#line 2009 "../../../src/parse-gram.c"
02975b9a
JD
2009 break;
2010
2011 case 16:
2012
ccde1f98 2013/* Line 1457 of yacc.c */
f7398526 2014#line 245 "parse-gram.y"
cd3684cf 2015 {
bf8b3d98
PE
2016 nondeterministic_parser = true;
2017 glr_parser = true;
2018 }
ccde1f98
AD
2019
2020/* Line 1457 of yacc.c */
f7398526 2021#line 2022 "../../../src/parse-gram.c"
e9955c83 2022 break;
1921f1d7 2023
02975b9a 2024 case 17:
136a0f76 2025
ccde1f98 2026/* Line 1457 of yacc.c */
f7398526 2027#line 250 "parse-gram.y"
cd3684cf 2028 {
7c0c6181
JD
2029 code_props action;
2030 code_props_symbol_action_init (&action, (yyvsp[(2) - (2)].code), (yylsp[(2) - (2)]));
2031 code_props_translate_code (&action);
2032 gram_scanner_last_string_free ();
2033 muscle_code_grow ("initial_action", action.code, (yylsp[(2) - (2)]));
2034 code_scanner_last_string_free ();
bf8b3d98 2035 }
ccde1f98
AD
2036
2037/* Line 1457 of yacc.c */
f7398526 2038#line 2039 "../../../src/parse-gram.c"
e9955c83 2039 break;
1921f1d7 2040
02975b9a 2041 case 18:
136a0f76 2042
ccde1f98 2043/* Line 1457 of yacc.c */
f7398526 2044#line 258 "parse-gram.y"
51365192 2045 { language_argmatch ((yyvsp[(2) - (2)].chars), grammar_prio, (yylsp[(1) - (2)])); }
ccde1f98
AD
2046
2047/* Line 1457 of yacc.c */
f7398526 2048#line 2049 "../../../src/parse-gram.c"
e9955c83 2049 break;
1921f1d7 2050
02975b9a 2051 case 19:
136a0f76 2052
ccde1f98 2053/* Line 1457 of yacc.c */
f7398526 2054#line 259 "parse-gram.y"
5e6feb86 2055 { add_param ("lex_param", (yyvsp[(2) - (2)].code), (yylsp[(2) - (2)])); }
ccde1f98
AD
2056
2057/* Line 1457 of yacc.c */
f7398526 2058#line 2059 "../../../src/parse-gram.c"
e9955c83 2059 break;
1921f1d7 2060
02975b9a 2061 case 20:
136a0f76 2062
ccde1f98 2063/* Line 1457 of yacc.c */
f7398526 2064#line 260 "parse-gram.y"
5e6feb86 2065 { locations_flag = true; }
ccde1f98
AD
2066
2067/* Line 1457 of yacc.c */
f7398526 2068#line 2069 "../../../src/parse-gram.c"
02975b9a
JD
2069 break;
2070
2071 case 21:
2072
ccde1f98 2073/* Line 1457 of yacc.c */
f7398526 2074#line 261 "parse-gram.y"
5e6feb86 2075 { spec_name_prefix = (yyvsp[(2) - (2)].chars); }
ccde1f98
AD
2076
2077/* Line 1457 of yacc.c */
f7398526 2078#line 2079 "../../../src/parse-gram.c"
e9955c83 2079 break;
1921f1d7 2080
02975b9a 2081 case 22:
136a0f76 2082
ccde1f98 2083/* Line 1457 of yacc.c */
f7398526 2084#line 262 "parse-gram.y"
5e6feb86 2085 { spec_name_prefix = (yyvsp[(3) - (3)].chars); }
ccde1f98
AD
2086
2087/* Line 1457 of yacc.c */
f7398526 2088#line 2089 "../../../src/parse-gram.c"
4cdb01db 2089 break;
1921f1d7 2090
02975b9a 2091 case 23:
136a0f76 2092
ccde1f98 2093/* Line 1457 of yacc.c */
f7398526 2094#line 263 "parse-gram.y"
5e6feb86 2095 { no_lines_flag = true; }
ccde1f98
AD
2096
2097/* Line 1457 of yacc.c */
f7398526 2098#line 2099 "../../../src/parse-gram.c"
4cdb01db 2099 break;
1921f1d7 2100
02975b9a
JD
2101 case 24:
2102
ccde1f98 2103/* Line 1457 of yacc.c */
f7398526 2104#line 264 "parse-gram.y"
5e6feb86 2105 { nondeterministic_parser = true; }
ccde1f98
AD
2106
2107/* Line 1457 of yacc.c */
f7398526 2108#line 2109 "../../../src/parse-gram.c"
02975b9a
JD
2109 break;
2110
2111 case 25:
136a0f76 2112
ccde1f98 2113/* Line 1457 of yacc.c */
f7398526 2114#line 265 "parse-gram.y"
5e6feb86 2115 { spec_outfile = (yyvsp[(2) - (2)].chars); }
ccde1f98
AD
2116
2117/* Line 1457 of yacc.c */
f7398526 2118#line 2119 "../../../src/parse-gram.c"
4cdb01db 2119 break;
1921f1d7 2120
02975b9a 2121 case 26:
136a0f76 2122
ccde1f98 2123/* Line 1457 of yacc.c */
f7398526 2124#line 266 "parse-gram.y"
5e6feb86 2125 { spec_outfile = (yyvsp[(3) - (3)].chars); }
ccde1f98
AD
2126
2127/* Line 1457 of yacc.c */
f7398526 2128#line 2129 "../../../src/parse-gram.c"
676385e2
PH
2129 break;
2130
02975b9a 2131 case 27:
136a0f76 2132
ccde1f98 2133/* Line 1457 of yacc.c */
f7398526 2134#line 267 "parse-gram.y"
5e6feb86 2135 { add_param ("parse_param", (yyvsp[(2) - (2)].code), (yylsp[(2) - (2)])); }
ccde1f98
AD
2136
2137/* Line 1457 of yacc.c */
f7398526 2138#line 2139 "../../../src/parse-gram.c"
ae7453f2
AD
2139 break;
2140
02975b9a 2141 case 28:
136a0f76 2142
ccde1f98 2143/* Line 1457 of yacc.c */
f7398526 2144#line 269 "parse-gram.y"
d9df47b6
JD
2145 {
2146 /* %pure-parser is deprecated in favor of `%define api.pure', so use
2147 `%define api.pure' in a backward-compatible manner here. First, don't
2148 complain if %pure-parser is specified multiple times. */
2149 if (!muscle_find_const ("percent_define(api.pure)"))
2150 muscle_percent_define_insert ("api.pure", (yylsp[(1) - (1)]), "");
2151 /* In all cases, use api.pure now so that the backend doesn't complain if
2152 the skeleton ignores api.pure, but do warn now if there's a previous
2153 conflicting definition from an actual %define. */
2154 if (!muscle_percent_define_flag_if ("api.pure"))
2155 muscle_percent_define_insert ("api.pure", (yylsp[(1) - (1)]), "");
2156 }
ccde1f98
AD
2157
2158/* Line 1457 of yacc.c */
f7398526 2159#line 2160 "../../../src/parse-gram.c"
ae7453f2
AD
2160 break;
2161
02975b9a 2162 case 29:
136a0f76 2163
ccde1f98 2164/* Line 1457 of yacc.c */
f7398526 2165#line 281 "parse-gram.y"
7172e23e 2166 { version_check (&(yylsp[(2) - (2)]), (yyvsp[(2) - (2)].chars)); }
ccde1f98
AD
2167
2168/* Line 1457 of yacc.c */
f7398526 2169#line 2170 "../../../src/parse-gram.c"
b50d2359
AD
2170 break;
2171
d782395d 2172 case 30:
136a0f76 2173
ccde1f98 2174/* Line 1457 of yacc.c */
f7398526 2175#line 283 "parse-gram.y"
a7867f53
JD
2176 {
2177 char const *skeleton_user = (yyvsp[(2) - (2)].chars);
2178 if (strchr (skeleton_user, '/'))
2179 {
2180 size_t dir_length = strlen (current_file);
2181 char *skeleton_build;
2182 while (dir_length && current_file[dir_length - 1] != '/')
2183 --dir_length;
2184 while (dir_length && current_file[dir_length - 1] == '/')
2185 --dir_length;
2186 skeleton_build =
2187 xmalloc (dir_length + 1 + strlen (skeleton_user) + 1);
2188 if (dir_length > 0)
2189 {
2190 strncpy (skeleton_build, current_file, dir_length);
2191 skeleton_build[dir_length++] = '/';
2192 }
2193 strcpy (skeleton_build + dir_length, skeleton_user);
2194 skeleton_user = uniqstr_new (skeleton_build);
2195 free (skeleton_build);
2196 }
51365192 2197 skeleton_arg (skeleton_user, grammar_prio, (yylsp[(1) - (2)]));
a7867f53 2198 }
ccde1f98
AD
2199
2200/* Line 1457 of yacc.c */
f7398526 2201#line 2202 "../../../src/parse-gram.c"
3fa3725a
PE
2202 break;
2203
d782395d 2204 case 31:
136a0f76 2205
ccde1f98 2206/* Line 1457 of yacc.c */
f7398526 2207#line 306 "parse-gram.y"
7172e23e 2208 { token_table_flag = true; }
ccde1f98
AD
2209
2210/* Line 1457 of yacc.c */
f7398526 2211#line 2212 "../../../src/parse-gram.c"
5e6feb86
PE
2212 break;
2213
d782395d 2214 case 32:
5e6feb86 2215
ccde1f98 2216/* Line 1457 of yacc.c */
f7398526 2217#line 307 "parse-gram.y"
ef1b4273 2218 { report_flag |= report_states; }
ccde1f98
AD
2219
2220/* Line 1457 of yacc.c */
f7398526 2221#line 2222 "../../../src/parse-gram.c"
7172e23e
JD
2222 break;
2223
d782395d 2224 case 33:
7172e23e 2225
ccde1f98 2226/* Line 1457 of yacc.c */
f7398526 2227#line 308 "parse-gram.y"
83a457be 2228 { yacc_flag = true; }
ccde1f98
AD
2229
2230/* Line 1457 of yacc.c */
f7398526 2231#line 2232 "../../../src/parse-gram.c"
4cdb01db 2232 break;
1921f1d7 2233
d782395d 2234 case 37:
136a0f76 2235
ccde1f98 2236/* Line 1457 of yacc.c */
f7398526 2237#line 316 "parse-gram.y"
1921f1d7 2238 {
66809587 2239 grammar_start_symbol_set ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)]));
4cdb01db 2240 }
ccde1f98
AD
2241
2242/* Line 1457 of yacc.c */
f7398526 2243#line 2244 "../../../src/parse-gram.c"
e9955c83 2244 break;
1921f1d7 2245
d782395d 2246 case 38:
136a0f76 2247
ccde1f98 2248/* Line 1457 of yacc.c */
f7398526 2249#line 320 "parse-gram.y"
1921f1d7 2250 {
05d18c24 2251 symbol_list *list;
e9071366 2252 for (list = (yyvsp[(3) - (3)].list); list; list = list->next)
7c0c6181 2253 symbol_list_destructor_set (list, (yyvsp[(2) - (3)].code), (yylsp[(2) - (3)]));
e9071366 2254 symbol_list_free ((yyvsp[(3) - (3)].list));
4cdb01db 2255 }
ccde1f98
AD
2256
2257/* Line 1457 of yacc.c */
f7398526 2258#line 2259 "../../../src/parse-gram.c"
e9955c83 2259 break;
1921f1d7 2260
d782395d 2261 case 39:
136a0f76 2262
ccde1f98 2263/* Line 1457 of yacc.c */
f7398526 2264#line 327 "parse-gram.y"
1921f1d7 2265 {
05d18c24 2266 symbol_list *list;
e9071366 2267 for (list = (yyvsp[(3) - (3)].list); list; list = list->next)
7c0c6181 2268 symbol_list_printer_set (list, (yyvsp[(2) - (3)].code), (yylsp[(2) - (3)]));
e9071366 2269 symbol_list_free ((yyvsp[(3) - (3)].list));
4cdb01db 2270 }
ccde1f98
AD
2271
2272/* Line 1457 of yacc.c */
f7398526 2273#line 2274 "../../../src/parse-gram.c"
e9955c83 2274 break;
1921f1d7 2275
d782395d 2276 case 40:
136a0f76 2277
ccde1f98 2278/* Line 1457 of yacc.c */
f7398526 2279#line 334 "parse-gram.y"
92f5e991 2280 {
66ef8b9d 2281 default_prec = true;
92f5e991 2282 }
ccde1f98
AD
2283
2284/* Line 1457 of yacc.c */
f7398526 2285#line 2286 "../../../src/parse-gram.c"
9280d3ef
AD
2286 break;
2287
d782395d 2288 case 41:
136a0f76 2289
ccde1f98 2290/* Line 1457 of yacc.c */
f7398526 2291#line 338 "parse-gram.y"
66ef8b9d
PE
2292 {
2293 default_prec = false;
2294 }
ccde1f98
AD
2295
2296/* Line 1457 of yacc.c */
f7398526 2297#line 2298 "../../../src/parse-gram.c"
92f5e991
AD
2298 break;
2299
d782395d 2300 case 42:
2cbe6b7f 2301
ccde1f98 2302/* Line 1457 of yacc.c */
f7398526 2303#line 342 "parse-gram.y"
8e0a5e9e 2304 {
9611cfa2
JD
2305 /* Do not invoke muscle_percent_code_grow here since it invokes
2306 muscle_user_name_list_grow. */
592d0b1e 2307 muscle_code_grow ("percent_code()", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)]));
8e0a5e9e
JD
2308 code_scanner_last_string_free ();
2309 }
ccde1f98
AD
2310
2311/* Line 1457 of yacc.c */
f7398526 2312#line 2313 "../../../src/parse-gram.c"
2cbe6b7f
JD
2313 break;
2314
d782395d 2315 case 43:
2cbe6b7f 2316
ccde1f98 2317/* Line 1457 of yacc.c */
f7398526 2318#line 349 "parse-gram.y"
8e0a5e9e 2319 {
9611cfa2 2320 muscle_percent_code_grow ((yyvsp[(2) - (3)].uniqstr), (yylsp[(2) - (3)]), (yyvsp[(3) - (3)].chars), (yylsp[(3) - (3)]));
8e0a5e9e 2321 code_scanner_last_string_free ();
8e0a5e9e 2322 }
ccde1f98
AD
2323
2324/* Line 1457 of yacc.c */
f7398526 2325#line 2326 "../../../src/parse-gram.c"
58d7a1a1
AD
2326 break;
2327
d782395d 2328 case 44:
136a0f76 2329
ccde1f98 2330/* Line 1457 of yacc.c */
f7398526 2331#line 363 "parse-gram.y"
2cbe6b7f 2332 {}
ccde1f98
AD
2333
2334/* Line 1457 of yacc.c */
f7398526 2335#line 2336 "../../../src/parse-gram.c"
66ef8b9d
PE
2336 break;
2337
d782395d 2338 case 45:
136a0f76 2339
ccde1f98 2340/* Line 1457 of yacc.c */
f7398526 2341#line 364 "parse-gram.y"
2cbe6b7f 2342 { muscle_code_grow ("union_name", (yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
ccde1f98
AD
2343
2344/* Line 1457 of yacc.c */
f7398526 2345#line 2346 "../../../src/parse-gram.c"
2cbe6b7f
JD
2346 break;
2347
d782395d 2348 case 46:
2cbe6b7f 2349
ccde1f98 2350/* Line 1457 of yacc.c */
f7398526 2351#line 369 "parse-gram.y"
9280d3ef 2352 {
1f4cc0f4 2353 union_seen = true;
7ecec4dd
JD
2354 muscle_code_grow ("stype", (yyvsp[(3) - (3)].chars), (yylsp[(3) - (3)]));
2355 code_scanner_last_string_free ();
9280d3ef 2356 }
ccde1f98
AD
2357
2358/* Line 1457 of yacc.c */
f7398526 2359#line 2360 "../../../src/parse-gram.c"
9280d3ef
AD
2360 break;
2361
d782395d 2362 case 47:
136a0f76 2363
ccde1f98 2364/* Line 1457 of yacc.c */
f7398526 2365#line 380 "parse-gram.y"
58d7a1a1 2366 { current_class = nterm_sym; }
ccde1f98
AD
2367
2368/* Line 1457 of yacc.c */
f7398526 2369#line 2370 "../../../src/parse-gram.c"
366eea36
AD
2370 break;
2371
d782395d 2372 case 48:
136a0f76 2373
ccde1f98 2374/* Line 1457 of yacc.c */
f7398526 2375#line 381 "parse-gram.y"
366eea36
AD
2376 {
2377 current_class = unknown_sym;
2378 current_type = NULL;
2379 }
ccde1f98
AD
2380
2381/* Line 1457 of yacc.c */
f7398526 2382#line 2383 "../../../src/parse-gram.c"
366eea36
AD
2383 break;
2384
d782395d 2385 case 49:
136a0f76 2386
ccde1f98 2387/* Line 1457 of yacc.c */
f7398526 2388#line 385 "parse-gram.y"
58d7a1a1 2389 { current_class = token_sym; }
ccde1f98
AD
2390
2391/* Line 1457 of yacc.c */
f7398526 2392#line 2393 "../../../src/parse-gram.c"
58d7a1a1
AD
2393 break;
2394
d782395d 2395 case 50:
136a0f76 2396
ccde1f98 2397/* Line 1457 of yacc.c */
f7398526 2398#line 386 "parse-gram.y"
58d7a1a1
AD
2399 {
2400 current_class = unknown_sym;
2401 current_type = NULL;
2402 }
ccde1f98
AD
2403
2404/* Line 1457 of yacc.c */
f7398526 2405#line 2406 "../../../src/parse-gram.c"
58d7a1a1
AD
2406 break;
2407
d782395d 2408 case 51:
136a0f76 2409
ccde1f98 2410/* Line 1457 of yacc.c */
f7398526 2411#line 391 "parse-gram.y"
1e0bab92 2412 {
05d18c24 2413 symbol_list *list;
3acc0308 2414 tag_seen = true;
66809587 2415 for (list = (yyvsp[(3) - (3)].list); list; list = list->next)
3be03b13 2416 symbol_type_set (list->content.sym, (yyvsp[(2) - (3)].uniqstr), (yylsp[(2) - (3)]));
66809587 2417 symbol_list_free ((yyvsp[(3) - (3)].list));
1e0bab92 2418 }
ccde1f98
AD
2419
2420/* Line 1457 of yacc.c */
f7398526 2421#line 2422 "../../../src/parse-gram.c"
e9955c83 2422 break;
1921f1d7 2423
d782395d 2424 case 52:
136a0f76 2425
ccde1f98 2426/* Line 1457 of yacc.c */
f7398526 2427#line 402 "parse-gram.y"
1921f1d7 2428 {
05d18c24 2429 symbol_list *list;
1e0bab92 2430 ++current_prec;
66809587 2431 for (list = (yyvsp[(3) - (3)].list); list; list = list->next)
1e0bab92 2432 {
3be03b13
JD
2433 symbol_type_set (list->content.sym, current_type, (yylsp[(2) - (3)]));
2434 symbol_precedence_set (list->content.sym, current_prec, (yyvsp[(1) - (3)].assoc), (yylsp[(1) - (3)]));
1e0bab92 2435 }
66809587 2436 symbol_list_free ((yyvsp[(3) - (3)].list));
2c569025
AD
2437 current_type = NULL;
2438 }
ccde1f98
AD
2439
2440/* Line 1457 of yacc.c */
f7398526 2441#line 2442 "../../../src/parse-gram.c"
e9955c83 2442 break;
1921f1d7 2443
d782395d 2444 case 53:
136a0f76 2445
ccde1f98 2446/* Line 1457 of yacc.c */
f7398526 2447#line 416 "parse-gram.y"
76dcf299 2448 { (yyval.assoc) = left_assoc; }
ccde1f98
AD
2449
2450/* Line 1457 of yacc.c */
f7398526 2451#line 2452 "../../../src/parse-gram.c"
e9955c83 2452 break;
1921f1d7 2453
d782395d 2454 case 54:
136a0f76 2455
ccde1f98 2456/* Line 1457 of yacc.c */
f7398526 2457#line 417 "parse-gram.y"
76dcf299 2458 { (yyval.assoc) = right_assoc; }
ccde1f98
AD
2459
2460/* Line 1457 of yacc.c */
f7398526 2461#line 2462 "../../../src/parse-gram.c"
e9955c83 2462 break;
1921f1d7 2463
d782395d 2464 case 55:
136a0f76 2465
ccde1f98 2466/* Line 1457 of yacc.c */
f7398526 2467#line 418 "parse-gram.y"
76dcf299 2468 { (yyval.assoc) = non_assoc; }
ccde1f98
AD
2469
2470/* Line 1457 of yacc.c */
f7398526 2471#line 2472 "../../../src/parse-gram.c"
4cdb01db 2472 break;
1921f1d7 2473
d782395d 2474 case 56:
136a0f76 2475
ccde1f98 2476/* Line 1457 of yacc.c */
f7398526
AD
2477#line 419 "parse-gram.y"
2478 { (yyval.assoc) = precedence_assoc; }
ccde1f98
AD
2479
2480/* Line 1457 of yacc.c */
f7398526 2481#line 2482 "../../../src/parse-gram.c"
e9955c83 2482 break;
1921f1d7 2483
d782395d 2484 case 57:
136a0f76 2485
ccde1f98 2486/* Line 1457 of yacc.c */
f7398526
AD
2487#line 423 "parse-gram.y"
2488 { current_type = NULL; }
ccde1f98
AD
2489
2490/* Line 1457 of yacc.c */
f7398526 2491#line 2492 "../../../src/parse-gram.c"
e9955c83 2492 break;
1921f1d7 2493
d782395d 2494 case 58:
136a0f76 2495
ccde1f98 2496/* Line 1457 of yacc.c */
f7398526
AD
2497#line 424 "parse-gram.y"
2498 { current_type = (yyvsp[(1) - (1)].uniqstr); tag_seen = true; }
ccde1f98
AD
2499
2500/* Line 1457 of yacc.c */
f7398526 2501#line 2502 "../../../src/parse-gram.c"
3be03b13
JD
2502 break;
2503
d782395d 2504 case 59:
136a0f76 2505
ccde1f98 2506/* Line 1457 of yacc.c */
88511166 2507#line 430 "parse-gram.y"
f7398526 2508 { (yyval.list) = symbol_list_sym_new ((yyvsp[(1) - (1)].symbol), (yylsp[(1) - (1)])); }
ccde1f98
AD
2509
2510/* Line 1457 of yacc.c */
f7398526 2511#line 2512 "../../../src/parse-gram.c"
3be03b13
JD
2512 break;
2513
d782395d 2514 case 60:
136a0f76 2515
ccde1f98 2516/* Line 1457 of yacc.c */
f7398526
AD
2517#line 432 "parse-gram.y"
2518 { (yyval.list) = symbol_list_prepend ((yyvsp[(1) - (2)].list), symbol_list_sym_new ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)]))); }
ccde1f98
AD
2519
2520/* Line 1457 of yacc.c */
f7398526 2521#line 2522 "../../../src/parse-gram.c"
4cdb01db 2522 break;
1921f1d7 2523
d782395d 2524 case 61:
136a0f76 2525
ccde1f98 2526/* Line 1457 of yacc.c */
f7398526
AD
2527#line 436 "parse-gram.y"
2528 { (yyval.symbol) = (yyvsp[(1) - (1)].symbol); }
ccde1f98
AD
2529
2530/* Line 1457 of yacc.c */
f7398526 2531#line 2532 "../../../src/parse-gram.c"
4cdb01db 2532 break;
1921f1d7 2533
d782395d 2534 case 62:
136a0f76 2535
ccde1f98 2536/* Line 1457 of yacc.c */
f7398526
AD
2537#line 437 "parse-gram.y"
2538 { (yyval.symbol) = (yyvsp[(1) - (2)].symbol); symbol_user_token_number_set ((yyvsp[(1) - (2)].symbol), (yyvsp[(2) - (2)].integer), (yylsp[(2) - (2)])); }
ccde1f98
AD
2539
2540/* Line 1457 of yacc.c */
f7398526 2541#line 2542 "../../../src/parse-gram.c"
3be03b13
JD
2542 break;
2543
d782395d 2544 case 63:
136a0f76 2545
ccde1f98 2546/* Line 1457 of yacc.c */
88511166 2547#line 443 "parse-gram.y"
f7398526 2548 { (yyval.list) = symbol_list_sym_new ((yyvsp[(1) - (1)].symbol), (yylsp[(1) - (1)])); }
ccde1f98
AD
2549
2550/* Line 1457 of yacc.c */
f7398526 2551#line 2552 "../../../src/parse-gram.c"
3be03b13
JD
2552 break;
2553
d782395d 2554 case 64:
136a0f76 2555
ccde1f98 2556/* Line 1457 of yacc.c */
f7398526
AD
2557#line 445 "parse-gram.y"
2558 { (yyval.list) = symbol_list_prepend ((yyvsp[(1) - (2)].list), symbol_list_sym_new ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)]))); }
ccde1f98
AD
2559
2560/* Line 1457 of yacc.c */
f7398526 2561#line 2562 "../../../src/parse-gram.c"
3be03b13
JD
2562 break;
2563
d782395d 2564 case 65:
136a0f76 2565
ccde1f98 2566/* Line 1457 of yacc.c */
f7398526
AD
2567#line 449 "parse-gram.y"
2568 { (yyval.list) = (yyvsp[(1) - (1)].list); }
ccde1f98
AD
2569
2570/* Line 1457 of yacc.c */
f7398526 2571#line 2572 "../../../src/parse-gram.c"
12e35840
JD
2572 break;
2573
d782395d 2574 case 66:
12e35840 2575
ccde1f98 2576/* Line 1457 of yacc.c */
f7398526
AD
2577#line 450 "parse-gram.y"
2578 { (yyval.list) = symbol_list_prepend ((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].list)); }
ccde1f98
AD
2579
2580/* Line 1457 of yacc.c */
f7398526 2581#line 2582 "../../../src/parse-gram.c"
ab7f29f8
JD
2582 break;
2583
2584 case 67:
2585
ccde1f98 2586/* Line 1457 of yacc.c */
f7398526
AD
2587#line 454 "parse-gram.y"
2588 { (yyval.list) = symbol_list_sym_new ((yyvsp[(1) - (1)].symbol), (yylsp[(1) - (1)])); }
ccde1f98
AD
2589
2590/* Line 1457 of yacc.c */
f7398526 2591#line 2592 "../../../src/parse-gram.c"
ab7f29f8
JD
2592 break;
2593
2594 case 68:
2595
ccde1f98 2596/* Line 1457 of yacc.c */
f7398526
AD
2597#line 455 "parse-gram.y"
2598 { (yyval.list) = symbol_list_type_new ((yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
ccde1f98
AD
2599
2600/* Line 1457 of yacc.c */
f7398526 2601#line 2602 "../../../src/parse-gram.c"
ab7f29f8
JD
2602 break;
2603
2604 case 69:
2605
ccde1f98 2606/* Line 1457 of yacc.c */
f7398526
AD
2607#line 456 "parse-gram.y"
2608 { (yyval.list) = symbol_list_default_tagged_new ((yylsp[(1) - (1)])); }
ccde1f98
AD
2609
2610/* Line 1457 of yacc.c */
f7398526 2611#line 2612 "../../../src/parse-gram.c"
ab7f29f8
JD
2612 break;
2613
2614 case 70:
2615
ccde1f98 2616/* Line 1457 of yacc.c */
f7398526
AD
2617#line 457 "parse-gram.y"
2618 { (yyval.list) = symbol_list_default_tagless_new ((yylsp[(1) - (1)])); }
2619
2620/* Line 1457 of yacc.c */
2621#line 2622 "../../../src/parse-gram.c"
2622 break;
2623
2624 case 71:
2625
2626/* Line 1457 of yacc.c */
2627#line 463 "parse-gram.y"
1921f1d7 2628 {
66809587 2629 current_type = (yyvsp[(1) - (1)].uniqstr);
1f4cc0f4 2630 tag_seen = true;
4cdb01db 2631 }
ccde1f98
AD
2632
2633/* Line 1457 of yacc.c */
f7398526 2634#line 2635 "../../../src/parse-gram.c"
e9955c83 2635 break;
1921f1d7 2636
f7398526 2637 case 72:
136a0f76 2638
ccde1f98 2639/* Line 1457 of yacc.c */
f7398526 2640#line 468 "parse-gram.y"
1921f1d7 2641 {
f52b276c 2642 symbol_class_set ((yyvsp[(1) - (1)].symbol), current_class, (yylsp[(1) - (1)]), true);
66809587 2643 symbol_type_set ((yyvsp[(1) - (1)].symbol), current_type, (yylsp[(1) - (1)]));
4cdb01db 2644 }
ccde1f98
AD
2645
2646/* Line 1457 of yacc.c */
f7398526 2647#line 2648 "../../../src/parse-gram.c"
e9955c83 2648 break;
1921f1d7 2649
f7398526 2650 case 73:
136a0f76 2651
ccde1f98 2652/* Line 1457 of yacc.c */
f7398526 2653#line 473 "parse-gram.y"
1921f1d7 2654 {
f52b276c 2655 symbol_class_set ((yyvsp[(1) - (2)].symbol), current_class, (yylsp[(1) - (2)]), true);
66809587
PE
2656 symbol_type_set ((yyvsp[(1) - (2)].symbol), current_type, (yylsp[(1) - (2)]));
2657 symbol_user_token_number_set ((yyvsp[(1) - (2)].symbol), (yyvsp[(2) - (2)].integer), (yylsp[(2) - (2)]));
4cdb01db 2658 }
ccde1f98
AD
2659
2660/* Line 1457 of yacc.c */
f7398526 2661#line 2662 "../../../src/parse-gram.c"
e9955c83 2662 break;
1921f1d7 2663
f7398526 2664 case 74:
136a0f76 2665
ccde1f98 2666/* Line 1457 of yacc.c */
f7398526 2667#line 479 "parse-gram.y"
1921f1d7 2668 {
f52b276c 2669 symbol_class_set ((yyvsp[(1) - (2)].symbol), current_class, (yylsp[(1) - (2)]), true);
66809587
PE
2670 symbol_type_set ((yyvsp[(1) - (2)].symbol), current_type, (yylsp[(1) - (2)]));
2671 symbol_make_alias ((yyvsp[(1) - (2)].symbol), (yyvsp[(2) - (2)].symbol), (yyloc));
4cdb01db 2672 }
ccde1f98
AD
2673
2674/* Line 1457 of yacc.c */
f7398526 2675#line 2676 "../../../src/parse-gram.c"
e9955c83 2676 break;
1921f1d7 2677
f7398526 2678 case 75:
136a0f76 2679
ccde1f98 2680/* Line 1457 of yacc.c */
f7398526 2681#line 485 "parse-gram.y"
1921f1d7 2682 {
f52b276c 2683 symbol_class_set ((yyvsp[(1) - (3)].symbol), current_class, (yylsp[(1) - (3)]), true);
66809587
PE
2684 symbol_type_set ((yyvsp[(1) - (3)].symbol), current_type, (yylsp[(1) - (3)]));
2685 symbol_user_token_number_set ((yyvsp[(1) - (3)].symbol), (yyvsp[(2) - (3)].integer), (yylsp[(2) - (3)]));
2686 symbol_make_alias ((yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol), (yyloc));
4cdb01db 2687 }
ccde1f98
AD
2688
2689/* Line 1457 of yacc.c */
f7398526 2690#line 2691 "../../../src/parse-gram.c"
e9955c83 2691 break;
1921f1d7 2692
f7398526 2693 case 82:
136a0f76 2694
ccde1f98 2695/* Line 1457 of yacc.c */
f7398526 2696#line 515 "parse-gram.y"
b275314e
AD
2697 {
2698 yyerrok;
2699 }
ccde1f98
AD
2700
2701/* Line 1457 of yacc.c */
f7398526 2702#line 2703 "../../../src/parse-gram.c"
e9955c83 2703 break;
1921f1d7 2704
f7398526 2705 case 83:
136a0f76 2706
ccde1f98 2707/* Line 1457 of yacc.c */
f7398526 2708#line 521 "parse-gram.y"
66809587 2709 { current_lhs = (yyvsp[(1) - (1)].symbol); current_lhs_location = (yylsp[(1) - (1)]); }
ccde1f98
AD
2710
2711/* Line 1457 of yacc.c */
f7398526 2712#line 2713 "../../../src/parse-gram.c"
e9955c83 2713 break;
1921f1d7 2714
f7398526 2715 case 85:
136a0f76 2716
ccde1f98 2717/* Line 1457 of yacc.c */
f7398526 2718#line 525 "parse-gram.y"
8f3596a6 2719 { grammar_current_rule_end ((yylsp[(1) - (1)])); }
ccde1f98
AD
2720
2721/* Line 1457 of yacc.c */
f7398526 2722#line 2723 "../../../src/parse-gram.c"
4cdb01db 2723 break;
1921f1d7 2724
f7398526 2725 case 86:
136a0f76 2726
ccde1f98 2727/* Line 1457 of yacc.c */
f7398526 2728#line 526 "parse-gram.y"
8f3596a6 2729 { grammar_current_rule_end ((yylsp[(3) - (3)])); }
ccde1f98
AD
2730
2731/* Line 1457 of yacc.c */
f7398526 2732#line 2733 "../../../src/parse-gram.c"
e9955c83 2733 break;
1921f1d7 2734
f7398526 2735 case 88:
136a0f76 2736
ccde1f98 2737/* Line 1457 of yacc.c */
f7398526 2738#line 532 "parse-gram.y"
5e6feb86 2739 { grammar_current_rule_begin (current_lhs, current_lhs_location); }
ccde1f98
AD
2740
2741/* Line 1457 of yacc.c */
f7398526 2742#line 2743 "../../../src/parse-gram.c"
e9071366
AD
2743 break;
2744
f7398526 2745 case 89:
136a0f76 2746
ccde1f98 2747/* Line 1457 of yacc.c */
f7398526 2748#line 534 "parse-gram.y"
5e6feb86 2749 { grammar_current_rule_symbol_append ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)])); }
ccde1f98
AD
2750
2751/* Line 1457 of yacc.c */
f7398526 2752#line 2753 "../../../src/parse-gram.c"
676385e2
PH
2753 break;
2754
f7398526 2755 case 90:
136a0f76 2756
ccde1f98 2757/* Line 1457 of yacc.c */
f7398526 2758#line 536 "parse-gram.y"
5e6feb86 2759 { grammar_current_rule_action_append ((yyvsp[(2) - (2)].code), (yylsp[(2) - (2)])); }
ccde1f98
AD
2760
2761/* Line 1457 of yacc.c */
f7398526 2762#line 2763 "../../../src/parse-gram.c"
676385e2
PH
2763 break;
2764
f7398526 2765 case 91:
136a0f76 2766
ccde1f98 2767/* Line 1457 of yacc.c */
f7398526 2768#line 538 "parse-gram.y"
5e6feb86 2769 { grammar_current_rule_prec_set ((yyvsp[(3) - (3)].symbol), (yylsp[(3) - (3)])); }
ccde1f98
AD
2770
2771/* Line 1457 of yacc.c */
f7398526 2772#line 2773 "../../../src/parse-gram.c"
3fa3725a
PE
2773 break;
2774
f7398526 2775 case 92:
136a0f76 2776
ccde1f98 2777/* Line 1457 of yacc.c */
f7398526 2778#line 540 "parse-gram.y"
5e6feb86 2779 { grammar_current_rule_dprec_set ((yyvsp[(3) - (3)].integer), (yylsp[(3) - (3)])); }
ccde1f98
AD
2780
2781/* Line 1457 of yacc.c */
f7398526 2782#line 2783 "../../../src/parse-gram.c"
5e6feb86
PE
2783 break;
2784
f7398526 2785 case 93:
5e6feb86 2786
ccde1f98 2787/* Line 1457 of yacc.c */
f7398526 2788#line 542 "parse-gram.y"
66809587 2789 { grammar_current_rule_merge_set ((yyvsp[(3) - (3)].uniqstr), (yylsp[(3) - (3)])); }
ccde1f98
AD
2790
2791/* Line 1457 of yacc.c */
f7398526 2792#line 2793 "../../../src/parse-gram.c"
b275314e
AD
2793 break;
2794
f7398526 2795 case 95:
136a0f76 2796
ccde1f98 2797/* Line 1457 of yacc.c */
f7398526 2798#line 552 "parse-gram.y"
16dc6a9e 2799 { (yyval.uniqstr) = uniqstr_new ((yyvsp[(1) - (1)].chars)); }
ccde1f98
AD
2800
2801/* Line 1457 of yacc.c */
f7398526 2802#line 2803 "../../../src/parse-gram.c"
16dc6a9e
JD
2803 break;
2804
f7398526 2805 case 96:
16dc6a9e 2806
ccde1f98 2807/* Line 1457 of yacc.c */
f7398526 2808#line 558 "parse-gram.y"
2ce4ed68 2809 {
592d0b1e 2810 (yyval.chars) = "";
2ce4ed68 2811 }
ccde1f98
AD
2812
2813/* Line 1457 of yacc.c */
f7398526 2814#line 2815 "../../../src/parse-gram.c"
2ce4ed68
AD
2815 break;
2816
f7398526 2817 case 98:
136a0f76 2818
ccde1f98 2819/* Line 1457 of yacc.c */
f7398526 2820#line 571 "parse-gram.y"
2ce4ed68 2821 {
7c0c6181 2822 code_props plain_code;
ff8d8df2 2823 (yyvsp[(1) - (1)].code)[strlen ((yyvsp[(1) - (1)].code)) - 1] = '\n';
7c0c6181
JD
2824 code_props_plain_init (&plain_code, (yyvsp[(1) - (1)].code)+1, (yylsp[(1) - (1)]));
2825 code_props_translate_code (&plain_code);
2826 gram_scanner_last_string_free ();
2827 (yyval.chars) = plain_code.code;
2ce4ed68 2828 }
ccde1f98
AD
2829
2830/* Line 1457 of yacc.c */
f7398526 2831#line 2832 "../../../src/parse-gram.c"
2ce4ed68
AD
2832 break;
2833
f7398526 2834 case 99:
136a0f76 2835
ccde1f98 2836/* Line 1457 of yacc.c */
f7398526 2837#line 591 "parse-gram.y"
203b9274 2838 { (yyval.symbol) = symbol_from_uniqstr ((yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
ccde1f98
AD
2839
2840/* Line 1457 of yacc.c */
f7398526 2841#line 2842 "../../../src/parse-gram.c"
916708d5
AD
2842 break;
2843
f7398526 2844 case 100:
136a0f76 2845
ccde1f98 2846/* Line 1457 of yacc.c */
f7398526 2847#line 593 "parse-gram.y"
d2a1a60a
PE
2848 {
2849 (yyval.symbol) = symbol_get (char_name ((yyvsp[(1) - (1)].character)), (yylsp[(1) - (1)]));
2850 symbol_class_set ((yyval.symbol), token_sym, (yylsp[(1) - (1)]), false);
2851 symbol_user_token_number_set ((yyval.symbol), (yyvsp[(1) - (1)].character), (yylsp[(1) - (1)]));
2852 }
ccde1f98
AD
2853
2854/* Line 1457 of yacc.c */
f7398526 2855#line 2856 "../../../src/parse-gram.c"
66ef8b9d
PE
2856 break;
2857
f7398526 2858 case 101:
136a0f76 2859
ccde1f98 2860/* Line 1457 of yacc.c */
f7398526 2861#line 601 "parse-gram.y"
203b9274 2862 { (yyval.symbol) = symbol_from_uniqstr ((yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
ccde1f98
AD
2863
2864/* Line 1457 of yacc.c */
f7398526 2865#line 2866 "../../../src/parse-gram.c"
58d7a1a1
AD
2866 break;
2867
f7398526 2868 case 104:
136a0f76 2869
ccde1f98 2870/* Line 1457 of yacc.c */
f7398526 2871#line 613 "parse-gram.y"
1921f1d7 2872 {
66809587 2873 (yyval.symbol) = symbol_get (quotearg_style (c_quoting_style, (yyvsp[(1) - (1)].chars)), (yylsp[(1) - (1)]));
db89d400 2874 symbol_class_set ((yyval.symbol), token_sym, (yylsp[(1) - (1)]), false);
4cdb01db 2875 }
ccde1f98
AD
2876
2877/* Line 1457 of yacc.c */
f7398526 2878#line 2879 "../../../src/parse-gram.c"
e9955c83 2879 break;
1921f1d7 2880
f7398526 2881 case 106:
136a0f76 2882
ccde1f98 2883/* Line 1457 of yacc.c */
f7398526 2884#line 622 "parse-gram.y"
1921f1d7 2885 {
7c0c6181
JD
2886 code_props plain_code;
2887 code_props_plain_init (&plain_code, (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)]));
2888 code_props_translate_code (&plain_code);
e9071366 2889 gram_scanner_last_string_free ();
7c0c6181
JD
2890 muscle_code_grow ("epilogue", plain_code.code, (yylsp[(2) - (2)]));
2891 code_scanner_last_string_free ();
4cdb01db 2892 }
ccde1f98
AD
2893
2894/* Line 1457 of yacc.c */
f7398526 2895#line 2896 "../../../src/parse-gram.c"
e9955c83
AD
2896 break;
2897
2898
136a0f76 2899
ccde1f98 2900/* Line 1457 of yacc.c */
f7398526 2901#line 2902 "../../../src/parse-gram.c"
e1054895 2902 default: break;
1921f1d7 2903 }
66809587 2904 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1921f1d7 2905
3b0ffc7e
PE
2906 YYPOPSTACK (yylen);
2907 yylen = 0;
05d18c24 2908 YY_STACK_PRINT (yyss, yyssp);
e9955c83
AD
2909
2910 *++yyvsp = yyval;
e9955c83 2911 *++yylsp = yyloc;
e9955c83
AD
2912
2913 /* Now `shift' the result of the reduction. Determine what state
2914 that goes to, based on the state we popped back to and the rule
2915 number reduced by. */
2916
2917 yyn = yyr1[yyn];
2918
1921f1d7 2919 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
219741d8 2920 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
e9955c83
AD
2921 yystate = yytable[yystate];
2922 else
1921f1d7 2923 yystate = yydefgoto[yyn - YYNTOKENS];
e9955c83
AD
2924
2925 goto yynewstate;
2926
2927
2928/*------------------------------------.
2929| yyerrlab -- here on detecting error |
2930`------------------------------------*/
2931yyerrlab:
2932 /* If not already recovering from an error, report this error. */
2933 if (!yyerrstatus)
2934 {
2935 ++yynerrs;
2abdfeef
PE
2936#if ! YYERROR_VERBOSE
2937 yyerror (YY_("syntax error"));
2938#else
2939 {
2940 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2941 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2942 {
2943 YYSIZE_T yyalloc = 2 * yysize;
2944 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2945 yyalloc = YYSTACK_ALLOC_MAXIMUM;
2946 if (yymsg != yymsgbuf)
2947 YYSTACK_FREE (yymsg);
2948 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2949 if (yymsg)
2950 yymsg_alloc = yyalloc;
2951 else
6d5aa694 2952 {
2abdfeef
PE
2953 yymsg = yymsgbuf;
2954 yymsg_alloc = sizeof yymsgbuf;
6d5aa694 2955 }
2abdfeef 2956 }
ae7453f2 2957
2abdfeef
PE
2958 if (0 < yysize && yysize <= yymsg_alloc)
2959 {
2960 (void) yysyntax_error (yymsg, yystate, yychar);
2961 yyerror (yymsg);
2962 }
2963 else
2964 {
2965 yyerror (YY_("syntax error"));
2966 if (yysize != 0)
6088a2a0 2967 goto yyexhaustedlab;
2abdfeef
PE
2968 }
2969 }
2970#endif
e9955c83 2971 }
e9955c83 2972
8a8dc872 2973 yyerror_range[0] = yylloc;
78a00b7d 2974
e9955c83
AD
2975 if (yyerrstatus == 3)
2976 {
9bc0dd67 2977 /* If just tried and failed to reuse lookahead token after an
e9955c83
AD
2978 error, discard it. */
2979
465b4444 2980 if (yychar <= YYEOF)
bf8b3d98 2981 {
d11e0cfa 2982 /* Return failure if at end of input. */
465b4444 2983 if (yychar == YYEOF)
7768896a 2984 YYABORT;
bf8b3d98 2985 }
465b4444
PE
2986 else
2987 {
4b367315 2988 yydestruct ("Error: discarding",
bf8b3d98 2989 yytoken, &yylval, &yylloc);
465b4444 2990 yychar = YYEMPTY;
465b4444 2991 }
e9955c83
AD
2992 }
2993
9bc0dd67 2994 /* Else will try to reuse lookahead token after shifting the error
e9955c83 2995 token. */
6d5aa694 2996 goto yyerrlab1;
e9955c83 2997
05d18c24 2998
465b4444
PE
2999/*---------------------------------------------------.
3000| yyerrorlab -- error raised explicitly by YYERROR. |
3001`---------------------------------------------------*/
3002yyerrorlab:
3003
e1054895
PE
3004 /* Pacify compilers like GCC when the user code never invokes
3005 YYERROR and the label yyerrorlab therefore never appears in user
3006 code. */
e764d4df 3007 if (/*CONSTCOND*/ 0)
465b4444 3008 goto yyerrorlab;
465b4444 3009
8a8dc872 3010 yyerror_range[0] = yylsp[1-yylen];
3b0ffc7e
PE
3011 /* Do not reclaim the symbols of the rule which action triggered
3012 this YYERROR. */
3013 YYPOPSTACK (yylen);
3014 yylen = 0;
3015 YY_STACK_PRINT (yyss, yyssp);
465b4444 3016 yystate = *yyssp;
465b4444
PE
3017 goto yyerrlab1;
3018
3019
3020/*-------------------------------------------------------------.
3021| yyerrlab1 -- common code for both syntax error and YYERROR. |
3022`-------------------------------------------------------------*/
05d18c24 3023yyerrlab1:
1921f1d7 3024 yyerrstatus = 3; /* Each real token shifted decrements this. */
e9955c83 3025
1921f1d7
AD
3026 for (;;)
3027 {
3028 yyn = yypact[yystate];
04b6e11e 3029 if (yyn != YYPACT_NINF)
1921f1d7
AD
3030 {
3031 yyn += YYTERROR;
3032 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3033 {
3034 yyn = yytable[yyn];
3035 if (0 < yyn)
3036 break;
3037 }
3038 }
4cdb01db 3039
1921f1d7
AD
3040 /* Pop the current state because it cannot handle the error token. */
3041 if (yyssp == yyss)
3042 YYABORT;
0c15323d 3043
8a8dc872 3044 yyerror_range[0] = *yylsp;
4b367315 3045 yydestruct ("Error: popping",
bf8b3d98 3046 yystos[yystate], yyvsp, yylsp);
3b0ffc7e 3047 YYPOPSTACK (1);
465b4444 3048 yystate = *yyssp;
05d18c24 3049 YY_STACK_PRINT (yyss, yyssp);
e9955c83
AD
3050 }
3051
e9955c83 3052 *++yyvsp = yylval;
8a8dc872
AD
3053
3054 yyerror_range[1] = yylloc;
3055 /* Using YYLLOC is tempting, but would change the location of
9bc0dd67 3056 the lookahead. YYLOC is available though. */
bf8b3d98 3057 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
78a00b7d 3058 *++yylsp = yyloc;
e9955c83 3059
3b0ffc7e 3060 /* Shift the error token. */
6088a2a0 3061 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
8a8dc872 3062
e9955c83
AD
3063 yystate = yyn;
3064 goto yynewstate;
3065
3066
3067/*-------------------------------------.
3068| yyacceptlab -- YYACCEPT comes here. |
3069`-------------------------------------*/
3070yyacceptlab:
3071 yyresult = 0;
3072 goto yyreturn;
3073
3074/*-----------------------------------.
3075| yyabortlab -- YYABORT comes here. |
3076`-----------------------------------*/
3077yyabortlab:
3078 yyresult = 1;
3079 goto yyreturn;
3080
f16b0819 3081#if !defined(yyoverflow) || YYERROR_VERBOSE
6088a2a0
PE
3082/*-------------------------------------------------.
3083| yyexhaustedlab -- memory exhaustion comes here. |
3084`-------------------------------------------------*/
3085yyexhaustedlab:
3086 yyerror (YY_("memory exhausted"));
e9955c83
AD
3087 yyresult = 2;
3088 /* Fall through. */
366eea36 3089#endif
e9955c83
AD
3090
3091yyreturn:
ec5479ce 3092 if (yychar != YYEMPTY)
ec5d1a8a 3093 yydestruct ("Cleanup: discarding lookahead",
bd134904 3094 yytoken, &yylval, &yylloc);
3b0ffc7e
PE
3095 /* Do not reclaim the symbols of the rule which action triggered
3096 this YYABORT or YYACCEPT. */
3097 YYPOPSTACK (yylen);
3098 YY_STACK_PRINT (yyss, yyssp);
d11e0cfa
PE
3099 while (yyssp != yyss)
3100 {
ec5d1a8a 3101 yydestruct ("Cleanup: popping",
d11e0cfa 3102 yystos[*yyssp], yyvsp, yylsp);
3b0ffc7e 3103 YYPOPSTACK (1);
d11e0cfa 3104 }
e9955c83
AD
3105#ifndef yyoverflow
3106 if (yyss != yyssa)
3107 YYSTACK_FREE (yyss);
2abdfeef
PE
3108#endif
3109#if YYERROR_VERBOSE
3110 if (yymsg != yymsgbuf)
3111 YYSTACK_FREE (yymsg);
e9955c83 3112#endif
d2a1a60a
PE
3113 /* Make sure YYID is used. */
3114 return YYID (yyresult);
e9955c83 3115}
1921f1d7 3116
366eea36 3117
136a0f76 3118
ccde1f98 3119/* Line 1677 of yacc.c */
f7398526 3120#line 632 "parse-gram.y"
05d18c24
PE
3121
3122
3123
3124/* Return the location of the left-hand side of a rule whose
3125 right-hand side is RHS[1] ... RHS[N]. Ignore empty nonterminals in
3126 the right-hand side, and return an empty location equal to the end
3127 boundary of RHS[0] if the right-hand side is empty. */
3128
3129static YYLTYPE
3130lloc_default (YYLTYPE const *rhs, int n)
3131{
3132 int i;
1d64f0ba 3133 YYLTYPE loc;
329d23c5
PE
3134
3135 /* SGI MIPSpro 7.4.1m miscompiles "loc.start = loc.end = rhs[n].end;".
3136 The bug is fixed in 7.4.2m, but play it safe for now. */
3137 loc.start = rhs[n].end;
3138 loc.end = rhs[n].end;
05d18c24 3139
73521d9f
PE
3140 /* Ignore empty nonterminals the start of the the right-hand side.
3141 Do not bother to ignore them at the end of the right-hand side,
3142 since empty nonterminals have the same end as their predecessors. */
05d18c24
PE
3143 for (i = 1; i <= n; i++)
3144 if (! equal_boundaries (rhs[i].start, rhs[i].end))
3145 {
1d64f0ba 3146 loc.start = rhs[i].start;
05d18c24
PE
3147 break;
3148 }
3149
1d64f0ba 3150 return loc;
05d18c24
PE
3151}
3152
3153
3154/* Add a lex-param or a parse-param (depending on TYPE) with
3155 declaration DECL and location LOC. */
3156
3157static void
73521d9f 3158add_param (char const *type, char *decl, location loc)
05d18c24 3159{
8a8dc872 3160 static char const alphanum[26 + 26 + 1 + 10] =
05d18c24
PE
3161 "abcdefghijklmnopqrstuvwxyz"
3162 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
8a8dc872
AD
3163 "_"
3164 "0123456789";
05d18c24 3165 char const *name_start = NULL;
73521d9f 3166 char *p;
05d18c24 3167
2ed24dd8 3168 /* Stop on last actual character. */
e503aa60 3169 for (p = decl; p[1]; p++)
8a8dc872
AD
3170 if ((p == decl
3171 || ! memchr (alphanum, p[-1], sizeof alphanum))
3172 && memchr (alphanum, p[0], sizeof alphanum - 10))
05d18c24 3173 name_start = p;
2ed24dd8 3174
8a8dc872
AD
3175 /* Strip the surrounding '{' and '}', and any blanks just inside
3176 the braces. */
3177 while (*--p == ' ' || *p == '\t')
3178 continue;
e503aa60 3179 p[1] = '\0';
8a8dc872
AD
3180 while (*++decl == ' ' || *decl == '\t')
3181 continue;
73521d9f 3182
05d18c24
PE
3183 if (! name_start)
3184 complain_at (loc, _("missing identifier in parameter declaration"));
3185 else
3186 {
3187 char *name;
3188 size_t name_len;
3189
3190 for (name_len = 1;
8a8dc872 3191 memchr (alphanum, name_start[name_len], sizeof alphanum);
05d18c24
PE
3192 name_len++)
3193 continue;
3194
3195 name = xmalloc (name_len + 1);
3196 memcpy (name, name_start, name_len);
3197 name[name_len] = '\0';
3198 muscle_pair_list_grow (type, decl, name);
3199 free (name);
3200 }
3201
e9071366 3202 gram_scanner_last_string_free ();
05d18c24 3203}
e9955c83 3204
2ce4ed68 3205
b50d2359
AD
3206static void
3207version_check (location const *loc, char const *version)
3208{
3209 if (strverscmp (version, PACKAGE_VERSION) > 0)
9b8a5ce0
AD
3210 {
3211 complain_at (*loc, "require bison %s, but have %s",
3212 version, PACKAGE_VERSION);
3213 exit (63);
3214 }
b50d2359
AD
3215}
3216
05d18c24
PE
3217static void
3218gram_error (location const *loc, char const *msg)
e9955c83 3219{
05d18c24 3220 complain_at (*loc, "%s", msg);
e9955c83 3221}
1921f1d7 3222
73521d9f
PE
3223char const *
3224token_name (int type)
3225{
e0045d49 3226 return yytname[YYTRANSLATE (type)];
73521d9f
PE
3227}
3228
d2a1a60a
PE
3229static char const *
3230char_name (char c)
3231{
3232 if (c == '\'')
3233 return "'\\''";
3234 else
3235 {
3236 char buf[4];
3237 buf[0] = '\''; buf[1] = c; buf[2] = '\''; buf[3] = '\0';
3238 return quotearg_style (escape_quoting_style, buf);
3239 }
3240}