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