1 /* A Bison parser, made from parse-gram.y
4 /* Skeleton output parser for Bison,
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
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.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* As a special exception, when this file is copied by Bison into a
24 Bison output file, you may use that output file without restriction.
25 This special exception was added by the Free Software Foundation
26 in version 1.24 of Bison. */
28 /* This is the parser code that is written into each bison parser when
29 the %semantic_parser declaration is not specified in the grammar.
30 It was written by Richard Stallman by simplifying the original so
31 called ``semantic'' parser. */
33 /* All symbols defined below should begin with yy or YY, to avoid
34 infringing on user name space. This should be done even for local
35 variables, as they might otherwise be expanded by user macros.
36 There are some unavoidable exceptions within include files to
37 define necessary library symbols; they are noted "INFRINGES ON
38 USER NAME SPACE" below. */
40 /* Identify Bison output. */
46 /* Using locations. */
47 #define YYLSP_NEEDED 1
49 /* If NAME_PREFIX is specified substitute the variables and functions
51 #define yyparse gram_parse
52 #define yylex gram_lex
53 #define yyerror gram_error
54 #define yylval gram_lval
55 #define yychar gram_char
56 #define yydebug gram_debug
57 #define yynerrs gram_nerrs
59 # define yylloc gram_lloc
63 /* Copy the first part of user declarations. */
64 #line 31 "parse-gram.y"
67 #include "muscle_tab.h"
74 #include "conflicts.h"
76 /* Produce verbose parse errors. */
77 #define YYERROR_VERBOSE 1
78 #define YYLLOC_DEFAULT(Current, Rhs, N) \
82 Current.first_column = Rhs[1].first_column; \
83 Current.first_line = Rhs[1].first_line; \
84 Current.last_column = Rhs[N].last_column; \
85 Current.last_line = Rhs[N].last_line; \
93 /* Pass the control structure to YYPARSE and YYLEX. */
94 #define YYPARSE_PARAM gram_control
95 #define YYLEX_PARAM gram_control
96 /* YYPARSE receives GRAM_CONTROL as a void *. Provide a
97 correctly typed access to it. */
98 #define yycontrol ((gram_control_t *) gram_control)
100 /* Request detailed parse error messages, and pass them to
103 #define yyerror(Msg) \
104 gram_error (yycontrol, &yylloc, Msg)
106 /* When debugging our pure parser, we want to see values and locations
108 #define YYPRINT(File, Type, Value) \
109 yyprint (File, &yylloc, Type, &Value)
110 static void yyprint (FILE *file
, const location_t
*loc
,
111 int type
, const yystype
*value
);
113 symbol_class current_class
= unknown_sym
;
114 char *current_type
= 0;
115 symbol_t
*current_lhs
;
116 location_t current_lhs_location
;
117 associativity current_assoc
;
118 int current_prec
= 0;
119 braced_code_t current_braced_code
= action_braced_code
;
124 # if defined (__STDC__) || defined (__cplusplus)
125 /* Put the tokens into the symbol table, so that GDB and other debuggers
135 PERCENT_DESTRUCTOR
= 264,
139 PERCENT_NONASSOC
= 268,
140 PERCENT_EXPECT
= 269,
143 PERCENT_VERBOSE
= 272,
144 PERCENT_ERROR_VERBOSE
= 273,
145 PERCENT_OUTPUT
= 274,
146 PERCENT_FILE_PREFIX
= 275,
147 PERCENT_NAME_PREFIX
= 276,
148 PERCENT_DEFINE
= 277,
149 PERCENT_PURE_PARSER
= 278,
150 PERCENT_DEFINES
= 279,
153 PERCENT_LOCATIONS
= 282,
154 PERCENT_NO_LINES
= 283,
155 PERCENT_SKELETON
= 284,
156 PERCENT_TOKEN_TABLE
= 285,
163 PERCENT_PERCENT
= 292,
169 /* POSIX requires `int' for tokens in interfaces. */
170 # define YYTOKENTYPE int
171 #endif /* !YYTOKENTYPE */
174 #define CHARACTER 259
176 #define PERCENT_TOKEN 261
177 #define PERCENT_NTERM 262
178 #define PERCENT_TYPE 263
179 #define PERCENT_DESTRUCTOR 264
180 #define PERCENT_UNION 265
181 #define PERCENT_LEFT 266
182 #define PERCENT_RIGHT 267
183 #define PERCENT_NONASSOC 268
184 #define PERCENT_EXPECT 269
185 #define PERCENT_START 270
186 #define PERCENT_PREC 271
187 #define PERCENT_VERBOSE 272
188 #define PERCENT_ERROR_VERBOSE 273
189 #define PERCENT_OUTPUT 274
190 #define PERCENT_FILE_PREFIX 275
191 #define PERCENT_NAME_PREFIX 276
192 #define PERCENT_DEFINE 277
193 #define PERCENT_PURE_PARSER 278
194 #define PERCENT_DEFINES 279
195 #define PERCENT_YACC 280
196 #define PERCENT_DEBUG 281
197 #define PERCENT_LOCATIONS 282
198 #define PERCENT_NO_LINES 283
199 #define PERCENT_SKELETON 284
200 #define PERCENT_TOKEN_TABLE 285
203 #define SEMICOLON 288
207 #define PERCENT_PERCENT 292
210 #define BRACED_CODE 295
215 /* Enabling traces. */
220 /* Enabling verbose error messages. */
221 #ifdef YYERROR_VERBOSE
222 # undef YYERROR_VERBOSE
223 # define YYERROR_VERBOSE 1
225 # define YYERROR_VERBOSE 0
229 #line 91 "parse-gram.y"
237 /* Line 199 of /usr/local/share/bison/bison.simple. */
238 #line 239 "parse-gram.c"
239 # define YYSTYPE yystype
240 # define YYSTYPE_IS_TRIVIAL 1
244 typedef struct yyltype
251 # define YYLTYPE yyltype
252 # define YYLTYPE_IS_TRIVIAL 1
255 /* Copy the second part of user declarations. */
258 /* Line 219 of /usr/local/share/bison/bison.simple. */
259 #line 260 "parse-gram.c"
261 #if ! defined (yyoverflow) || YYERROR_VERBOSE
263 /* The parser invokes alloca or malloc; define the necessary symbols. */
265 # if YYSTACK_USE_ALLOCA
266 # define YYSTACK_ALLOC alloca
268 # ifndef YYSTACK_USE_ALLOCA
269 # if defined (alloca) || defined (_ALLOCA_H)
270 # define YYSTACK_ALLOC alloca
273 # define YYSTACK_ALLOC __builtin_alloca
279 # ifdef YYSTACK_ALLOC
280 /* Pacify GCC's `empty if-body' warning. */
281 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
283 # if defined (__STDC__) || defined (__cplusplus)
284 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
285 # define YYSIZE_T size_t
287 # define YYSTACK_ALLOC malloc
288 # define YYSTACK_FREE free
290 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
293 #if (! defined (yyoverflow) \
294 && (! defined (__cplusplus) \
295 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
297 /* A type that is properly aligned for any stack member. */
307 /* The size of the maximum gap between one aligned stack and the next. */
308 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
310 /* The size of an array large to enough to hold all stacks, each with
313 # define YYSTACK_BYTES(N) \
314 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
315 + 2 * YYSTACK_GAP_MAX)
317 # define YYSTACK_BYTES(N) \
318 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
322 /* Copy COUNT objects from FROM to TO. The source and destination do
326 # define YYCOPY(To, From, Count) \
327 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
329 # define YYCOPY(To, From, Count) \
332 register YYSIZE_T yyi; \
333 for (yyi = 0; yyi < (Count); yyi++) \
334 (To)[yyi] = (From)[yyi]; \
340 /* Relocate STACK from its old location to the new one. The
341 local variables YYSIZE and YYSTACKSIZE give the old and new number of
342 elements in the stack, and YYPTR gives the new location of the
343 stack. Advance YYPTR to a properly aligned location for the next
345 # define YYSTACK_RELOCATE(Stack) \
348 YYSIZE_T yynewbytes; \
349 YYCOPY (&yyptr->Stack, Stack, yysize); \
350 Stack = &yyptr->Stack; \
351 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
352 yyptr += yynewbytes / sizeof (*yyptr); \
358 /* YYFINAL -- State number of the termination state. */
360 #define YYFLAG -32768
363 /* YYNTOKENS -- Number of terminals. */
365 /* YYNNTS -- Number of nonterminals. */
367 /* YYNRULES -- Number of rules. */
369 /* YYNRULES -- Number of states. */
372 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
374 #define YYMAXUTOK 295
376 #define YYTRANSLATE(X) \
377 ((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK)
379 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
380 static const unsigned char yytranslate
[] =
382 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
383 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
384 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
385 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
386 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
387 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
388 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
389 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
390 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
391 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
392 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
393 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
394 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
395 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
396 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
397 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
398 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
399 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
400 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
401 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
402 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
403 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
404 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
405 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
406 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
407 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
408 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
409 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
410 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
411 35, 36, 37, 38, 39, 40
415 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
417 static const unsigned char yyprhs
[] =
419 0, 0, 3, 8, 9, 13, 15, 17, 19, 23,
420 25, 27, 30, 34, 36, 40, 42, 46, 48, 51,
421 53, 55, 57, 59, 61, 64, 67, 68, 73, 74,
422 78, 79, 83, 87, 91, 93, 95, 97, 98, 100,
423 102, 105, 107, 109, 112, 115, 119, 121, 124, 126,
424 129, 131, 134, 135, 141, 143, 147, 148, 151, 154,
425 158, 160, 162, 164, 166, 168, 170, 171, 174, 175
428 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
429 static const signed char yyrhs
[] =
431 42, 0, -1, 43, 37, 56, 66, -1, -1, 43,
432 44, 67, -1, 45, -1, 38, -1, 26, -1, 22,
433 65, 65, -1, 24, -1, 18, -1, 14, 5, -1,
434 20, 32, 65, -1, 27, -1, 21, 32, 65, -1,
435 28, -1, 19, 32, 65, -1, 23, -1, 29, 65,
436 -1, 30, -1, 17, -1, 25, -1, 50, -1, 47,
437 -1, 15, 62, -1, 10, 40, -1, -1, 9, 46,
438 40, 53, -1, -1, 7, 48, 55, -1, -1, 6,
439 49, 55, -1, 8, 31, 53, -1, 51, 52, 53,
440 -1, 11, -1, 12, -1, 13, -1, -1, 31, -1,
441 62, -1, 53, 62, -1, 31, -1, 36, -1, 36,
442 5, -1, 36, 64, -1, 36, 5, 64, -1, 54,
443 -1, 55, 54, -1, 57, -1, 56, 57, -1, 58,
444 -1, 45, 33, -1, -1, 36, 34, 59, 60, 33,
445 -1, 61, -1, 60, 35, 61, -1, -1, 61, 62,
446 -1, 61, 63, -1, 61, 16, 62, -1, 36, -1,
447 64, -1, 4, -1, 40, -1, 3, -1, 3, -1,
448 -1, 37, 39, -1, -1, 33, -1
451 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
452 static const unsigned short yyrline
[] =
454 0, 154, 154, 167, 169, 172, 174, 175, 176, 177,
455 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
456 188, 189, 192, 194, 195, 199, 205, 205, 217, 217,
457 223, 223, 228, 237, 252, 254, 255, 258, 260, 265,
458 267, 271, 276, 281, 287, 293, 303, 306, 315, 317,
459 323, 325, 328, 328, 333, 335, 338, 341, 343, 345,
460 349, 351, 352, 355, 361, 370, 378, 383, 389, 391
464 #if YYDEBUG || YYERROR_VERBOSE
465 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
466 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
467 static const char *const yytname
[] =
469 "\"end of string\"", "error", "$undefined.", "STRING", "CHARACTER", "INT",
470 "\"%token\"", "\"%nterm\"", "\"%type\"", "\"%destructor\"",
471 "\"%union\"", "\"%left\"", "\"%right\"", "\"%nonassoc\"", "\"%expect\"",
472 "\"%start\"", "\"%prec\"", "\"%verbose\"", "\"%error-verbose\"",
473 "\"%output\"", "\"%file-prefix\"", "\"%name-prefix\"", "\"%define\"",
474 "\"%pure-parser\"", "\"%defines\"", "\"%yacc\"", "\"%debug\"",
475 "\"%locations\"", "\"%no-lines\"", "\"%skeleton\"", "\"%token-table\"",
476 "TYPE", "\"=\"", "\";\"", "\":\"", "\"|\"", "\"identifier\"", "\"%%\"",
477 "PROLOGUE", "EPILOGUE", "BRACED_CODE", "$axiom", "input",
478 "declarations", "declaration", "grammar_declaration", "@1",
479 "symbol_declaration", "@2", "@3", "precedence_declaration",
480 "precedence_declarator", "type.opt", "symbols.1", "symbol_def",
481 "symbol_defs.1", "grammar", "rules_or_grammar_declaration", "rules",
482 "@4", "rhses.1", "rhs", "symbol", "action", "string_as_id",
483 "string_content", "epilogue.opt", "semi_colon.opt", 0
487 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
489 static const short yytoknum
[] =
491 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
492 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
493 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
494 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
498 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
499 static const unsigned char yyr1
[] =
501 0, 41, 42, 43, 43, 44, 44, 44, 44, 44,
502 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
503 44, 44, 45, 45, 45, 45, 46, 45, 48, 47,
504 49, 47, 47, 50, 51, 51, 51, 52, 52, 53,
505 53, 54, 54, 54, 54, 54, 55, 55, 56, 56,
506 57, 57, 59, 58, 60, 60, 61, 61, 61, 61,
507 62, 62, 62, 63, 64, 65, 66, 66, 67, 67
510 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
511 static const unsigned char yyr2
[] =
513 0, 2, 4, 0, 3, 1, 1, 1, 3, 1,
514 1, 2, 3, 1, 3, 1, 3, 1, 2, 1,
515 1, 1, 1, 1, 2, 2, 0, 4, 0, 3,
516 0, 3, 3, 3, 1, 1, 1, 0, 1, 1,
517 2, 1, 1, 2, 2, 3, 1, 2, 1, 2,
518 1, 2, 0, 5, 1, 3, 0, 2, 2, 3,
519 1, 1, 1, 1, 1, 1, 0, 2, 0, 1
522 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
523 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
524 means the default is an error. */
525 static const short yydefact
[] =
527 3, 0, 0, 0, 30, 28, 0, 26, 0, 34,
528 35, 36, 0, 0, 20, 10, 0, 0, 0, 0,
529 17, 9, 21, 7, 13, 15, 0, 19, 0, 6,
530 68, 5, 23, 22, 37, 0, 0, 0, 0, 25,
531 11, 64, 62, 60, 24, 61, 0, 0, 0, 65,
532 0, 18, 0, 0, 66, 48, 50, 69, 4, 38,
533 0, 41, 42, 46, 31, 29, 32, 39, 0, 16,
534 12, 14, 8, 52, 51, 0, 49, 2, 33, 43,
535 44, 47, 40, 27, 56, 67, 45, 0, 54, 53,
536 56, 0, 63, 57, 58, 55, 59
539 /* YYPGOTO[NTERM-NUM]. */
540 static const short yydefgoto
[] =
542 -1, 1, 2, 30, 53, 38, 32, 36, 35, 33,
543 34, 60, 66, 63, 64, 54, 55, 56, 84, 87,
544 88, 67, 94, 45, 50, 77, 58
547 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
549 static const short yypact
[] =
551 -32768, 25, 77,-32768,-32768,-32768, -20,-32768, -31,-32768,
552 -32768,-32768, 35, 0,-32768,-32768, 12, 15, 16, 46,
553 -32768,-32768,-32768,-32768,-32768,-32768, 46,-32768, 20,-32768,
554 17,-32768,-32768,-32768, 21, -24, -24, 0, 14,-32768,
555 -32768,-32768,-32768,-32768,-32768,-32768, 46, 46, 46,-32768,
556 46,-32768, 26, 18, 9,-32768,-32768,-32768,-32768,-32768,
557 0,-32768, 5,-32768, -24, -24, 0,-32768, 0,-32768,
558 -32768,-32768,-32768,-32768,-32768, 23,-32768,-32768, 0, 52,
559 -32768,-32768,-32768, 0,-32768,-32768,-32768, 6, -2,-32768,
560 -32768, 0,-32768,-32768,-32768, -2,-32768
563 /* YYPGOTO[NTERM-NUM]. */
564 static const short yypgoto
[] =
566 -32768,-32768,-32768,-32768, 61,-32768,-32768,-32768,-32768,-32768,
567 -32768,-32768, -55, -22, 28,-32768, 13,-32768,-32768,-32768,
568 -21, -13,-32768, -56, 11,-32768,-32768
571 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
572 positive, shift that token. If negative, reduce the rule which
573 number is the opposite. If zero, do what YYDEFACT says. */
574 static const short yytable
[] =
576 44, 41, 42, 41, 42, 78, 80, 61, 41, 39,
577 79, 37, 62, 83, 91, 4, 5, 6, 7, 8,
578 9, 10, 11, 86, 13, 3, 4, 5, 6, 7,
579 8, 9, 10, 11, 43, 13, 43, 51, 92, 89,
580 40, 90, 81, 81, 46, 52, 75, 47, 48, 49,
581 57, 74, 59, 82, 68, 41, 52, 69, 70, 71,
582 73, 72, 85, 31, 65, 82, 0, 76, 0, 95,
583 82, 0, 0, 0, 0, 93, 0, 0, 96, 0,
584 0, 0, 93, 4, 5, 6, 7, 8, 9, 10,
585 11, 12, 13, 0, 14, 15, 16, 17, 18, 19,
586 20, 21, 22, 23, 24, 25, 26, 27, 0, 0,
590 static const short yycheck
[] =
592 13, 3, 4, 3, 4, 60, 62, 31, 3, 40,
593 5, 31, 36, 68, 16, 6, 7, 8, 9, 10,
594 11, 12, 13, 79, 15, 0, 6, 7, 8, 9,
595 10, 11, 12, 13, 36, 15, 36, 26, 40, 33,
596 5, 35, 64, 65, 32, 36, 37, 32, 32, 3,
597 33, 33, 31, 66, 40, 3, 36, 46, 47, 48,
598 34, 50, 39, 2, 36, 78, -1, 54, -1, 90,
599 83, -1, -1, -1, -1, 88, -1, -1, 91, -1,
600 -1, -1, 95, 6, 7, 8, 9, 10, 11, 12,
601 13, 14, 15, -1, 17, 18, 19, 20, 21, 22,
602 23, 24, 25, 26, 27, 28, 29, 30, -1, -1,
603 -1, -1, -1, -1, 37, 38
607 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
608 symbol of state STATE-NUM. */
609 static const unsigned char yystos
[] =
611 0, 42, 43, 0, 6, 7, 8, 9, 10, 11,
612 12, 13, 14, 15, 17, 18, 19, 20, 21, 22,
613 23, 24, 25, 26, 27, 28, 29, 30, 37, 38,
614 44, 45, 47, 50, 51, 49, 48, 31, 46, 40,
615 5, 3, 4, 36, 62, 64, 32, 32, 32, 3,
616 65, 65, 36, 45, 56, 57, 58, 33, 67, 31,
617 52, 31, 36, 54, 55, 55, 53, 62, 40, 65,
618 65, 65, 65, 34, 33, 37, 57, 66, 53, 5,
619 64, 54, 62, 53, 59, 39, 64, 60, 61, 33,
620 35, 16, 40, 62, 63, 61, 62
624 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
625 # define YYSIZE_T __SIZE_TYPE__
627 #if ! defined (YYSIZE_T) && defined (size_t)
628 # define YYSIZE_T size_t
630 #if ! defined (YYSIZE_T)
631 # if defined (__STDC__) || defined (__cplusplus)
632 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
633 # define YYSIZE_T size_t
636 #if ! defined (YYSIZE_T)
637 # define YYSIZE_T unsigned int
640 #define yyerrok (yyerrstatus = 0)
641 #define yyclearin (yychar = YYEMPTY)
645 #define YYACCEPT goto yyacceptlab
646 #define YYABORT goto yyabortlab
647 #define YYERROR goto yyerrlab1
649 /* Like YYERROR except do call yyerror. This remains here temporarily
650 to ease the transition to the new meaning of YYERROR, for GCC.
651 Once GCC version 2 has supplanted version 1, this can go. */
653 #define YYFAIL goto yyerrlab
655 #define YYRECOVERING() (!!yyerrstatus)
657 #define YYBACKUP(Token, Value) \
659 if (yychar == YYEMPTY && yylen == 1) \
663 yychar1 = YYTRANSLATE (yychar); \
669 yyerror ("syntax error: cannot back up"); \
675 #define YYERRCODE 256
677 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
680 #ifndef YYLLOC_DEFAULT
681 # define YYLLOC_DEFAULT(Current, Rhs, N) \
682 Current.first_line = Rhs[1].first_line; \
683 Current.first_column = Rhs[1].first_column; \
684 Current.last_line = Rhs[N].last_line; \
685 Current.last_column = Rhs[N].last_column;
688 /* YYLEX -- calling `yylex' with the right arguments. */
693 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
695 # define YYLEX yylex (&yylval, &yylloc)
697 # else /* !YYLSP_NEEDED */
699 # define YYLEX yylex (&yylval, YYLEX_PARAM)
701 # define YYLEX yylex (&yylval)
703 # endif /* !YYLSP_NEEDED */
705 # define YYLEX yylex ()
708 /* Enable debugging if requested. */
712 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
713 # define YYFPRINTF fprintf
716 # define YYDPRINTF(Args) \
721 /* Nonzero means print parse trace. It is left uninitialized so that
722 multiple parsers can coexist. */
725 # define YYDPRINTF(Args)
726 #endif /* !YYDEBUG */
728 /* YYINITDEPTH -- initial size of the parser's stacks. */
730 # define YYINITDEPTH 200
733 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
734 if the built-in stack extension method is used).
736 Do not make this value too large; the results are undefined if
737 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
738 evaluated with infinite-precision integer arithmetic. */
745 # define YYMAXDEPTH 10000
753 # if defined (__GLIBC__) && defined (_STRING_H)
754 # define yystrlen strlen
756 /* Return the length of YYSTR. */
758 # if defined (__STDC__) || defined (__cplusplus)
759 yystrlen (const char *yystr
)
765 register const char *yys
= yystr
;
767 while (*yys
++ != '\0')
770 return yys
- yystr
- 1;
776 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
777 # define yystpcpy stpcpy
779 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
782 # if defined (__STDC__) || defined (__cplusplus)
783 yystpcpy (char *yydest
, const char *yysrc
)
785 yystpcpy (yydest
, yysrc
)
790 register char *yyd
= yydest
;
791 register const char *yys
= yysrc
;
793 while ((*yyd
++ = *yys
++) != '\0')
801 #endif /* !YYERROR_VERBOSE */
805 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
806 into yyparse. The argument should have type void *.
807 It should actually point to an object.
808 Grammar actions can access the variable by casting it
809 to the proper pointer type. */
812 # if defined (__STDC__) || defined (__cplusplus)
813 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
814 # define YYPARSE_PARAM_DECL
816 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
817 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
819 #else /* !YYPARSE_PARAM */
820 # define YYPARSE_PARAM_ARG
821 # define YYPARSE_PARAM_DECL
822 #endif /* !YYPARSE_PARAM */
824 /* Prevent warning if -Wstrict-prototypes. */
826 # ifdef YYPARSE_PARAM
827 int yyparse (void *);
833 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
834 variables are global, or local to YYPARSE. */
836 #define YY_DECL_NON_LSP_VARIABLES \
837 /* The lookahead symbol. */ \
840 /* The semantic value of the lookahead symbol. */ \
843 /* Number of parse errors so far. */ \
847 # define YY_DECL_VARIABLES \
848 YY_DECL_NON_LSP_VARIABLES \
850 /* Location data for the lookahead symbol. */ \
853 # define YY_DECL_VARIABLES \
854 YY_DECL_NON_LSP_VARIABLES
857 /* If nonreentrant, generate the variables here. */
864 yyparse (YYPARSE_PARAM_ARG
)
867 /* If reentrant, generate the variables here. */
872 register int yystate
;
875 /* Number of tokens to shift before error messages enabled. */
877 /* Lookahead token as an internal (translated) token number. */
880 /* Three stacks and their tools:
881 `yyss': related to states,
882 `yyvs': related to semantic values,
883 `yyls': related to locations.
885 Refer to the stacks thru separate pointers, to allow yyoverflow
886 to reallocate them elsewhere. */
888 /* The state stack. */
889 short yyssa
[YYINITDEPTH
];
891 register short *yyssp
;
893 /* The semantic value stack. */
894 YYSTYPE yyvsa
[YYINITDEPTH
];
895 YYSTYPE
*yyvs
= yyvsa
;
896 register YYSTYPE
*yyvsp
;
899 /* The location stack. */
900 YYLTYPE yylsa
[YYINITDEPTH
];
901 YYLTYPE
*yyls
= yylsa
;
906 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
908 # define YYPOPSTACK (yyvsp--, yyssp--)
911 YYSIZE_T yystacksize
= YYINITDEPTH
;
913 /* The variables used to return semantic value and location from the
920 /* When reducing, the number of symbols on the RHS of the reduced
924 YYDPRINTF ((stderr
, "Starting parse\n"));
929 yychar
= YYEMPTY
; /* Cause a token to be read. */
931 /* Initialize stack pointers.
932 Waste one element of value and location stack
933 so that they stay on the same level as the state stack.
934 The wasted elements are never initialized. */
943 /*------------------------------------------------------------.
944 | yynewstate -- Push a new state, which is found in yystate. |
945 `------------------------------------------------------------*/
947 /* In all cases, when you get here, the value and location stacks
948 have just been pushed. so pushing a state here evens the stacks.
955 if (yyssp
>= yyss
+ yystacksize
- 1)
957 /* Get the current used size of the three stacks, in elements. */
958 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
962 /* Give user a chance to reallocate the stack. Use copies of
963 these so that the &'s don't force the real ones into
965 YYSTYPE
*yyvs1
= yyvs
;
968 /* Each stack pointer address is followed by the size of the
969 data in use in that stack, in bytes. */
971 YYLTYPE
*yyls1
= yyls
;
972 /* This used to be a conditional around just the two extra args,
973 but that might be undefined if yyoverflow is a macro. */
974 yyoverflow ("parser stack overflow",
975 &yyss1
, yysize
* sizeof (*yyssp
),
976 &yyvs1
, yysize
* sizeof (*yyvsp
),
977 &yyls1
, yysize
* sizeof (*yylsp
),
981 yyoverflow ("parser stack overflow",
982 &yyss1
, yysize
* sizeof (*yyssp
),
983 &yyvs1
, yysize
* sizeof (*yyvsp
),
989 #else /* no yyoverflow */
990 # ifndef YYSTACK_RELOCATE
993 /* Extend the stack our own way. */
994 if (yystacksize
>= YYMAXDEPTH
)
997 if (yystacksize
> YYMAXDEPTH
)
998 yystacksize
= YYMAXDEPTH
;
1001 short *yyss1
= yyss
;
1002 union yyalloc
*yyptr
=
1003 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1006 YYSTACK_RELOCATE (yyss
);
1007 YYSTACK_RELOCATE (yyvs
);
1009 YYSTACK_RELOCATE (yyls
);
1011 # undef YYSTACK_RELOCATE
1013 YYSTACK_FREE (yyss1
);
1016 #endif /* no yyoverflow */
1018 yyssp
= yyss
+ yysize
- 1;
1019 yyvsp
= yyvs
+ yysize
- 1;
1021 yylsp
= yyls
+ yysize
- 1;
1024 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1025 (unsigned long int) yystacksize
));
1027 if (yyssp
>= yyss
+ yystacksize
- 1)
1031 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1040 /* Do appropriate processing given the current state. */
1041 /* Read a lookahead token if we need one and don't already have one. */
1044 /* First try to decide what to do without reference to lookahead token. */
1046 yyn
= yypact
[yystate
];
1050 /* Not known => get a lookahead token if don't already have one. */
1052 /* yychar is either YYEMPTY or YYEOF
1053 or a valid token in external form. */
1055 if (yychar
== YYEMPTY
)
1057 YYDPRINTF ((stderr
, "Reading a token: "));
1061 /* Convert token to internal form (in yychar1) for indexing tables with. */
1063 if (yychar
<= 0) /* This means end of input. */
1066 yychar
= YYEOF
; /* Don't call YYLEX any more. */
1068 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1072 yychar1
= YYTRANSLATE (yychar
);
1075 /* We have to keep this `#if YYDEBUG', since we use variables
1076 which are defined only if `YYDEBUG' is set. */
1079 YYFPRINTF (stderr
, "Next token is %d (%s",
1080 yychar
, yytname
[yychar1
]);
1081 /* Give the individual parser a way to print the precise
1082 meaning of a token, for further debugging info. */
1084 YYPRINT (stderr
, yychar
, yylval
);
1086 YYFPRINTF (stderr
, ")\n");
1092 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != yychar1
)
1097 /* yyn is what to do for this token type in this state.
1098 Negative => reduce, -yyn is rule number.
1099 Positive => shift, yyn is new state.
1100 New state is final state => don't bother to shift,
1101 just return success.
1102 0, or most negative number => error. */
1117 /* Shift the lookahead token. */
1118 YYDPRINTF ((stderr
, "Shifting token %d (%s), ",
1119 yychar
, yytname
[yychar1
]));
1121 /* Discard the token being shifted unless it is eof. */
1122 if (yychar
!= YYEOF
)
1130 /* Count tokens shifted since error; after three, turn off error
1139 /*-----------------------------------------------------------.
1140 | yydefault -- do the default action for the current state. |
1141 `-----------------------------------------------------------*/
1143 yyn
= yydefact
[yystate
];
1149 /*-----------------------------.
1150 | yyreduce -- Do a reduction. |
1151 `-----------------------------*/
1153 /* yyn is the number of a rule to reduce with. */
1156 /* If YYLEN is nonzero, implement the default value of the action:
1159 Otherwise, the following line sets YYVAL to the semantic value of
1160 the lookahead token. This behavior is undocumented and Bison
1161 users should not rely upon it. Assigning to YYVAL
1162 unconditionally makes the parser a bit smaller, and it avoids a
1163 GCC warning that YYVAL may be used uninitialized. */
1164 yyval
= yyvsp
[1-yylen
];
1167 /* Default location. */
1168 YYLLOC_DEFAULT (yyloc
, (yylsp
- yylen
), yylen
);
1172 /* We have to keep this `#if YYDEBUG', since we use variables which
1173 are defined only if `YYDEBUG' is set. */
1178 YYFPRINTF (stderr
, "Reducing via rule %d (line %d), ",
1179 yyn
- 1, yyrline
[yyn
]);
1181 /* Print the symbols being reduced, and their result. */
1182 for (yyi
= yyprhs
[yyn
]; yyrhs
[yyi
] >= 0; yyi
++)
1183 YYFPRINTF (stderr
, "%s ", yytname
[yyrhs
[yyi
]]);
1184 YYFPRINTF (stderr
, " -> %s\n", yytname
[yyr1
[yyn
]]);
1190 #line 156 "parse-gram.y"
1192 yycontrol
->errcode
= 0;
1193 epilogue_set (yyvsp
[0].string
, yylsp
[0]);
1198 #line 174 "parse-gram.y"
1199 { prologue_augment (yyvsp
[0].string
, yylsp
[0]); }
1203 #line 175 "parse-gram.y"
1208 #line 176 "parse-gram.y"
1209 { muscle_insert (yyvsp
[-1].string
, yyvsp
[0].string
); }
1213 #line 177 "parse-gram.y"
1214 { defines_flag
= 1; }
1218 #line 178 "parse-gram.y"
1219 { error_verbose
= 1; }
1223 #line 179 "parse-gram.y"
1224 { expected_conflicts
= yyvsp
[0].integer
; }
1228 #line 180 "parse-gram.y"
1229 { spec_file_prefix
= yyvsp
[0].string
; }
1233 #line 181 "parse-gram.y"
1234 { locations_flag
= 1; }
1238 #line 182 "parse-gram.y"
1239 { spec_name_prefix
= yyvsp
[0].string
; }
1243 #line 183 "parse-gram.y"
1244 { no_lines_flag
= 1; }
1248 #line 184 "parse-gram.y"
1249 { spec_outfile
= yyvsp
[0].string
; }
1253 #line 185 "parse-gram.y"
1254 { pure_parser
= 1; }
1258 #line 186 "parse-gram.y"
1259 { skeleton
= yyvsp
[0].string
; }
1263 #line 187 "parse-gram.y"
1264 { token_table_flag
= 1; }
1268 #line 188 "parse-gram.y"
1269 { report_flag
= 1; }
1273 #line 189 "parse-gram.y"
1278 #line 196 "parse-gram.y"
1280 grammar_start_symbol_set (yyvsp
[0].symbol
, yylsp
[0]);
1285 #line 200 "parse-gram.y"
1288 MUSCLE_INSERT_INT ("stype_line", yylsp
[0].first_line
);
1289 muscle_insert ("stype", yyvsp
[0].string
);
1294 #line 206 "parse-gram.y"
1295 { current_braced_code
= destructor_braced_code
; }
1299 #line 208 "parse-gram.y"
1301 symbol_list_t
*list
;
1302 for (list
= yyvsp
[0].list
; list
; list
= list
->next
)
1303 symbol_destructor_set (list
->sym
, list
->location
, yyvsp
[-1].string
);
1304 symbol_list_free (yyvsp
[0].list
);
1305 current_braced_code
= action_braced_code
;
1310 #line 218 "parse-gram.y"
1311 { current_class
= nterm_sym
; }
1315 #line 219 "parse-gram.y"
1317 current_class
= unknown_sym
;
1318 current_type
= NULL
;
1323 #line 223 "parse-gram.y"
1324 { current_class
= token_sym
; }
1328 #line 224 "parse-gram.y"
1330 current_class
= unknown_sym
;
1331 current_type
= NULL
;
1336 #line 229 "parse-gram.y"
1338 symbol_list_t
*list
;
1339 for (list
= yyvsp
[0].list
; list
; list
= list
->next
)
1340 symbol_type_set (list
->sym
, list
->location
, yyvsp
[-1].string
);
1341 symbol_list_free (yyvsp
[0].list
);
1346 #line 239 "parse-gram.y"
1348 symbol_list_t
*list
;
1350 for (list
= yyvsp
[0].list
; list
; list
= list
->next
)
1352 symbol_type_set (list
->sym
, list
->location
, current_type
);
1353 symbol_precedence_set (list
->sym
, list
->location
, current_prec
, yyvsp
[-2].assoc
);
1355 symbol_list_free (yyvsp
[0].list
);
1356 current_type
= NULL
;
1361 #line 253 "parse-gram.y"
1362 { yyval
.assoc
= left_assoc
; }
1366 #line 254 "parse-gram.y"
1367 { yyval
.assoc
= right_assoc
; }
1371 #line 255 "parse-gram.y"
1372 { yyval
.assoc
= non_assoc
; }
1376 #line 259 "parse-gram.y"
1377 { current_type
= NULL
;}
1381 #line 260 "parse-gram.y"
1382 { current_type
= yyvsp
[0].string
; }
1386 #line 266 "parse-gram.y"
1387 { yyval
.list
= symbol_list_new (yyvsp
[0].symbol
, yylsp
[0]); }
1391 #line 267 "parse-gram.y"
1392 { yyval
.list
= symbol_list_prepend (yyvsp
[-1].list
, yyvsp
[0].symbol
, yylsp
[0]); }
1396 #line 273 "parse-gram.y"
1398 current_type
= yyvsp
[0].string
;
1403 #line 277 "parse-gram.y"
1405 symbol_class_set (yyvsp
[0].symbol
, current_class
);
1406 symbol_type_set (yyvsp
[0].symbol
, yylsp
[0], current_type
);
1411 #line 282 "parse-gram.y"
1413 symbol_class_set (yyvsp
[-1].symbol
, current_class
);
1414 symbol_type_set (yyvsp
[-1].symbol
, yylsp
[-1], current_type
);
1415 symbol_user_token_number_set (yyvsp
[-1].symbol
, yyvsp
[0].integer
);
1420 #line 288 "parse-gram.y"
1422 symbol_class_set (yyvsp
[-1].symbol
, current_class
);
1423 symbol_type_set (yyvsp
[-1].symbol
, yylsp
[-1], current_type
);
1424 symbol_make_alias (yyvsp
[-1].symbol
, yyvsp
[0].symbol
);
1429 #line 294 "parse-gram.y"
1431 symbol_class_set (yyvsp
[-2].symbol
, current_class
);
1432 symbol_type_set (yyvsp
[-2].symbol
, yylsp
[-2], current_type
);
1433 symbol_user_token_number_set (yyvsp
[-2].symbol
, yyvsp
[-1].integer
);
1434 symbol_make_alias (yyvsp
[-2].symbol
, yyvsp
[0].symbol
);
1439 #line 305 "parse-gram.y"
1444 #line 307 "parse-gram.y"
1449 #line 329 "parse-gram.y"
1450 { current_lhs
= yyvsp
[-1].symbol
; current_lhs_location
= yylsp
[-1]; }
1454 #line 330 "parse-gram.y"
1459 #line 334 "parse-gram.y"
1460 { grammar_rule_end (yylsp
[0]); }
1464 #line 335 "parse-gram.y"
1465 { grammar_rule_end (yylsp
[0]); }
1469 #line 340 "parse-gram.y"
1470 { grammar_rule_begin (current_lhs
, current_lhs_location
); }
1474 #line 342 "parse-gram.y"
1475 { grammar_current_rule_symbol_append (yyvsp
[0].symbol
, yylsp
[0]); }
1479 #line 344 "parse-gram.y"
1480 { grammar_current_rule_action_append (yyvsp
[0].string
, yylsp
[0]); }
1484 #line 346 "parse-gram.y"
1485 { grammar_current_rule_prec_set (yyvsp
[0].symbol
); }
1489 #line 350 "parse-gram.y"
1490 { yyval
.symbol
= yyvsp
[0].symbol
; }
1494 #line 351 "parse-gram.y"
1495 { yyval
.symbol
= yyvsp
[0].symbol
; }
1499 #line 352 "parse-gram.y"
1500 { yyval
.symbol
= getsym (yyvsp
[0].string
, yylsp
[0]); }
1504 #line 357 "parse-gram.y"
1505 { yyval
.string
= yyvsp
[0].string
; }
1509 #line 363 "parse-gram.y"
1511 yyval
.symbol
= getsym (yyvsp
[0].string
, yylsp
[0]);
1512 symbol_class_set (yyval
.symbol
, token_sym
);
1517 #line 372 "parse-gram.y"
1519 yyval
.string
= yyvsp
[0].string
+ 1;
1520 yyval
.string
[strlen (yyval
.string
) - 1] = '\0';
1525 #line 380 "parse-gram.y"
1527 yyval
.string
= xstrdup ("");
1532 #line 384 "parse-gram.y"
1534 yyval
.string
= yyvsp
[0].string
;
1541 /* Line 1012 of /usr/local/share/bison/bison.simple. */
1542 #line 1543 "parse-gram.c"
1553 short *yyssp1
= yyss
- 1;
1554 YYFPRINTF (stderr
, "state stack now");
1555 while (yyssp1
!= yyssp
)
1556 YYFPRINTF (stderr
, " %d", *++yyssp1
);
1557 YYFPRINTF (stderr
, "\n");
1566 /* Now `shift' the result of the reduction. Determine what state
1567 that goes to, based on the state we popped back to and the rule
1568 number reduced by. */
1572 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
1573 if (yystate
>= 0 && yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1574 yystate
= yytable
[yystate
];
1576 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
1581 /*------------------------------------.
1582 | yyerrlab -- here on detecting error |
1583 `------------------------------------*/
1585 /* If not already recovering from an error, report this error. */
1591 yyn
= yypact
[yystate
];
1593 if (yyn
> YYFLAG
&& yyn
< YYLAST
)
1595 YYSIZE_T yysize
= 0;
1600 /* Start YYX at -YYN if negative to avoid negative indexes in
1602 for (yyx
= yyn
< 0 ? -yyn
: 0;
1603 yyx
< (int) (sizeof (yytname
) / sizeof (char *)); yyx
++)
1604 if (yycheck
[yyx
+ yyn
] == yyx
)
1605 yysize
+= yystrlen (yytname
[yyx
]) + 15, yycount
++;
1606 yysize
+= yystrlen ("parse error, unexpected ") + 1;
1607 yysize
+= yystrlen (yytname
[YYTRANSLATE (yychar
)]);
1608 yymsg
= (char *) YYSTACK_ALLOC (yysize
);
1611 char *yyp
= yystpcpy (yymsg
, "parse error, unexpected ");
1612 yyp
= yystpcpy (yyp
, yytname
[YYTRANSLATE (yychar
)]);
1617 for (yyx
= yyn
< 0 ? -yyn
: 0;
1618 yyx
< (int) (sizeof (yytname
) / sizeof (char *));
1620 if (yycheck
[yyx
+ yyn
] == yyx
)
1622 const char *yyq
= ! yycount
? ", expecting " : " or ";
1623 yyp
= yystpcpy (yyp
, yyq
);
1624 yyp
= yystpcpy (yyp
, yytname
[yyx
]);
1629 YYSTACK_FREE (yymsg
);
1632 yyerror ("parse error; also virtual memory exhausted");
1635 #endif /* YYERROR_VERBOSE */
1636 yyerror ("parse error");
1641 /*----------------------------------------------------.
1642 | yyerrlab1 -- error raised explicitly by an action. |
1643 `----------------------------------------------------*/
1645 if (yyerrstatus
== 3)
1647 /* If just tried and failed to reuse lookahead token after an
1648 error, discard it. */
1650 /* Return failure if at end of input. */
1651 if (yychar
== YYEOF
)
1653 YYDPRINTF ((stderr
, "Discarding token %d (%s).\n",
1654 yychar
, yytname
[yychar1
]));
1658 /* Else will try to reuse lookahead token after shifting the error
1661 yyerrstatus
= 3; /* Each real token shifted decrements this. */
1665 yyn
= yypact
[yystate
];
1669 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
1677 /* Pop the current state because it cannot handle the error token. */
1684 if (yystos
[yystate
] < YYNTOKENS
)
1686 YYFPRINTF (stderr
, "Error: popping token %d (%s",
1687 yytoknum
[yystos
[yystate
]], yytname
[yystos
[yystate
]]);
1689 YYPRINT (stderr
, yytoknum
[yystos
[yystate
]], *yyvsp
);
1691 YYFPRINTF (stderr
, ")\n");
1695 YYFPRINTF (stderr
, "Error: popping nonterminal (%s)\n",
1696 yytname
[yystos
[yystate
]]);
1710 short *yyssp1
= yyss
- 1;
1711 YYFPRINTF (stderr
, "Error: state stack now");
1712 while (yyssp1
!= yyssp
)
1713 YYFPRINTF (stderr
, " %d", *++yyssp1
);
1714 YYFPRINTF (stderr
, "\n");
1722 YYDPRINTF ((stderr
, "Shifting error token, "));
1733 /*-------------------------------------.
1734 | yyacceptlab -- YYACCEPT comes here. |
1735 `-------------------------------------*/
1740 /*-----------------------------------.
1741 | yyabortlab -- YYABORT comes here. |
1742 `-----------------------------------*/
1747 /*---------------------------------------------.
1748 | yyoverflowab -- parser overflow comes here. |
1749 `---------------------------------------------*/
1751 yyerror ("parser stack overflow");
1758 YYSTACK_FREE (yyss
);
1763 #line 393 "parse-gram.y"
1765 /*------------------------------------------------------------------.
1766 | When debugging the parser, display tokens' locations and values. |
1767 `------------------------------------------------------------------*/
1770 yyprint (FILE *file
,
1771 const location_t
*loc
, int type
, const yystype
*value
)
1774 LOCATION_PRINT (file
, *loc
);
1779 fprintf (file
, " = '%s'", value
->string
);
1783 fprintf (file
, " = %s", value
->symbol
->tag
);
1787 fprintf (file
, " = %d", value
->integer
);
1791 fprintf (file
, " = \"%s\"", value
->string
);
1795 fprintf (file
, " = <%s>", value
->string
);
1801 fprintf (file
, " = {{ %s }}", value
->string
);
1807 gram_error (gram_control_t
*control ATTRIBUTE_UNUSED
,
1808 location_t
*yylloc
, const char *msg
)
1810 LOCATION_PRINT (stderr
, *yylloc
);
1811 fprintf (stderr
, ": %s\n", msg
);