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