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