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