3 m4_define_default([b4_input_suffix], [.y])
5 m4_define_default([b4_output_parser_suffix],
6 [m4_translit(b4_input_suffix, [yY], [cC])])
8 m4_define_default([b4_output_parser_name],
9 [b4_output_prefix[]b4_output_infix[]b4_output_parser_suffix[]])
12 m4_define_default([b4_output_header_suffix],
13 [m4_translit(b4_input_suffix, [yY], [hH])])
15 m4_define_default([b4_output_header_name],
16 [b4_output_prefix[]b4_output_infix[]b4_output_header_suffix[]])
18 m4_define_default([b4_header_guard],
19 [m4_bpatsubst(m4_toupper([BISON_]b4_output_header_name),
20 [[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])])
23 # b4_token_defines(TOKEN-NAME, TOKEN-NUMBER)
24 # ------------------------------------------
25 # Output the definition of this token as #define.
26 m4_define([b4_token_define],
31 # b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
32 # -------------------------------------------------------
33 # Output the definition of the tokens as #define.
34 m4_define([b4_token_defines],
35 [m4_map([b4_token_define], [$@])])
39 #output "b4_output_parser_name"
40 /* A Bison parser, made from b4_filename
41 by GNU bison b4_version. */
43 /* Skeleton output parser for Bison,
44 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
47 This program is free software; you can redistribute it and/or modify
48 it under the terms of the GNU General Public License as published by
49 the Free Software Foundation; either version 2, or (at your option)
52 This program is distributed in the hope that it will be useful,
53 but WITHOUT ANY WARRANTY; without even the implied warranty of
54 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55 GNU General Public License for more details.
57 You should have received a copy of the GNU General Public License
58 along with this program; if not, write to the Free Software
59 Foundation, Inc., 59 Temple Place - Suite 330,
60 Boston, MA 02111-1307, USA. */
62 /* As a special exception, when this file is copied by Bison into a
63 Bison output file, you may use that output file without restriction.
64 This special exception was added by the Free Software Foundation
65 in version 1.24 of Bison. */
67 /* This is the parser code that is written into each bison parser when
68 the %semantic_parser declaration is not specified in the grammar.
69 It was written by Richard Stallman by simplifying the hairy parser
70 used when %semantic_parser is specified. */
72 /* Identify Bison output. */
76 #define YYPURE b4_pure
78 /* Using locations. */
79 #define YYLSP_NEEDED b4_locations_flag
81 m4_if(b4_prefix[], [yy], [],
82 [/* If NAME_PREFIX is specified substitute the variables and functions
84 #define yyparse b4_prefix[]parse
85 #define yylex b4_prefix[]lex
86 #define yyerror b4_prefix[]error
87 #define yylval b4_prefix[]lval
88 #define yychar b4_prefix[]char
89 #define yydebug b4_prefix[]debug
90 #define yynerrs b4_prefix[]nerrs
92 # define yylloc b4_prefix[]lloc
96 /* Copy the user declarations. */
99 /* Enabling traces. */
101 # define YYDEBUG b4_debug
104 /* Enabling verbose error messages. */
105 #ifdef YYERROR_VERBOSE
106 # undef YYERROR_VERBOSE
107 # define YYERROR_VERBOSE 1
109 # define YYERROR_VERBOSE b4_error_verbose
113 m4_ifdef([b4_stype_line],
114 [#line b4_stype_line "b4_filename"
116 typedef b4_stype yystype;
117 # define YYSTYPE yystype
121 typedef struct yyltype
128 # define YYLTYPE b4_ltype
131 /* Line __line__ of __file__. */
132 #line __oline__ "b4_output_parser_name"
134 /* All symbols defined below should begin with yy or YY, to avoid
135 infringing on user name space. This should be done even for local
136 variables, as they might otherwise be expanded by user macros.
137 There are some unavoidable exceptions within include files to
138 define necessary library symbols; they are noted "INFRINGES ON
139 USER NAME SPACE" below. */
141 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
143 /* The parser invokes alloca or malloc; define the necessary symbols. */
145 # if YYSTACK_USE_ALLOCA
146 # define YYSTACK_ALLOC alloca
148 # ifndef YYSTACK_USE_ALLOCA
149 # if defined (alloca) || defined (_ALLOCA_H)
150 # define YYSTACK_ALLOC alloca
153 # define YYSTACK_ALLOC __builtin_alloca
159 # ifdef YYSTACK_ALLOC
160 /* Pacify GCC's `empty if-body' warning. */
161 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
163 # if defined (__STDC__) || defined (__cplusplus)
164 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
165 # define YYSIZE_T size_t
167 # define YYSTACK_ALLOC malloc
168 # define YYSTACK_FREE free
171 /* A type that is properly aligned for any stack member. */
181 /* The size of the maximum gap between one aligned stack and the next. */
182 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
184 /* The size of an array large to enough to hold all stacks, each with
187 # define YYSTACK_BYTES(N) \
188 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
189 + 2 * YYSTACK_GAP_MAX)
191 # define YYSTACK_BYTES(N) \
192 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
196 /* Copy COUNT objects from FROM to TO. The source and destination do
200 # define YYCOPY(To, From, Count) \
201 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
203 # define YYCOPY(To, From, Count) \
206 register YYSIZE_T yyi; \
207 for (yyi = 0; yyi < (Count); yyi++) \
208 (To)[yyi] = (From)[yyi]; \
214 /* Relocate STACK from its old location to the new one. The
215 local variables YYSIZE and YYSTACKSIZE give the old and new number of
216 elements in the stack, and YYPTR gives the new location of the
217 stack. Advance YYPTR to a properly aligned location for the next
219 # define YYSTACK_RELOCATE(Stack) \
222 YYSIZE_T yynewbytes; \
223 YYCOPY (&yyptr->Stack, Stack, yysize); \
224 Stack = &yyptr->Stack; \
225 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
226 yyptr += yynewbytes / sizeof (*yyptr); \
230 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
233 b4_token_defines(b4_tokens)
235 /* YYFINAL -- State number of the termination state. */
236 #define YYFINAL b4_final
237 #define YYFLAG b4_flag
238 #define YYLAST b4_last
240 /* YYNTOKENS -- Number of terminals. */
241 #define YYNTOKENS b4_ntokens
242 /* YYNNTS -- Number of nonterminals. */
243 #define YYNNTS b4_nnts
244 /* YYNRULES -- Number of rules. */
245 #define YYNRULES b4_nrules
246 /* YYNRULES -- Number of states. */
247 #define YYNSTATES b4_nstates
248 #define YYMAXUTOK b4_maxtok
250 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
251 #define YYTRANSLATE(x) ((unsigned)(x) <= b4_maxtok ? yytranslate[[x]] : b4_nsym)
253 /* YYTRANSLATE[[YYLEX]] -- Bison symbol number corresponding to YYLEX. */
254 static const char yytranslate[[]] =
260 /* YYPRHS[[YYN]] -- Index of the first RHS symbol of rule number YYN in
262 static const short yyprhs[[]] =
267 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
268 static const short yyrhs[[]] =
273 /* YYRLINE[[YYN]] -- source line where rule number YYN was defined. */
274 static const short yyrline[[]] =
280 #if (YYDEBUG) || YYERROR_VERBOSE
281 /* YYTNME[[SYMBOL-NUM]] -- String name of the symbol SYMBOL-NUM.
282 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
283 static const char *const yytname[[]] =
289 /* YYTOKNUM[[YYN]] -- Index in YYTNAME corresponding to YYLEX. */
290 static const short yytoknum[[]] =
295 /* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives. */
296 static const short yyr1[[]] =
301 /* YYR2[[YYN]] -- Number of symbols composing right hand side of rule YYN. */
302 static const short yyr2[[]] =
307 /* YYDEFACT[[S]] -- default rule to reduce with in state S when YYTABLE
308 doesn't specify something else to do. Zero means the default is an
310 static const short yydefact[[]] =
315 /* YYPGOTO[[NTERM-NUM]]. */
316 static const short yydefgoto[[]] =
321 /* YYPACT[[STATE-NUM]] -- Index in YYTABLE of the portion describing
323 static const short yypact[[]] =
328 /* YYPGOTO[[NTERM-NUM]]. */
329 static const short yypgoto[[]] =
334 /* YYTABLE[[YYPACT[STATE-NUM]]]. What to do in state STATE-NUM. If
335 positive, shift that token. If negative, reduce the rule which
336 number is the opposite. If zero, do what YYDEFACT says. */
337 static const short yytable[[]] =
342 static const short yycheck[[]] =
348 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
349 # define YYSIZE_T __SIZE_TYPE__
351 #if ! defined (YYSIZE_T) && defined (size_t)
352 # define YYSIZE_T size_t
354 #if ! defined (YYSIZE_T)
355 # if defined (__STDC__) || defined (__cplusplus)
356 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
357 # define YYSIZE_T size_t
360 #if ! defined (YYSIZE_T)
361 # define YYSIZE_T unsigned int
364 #define yyerrok (yyerrstatus = 0)
365 #define yyclearin (yychar = YYEMPTY)
369 #define YYACCEPT goto yyacceptlab
370 #define YYABORT goto yyabortlab
371 #define YYERROR goto yyerrlab1
373 /* Like YYERROR except do call yyerror. This remains here temporarily
374 to ease the transition to the new meaning of YYERROR, for GCC.
375 Once GCC version 2 has supplanted version 1, this can go. */
377 #define YYFAIL goto yyerrlab
379 #define YYRECOVERING() (!!yyerrstatus)
381 #define YYBACKUP(Token, Value) \
383 if (yychar == YYEMPTY && yylen == 1) \
387 yychar1 = YYTRANSLATE (yychar); \
393 yyerror ("syntax error: cannot back up"); \
399 #define YYERRCODE 256
401 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
404 When YYLLOC_DEFAULT is run, CURRENT is set the location of the
405 first token. By default, to implement support for ranges, extend
406 its range to the last symbol. */
408 #ifndef YYLLOC_DEFAULT
409 # define YYLLOC_DEFAULT(Current, Rhs, N) \
410 Current.last_line = Rhs[[N]].last_line; \
411 Current.last_column = Rhs[[N]].last_column;
414 /* YYLEX -- calling `yylex' with the right arguments. */
419 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
421 # define YYLEX yylex (&yylval, &yylloc)
423 # else /* !YYLSP_NEEDED */
425 # define YYLEX yylex (&yylval, YYLEX_PARAM)
427 # define YYLEX yylex (&yylval)
429 # endif /* !YYLSP_NEEDED */
431 # define YYLEX yylex ()
434 /* Enable debugging if requested. */
438 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
439 # define YYFPRINTF fprintf
442 # define YYDPRINTF(Args) \
447 /* Nonzero means print parse trace. Since this is uninitialized, it
448 does not stop multiple parsers from coexisting. */
451 # define YYDPRINTF(Args)
452 #endif /* !YYDEBUG */
454 /* YYINITDEPTH -- initial size of the parser's stacks. */
456 # define YYINITDEPTH b4_initdepth
459 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
460 if the built-in stack extension method is used).
462 Do not make this value too large; the results are undefined if
463 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
464 evaluated with infinite-precision integer arithmetic. */
471 # define YYMAXDEPTH b4_maxdepth
479 # if defined (__GLIBC__) && defined (_STRING_H)
480 # define yystrlen strlen
482 /* Return the length of YYSTR. */
484 # if defined (__STDC__) || defined (__cplusplus)
485 yystrlen (const char *yystr)
491 register const char *yys = yystr;
493 while (*yys++ != '\0')
496 return yys - yystr - 1;
502 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
503 # define yystpcpy stpcpy
505 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
508 # if defined (__STDC__) || defined (__cplusplus)
509 yystpcpy (char *yydest, const char *yysrc)
511 yystpcpy (yydest, yysrc)
516 register char *yyd = yydest;
517 register const char *yys = yysrc;
519 while ((*yyd++ = *yys++) != '\0')
527 #endif /* !YYERROR_VERBOSE */
531 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
532 into yyparse. The argument should have type void *.
533 It should actually point to an object.
534 Grammar actions can access the variable by casting it
535 to the proper pointer type. */
538 # if defined (__STDC__) || defined (__cplusplus)
539 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
540 # define YYPARSE_PARAM_DECL
542 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
543 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
545 #else /* !YYPARSE_PARAM */
546 # define YYPARSE_PARAM_ARG
547 # define YYPARSE_PARAM_DECL
548 #endif /* !YYPARSE_PARAM */
550 /* Prevent warning if -Wstrict-prototypes. */
552 # ifdef YYPARSE_PARAM
553 int yyparse (void *);
559 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
560 variables are global, or local to YYPARSE. */
562 #define YY_DECL_NON_LSP_VARIABLES \
563 /* The lookahead symbol. */ \
566 /* The semantic value of the lookahead symbol. */ \
569 /* Number of parse errors so far. */ \
573 # define YY_DECL_VARIABLES \
574 YY_DECL_NON_LSP_VARIABLES \
576 /* Location data for the lookahead symbol. */ \
579 # define YY_DECL_VARIABLES \
580 YY_DECL_NON_LSP_VARIABLES
583 /* If nonreentrant, generate the variables here. */
590 yyparse (YYPARSE_PARAM_ARG)
593 /* If reentrant, generate the variables here. */
598 register int yystate;
601 /* Number of tokens to shift before error messages enabled. */
603 /* Lookahead token as an internal (translated) token number. */
606 /* Three stacks and their tools:
607 `yyss': related to states,
608 `yyvs': related to semantic values,
609 `yyls': related to locations.
611 Refer to the stacks thru separate pointers, to allow yyoverflow
612 to reallocate them elsewhere. */
614 /* The state stack. */
615 short yyssa[YYINITDEPTH];
617 register short *yyssp;
619 /* The semantic value stack. */
620 YYSTYPE yyvsa[YYINITDEPTH];
621 YYSTYPE *yyvs = yyvsa;
622 register YYSTYPE *yyvsp;
625 /* The location stack. */
626 YYLTYPE yylsa[YYINITDEPTH];
627 YYLTYPE *yyls = yylsa;
632 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
634 # define YYPOPSTACK (yyvsp--, yyssp--)
637 YYSIZE_T yystacksize = YYINITDEPTH;
639 /* The variables used to return semantic value and location from the
646 /* When reducing, the number of symbols on the RHS of the reduced
650 YYDPRINTF ((stderr, "Starting parse\n"));
655 yychar = YYEMPTY; /* Cause a token to be read. */
657 /* Initialize stack pointers.
658 Waste one element of value and location stack
659 so that they stay on the same level as the state stack.
660 The wasted elements are never initialized. */
669 /*------------------------------------------------------------.
670 | yynewstate -- Push a new state, which is found in yystate. |
671 `------------------------------------------------------------*/
673 /* In all cases, when you get here, the value and location stacks
674 have just been pushed. so pushing a state here evens the stacks.
681 if (yyssp >= yyss + yystacksize - 1)
683 /* Get the current used size of the three stacks, in elements. */
684 YYSIZE_T yysize = yyssp - yyss + 1;
688 /* Give user a chance to reallocate the stack. Use copies of
689 these so that the &'s don't force the real ones into
691 YYSTYPE *yyvs1 = yyvs;
694 /* Each stack pointer address is followed by the size of the
695 data in use in that stack, in bytes. */
697 YYLTYPE *yyls1 = yyls;
698 /* This used to be a conditional around just the two extra args,
699 but that might be undefined if yyoverflow is a macro. */
700 yyoverflow ("parser stack overflow",
701 &yyss1, yysize * sizeof (*yyssp),
702 &yyvs1, yysize * sizeof (*yyvsp),
703 &yyls1, yysize * sizeof (*yylsp),
707 yyoverflow ("parser stack overflow",
708 &yyss1, yysize * sizeof (*yyssp),
709 &yyvs1, yysize * sizeof (*yyvsp),
715 #else /* no yyoverflow */
716 /* Extend the stack our own way. */
717 if (yystacksize >= YYMAXDEPTH)
720 if (yystacksize > YYMAXDEPTH)
721 yystacksize = YYMAXDEPTH;
725 union yyalloc *yyptr =
726 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
729 YYSTACK_RELOCATE (yyss);
730 YYSTACK_RELOCATE (yyvs);
732 YYSTACK_RELOCATE (yyls);
734 # undef YYSTACK_RELOCATE
736 YYSTACK_FREE (yyss1);
738 #endif /* no yyoverflow */
740 yyssp = yyss + yysize - 1;
741 yyvsp = yyvs + yysize - 1;
743 yylsp = yyls + yysize - 1;
746 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
747 (unsigned long int) yystacksize));
749 if (yyssp >= yyss + yystacksize - 1)
753 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
762 /* Do appropriate processing given the current state. */
763 /* Read a lookahead token if we need one and don't already have one. */
766 /* First try to decide what to do without reference to lookahead token. */
768 yyn = yypact[yystate];
772 /* Not known => get a lookahead token if don't already have one. */
774 /* yychar is either YYEMPTY or YYEOF
775 or a valid token in external form. */
777 if (yychar == YYEMPTY)
779 YYDPRINTF ((stderr, "Reading a token: "));
783 /* Convert token to internal form (in yychar1) for indexing tables with. */
785 if (yychar <= 0) /* This means end of input. */
788 yychar = YYEOF; /* Don't call YYLEX any more. */
790 YYDPRINTF ((stderr, "Now at end of input.\n"));
794 yychar1 = YYTRANSLATE (yychar);
797 /* We have to keep this `#if YYDEBUG', since we use variables
798 which are defined only if `YYDEBUG' is set. */
801 YYFPRINTF (stderr, "Next token is %d (%s",
802 yychar, yytname[yychar1]);
803 /* Give the individual parser a way to print the precise
804 meaning of a token, for further debugging info. */
806 YYPRINT (stderr, yychar, yylval);
808 YYFPRINTF (stderr, ")\n");
814 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
819 /* yyn is what to do for this token type in this state.
820 Negative => reduce, -yyn is rule number.
821 Positive => shift, yyn is new state.
822 New state is final state => don't bother to shift,
824 0, or most negative number => error. */
839 /* Shift the lookahead token. */
840 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
841 yychar, yytname[yychar1]));
843 /* Discard the token being shifted unless it is eof. */
852 /* Count tokens shifted since error; after three, turn off error
861 /*-----------------------------------------------------------.
862 | yydefault -- do the default action for the current state. |
863 `-----------------------------------------------------------*/
865 yyn = yydefact[yystate];
871 /*-----------------------------.
872 | yyreduce -- Do a reduction. |
873 `-----------------------------*/
875 /* yyn is the number of a rule to reduce with. */
878 /* If YYLEN is nonzero, implement the default value of the action:
881 Otherwise, the following line sets YYVAL to the semantic value of
882 the lookahead token. This behavior is undocumented and Bison
883 users should not rely upon it. Assigning to YYVAL
884 unconditionally makes the parser a bit smaller, and it avoids a
885 GCC warning that YYVAL may be used uninitialized. */
886 yyval = yyvsp[1-yylen];
889 /* Similarly for the default location. Let the user run additional
890 commands if for instance locations are ranges. */
891 yyloc = yylsp[1-yylen];
892 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
896 /* We have to keep this `#if YYDEBUG', since we use variables which
897 are defined only if `YYDEBUG' is set. */
902 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
903 yyn - 1, yyrline[yyn]);
905 /* Print the symbols being reduced, and their result. */
906 for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
907 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
908 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
916 /* Line __line__ of __file__. */
917 #line __oline__ "b4_output_parser_name"
928 short *yyssp1 = yyss - 1;
929 YYFPRINTF (stderr, "state stack now");
930 while (yyssp1 != yyssp)
931 YYFPRINTF (stderr, " %d", *++yyssp1);
932 YYFPRINTF (stderr, "\n");
941 /* Now `shift' the result of the reduction. Determine what state
942 that goes to, based on the state we popped back to and the rule
943 number reduced by. */
947 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
948 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
949 yystate = yytable[yystate];
951 yystate = yydefgoto[yyn - YYNTOKENS];
956 /*------------------------------------.
957 | yyerrlab -- here on detecting error |
958 `------------------------------------*/
960 /* If not already recovering from an error, report this error. */
966 yyn = yypact[yystate];
968 if (yyn > YYFLAG && yyn < YYLAST)
975 /* Start YYX at -YYN if negative to avoid negative indexes in
977 for (yyx = yyn < 0 ? -yyn : 0;
978 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
979 if (yycheck[yyx + yyn] == yyx)
980 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
981 yysize += yystrlen ("parse error, unexpected ") + 1;
982 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
983 yymsg = (char *) YYSTACK_ALLOC (yysize);
986 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
987 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
992 for (yyx = yyn < 0 ? -yyn : 0;
993 yyx < (int) (sizeof (yytname) / sizeof (char *));
995 if (yycheck[yyx + yyn] == yyx)
997 const char *yyq = ! yycount ? ", expecting " : " or ";
998 yyp = yystpcpy (yyp, yyq);
999 yyp = yystpcpy (yyp, yytname[yyx]);
1004 YYSTACK_FREE (yymsg);
1007 yyerror ("parse error; also virtual memory exhausted");
1010 #endif /* YYERROR_VERBOSE */
1011 yyerror ("parse error");
1016 /*----------------------------------------------------.
1017 | yyerrlab1 -- error raised explicitly by an action. |
1018 `----------------------------------------------------*/
1020 if (yyerrstatus == 3)
1022 /* If just tried and failed to reuse lookahead token after an
1023 error, discard it. */
1025 /* Return failure if at end of input. */
1026 if (yychar == YYEOF)
1028 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1029 yychar, yytname[yychar1]));
1033 /* Else will try to reuse lookahead token after shifting the error
1036 yyerrstatus = 3; /* Each real token shifted decrements this. */
1041 /*-------------------------------------------------------------------.
1042 | yyerrdefault -- current state does not do anything special for the |
1044 `-------------------------------------------------------------------*/
1047 /* This is wrong; only states that explicitly want error tokens
1048 should shift them. */
1050 /* If its default is to accept any token, ok. Otherwise pop it. */
1051 yyn = yydefact[yystate];
1057 /*---------------------------------------------------------------.
1058 | yyerrpop -- pop the current state because it cannot handle the |
1060 `---------------------------------------------------------------*/
1073 short *yyssp1 = yyss - 1;
1074 YYFPRINTF (stderr, "Error: state stack now");
1075 while (yyssp1 != yyssp)
1076 YYFPRINTF (stderr, " %d", *++yyssp1);
1077 YYFPRINTF (stderr, "\n");
1085 yyn = yypact[yystate];
1090 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1107 YYDPRINTF ((stderr, "Shifting error token, "));
1118 /*-------------------------------------.
1119 | yyacceptlab -- YYACCEPT comes here. |
1120 `-------------------------------------*/
1125 /*-----------------------------------.
1126 | yyabortlab -- YYABORT comes here. |
1127 `-----------------------------------*/
1132 /*---------------------------------------------.
1133 | yyoverflowab -- parser overflow comes here. |
1134 `---------------------------------------------*/
1136 yyerror ("parser stack overflow");
1143 YYSTACK_FREE (yyss);
1149 m4_if(b4_defines_flag, 0, [],
1150 [#output "b4_output_header_name"
1151 #ifndef b4_header_guard
1152 # define b4_header_guard
1154 b4_token_defines(b4_tokens)
1157 m4_ifdef([b4_stype_line],
1158 [#line b4_stype_line "b4_filename"
1162 # define YYSTYPE yystype
1166 [extern YYSTYPE b4_prefix[]lval;])
1168 m4_if(b4_locations_flag, [0], [],
1170 typedef struct yyltype
1177 # define YYLTYPE yyltype
1181 [extern YYLTYPE b4_prefix[]lloc;])
1183 #endif /* not b4_header_guard */