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