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