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