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"
73 #include "conflicts.h"
75 /* Produce verbose parse errors. */
76 #define YYERROR_VERBOSE 1
77 #define YYLLOC_DEFAULT(Current, Rhs, N) \
81 Current.first_column = Rhs[1].first_column; \
82 Current.first_line = Rhs[1].first_line; \
83 Current.last_column = Rhs[N].last_column; \
84 Current.last_line = Rhs[N].last_line; \
92 /* Pass the control structure to YYPARSE and YYLEX. */
93 #define YYPARSE_PARAM gram_control
94 #define YYLEX_PARAM gram_control
95 /* YYPARSE receives GRAM_CONTROL as a void *. Provide a
96 correctly typed access to it. */
97 #define yycontrol ((gram_control_t *) gram_control)
99 /* Request detailed parse error messages, and pass them to
102 #define yyerror(Msg) \
103 gram_error (yycontrol, &yylloc, Msg)
105 /* When debugging our pure parser, we want to see values and locations
107 #define YYPRINT(File, Type, Value) \
108 yyprint (File, &yylloc, Type, &Value)
109 static void yyprint (FILE *file
, const location_t
*loc
,
110 int type
, const yystype
*value
);
112 symbol_class current_class
= unknown_sym
;
113 char *current_type
= 0;
114 symbol_t
*current_lhs
;
115 location_t current_lhs_location
;
116 associativity current_assoc
;
117 int current_prec
= 0;
122 # if defined (__STDC__) || defined (__cplusplus)
123 /* Put the tokens into the symbol table, so that GDB and other debuggers
134 PERCENT_EXPECT
= 265,
137 PERCENT_VERBOSE
= 268,
138 PERCENT_ERROR_VERBOSE
= 269,
139 PERCENT_OUTPUT
= 270,
140 PERCENT_FILE_PREFIX
= 271,
141 PERCENT_NAME_PREFIX
= 272,
142 PERCENT_DEFINE
= 273,
143 PERCENT_PURE_PARSER
= 274,
144 PERCENT_DEFINES
= 275,
147 PERCENT_LOCATIONS
= 278,
148 PERCENT_NO_LINES
= 279,
149 PERCENT_SKELETON
= 280,
150 PERCENT_TOKEN_TABLE
= 281,
157 PERCENT_PERCENT
= 288,
163 PERCENT_NONASSOC
= 294
166 /* POSIX requires `int' for tokens in interfaces. */
167 # define YYTOKENTYPE int
168 #endif /* !YYTOKENTYPE */
171 #define CHARACTER 259
173 #define PERCENT_TOKEN 261
174 #define PERCENT_NTERM 262
175 #define PERCENT_TYPE 263
176 #define PERCENT_UNION 264
177 #define PERCENT_EXPECT 265
178 #define PERCENT_START 266
179 #define PERCENT_PREC 267
180 #define PERCENT_VERBOSE 268
181 #define PERCENT_ERROR_VERBOSE 269
182 #define PERCENT_OUTPUT 270
183 #define PERCENT_FILE_PREFIX 271
184 #define PERCENT_NAME_PREFIX 272
185 #define PERCENT_DEFINE 273
186 #define PERCENT_PURE_PARSER 274
187 #define PERCENT_DEFINES 275
188 #define PERCENT_YACC 276
189 #define PERCENT_DEBUG 277
190 #define PERCENT_LOCATIONS 278
191 #define PERCENT_NO_LINES 279
192 #define PERCENT_SKELETON 280
193 #define PERCENT_TOKEN_TABLE 281
196 #define SEMICOLON 284
200 #define PERCENT_PERCENT 288
203 #define BRACED_CODE 291
204 #define PERCENT_LEFT 292
205 #define PERCENT_RIGHT 293
206 #define PERCENT_NONASSOC 294
211 /* Enabling traces. */
216 /* Enabling verbose error messages. */
217 #ifdef YYERROR_VERBOSE
218 # undef YYERROR_VERBOSE
219 # define YYERROR_VERBOSE 1
221 # define YYERROR_VERBOSE 0
225 #line 89 "parse-gram.y"
232 /* Line 199 of /usr/local/share/bison/bison.simple. */
233 #line 234 "parse-gram.c"
234 # define YYSTYPE yystype
235 # define YYSTYPE_IS_TRIVIAL 1
239 typedef struct yyltype
246 # define YYLTYPE yyltype
247 # define YYLTYPE_IS_TRIVIAL 1
250 /* Copy the second part of user declarations. */
253 /* Line 219 of /usr/local/share/bison/bison.simple. */
254 #line 255 "parse-gram.c"
256 #if ! defined (yyoverflow) || YYERROR_VERBOSE
258 /* The parser invokes alloca or malloc; define the necessary symbols. */
260 # if YYSTACK_USE_ALLOCA
261 # define YYSTACK_ALLOC alloca
263 # ifndef YYSTACK_USE_ALLOCA
264 # if defined (alloca) || defined (_ALLOCA_H)
265 # define YYSTACK_ALLOC alloca
268 # define YYSTACK_ALLOC __builtin_alloca
274 # ifdef YYSTACK_ALLOC
275 /* Pacify GCC's `empty if-body' warning. */
276 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
278 # if defined (__STDC__) || defined (__cplusplus)
279 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
280 # define YYSIZE_T size_t
282 # define YYSTACK_ALLOC malloc
283 # define YYSTACK_FREE free
285 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
288 #if (! defined (yyoverflow) \
289 && (! defined (__cplusplus) \
290 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
292 /* A type that is properly aligned for any stack member. */
302 /* The size of the maximum gap between one aligned stack and the next. */
303 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
305 /* The size of an array large to enough to hold all stacks, each with
308 # define YYSTACK_BYTES(N) \
309 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
310 + 2 * YYSTACK_GAP_MAX)
312 # define YYSTACK_BYTES(N) \
313 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
317 /* Copy COUNT objects from FROM to TO. The source and destination do
321 # define YYCOPY(To, From, Count) \
322 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
324 # define YYCOPY(To, From, Count) \
327 register YYSIZE_T yyi; \
328 for (yyi = 0; yyi < (Count); yyi++) \
329 (To)[yyi] = (From)[yyi]; \
335 /* Relocate STACK from its old location to the new one. The
336 local variables YYSIZE and YYSTACKSIZE give the old and new number of
337 elements in the stack, and YYPTR gives the new location of the
338 stack. Advance YYPTR to a properly aligned location for the next
340 # define YYSTACK_RELOCATE(Stack) \
343 YYSIZE_T yynewbytes; \
344 YYCOPY (&yyptr->Stack, Stack, yysize); \
345 Stack = &yyptr->Stack; \
346 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
347 yyptr += yynewbytes / sizeof (*yyptr); \
353 /* YYFINAL -- State number of the termination state. */
355 #define YYFLAG -32768
358 /* YYNTOKENS -- Number of terminals. */
360 /* YYNNTS -- Number of nonterminals. */
362 /* YYNRULES -- Number of rules. */
364 /* YYNRULES -- Number of states. */
367 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
369 #define YYMAXUTOK 294
371 #define YYTRANSLATE(X) \
372 ((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK)
374 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
375 static const unsigned char yytranslate
[] =
377 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
378 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
379 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
380 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
381 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
382 2, 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, 1, 2, 3, 4,
403 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
404 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
405 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
410 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
412 static const unsigned char yyprhs
[] =
414 0, 0, 3, 8, 9, 13, 15, 17, 19, 23,
415 25, 27, 30, 34, 36, 40, 42, 46, 48, 51,
416 53, 55, 57, 59, 61, 64, 67, 68, 72, 73,
417 77, 78, 83, 84, 89, 91, 93, 95, 96, 98,
418 100, 103, 105, 108, 110, 112, 115, 118, 122, 124,
419 127, 129, 132, 134, 137, 138, 144, 146, 150, 151,
420 154, 157, 161, 163, 165, 167, 169, 171, 173, 174,
424 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
425 static const signed char yyrhs
[] =
427 41, 0, -1, 42, 33, 57, 67, -1, -1, 42,
428 43, 68, -1, 44, -1, 34, -1, 22, -1, 18,
429 66, 66, -1, 20, -1, 14, -1, 10, 5, -1,
430 16, 28, 66, -1, 23, -1, 17, 28, 66, -1,
431 24, -1, 15, 28, 66, -1, 19, -1, 25, 66,
432 -1, 26, -1, 13, -1, 21, -1, 49, -1, 45,
433 -1, 11, 63, -1, 9, 36, -1, -1, 7, 46,
434 56, -1, -1, 6, 47, 56, -1, -1, 8, 27,
435 48, 53, -1, -1, 51, 52, 50, 54, -1, 37,
436 -1, 38, -1, 39, -1, -1, 27, -1, 32, -1,
437 53, 32, -1, 63, -1, 54, 63, -1, 27, -1,
438 32, -1, 32, 5, -1, 32, 65, -1, 32, 5,
439 65, -1, 55, -1, 56, 55, -1, 58, -1, 57,
440 58, -1, 59, -1, 44, 29, -1, -1, 32, 30,
441 60, 61, 29, -1, 62, -1, 61, 31, 62, -1,
442 -1, 62, 63, -1, 62, 64, -1, 62, 12, 63,
443 -1, 32, -1, 65, -1, 4, -1, 36, -1, 3,
444 -1, 3, -1, -1, 33, 35, -1, -1, 29, -1
447 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
448 static const unsigned short yyrline
[] =
450 0, 146, 146, 159, 161, 164, 166, 167, 168, 169,
451 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
452 180, 181, 184, 186, 187, 191, 199, 199, 205, 205,
453 210, 210, 216, 216, 226, 228, 229, 232, 234, 238,
454 240, 244, 250, 258, 263, 268, 274, 280, 290, 293,
455 302, 304, 310, 312, 315, 315, 320, 322, 325, 328,
456 330, 332, 336, 338, 339, 342, 348, 357, 365, 370,
461 #if YYDEBUG || YYERROR_VERBOSE
462 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
463 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
464 static const char *const yytname
[] =
466 "\"end of string\"", "error", "$undefined.", "STRING", "CHARACTER", "INT",
467 "\"%token\"", "\"%nterm\"", "\"%type\"", "\"%union\"", "\"%expect\"",
468 "\"%start\"", "\"%prec\"", "\"%verbose\"", "\"%error-verbose\"",
469 "\"%output\"", "\"%file-prefix\"", "\"%name-prefix\"", "\"%define\"",
470 "\"%pure-parser\"", "\"%defines\"", "\"%yacc\"", "\"%debug\"",
471 "\"%locations\"", "\"%no-lines\"", "\"%skeleton\"", "\"%token-table\"",
472 "TYPE", "\"=\"", "\";\"", "\":\"", "\"|\"", "\"identifier\"", "\"%%\"",
473 "PROLOGUE", "EPILOGUE", "BRACED_CODE", "\"%left\"", "\"%right\"",
474 "\"%nonassoc\"", "$axiom", "input", "declarations", "declaration",
475 "grammar_declaration", "symbol_declaration", "@1", "@2", "@3",
476 "precedence_declaration", "@4", "precedence_declarator", "type.opt",
477 "nterms_to_type.1", "terms_to_prec.1", "symbol_def", "symbol_defs.1",
478 "grammar", "rules_or_grammar_declaration", "rules", "@5", "rhses.1",
479 "rhs", "symbol", "action", "string_as_id", "string_content",
480 "epilogue.opt", "semi_colon.opt", 0
484 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
486 static const short yytoknum
[] =
488 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
489 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
490 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
491 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
495 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
496 static const unsigned char yyr1
[] =
498 0, 40, 41, 42, 42, 43, 43, 43, 43, 43,
499 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
500 43, 43, 44, 44, 44, 44, 46, 45, 47, 45,
501 48, 45, 50, 49, 51, 51, 51, 52, 52, 53,
502 53, 54, 54, 55, 55, 55, 55, 55, 56, 56,
503 57, 57, 58, 58, 60, 59, 61, 61, 62, 62,
504 62, 62, 63, 63, 63, 64, 65, 66, 67, 67,
508 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
509 static const unsigned char yyr2
[] =
511 0, 2, 4, 0, 3, 1, 1, 1, 3, 1,
512 1, 2, 3, 1, 3, 1, 3, 1, 2, 1,
513 1, 1, 1, 1, 2, 2, 0, 3, 0, 3,
514 0, 4, 0, 4, 1, 1, 1, 0, 1, 1,
515 2, 1, 2, 1, 1, 2, 2, 3, 1, 2,
516 1, 2, 1, 2, 0, 5, 1, 3, 0, 2,
517 2, 3, 1, 1, 1, 1, 1, 1, 0, 2,
521 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
522 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
523 means the default is an error. */
524 static const short yydefact
[] =
526 3, 0, 0, 0, 28, 26, 0, 0, 0, 0,
527 20, 10, 0, 0, 0, 0, 17, 9, 21, 7,
528 13, 15, 0, 19, 0, 6, 34, 35, 36, 70,
529 5, 23, 22, 37, 0, 0, 30, 25, 11, 66,
530 64, 62, 24, 63, 0, 0, 0, 67, 0, 18,
531 0, 0, 68, 50, 52, 71, 4, 38, 32, 43,
532 44, 48, 29, 27, 0, 16, 12, 14, 8, 54,
533 53, 0, 51, 2, 0, 45, 46, 49, 39, 31,
534 58, 69, 33, 41, 47, 40, 0, 56, 42, 55,
535 58, 0, 65, 59, 60, 57, 61
538 /* YYPGOTO[NTERM-NUM]. */
539 static const short yydefgoto
[] =
541 -1, 1, 2, 29, 51, 31, 35, 34, 64, 32,
542 74, 33, 58, 79, 82, 61, 62, 52, 53, 54,
543 80, 86, 87, 93, 94, 43, 48, 73, 56
546 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
548 static const short yypact
[] =
550 -32768, 7, -5,-32768,-32768,-32768, -1, 11, 46, 38,
551 -32768,-32768, 36, 43, 44, 66,-32768,-32768,-32768,-32768,
552 -32768,-32768, 66,-32768, 29,-32768,-32768,-32768,-32768, 48,
553 -32768,-32768,-32768, 52, 18, 18,-32768,-32768,-32768,-32768,
554 -32768,-32768,-32768,-32768, 66, 66, 66,-32768, 66,-32768,
555 50, 54, 16,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
556 41,-32768, 18, 18, 49,-32768,-32768,-32768,-32768,-32768,
557 -32768, 51,-32768,-32768, 38, 81,-32768,-32768,-32768, 53,
558 -32768,-32768, 38,-32768,-32768,-32768, 31, 27,-32768,-32768,
559 -32768, 38,-32768,-32768,-32768, 27,-32768
562 /* YYPGOTO[NTERM-NUM]. */
563 static const short yypgoto
[] =
565 -32768,-32768,-32768,-32768, 85,-32768,-32768,-32768,-32768,-32768,
566 -32768,-32768,-32768,-32768,-32768, -6, 55,-32768, 37,-32768,
567 -32768,-32768, -2, -9,-32768, -17, 30,-32768,-32768
570 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
571 positive, shift that token. If negative, reduce the rule which
572 number is the opposite. If zero, do what YYDEFACT says. */
573 static const short yytable
[] =
575 42, 4, 5, 6, 7, 8, 9, 3, 10, 11,
576 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
577 22, 23, 4, 5, 6, 7, 36, 9, 24, 25,
578 39, 40, 26, 27, 28, 4, 5, 6, 7, 91,
579 9, 39, 40, 76, 39, 59, 75, 37, 50, 71,
580 60, 38, 49, 26, 27, 28, 77, 77, 84, 41,
581 89, 50, 90, 92, 44, 83, 26, 27, 28, 47,
582 41, 45, 46, 88, 65, 66, 67, 55, 68, 57,
583 69, 78, 96, 70, 39, 85, 81, 30, 95, 72,
587 static const short yycheck
[] =
589 9, 6, 7, 8, 9, 10, 11, 0, 13, 14,
590 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
591 25, 26, 6, 7, 8, 9, 27, 11, 33, 34,
592 3, 4, 37, 38, 39, 6, 7, 8, 9, 12,
593 11, 3, 4, 60, 3, 27, 5, 36, 32, 33,
594 32, 5, 22, 37, 38, 39, 62, 63, 75, 32,
595 29, 32, 31, 36, 28, 74, 37, 38, 39, 3,
596 32, 28, 28, 82, 44, 45, 46, 29, 48, 27,
597 30, 32, 91, 29, 3, 32, 35, 2, 90, 52,
602 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
603 symbol of state STATE-NUM. */
604 static const unsigned char yystos
[] =
606 0, 41, 42, 0, 6, 7, 8, 9, 10, 11,
607 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
608 23, 24, 25, 26, 33, 34, 37, 38, 39, 43,
609 44, 45, 49, 51, 47, 46, 27, 36, 5, 3,
610 4, 32, 63, 65, 28, 28, 28, 3, 66, 66,
611 32, 44, 57, 58, 59, 29, 68, 27, 52, 27,
612 32, 55, 56, 56, 48, 66, 66, 66, 66, 30,
613 29, 33, 58, 67, 50, 5, 65, 55, 32, 53,
614 60, 35, 54, 63, 65, 32, 61, 62, 63, 29,
615 31, 12, 36, 63, 64, 62, 63
619 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
620 # define YYSIZE_T __SIZE_TYPE__
622 #if ! defined (YYSIZE_T) && defined (size_t)
623 # define YYSIZE_T size_t
625 #if ! defined (YYSIZE_T)
626 # if defined (__STDC__) || defined (__cplusplus)
627 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
628 # define YYSIZE_T size_t
631 #if ! defined (YYSIZE_T)
632 # define YYSIZE_T unsigned int
635 #define yyerrok (yyerrstatus = 0)
636 #define yyclearin (yychar = YYEMPTY)
640 #define YYACCEPT goto yyacceptlab
641 #define YYABORT goto yyabortlab
642 #define YYERROR goto yyerrlab1
644 /* Like YYERROR except do call yyerror. This remains here temporarily
645 to ease the transition to the new meaning of YYERROR, for GCC.
646 Once GCC version 2 has supplanted version 1, this can go. */
648 #define YYFAIL goto yyerrlab
650 #define YYRECOVERING() (!!yyerrstatus)
652 #define YYBACKUP(Token, Value) \
654 if (yychar == YYEMPTY && yylen == 1) \
658 yychar1 = YYTRANSLATE (yychar); \
664 yyerror ("syntax error: cannot back up"); \
670 #define YYERRCODE 256
672 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
675 #ifndef YYLLOC_DEFAULT
676 # define YYLLOC_DEFAULT(Current, Rhs, N) \
677 Current.first_line = Rhs[1].first_line; \
678 Current.first_column = Rhs[1].first_column; \
679 Current.last_line = Rhs[N].last_line; \
680 Current.last_column = Rhs[N].last_column;
683 /* YYLEX -- calling `yylex' with the right arguments. */
688 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
690 # define YYLEX yylex (&yylval, &yylloc)
692 # else /* !YYLSP_NEEDED */
694 # define YYLEX yylex (&yylval, YYLEX_PARAM)
696 # define YYLEX yylex (&yylval)
698 # endif /* !YYLSP_NEEDED */
700 # define YYLEX yylex ()
703 /* Enable debugging if requested. */
707 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
708 # define YYFPRINTF fprintf
711 # define YYDPRINTF(Args) \
716 /* Nonzero means print parse trace. It is left uninitialized so that
717 multiple parsers can coexist. */
720 # define YYDPRINTF(Args)
721 #endif /* !YYDEBUG */
723 /* YYINITDEPTH -- initial size of the parser's stacks. */
725 # define YYINITDEPTH 200
728 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
729 if the built-in stack extension method is used).
731 Do not make this value too large; the results are undefined if
732 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
733 evaluated with infinite-precision integer arithmetic. */
740 # define YYMAXDEPTH 10000
748 # if defined (__GLIBC__) && defined (_STRING_H)
749 # define yystrlen strlen
751 /* Return the length of YYSTR. */
753 # if defined (__STDC__) || defined (__cplusplus)
754 yystrlen (const char *yystr
)
760 register const char *yys
= yystr
;
762 while (*yys
++ != '\0')
765 return yys
- yystr
- 1;
771 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
772 # define yystpcpy stpcpy
774 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
777 # if defined (__STDC__) || defined (__cplusplus)
778 yystpcpy (char *yydest
, const char *yysrc
)
780 yystpcpy (yydest
, yysrc
)
785 register char *yyd
= yydest
;
786 register const char *yys
= yysrc
;
788 while ((*yyd
++ = *yys
++) != '\0')
796 #endif /* !YYERROR_VERBOSE */
800 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
801 into yyparse. The argument should have type void *.
802 It should actually point to an object.
803 Grammar actions can access the variable by casting it
804 to the proper pointer type. */
807 # if defined (__STDC__) || defined (__cplusplus)
808 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
809 # define YYPARSE_PARAM_DECL
811 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
812 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
814 #else /* !YYPARSE_PARAM */
815 # define YYPARSE_PARAM_ARG
816 # define YYPARSE_PARAM_DECL
817 #endif /* !YYPARSE_PARAM */
819 /* Prevent warning if -Wstrict-prototypes. */
821 # ifdef YYPARSE_PARAM
822 int yyparse (void *);
828 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
829 variables are global, or local to YYPARSE. */
831 #define YY_DECL_NON_LSP_VARIABLES \
832 /* The lookahead symbol. */ \
835 /* The semantic value of the lookahead symbol. */ \
838 /* Number of parse errors so far. */ \
842 # define YY_DECL_VARIABLES \
843 YY_DECL_NON_LSP_VARIABLES \
845 /* Location data for the lookahead symbol. */ \
848 # define YY_DECL_VARIABLES \
849 YY_DECL_NON_LSP_VARIABLES
852 /* If nonreentrant, generate the variables here. */
859 yyparse (YYPARSE_PARAM_ARG
)
862 /* If reentrant, generate the variables here. */
867 register int yystate
;
870 /* Number of tokens to shift before error messages enabled. */
872 /* Lookahead token as an internal (translated) token number. */
875 /* Three stacks and their tools:
876 `yyss': related to states,
877 `yyvs': related to semantic values,
878 `yyls': related to locations.
880 Refer to the stacks thru separate pointers, to allow yyoverflow
881 to reallocate them elsewhere. */
883 /* The state stack. */
884 short yyssa
[YYINITDEPTH
];
886 register short *yyssp
;
888 /* The semantic value stack. */
889 YYSTYPE yyvsa
[YYINITDEPTH
];
890 YYSTYPE
*yyvs
= yyvsa
;
891 register YYSTYPE
*yyvsp
;
894 /* The location stack. */
895 YYLTYPE yylsa
[YYINITDEPTH
];
896 YYLTYPE
*yyls
= yylsa
;
901 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
903 # define YYPOPSTACK (yyvsp--, yyssp--)
906 YYSIZE_T yystacksize
= YYINITDEPTH
;
908 /* The variables used to return semantic value and location from the
915 /* When reducing, the number of symbols on the RHS of the reduced
919 YYDPRINTF ((stderr
, "Starting parse\n"));
924 yychar
= YYEMPTY
; /* Cause a token to be read. */
926 /* Initialize stack pointers.
927 Waste one element of value and location stack
928 so that they stay on the same level as the state stack.
929 The wasted elements are never initialized. */
938 /*------------------------------------------------------------.
939 | yynewstate -- Push a new state, which is found in yystate. |
940 `------------------------------------------------------------*/
942 /* In all cases, when you get here, the value and location stacks
943 have just been pushed. so pushing a state here evens the stacks.
950 if (yyssp
>= yyss
+ yystacksize
- 1)
952 /* Get the current used size of the three stacks, in elements. */
953 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
957 /* Give user a chance to reallocate the stack. Use copies of
958 these so that the &'s don't force the real ones into
960 YYSTYPE
*yyvs1
= yyvs
;
963 /* Each stack pointer address is followed by the size of the
964 data in use in that stack, in bytes. */
966 YYLTYPE
*yyls1
= yyls
;
967 /* This used to be a conditional around just the two extra args,
968 but that might be undefined if yyoverflow is a macro. */
969 yyoverflow ("parser stack overflow",
970 &yyss1
, yysize
* sizeof (*yyssp
),
971 &yyvs1
, yysize
* sizeof (*yyvsp
),
972 &yyls1
, yysize
* sizeof (*yylsp
),
976 yyoverflow ("parser stack overflow",
977 &yyss1
, yysize
* sizeof (*yyssp
),
978 &yyvs1
, yysize
* sizeof (*yyvsp
),
984 #else /* no yyoverflow */
985 # ifndef YYSTACK_RELOCATE
988 /* Extend the stack our own way. */
989 if (yystacksize
>= YYMAXDEPTH
)
992 if (yystacksize
> YYMAXDEPTH
)
993 yystacksize
= YYMAXDEPTH
;
997 union yyalloc
*yyptr
=
998 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1001 YYSTACK_RELOCATE (yyss
);
1002 YYSTACK_RELOCATE (yyvs
);
1004 YYSTACK_RELOCATE (yyls
);
1006 # undef YYSTACK_RELOCATE
1008 YYSTACK_FREE (yyss1
);
1011 #endif /* no yyoverflow */
1013 yyssp
= yyss
+ yysize
- 1;
1014 yyvsp
= yyvs
+ yysize
- 1;
1016 yylsp
= yyls
+ yysize
- 1;
1019 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1020 (unsigned long int) yystacksize
));
1022 if (yyssp
>= yyss
+ yystacksize
- 1)
1026 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1035 /* Do appropriate processing given the current state. */
1036 /* Read a lookahead token if we need one and don't already have one. */
1039 /* First try to decide what to do without reference to lookahead token. */
1041 yyn
= yypact
[yystate
];
1045 /* Not known => get a lookahead token if don't already have one. */
1047 /* yychar is either YYEMPTY or YYEOF
1048 or a valid token in external form. */
1050 if (yychar
== YYEMPTY
)
1052 YYDPRINTF ((stderr
, "Reading a token: "));
1056 /* Convert token to internal form (in yychar1) for indexing tables with. */
1058 if (yychar
<= 0) /* This means end of input. */
1061 yychar
= YYEOF
; /* Don't call YYLEX any more. */
1063 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1067 yychar1
= YYTRANSLATE (yychar
);
1070 /* We have to keep this `#if YYDEBUG', since we use variables
1071 which are defined only if `YYDEBUG' is set. */
1074 YYFPRINTF (stderr
, "Next token is %d (%s",
1075 yychar
, yytname
[yychar1
]);
1076 /* Give the individual parser a way to print the precise
1077 meaning of a token, for further debugging info. */
1079 YYPRINT (stderr
, yychar
, yylval
);
1081 YYFPRINTF (stderr
, ")\n");
1087 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != yychar1
)
1092 /* yyn is what to do for this token type in this state.
1093 Negative => reduce, -yyn is rule number.
1094 Positive => shift, yyn is new state.
1095 New state is final state => don't bother to shift,
1096 just return success.
1097 0, or most negative number => error. */
1112 /* Shift the lookahead token. */
1113 YYDPRINTF ((stderr
, "Shifting token %d (%s), ",
1114 yychar
, yytname
[yychar1
]));
1116 /* Discard the token being shifted unless it is eof. */
1117 if (yychar
!= YYEOF
)
1125 /* Count tokens shifted since error; after three, turn off error
1134 /*-----------------------------------------------------------.
1135 | yydefault -- do the default action for the current state. |
1136 `-----------------------------------------------------------*/
1138 yyn
= yydefact
[yystate
];
1144 /*-----------------------------.
1145 | yyreduce -- Do a reduction. |
1146 `-----------------------------*/
1148 /* yyn is the number of a rule to reduce with. */
1151 /* If YYLEN is nonzero, implement the default value of the action:
1154 Otherwise, the following line sets YYVAL to the semantic value of
1155 the lookahead token. This behavior is undocumented and Bison
1156 users should not rely upon it. Assigning to YYVAL
1157 unconditionally makes the parser a bit smaller, and it avoids a
1158 GCC warning that YYVAL may be used uninitialized. */
1159 yyval
= yyvsp
[1-yylen
];
1162 /* Default location. */
1163 YYLLOC_DEFAULT (yyloc
, (yylsp
- yylen
), yylen
);
1167 /* We have to keep this `#if YYDEBUG', since we use variables which
1168 are defined only if `YYDEBUG' is set. */
1173 YYFPRINTF (stderr
, "Reducing via rule %d (line %d), ",
1174 yyn
- 1, yyrline
[yyn
]);
1176 /* Print the symbols being reduced, and their result. */
1177 for (yyi
= yyprhs
[yyn
]; yyrhs
[yyi
] >= 0; yyi
++)
1178 YYFPRINTF (stderr
, "%s ", yytname
[yyrhs
[yyi
]]);
1179 YYFPRINTF (stderr
, " -> %s\n", yytname
[yyr1
[yyn
]]);
1185 #line 148 "parse-gram.y"
1187 yycontrol
->errcode
= 0;
1188 epilogue_set (yyvsp
[0].string
, yylsp
[0]);
1193 #line 166 "parse-gram.y"
1194 { prologue_augment (yyvsp
[0].string
, yylsp
[0]); }
1198 #line 167 "parse-gram.y"
1203 #line 168 "parse-gram.y"
1204 { muscle_insert (yyvsp
[-1].string
, yyvsp
[0].string
); }
1208 #line 169 "parse-gram.y"
1209 { defines_flag
= 1; }
1213 #line 170 "parse-gram.y"
1214 { error_verbose
= 1; }
1218 #line 171 "parse-gram.y"
1219 { expected_conflicts
= yyvsp
[0].integer
; }
1223 #line 172 "parse-gram.y"
1224 { spec_file_prefix
= yyvsp
[0].string
; }
1228 #line 173 "parse-gram.y"
1229 { locations_flag
= 1; }
1233 #line 174 "parse-gram.y"
1234 { spec_name_prefix
= yyvsp
[0].string
; }
1238 #line 175 "parse-gram.y"
1239 { no_lines_flag
= 1; }
1243 #line 176 "parse-gram.y"
1244 { spec_outfile
= yyvsp
[0].string
; }
1248 #line 177 "parse-gram.y"
1249 { pure_parser
= 1; }
1253 #line 178 "parse-gram.y"
1254 { skeleton
= yyvsp
[0].string
; }
1258 #line 179 "parse-gram.y"
1259 { token_table_flag
= 1; }
1263 #line 180 "parse-gram.y"
1264 { report_flag
= 1; }
1268 #line 181 "parse-gram.y"
1273 #line 188 "parse-gram.y"
1275 grammar_start_symbol_set (yyvsp
[0].symbol
, yylsp
[0]);
1280 #line 192 "parse-gram.y"
1283 MUSCLE_INSERT_INT ("stype_line", yylsp
[0].first_line
);
1284 muscle_insert ("stype", yyvsp
[0].string
);
1289 #line 200 "parse-gram.y"
1290 { current_class
= nterm_sym
; }
1294 #line 201 "parse-gram.y"
1296 current_class
= unknown_sym
;
1297 current_type
= NULL
;
1302 #line 205 "parse-gram.y"
1303 { current_class
= token_sym
; }
1307 #line 206 "parse-gram.y"
1309 current_class
= unknown_sym
;
1310 current_type
= NULL
;
1315 #line 210 "parse-gram.y"
1316 {current_type
= yyvsp
[0].string
; }
1320 #line 211 "parse-gram.y"
1322 current_type
= NULL
;
1327 #line 218 "parse-gram.y"
1328 { current_assoc
= yyvsp
[-1].assoc
; ++current_prec
; }
1332 #line 220 "parse-gram.y"
1333 { current_assoc
= non_assoc
; current_type
= NULL
; }
1337 #line 227 "parse-gram.y"
1338 { yyval
.assoc
= left_assoc
; }
1342 #line 228 "parse-gram.y"
1343 { yyval
.assoc
= right_assoc
; }
1347 #line 229 "parse-gram.y"
1348 { yyval
.assoc
= non_assoc
; }
1352 #line 233 "parse-gram.y"
1353 { current_type
= NULL
;}
1357 #line 234 "parse-gram.y"
1358 { current_type
= yyvsp
[0].string
; }
1362 #line 239 "parse-gram.y"
1363 { symbol_type_set (yyvsp
[0].symbol
, current_type
); }
1367 #line 240 "parse-gram.y"
1368 { symbol_type_set (yyvsp
[0].symbol
, current_type
); }
1372 #line 246 "parse-gram.y"
1374 symbol_type_set (yyvsp
[0].symbol
, current_type
);
1375 symbol_precedence_set (yyvsp
[0].symbol
, current_prec
, current_assoc
);
1380 #line 251 "parse-gram.y"
1382 symbol_type_set (yyvsp
[0].symbol
, current_type
);
1383 symbol_precedence_set (yyvsp
[0].symbol
, current_prec
, current_assoc
);
1388 #line 260 "parse-gram.y"
1390 current_type
= yyvsp
[0].string
;
1395 #line 264 "parse-gram.y"
1397 symbol_class_set (yyvsp
[0].symbol
, current_class
);
1398 symbol_type_set (yyvsp
[0].symbol
, current_type
);
1403 #line 269 "parse-gram.y"
1405 symbol_class_set (yyvsp
[-1].symbol
, current_class
);
1406 symbol_type_set (yyvsp
[-1].symbol
, current_type
);
1407 symbol_user_token_number_set (yyvsp
[-1].symbol
, yyvsp
[0].integer
);
1412 #line 275 "parse-gram.y"
1414 symbol_class_set (yyvsp
[-1].symbol
, current_class
);
1415 symbol_type_set (yyvsp
[-1].symbol
, current_type
);
1416 symbol_make_alias (yyvsp
[-1].symbol
, yyvsp
[0].symbol
);
1421 #line 281 "parse-gram.y"
1423 symbol_class_set (yyvsp
[-2].symbol
, current_class
);
1424 symbol_type_set (yyvsp
[-2].symbol
, current_type
);
1425 symbol_user_token_number_set (yyvsp
[-2].symbol
, yyvsp
[-1].integer
);
1426 symbol_make_alias (yyvsp
[-2].symbol
, yyvsp
[0].symbol
);
1431 #line 292 "parse-gram.y"
1436 #line 294 "parse-gram.y"
1441 #line 316 "parse-gram.y"
1442 { current_lhs
= yyvsp
[-1].symbol
; current_lhs_location
= yylsp
[-1]; }
1446 #line 317 "parse-gram.y"
1451 #line 321 "parse-gram.y"
1452 { grammar_rule_end (yylsp
[0]); }
1456 #line 322 "parse-gram.y"
1457 { grammar_rule_end (yylsp
[0]); }
1461 #line 327 "parse-gram.y"
1462 { grammar_rule_begin (current_lhs
, current_lhs_location
); }
1466 #line 329 "parse-gram.y"
1467 { grammar_current_rule_symbol_append (yyvsp
[0].symbol
, yylsp
[0]); }
1471 #line 331 "parse-gram.y"
1472 { grammar_current_rule_action_append (yyvsp
[0].string
, yylsp
[0]); }
1476 #line 333 "parse-gram.y"
1477 { grammar_current_rule_prec_set (yyvsp
[0].symbol
); }
1481 #line 337 "parse-gram.y"
1482 { yyval
.symbol
= yyvsp
[0].symbol
; }
1486 #line 338 "parse-gram.y"
1487 { yyval
.symbol
= yyvsp
[0].symbol
; }
1491 #line 339 "parse-gram.y"
1492 { yyval
.symbol
= getsym (yyvsp
[0].string
, yylsp
[0]); }
1496 #line 344 "parse-gram.y"
1497 { yyval
.string
= yyvsp
[0].string
; }
1501 #line 350 "parse-gram.y"
1503 yyval
.symbol
= getsym (yyvsp
[0].string
, yylsp
[0]);
1504 symbol_class_set (yyval
.symbol
, token_sym
);
1509 #line 359 "parse-gram.y"
1511 yyval
.string
= yyvsp
[0].string
+ 1;
1512 yyval
.string
[strlen (yyval
.string
) - 1] = '\0';
1517 #line 367 "parse-gram.y"
1519 yyval
.string
= xstrdup ("");
1524 #line 371 "parse-gram.y"
1526 yyval
.string
= yyvsp
[0].string
;
1533 /* Line 1012 of /usr/local/share/bison/bison.simple. */
1534 #line 1535 "parse-gram.c"
1545 short *yyssp1
= yyss
- 1;
1546 YYFPRINTF (stderr
, "state stack now");
1547 while (yyssp1
!= yyssp
)
1548 YYFPRINTF (stderr
, " %d", *++yyssp1
);
1549 YYFPRINTF (stderr
, "\n");
1558 /* Now `shift' the result of the reduction. Determine what state
1559 that goes to, based on the state we popped back to and the rule
1560 number reduced by. */
1564 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
1565 if (yystate
>= 0 && yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1566 yystate
= yytable
[yystate
];
1568 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
1573 /*------------------------------------.
1574 | yyerrlab -- here on detecting error |
1575 `------------------------------------*/
1577 /* If not already recovering from an error, report this error. */
1583 yyn
= yypact
[yystate
];
1585 if (yyn
> YYFLAG
&& yyn
< YYLAST
)
1587 YYSIZE_T yysize
= 0;
1592 /* Start YYX at -YYN if negative to avoid negative indexes in
1594 for (yyx
= yyn
< 0 ? -yyn
: 0;
1595 yyx
< (int) (sizeof (yytname
) / sizeof (char *)); yyx
++)
1596 if (yycheck
[yyx
+ yyn
] == yyx
)
1597 yysize
+= yystrlen (yytname
[yyx
]) + 15, yycount
++;
1598 yysize
+= yystrlen ("parse error, unexpected ") + 1;
1599 yysize
+= yystrlen (yytname
[YYTRANSLATE (yychar
)]);
1600 yymsg
= (char *) YYSTACK_ALLOC (yysize
);
1603 char *yyp
= yystpcpy (yymsg
, "parse error, unexpected ");
1604 yyp
= yystpcpy (yyp
, yytname
[YYTRANSLATE (yychar
)]);
1609 for (yyx
= yyn
< 0 ? -yyn
: 0;
1610 yyx
< (int) (sizeof (yytname
) / sizeof (char *));
1612 if (yycheck
[yyx
+ yyn
] == yyx
)
1614 const char *yyq
= ! yycount
? ", expecting " : " or ";
1615 yyp
= yystpcpy (yyp
, yyq
);
1616 yyp
= yystpcpy (yyp
, yytname
[yyx
]);
1621 YYSTACK_FREE (yymsg
);
1624 yyerror ("parse error; also virtual memory exhausted");
1627 #endif /* YYERROR_VERBOSE */
1628 yyerror ("parse error");
1633 /*----------------------------------------------------.
1634 | yyerrlab1 -- error raised explicitly by an action. |
1635 `----------------------------------------------------*/
1637 if (yyerrstatus
== 3)
1639 /* If just tried and failed to reuse lookahead token after an
1640 error, discard it. */
1642 /* Return failure if at end of input. */
1643 if (yychar
== YYEOF
)
1645 YYDPRINTF ((stderr
, "Discarding token %d (%s).\n",
1646 yychar
, yytname
[yychar1
]));
1650 /* Else will try to reuse lookahead token after shifting the error
1653 yyerrstatus
= 3; /* Each real token shifted decrements this. */
1657 yyn
= yypact
[yystate
];
1661 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
1669 /* Pop the current state because it cannot handle the error token. */
1676 if (yystos
[yystate
] < YYNTOKENS
)
1678 YYFPRINTF (stderr
, "Error: popping token %d (%s",
1679 yytoknum
[yystos
[yystate
]], yytname
[yystos
[yystate
]]);
1681 YYPRINT (stderr
, yytoknum
[yystos
[yystate
]], *yyvsp
);
1683 YYFPRINTF (stderr
, ")\n");
1687 YYFPRINTF (stderr
, "Error: popping nonterminal (%s)\n",
1688 yytname
[yystos
[yystate
]]);
1702 short *yyssp1
= yyss
- 1;
1703 YYFPRINTF (stderr
, "Error: state stack now");
1704 while (yyssp1
!= yyssp
)
1705 YYFPRINTF (stderr
, " %d", *++yyssp1
);
1706 YYFPRINTF (stderr
, "\n");
1714 YYDPRINTF ((stderr
, "Shifting error token, "));
1725 /*-------------------------------------.
1726 | yyacceptlab -- YYACCEPT comes here. |
1727 `-------------------------------------*/
1732 /*-----------------------------------.
1733 | yyabortlab -- YYABORT comes here. |
1734 `-----------------------------------*/
1739 /*---------------------------------------------.
1740 | yyoverflowab -- parser overflow comes here. |
1741 `---------------------------------------------*/
1743 yyerror ("parser stack overflow");
1750 YYSTACK_FREE (yyss
);
1755 #line 380 "parse-gram.y"
1757 /*------------------------------------------------------------------.
1758 | When debugging the parser, display tokens' locations and values. |
1759 `------------------------------------------------------------------*/
1762 yyprint (FILE *file
,
1763 const location_t
*loc
, int type
, const yystype
*value
)
1766 LOCATION_PRINT (file
, *loc
);
1771 fprintf (file
, " = '%s'", value
->string
);
1775 fprintf (file
, " = %s", value
->symbol
->tag
);
1779 fprintf (file
, " = %d", value
->integer
);
1783 fprintf (file
, " = \"%s\"", value
->string
);
1787 fprintf (file
, " = <%s>", value
->string
);
1793 fprintf (file
, " = {{ %s }}", value
->string
);
1799 gram_error (gram_control_t
*control ATTRIBUTE_UNUSED
,
1800 location_t
*yylloc
, const char *msg
)
1802 LOCATION_PRINT (stderr
, *yylloc
);
1803 fprintf (stderr
, ": %s\n", msg
);