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