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