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