3 # m4_define_default(MACRO, VALUE)
4 # -------------------------------
5 # Define MACRO to VALUE, unless already defined.
6 m4_define([m4_define_default],
7 [m4_ifdef([$1], [], [m4_define($@)])])
9 m4_define_default([b4_input_suffix], [.y])
11 m4_define_default([b4_output_parser_suffix],
12 [m4_translit(b4_input_suffix, [yY], [cC])])
14 m4_define_default([b4_output_parser_name],
15 [b4_output_prefix[]b4_output_infix[]b4_output_parser_suffix[]])
18 m4_define_default([b4_output_header_suffix],
19 [m4_translit(b4_input_suffix, [yY], [hH])])
21 m4_define_default([b4_output_header_name],
22 [b4_output_prefix[]b4_output_infix[]b4_output_header_suffix[]])
24 m4_define_default([b4_header_guard],
25 [m4_bpatsubst(m4_toupper([BISON_]b4_output_header_name),
26 [[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])])
29 #output "b4_output_parser_name"
30 /* A Bison parser, made from b4_filename
31 by GNU bison b4_version. */
33 /* Skeleton output parser for Bison,
34 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
37 This program is free software; you can redistribute it and/or modify
38 it under the terms of the GNU General Public License as published by
39 the Free Software Foundation; either version 2, or (at your option)
42 This program is distributed in the hope that it will be useful,
43 but WITHOUT ANY WARRANTY; without even the implied warranty of
44 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 GNU General Public License for more details.
47 You should have received a copy of the GNU General Public License
48 along with this program; if not, write to the Free Software
49 Foundation, Inc., 59 Temple Place - Suite 330,
50 Boston, MA 02111-1307, USA. */
52 /* As a special exception, when this file is copied by Bison into a
53 Bison output file, you may use that output file without restriction.
54 This special exception was added by the Free Software Foundation
55 in version 1.24 of Bison. */
57 /* This is the parser code that is written into each bison parser when
58 the %semantic_parser declaration is not specified in the grammar.
59 It was written by Richard Stallman by simplifying the hairy parser
60 used when %semantic_parser is specified. */
62 /* Identify Bison output. */
66 #define YYPURE b4_pure
68 /* Using locations. */
69 #define YYLSP_NEEDED b4_locations_flag
71 m4_if(b4_prefix[], [yy], [],
72 [/* If NAME_PREFIX is specified substitute the variables and functions
74 #define yyparse b4_prefix[]parse
75 #define yylex b4_prefix[]lex
76 #define yyerror b4_prefix[]error
77 #define yylval b4_prefix[]lval
78 #define yychar b4_prefix[]char
79 #define yydebug b4_prefix[]debug
80 #define yynerrs b4_prefix[]nerrs
82 # define yylloc b4_prefix[]lloc
86 /* Copy the user declarations. */
89 /* Enabling traces. */
91 # define YYDEBUG b4_debug
94 /* Enabling verbose error messages. */
95 #ifdef YYERROR_VERBOSE
96 # undef YYERROR_VERBOSE
97 # define YYERROR_VERBOSE 1
99 # define YYERROR_VERBOSE b4_error_verbose
103 typedef b4_stype yystype;
104 # define YYSTYPE yystype
108 typedef struct yyltype
115 # define YYLTYPE b4_ltype
118 /* Line __line__ of __file__. */
119 #line __oline__ "b4_output_parser_name"
121 /* All symbols defined below should begin with yy or YY, to avoid
122 infringing on user name space. This should be done even for local
123 variables, as they might otherwise be expanded by user macros.
124 There are some unavoidable exceptions within include files to
125 define necessary library symbols; they are noted "INFRINGES ON
126 USER NAME SPACE" below. */
128 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
130 /* The parser invokes alloca or malloc; define the necessary symbols. */
132 # if YYSTACK_USE_ALLOCA
133 # define YYSTACK_ALLOC alloca
135 # ifndef YYSTACK_USE_ALLOCA
136 # if defined (alloca) || defined (_ALLOCA_H)
137 # define YYSTACK_ALLOC alloca
140 # define YYSTACK_ALLOC __builtin_alloca
146 # ifdef YYSTACK_ALLOC
147 /* Pacify GCC's `empty if-body' warning. */
148 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
150 # if defined (__STDC__) || defined (__cplusplus)
151 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
152 # define YYSIZE_T size_t
154 # define YYSTACK_ALLOC malloc
155 # define YYSTACK_FREE free
158 /* A type that is properly aligned for any stack member. */
168 /* The size of the maximum gap between one aligned stack and the next. */
169 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
171 /* The size of an array large to enough to hold all stacks, each with
174 # define YYSTACK_BYTES(N) \
175 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
176 + 2 * YYSTACK_GAP_MAX)
178 # define YYSTACK_BYTES(N) \
179 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
183 /* Relocate the TYPE STACK from its old location to the new one. The
184 local variables YYSIZE and YYSTACKSIZE give the old and new number of
185 elements in the stack, and YYPTR gives the new location of the
186 stack. Advance YYPTR to a properly aligned location for the next
188 # define YYSTACK_RELOCATE(Type, Stack) \
191 YYSIZE_T yynewbytes; \
192 yymemcpy ((char *) yyptr, (char *) (Stack), \
193 yysize * (YYSIZE_T) sizeof (Type)); \
194 Stack = &yyptr->Stack; \
195 yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \
196 yyptr += yynewbytes / sizeof (*yyptr); \
200 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
205 /* YYFINAL -- State number of the termination state. */
206 #define YYFINAL b4_final
207 #define YYFLAG b4_flag
208 #define YYLAST b4_last
210 /* YYNTOKENS -- Number of terminals. */
211 #define YYNTOKENS b4_ntokens
212 /* YYNNTS -- Number of nonterminals. */
213 #define YYNNTS b4_nnts
214 /* YYNRULES -- Number of rules. */
215 #define YYNRULES b4_nrules
216 /* YYNRULES -- Number of states. */
217 #define YYNSTATES b4_nstates
218 #define YYMAXUTOK b4_maxtok
220 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
221 #define YYTRANSLATE(x) ((unsigned)(x) <= b4_maxtok ? yytranslate[[x]] : b4_nsym)
223 /* YYTRANSLATE[[YYLEX]] -- Bison symbol number corresponding to YYLEX. */
224 static const char yytranslate[[]] =
230 /* YYPRHS[[YYN]] -- Index of the first RHS symbol of rule number YYN in
232 static const short yyprhs[[]] =
237 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
238 static const short yyrhs[[]] =
243 /* YYRLINE[[YYN]] -- source line where rule number YYN was defined. */
244 static const short yyrline[[]] =
250 #if (YYDEBUG) || YYERROR_VERBOSE
251 /* YYTNME[[SYMBOL-NUM]] -- String name of the symbol SYMBOL-NUM.
252 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
253 static const char *const yytname[[]] =
259 /* YYTOKNUM[[YYN]] -- Index in YYTNAME corresponding to YYLEX. */
260 static const short yytoknum[[]] =
265 /* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives. */
266 static const short yyr1[[]] =
271 /* YYR2[[YYN]] -- Number of symbols composing right hand side of rule YYN. */
272 static const short yyr2[[]] =
277 /* YYDEFACT[[S]] -- default rule to reduce with in state S when YYTABLE
278 doesn't specify something else to do. Zero means the default is an
280 static const short yydefact[[]] =
285 /* YYPGOTO[[NTERM-NUM]]. */
286 static const short yydefgoto[[]] =
291 /* YYPACT[[STATE-NUM]] -- Index in YYTABLE of the portion describing
293 static const short yypact[[]] =
298 /* YYPGOTO[[NTERM-NUM]]. */
299 static const short yypgoto[[]] =
304 /* YYTABLE[[YYPACT[STATE-NUM]]]. What to do in state STATE-NUM. If
305 positive, shift that token. If negative, reduce the rule which
306 number is the opposite. If zero, do what YYDEFACT says. */
307 static const short yytable[[]] =
312 static const short yycheck[[]] =
318 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
319 # define YYSIZE_T __SIZE_TYPE__
321 #if ! defined (YYSIZE_T) && defined (size_t)
322 # define YYSIZE_T size_t
324 #if ! defined (YYSIZE_T)
325 # if defined (__STDC__) || defined (__cplusplus)
326 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
327 # define YYSIZE_T size_t
330 #if ! defined (YYSIZE_T)
331 # define YYSIZE_T unsigned int
334 #define yyerrok (yyerrstatus = 0)
335 #define yyclearin (yychar = YYEMPTY)
339 #define YYACCEPT goto yyacceptlab
340 #define YYABORT goto yyabortlab
341 #define YYERROR goto yyerrlab1
343 /* Like YYERROR except do call yyerror. This remains here temporarily
344 to ease the transition to the new meaning of YYERROR, for GCC.
345 Once GCC version 2 has supplanted version 1, this can go. */
347 #define YYFAIL goto yyerrlab
349 #define YYRECOVERING() (!!yyerrstatus)
351 #define YYBACKUP(Token, Value) \
353 if (yychar == YYEMPTY && yylen == 1) \
357 yychar1 = YYTRANSLATE (yychar); \
363 yyerror ("syntax error: cannot back up"); \
369 #define YYERRCODE 256
371 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
374 When YYLLOC_DEFAULT is run, CURRENT is set the location of the
375 first token. By default, to implement support for ranges, extend
376 its range to the last symbol. */
378 #ifndef YYLLOC_DEFAULT
379 # define YYLLOC_DEFAULT(Current, Rhs, N) \
380 Current.last_line = Rhs[[N]].last_line; \
381 Current.last_column = Rhs[[N]].last_column;
384 /* YYLEX -- calling `yylex' with the right arguments. */
389 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
391 # define YYLEX yylex (&yylval, &yylloc)
393 # else /* !YYLSP_NEEDED */
395 # define YYLEX yylex (&yylval, YYLEX_PARAM)
397 # define YYLEX yylex (&yylval)
399 # endif /* !YYLSP_NEEDED */
401 # define YYLEX yylex ()
404 /* Enable debugging if requested. */
408 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
409 # define YYFPRINTF fprintf
412 # define YYDPRINTF(Args) \
417 /* Nonzero means print parse trace. Since this is uninitialized, it
418 does not stop multiple parsers from coexisting. */
421 # define YYDPRINTF(Args)
422 #endif /* !YYDEBUG */
424 /* YYINITDEPTH -- initial size of the parser's stacks. */
426 # define YYINITDEPTH b4_initdepth
429 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
430 if the built-in stack extension method is used).
432 Do not make this value too large; the results are undefined if
433 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
434 evaluated with infinite-precision integer arithmetic. */
441 # define YYMAXDEPTH b4_maxdepth
446 #if ! defined (yyoverflow) && ! defined (yymemcpy)
447 # if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
448 # define yymemcpy __builtin_memcpy
449 # else /* not GNU C or C++ */
451 /* This is the most reliable way to avoid incompatibilities
452 in available built-in functions on various systems. */
454 # if defined (__STDC__) || defined (__cplusplus)
455 yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount)
457 yymemcpy (yyto, yyfrom, yycount)
463 register const char *yyf = yyfrom;
464 register char *yyt = yyto;
465 register YYSIZE_T yyi = yycount;
476 # if defined (__GLIBC__) && defined (_STRING_H)
477 # define yystrlen strlen
479 /* Return the length of YYSTR. */
481 # if defined (__STDC__) || defined (__cplusplus)
482 yystrlen (const char *yystr)
488 register const char *yys = yystr;
490 while (*yys++ != '\0')
493 return yys - yystr - 1;
499 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
500 # define yystpcpy stpcpy
502 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
505 # if defined (__STDC__) || defined (__cplusplus)
506 yystpcpy (char *yydest, const char *yysrc)
508 yystpcpy (yydest, yysrc)
513 register char *yyd = yydest;
514 register const char *yys = yysrc;
516 while ((*yyd++ = *yys++) != '\0')
524 #endif /* !YYERROR_VERBOSE */
528 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
529 into yyparse. The argument should have type void *.
530 It should actually point to an object.
531 Grammar actions can access the variable by casting it
532 to the proper pointer type. */
535 # if defined (__STDC__) || defined (__cplusplus)
536 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
537 # define YYPARSE_PARAM_DECL
539 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
540 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
542 #else /* !YYPARSE_PARAM */
543 # define YYPARSE_PARAM_ARG
544 # define YYPARSE_PARAM_DECL
545 #endif /* !YYPARSE_PARAM */
547 /* Prevent warning if -Wstrict-prototypes. */
549 # ifdef YYPARSE_PARAM
550 int yyparse (void *);
556 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
557 variables are global, or local to YYPARSE. */
559 #define YY_DECL_NON_LSP_VARIABLES \
560 /* The lookahead symbol. */ \
563 /* The semantic value of the lookahead symbol. */ \
566 /* Number of parse errors so far. */ \
570 # define YY_DECL_VARIABLES \
571 YY_DECL_NON_LSP_VARIABLES \
573 /* Location data for the lookahead symbol. */ \
576 # define YY_DECL_VARIABLES \
577 YY_DECL_NON_LSP_VARIABLES
580 /* If nonreentrant, generate the variables here. */
587 yyparse (YYPARSE_PARAM_ARG)
590 /* If reentrant, generate the variables here. */
595 register int yystate;
598 /* Number of tokens to shift before error messages enabled. */
600 /* Lookahead token as an internal (translated) token number. */
603 /* Three stacks and their tools:
604 `yyss': related to states,
605 `yyvs': related to semantic values,
606 `yyls': related to locations.
608 Refer to the stacks thru separate pointers, to allow yyoverflow
609 to reallocate them elsewhere. */
611 /* The state stack. */
612 short yyssa[YYINITDEPTH];
614 register short *yyssp;
616 /* The semantic value stack. */
617 YYSTYPE yyvsa[YYINITDEPTH];
618 YYSTYPE *yyvs = yyvsa;
619 register YYSTYPE *yyvsp;
622 /* The location stack. */
623 YYLTYPE yylsa[YYINITDEPTH];
624 YYLTYPE *yyls = yylsa;
629 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
631 # define YYPOPSTACK (yyvsp--, yyssp--)
634 YYSIZE_T yystacksize = YYINITDEPTH;
636 /* The variables used to return semantic value and location from the
643 /* When reducing, the number of symbols on the RHS of the reduced
647 YYDPRINTF ((stderr, "Starting parse\n"));
652 yychar = YYEMPTY; /* Cause a token to be read. */
654 /* Initialize stack pointers.
655 Waste one element of value and location stack
656 so that they stay on the same level as the state stack.
657 The wasted elements are never initialized. */
666 /*------------------------------------------------------------.
667 | yynewstate -- Push a new state, which is found in yystate. |
668 `------------------------------------------------------------*/
670 /* In all cases, when you get here, the value and location stacks
671 have just been pushed. so pushing a state here evens the stacks.
678 if (yyssp >= yyss + yystacksize - 1)
680 /* Get the current used size of the three stacks, in elements. */
681 YYSIZE_T yysize = yyssp - yyss + 1;
685 /* Give user a chance to reallocate the stack. Use copies of
686 these so that the &'s don't force the real ones into
688 YYSTYPE *yyvs1 = yyvs;
691 /* Each stack pointer address is followed by the size of the
692 data in use in that stack, in bytes. */
694 YYLTYPE *yyls1 = yyls;
695 /* This used to be a conditional around just the two extra args,
696 but that might be undefined if yyoverflow is a macro. */
697 yyoverflow ("parser stack overflow",
698 &yyss1, yysize * sizeof (*yyssp),
699 &yyvs1, yysize * sizeof (*yyvsp),
700 &yyls1, yysize * sizeof (*yylsp),
704 yyoverflow ("parser stack overflow",
705 &yyss1, yysize * sizeof (*yyssp),
706 &yyvs1, yysize * sizeof (*yyvsp),
712 #else /* no yyoverflow */
713 /* Extend the stack our own way. */
714 if (yystacksize >= YYMAXDEPTH)
717 if (yystacksize > YYMAXDEPTH)
718 yystacksize = YYMAXDEPTH;
722 union yyalloc *yyptr =
723 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
726 YYSTACK_RELOCATE (short, yyss);
727 YYSTACK_RELOCATE (YYSTYPE, yyvs);
729 YYSTACK_RELOCATE (YYLTYPE, yyls);
731 # undef YYSTACK_RELOCATE
733 YYSTACK_FREE (yyss1);
735 #endif /* no yyoverflow */
737 yyssp = yyss + yysize - 1;
738 yyvsp = yyvs + yysize - 1;
740 yylsp = yyls + yysize - 1;
743 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
744 (unsigned long int) yystacksize));
746 if (yyssp >= yyss + yystacksize - 1)
750 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
759 /* Do appropriate processing given the current state. */
760 /* Read a lookahead token if we need one and don't already have one. */
763 /* First try to decide what to do without reference to lookahead token. */
765 yyn = yypact[yystate];
769 /* Not known => get a lookahead token if don't already have one. */
771 /* yychar is either YYEMPTY or YYEOF
772 or a valid token in external form. */
774 if (yychar == YYEMPTY)
776 YYDPRINTF ((stderr, "Reading a token: "));
780 /* Convert token to internal form (in yychar1) for indexing tables with. */
782 if (yychar <= 0) /* This means end of input. */
785 yychar = YYEOF; /* Don't call YYLEX any more. */
787 YYDPRINTF ((stderr, "Now at end of input.\n"));
791 yychar1 = YYTRANSLATE (yychar);
794 /* We have to keep this `#if YYDEBUG', since we use variables
795 which are defined only if `YYDEBUG' is set. */
798 YYFPRINTF (stderr, "Next token is %d (%s",
799 yychar, yytname[yychar1]);
800 /* Give the individual parser a way to print the precise
801 meaning of a token, for further debugging info. */
803 YYPRINT (stderr, yychar, yylval);
805 YYFPRINTF (stderr, ")\n");
811 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
816 /* yyn is what to do for this token type in this state.
817 Negative => reduce, -yyn is rule number.
818 Positive => shift, yyn is new state.
819 New state is final state => don't bother to shift,
821 0, or most negative number => error. */
836 /* Shift the lookahead token. */
837 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
838 yychar, yytname[yychar1]));
840 /* Discard the token being shifted unless it is eof. */
849 /* Count tokens shifted since error; after three, turn off error
858 /*-----------------------------------------------------------.
859 | yydefault -- do the default action for the current state. |
860 `-----------------------------------------------------------*/
862 yyn = yydefact[yystate];
868 /*-----------------------------.
869 | yyreduce -- Do a reduction. |
870 `-----------------------------*/
872 /* yyn is the number of a rule to reduce with. */
875 /* If YYLEN is nonzero, implement the default value of the action:
878 Otherwise, the following line sets YYVAL to the semantic value of
879 the lookahead token. This behavior is undocumented and Bison
880 users should not rely upon it. Assigning to YYVAL
881 unconditionally makes the parser a bit smaller, and it avoids a
882 GCC warning that YYVAL may be used uninitialized. */
883 yyval = yyvsp[1-yylen];
886 /* Similarly for the default location. Let the user run additional
887 commands if for instance locations are ranges. */
888 yyloc = yylsp[1-yylen];
889 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
893 /* We have to keep this `#if YYDEBUG', since we use variables which
894 are defined only if `YYDEBUG' is set. */
899 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
900 yyn - 1, yyrline[yyn]);
902 /* Print the symbols being reduced, and their result. */
903 for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
904 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
905 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
913 /* Line __line__ of __file__. */
914 #line __oline__ "b4_output_parser_name"
925 short *yyssp1 = yyss - 1;
926 YYFPRINTF (stderr, "state stack now");
927 while (yyssp1 != yyssp)
928 YYFPRINTF (stderr, " %d", *++yyssp1);
929 YYFPRINTF (stderr, "\n");
938 /* Now `shift' the result of the reduction. Determine what state
939 that goes to, based on the state we popped back to and the rule
940 number reduced by. */
944 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
945 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
946 yystate = yytable[yystate];
948 yystate = yydefgoto[yyn - YYNTOKENS];
953 /*------------------------------------.
954 | yyerrlab -- here on detecting error |
955 `------------------------------------*/
957 /* If not already recovering from an error, report this error. */
963 yyn = yypact[yystate];
965 if (yyn > YYFLAG && yyn < YYLAST)
972 /* Start YYX at -YYN if negative to avoid negative indexes in
974 for (yyx = yyn < 0 ? -yyn : 0;
975 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
976 if (yycheck[yyx + yyn] == yyx)
977 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
978 yysize += yystrlen ("parse error, unexpected ") + 1;
979 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
980 yymsg = (char *) YYSTACK_ALLOC (yysize);
983 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
984 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
989 for (yyx = yyn < 0 ? -yyn : 0;
990 yyx < (int) (sizeof (yytname) / sizeof (char *));
992 if (yycheck[yyx + yyn] == yyx)
994 const char *yyq = ! yycount ? ", expecting " : " or ";
995 yyp = yystpcpy (yyp, yyq);
996 yyp = yystpcpy (yyp, yytname[yyx]);
1001 YYSTACK_FREE (yymsg);
1004 yyerror ("parse error; also virtual memory exhausted");
1007 #endif /* YYERROR_VERBOSE */
1008 yyerror ("parse error");
1013 /*----------------------------------------------------.
1014 | yyerrlab1 -- error raised explicitly by an action. |
1015 `----------------------------------------------------*/
1017 if (yyerrstatus == 3)
1019 /* If just tried and failed to reuse lookahead token after an
1020 error, discard it. */
1022 /* Return failure if at end of input. */
1023 if (yychar == YYEOF)
1025 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1026 yychar, yytname[yychar1]));
1030 /* Else will try to reuse lookahead token after shifting the error
1033 yyerrstatus = 3; /* Each real token shifted decrements this. */
1038 /*-------------------------------------------------------------------.
1039 | yyerrdefault -- current state does not do anything special for the |
1041 `-------------------------------------------------------------------*/
1044 /* This is wrong; only states that explicitly want error tokens
1045 should shift them. */
1047 /* If its default is to accept any token, ok. Otherwise pop it. */
1048 yyn = yydefact[yystate];
1054 /*---------------------------------------------------------------.
1055 | yyerrpop -- pop the current state because it cannot handle the |
1057 `---------------------------------------------------------------*/
1070 short *yyssp1 = yyss - 1;
1071 YYFPRINTF (stderr, "Error: state stack now");
1072 while (yyssp1 != yyssp)
1073 YYFPRINTF (stderr, " %d", *++yyssp1);
1074 YYFPRINTF (stderr, "\n");
1082 yyn = yypact[yystate];
1087 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1104 YYDPRINTF ((stderr, "Shifting error token, "));
1115 /*-------------------------------------.
1116 | yyacceptlab -- YYACCEPT comes here. |
1117 `-------------------------------------*/
1122 /*-----------------------------------.
1123 | yyabortlab -- YYABORT comes here. |
1124 `-----------------------------------*/
1129 /*---------------------------------------------.
1130 | yyoverflowab -- parser overflow comes here. |
1131 `---------------------------------------------*/
1133 yyerror ("parser stack overflow");
1140 YYSTACK_FREE (yyss);
1146 m4_if(b4_defines_flag, 0, [],
1147 [#output "b4_output_header_name"
1148 #ifndef b4_header_guard
1149 # define b4_header_guard
1156 # define YYSTYPE yystype
1160 [extern YYSTYPE b4_prefix[]lval;])
1162 m4_if(b4_locations_flag, [0], [],
1164 typedef struct yyltype
1171 # define YYLTYPE yyltype
1175 [extern YYLTYPE b4_prefix[]lloc;])
1177 #endif /* not b4_header_guard */