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