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