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