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