3 /* A Bison parser, made from %%filename
4 by GNU bison %%version. */
6 /* Skeleton output parser for bison,
7 Copyright 1984, 1989, 1990, 2000, 2001 Free Software Foundation, Inc.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
24 /* As a special exception, when this file is copied by Bison into a
25 Bison output file, you may use that output file without restriction.
26 This special exception was added by the Free Software Foundation
27 in version 1.24 of Bison. */
29 /* This is the parser code that is written into each bison parser when
30 the %semantic_parser declaration is not specified in the grammar.
31 It was written by Richard Stallman by simplifying the hairy parser
32 used when %semantic_parser is specified. */
34 /* Identify Bison output. */
40 /* Using locations. */
41 #define YYLSP_NEEDED %%locations-flag
43 /* Enabling traces. */
45 # define YYDEBUG %%debug
48 /* Enabling verbose error messages. */
49 #ifdef YYERROR_VERBOSE
50 # undef YYERROR_VERBOSE
51 # define YYERROR_VERBOSE 1
53 # define YYERROR_VERBOSE %%error-verbose
56 /* If name_prefix is specify substitute the variables and functions
58 #define yyparse %%prefix##parse
59 #define yylex %%prefix##lex
60 #define yyerror %%prefix##error
61 #define yylval %%prefix##lval
62 #define yychar %%prefix##char
63 #define yydebug %%prefix##debug
64 #define yynerrs %%prefix##nerrs
67 typedef %%stype yystype;
68 # define YYSTYPE yystype
72 typedef struct yyltype
79 # define YYLTYPE %%ltype
82 /* Copy the user declarations. */
85 /* Line %%skeleton-line of %%skeleton. */
86 #line %%line "%%parser-file-name"
90 /* All symbols defined below should begin with yy or YY, to avoid
91 infringing on user name space. This should be done even for local
92 variables, as they might otherwise be expanded by user macros.
93 There are some unavoidable exceptions within include files to
94 define necessary library symbols; they are noted "INFRINGES ON
95 USER NAME SPACE" below. */
97 #if ! defined (yyoverflow) || YYERROR_VERBOSE
99 /* The parser invokes alloca or malloc; define the necessary symbols. */
101 # if YYSTACK_USE_ALLOCA
102 # define YYSTACK_ALLOC alloca
103 # define YYSIZE_T size_t
105 # ifndef YYSTACK_USE_ALLOCA
106 # if defined (alloca) || defined (_ALLOCA_H)
107 # define YYSTACK_ALLOC alloca
108 # define YYSIZE_T size_t
110 # if defined (__GNUC__) || defined (_AIX) || defined (__hpux)
111 # define YYSTACK_ALLOC __builtin_alloca
117 # if defined (__sgi) || defined (__sparc__) || defined (__sparc) || defined (__sun)
118 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
119 # define YYSTACK_ALLOC alloca
120 # define YYSIZE_T size_t
127 # ifdef YYSTACK_ALLOC
128 /* Pacify GCC's `empty if-body' warning. */
129 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
132 # include <cstdlib> /* INFRINGES ON USER NAME SPACE */
133 # define YYSIZE_T std::size_t
134 # define YYSTACK_ALLOC std::malloc
135 # define YYSTACK_FREE std::free
138 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
139 # define YYSIZE_T size_t
141 # define YYSTACK_ALLOC malloc
142 # define YYSTACK_FREE free
146 /* A type that is properly aligned for any stack member. */
156 /* The size of the maximum gap between one aligned stack and the next. */
157 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
159 /* The size of an array large to enough to hold all stacks, each with
162 # define YYSTACK_BYTES(N) \
163 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
164 + 2 * YYSTACK_GAP_MAX)
166 # define YYSTACK_BYTES(N) \
167 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
171 /* Relocate the TYPE STACK from its old location to the new one. The
172 local variables YYSIZE and YYSTACKSIZE give the old and new number of
173 elements in the stack, and YYPTR gives the new location of the
174 stack. Advance YYPTR to a properly aligned location for the next
176 # define YYSTACK_RELOCATE(Type, Stack) \
179 YYSIZE_T yynewbytes; \
180 yymemcpy ((char *) yyptr, (char *) (Stack), \
181 yysize * (YYSIZE_T) sizeof (Type)); \
182 Stack = &yyptr->Stack; \
183 yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \
184 yyptr += yynewbytes / sizeof (*yyptr); \
188 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
193 /* YYFINAL -- State number of the termination state. */
194 #define YYFINAL %%final
195 #define YYFLAG %%flag
196 #define YYLAST %%last
198 /* YYNTOKENS -- Number of terminals. */
199 #define YYNTOKENS %%ntokens
200 /* YYNNTS -- Number of nonterminals. */
201 #define YYNNTS %%nnts
202 /* YYNRULES -- Number of rules. */
203 #define YYNRULES %%nrules
204 /* YYNRULES -- Number of states. */
205 #define YYNSTATES %%nstates
206 #define YYMAXUTOK %%maxtok
208 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
209 #define YYTRANSLATE(x) ((unsigned)(x) <= %%maxtok ? yytranslate[x] : %%nsym)
211 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
212 static const char yytranslate[] =
218 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
220 static const short yyprhs[] =
225 /* YYRHS -- A `0'-separated list of the rules' RHS. */
226 static const short yyrhs[] =
231 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
232 static const short yyrline[] =
238 #if (YYDEBUG) || YYERROR_VERBOSE
239 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
240 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
241 static const char *const yytname[] =
247 /* YYTOKNUM[YYN] -- Index in YYTNAME corresponding to YYLEX. */
248 static const short yytoknum[] =
253 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
254 static const short yyr1[] =
259 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
260 static const short yyr2[] =
265 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
266 doesn't specify something else to do. Zero means the default is an
268 static const short yydefact[] =
273 /* YYPGOTO[NTERM-NUM]. */
274 static const short yydefgoto[] =
279 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
281 static const short yypact[] =
286 /* YYPGOTO[NTERM-NUM]. */
287 static const short yypgoto[] =
292 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
293 positive, shift that token. If negative, reduce the rule which
294 number is the opposite. If zero, do what YYDEFACT says. */
295 static const short yytable[] =
300 static const short yycheck[] =
306 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
307 # define YYSIZE_T __SIZE_TYPE__
309 #if ! defined (YYSIZE_T) && defined (size_t)
310 # define YYSIZE_T size_t
312 #if ! defined (YYSIZE_T)
314 # include <cstddef> /* INFRINGES ON USER NAME SPACE */
315 # define YYSIZE_T std::size_t
318 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
319 # define YYSIZE_T size_t
323 #if ! defined (YYSIZE_T)
324 # define YYSIZE_T unsigned int
327 #define yyerrok (yyerrstatus = 0)
328 #define yyclearin (yychar = YYEMPTY)
332 #define YYACCEPT goto yyacceptlab
333 #define YYABORT goto yyabortlab
334 #define YYERROR goto yyerrlab1
336 /* Like YYERROR except do call yyerror. This remains here temporarily
337 to ease the transition to the new meaning of YYERROR, for GCC.
338 Once GCC version 2 has supplanted version 1, this can go. */
340 #define YYFAIL goto yyerrlab
342 #define YYRECOVERING() (!!yyerrstatus)
344 #define YYBACKUP(Token, Value) \
346 if (yychar == YYEMPTY && yylen == 1) \
350 yychar1 = YYTRANSLATE (yychar); \
356 yyerror ("syntax error: cannot back up"); \
362 #define YYERRCODE 256
364 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
367 When YYLLOC_DEFAULT is run, CURRENT is set the location of the
368 first token. By default, to implement support for ranges, extend
369 its range to the last symbol. */
371 #ifndef YYLLOC_DEFAULT
372 # define YYLLOC_DEFAULT(Current, Rhs, N) \
373 Current.last_line = Rhs[N].last_line; \
374 Current.last_column = Rhs[N].last_column;
377 /* YYLEX -- calling `yylex' with the right arguments. */
382 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
384 # define YYLEX yylex (&yylval, &yylloc)
386 # else /* !YYLSP_NEEDED */
388 # define YYLEX yylex (&yylval, YYLEX_PARAM)
390 # define YYLEX yylex (&yylval)
392 # endif /* !YYLSP_NEEDED */
394 # define YYLEX yylex ()
397 /* Enable debugging if requested. */
402 # include <cstdio.h> /* INFRINGES ON USER NAME SPACE */
403 # define YYFPRINTF std::fprintf
404 # define YYSTDERR std::stderr
406 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
407 # define YYFPRINTF fprintf
408 # define YYSTDERR stderr
412 # define YYDPRINTF(Args) \
417 /* Nonzero means print parse trace. [The following comment makes no
418 sense to me. Could someone clarify it? --akim] Since this is
419 uninitialized, it does not stop multiple parsers from coexisting.
423 # define YYDPRINTF(Args)
424 #endif /* !YYDEBUG */
426 /* YYINITDEPTH -- initial size of the parser's stacks. */
428 # define YYINITDEPTH %%initdepth
431 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
432 if the built-in stack extension method is used).
434 Do not make this value too large; the results are undefined if
435 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
436 evaluated with infinite-precision integer arithmetic. */
443 # define YYMAXDEPTH %%maxdepth
448 #if ! defined (yyoverflow) && ! defined (yymemcpy)
449 # if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
450 # define yymemcpy __builtin_memcpy
451 # else /* not GNU C or C++ */
453 /* This is the most reliable way to avoid incompatibilities
454 in available built-in functions on various systems. */
456 # if defined (__STDC__) || defined (__cplusplus)
457 yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount)
459 yymemcpy (yyto, yyfrom, yycount)
465 register const char *yyf = yyfrom;
466 register char *yyt = yyto;
467 register YYSIZE_T yyi = yycount;
478 # if defined (__GLIBC__) && defined (_STRING_H)
479 # define yystrlen strlen
481 /* Return the length of YYSTR. */
483 # if defined (__STDC__) || defined (__cplusplus)
484 yystrlen (const char *yystr)
490 register const char *yys = yystr;
492 while (*yys++ != '\0')
495 return yys - yystr - 1;
501 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
502 # define yystpcpy stpcpy
504 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
507 # if defined (__STDC__) || defined (__cplusplus)
508 yystpcpy (char *yydest, const char *yysrc)
510 yystpcpy (yydest, yysrc)
515 register char *yyd = yydest;
516 register const char *yys = yysrc;
518 while ((*yyd++ = *yys++) != '\0')
526 #endif /* !YYERROR_VERBOSE */
530 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
531 into yyparse. The argument should have type void *.
532 It should actually point to an object.
533 Grammar actions can access the variable by casting it
534 to the proper pointer type. */
538 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
539 # define YYPARSE_PARAM_DECL
540 # else /* !__cplusplus */
541 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
542 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
543 # endif /* !__cplusplus */
544 #else /* !YYPARSE_PARAM */
545 # define YYPARSE_PARAM_ARG
546 # define YYPARSE_PARAM_DECL
547 #endif /* !YYPARSE_PARAM */
549 /* Prevent warning if -Wstrict-prototypes. */
551 # ifdef YYPARSE_PARAM
552 int yyparse (void *);
558 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
559 variables are global, or local to YYPARSE. */
561 #define YY_DECL_NON_LSP_VARIABLES \
562 /* The lookahead symbol. */ \
565 /* The semantic value of the lookahead symbol. */ \
568 /* Number of parse errors so far. */ \
572 # define YY_DECL_VARIABLES \
573 YY_DECL_NON_LSP_VARIABLES \
575 /* Location data for the lookahead symbol. */ \
578 # define YY_DECL_VARIABLES \
579 YY_DECL_NON_LSP_VARIABLES
582 /* If nonreentrant, generate the variables here. */
589 yyparse (YYPARSE_PARAM_ARG)
592 /* If reentrant, generate the variables here. */
597 register int yystate;
600 /* Number of tokens to shift before error messages enabled. */
602 /* Lookahead token as an internal (translated) token number. */
605 /* Three stacks and their tools:
606 `yyss': related to states,
607 `yyvs': related to semantic values,
608 `yyls': related to locations.
610 Refer to the stacks thru separate pointers, to allow yyoverflow
611 to reallocate them elsewhere. */
613 /* The state stack. */
614 short yyssa[YYINITDEPTH];
616 register short *yyssp;
618 /* The semantic value stack. */
619 YYSTYPE yyvsa[YYINITDEPTH];
620 YYSTYPE *yyvs = yyvsa;
621 register YYSTYPE *yyvsp;
624 /* The location stack. */
625 YYLTYPE yylsa[YYINITDEPTH];
626 YYLTYPE *yyls = yylsa;
631 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
633 # define YYPOPSTACK (yyvsp--, yyssp--)
636 YYSIZE_T yystacksize = YYINITDEPTH;
638 /* The variables used to return semantic value and location from the
645 /* When reducing, the number of symbols on the RHS of the reduced
649 YYDPRINTF ((YYSTDERR, "Starting parse\n"));
654 yychar = YYEMPTY; /* Cause a token to be read. */
656 /* Initialize stack pointers.
657 Waste one element of value and location stack
658 so that they stay on the same level as the state stack.
659 The wasted elements are never initialized. */
668 /*------------------------------------------------------------.
669 | yynewstate -- Push a new state, which is found in yystate. |
670 `------------------------------------------------------------*/
672 /* In all cases, when you get here, the value and location stacks
673 have just been pushed. so pushing a state here evens the stacks.
680 if (yyssp >= yyss + yystacksize - 1)
682 /* Get the current used size of the three stacks, in elements. */
683 YYSIZE_T yysize = yyssp - yyss + 1;
687 /* Give user a chance to reallocate the stack. Use copies of
688 these so that the &'s don't force the real ones into
690 YYSTYPE *yyvs1 = yyvs;
693 /* Each stack pointer address is followed by the size of the
694 data in use in that stack, in bytes. */
696 YYLTYPE *yyls1 = yyls;
697 /* This used to be a conditional around just the two extra args,
698 but that might be undefined if yyoverflow is a macro. */
699 yyoverflow ("parser stack overflow",
700 &yyss1, yysize * sizeof (*yyssp),
701 &yyvs1, yysize * sizeof (*yyvsp),
702 &yyls1, yysize * sizeof (*yylsp),
706 yyoverflow ("parser stack overflow",
707 &yyss1, yysize * sizeof (*yyssp),
708 &yyvs1, yysize * sizeof (*yyvsp),
714 #else /* no yyoverflow */
715 /* Extend the stack our own way. */
716 if (yystacksize >= YYMAXDEPTH)
719 if (yystacksize > YYMAXDEPTH)
720 yystacksize = YYMAXDEPTH;
724 union yyalloc *yyptr =
725 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
728 YYSTACK_RELOCATE (short, yyss);
729 YYSTACK_RELOCATE (YYSTYPE, yyvs);
731 YYSTACK_RELOCATE (YYLTYPE, yyls);
733 # undef YYSTACK_RELOCATE
735 YYSTACK_FREE (yyss1);
737 #endif /* no yyoverflow */
739 yyssp = yyss + yysize - 1;
740 yyvsp = yyvs + yysize - 1;
742 yylsp = yyls + yysize - 1;
745 YYDPRINTF ((YYSTDERR, "Stack size increased to %lu\n",
746 (unsigned long int) yystacksize));
748 if (yyssp >= yyss + yystacksize - 1)
752 YYDPRINTF ((YYSTDERR, "Entering state %d\n", yystate));
761 /* Do appropriate processing given the current state. */
762 /* Read a lookahead token if we need one and don't already have one. */
765 /* First try to decide what to do without reference to lookahead token. */
767 yyn = yypact[yystate];
771 /* Not known => get a lookahead token if don't already have one. */
773 /* yychar is either YYEMPTY or YYEOF
774 or a valid token in external form. */
776 if (yychar == YYEMPTY)
778 YYDPRINTF ((YYSTDERR, "Reading a token: "));
782 /* Convert token to internal form (in yychar1) for indexing tables with. */
784 if (yychar <= 0) /* This means end of input. */
787 yychar = YYEOF; /* Don't call YYLEX any more. */
789 YYDPRINTF ((YYSTDERR, "Now at end of input.\n"));
793 yychar1 = YYTRANSLATE (yychar);
796 /* We have to keep this `#if YYDEBUG', since we use variables
797 which are defined only if `YYDEBUG' is set. */
800 YYFPRINTF (YYSTDERR, "Next token is %d (%s",
801 yychar, yytname[yychar1]);
802 /* Give the individual parser a way to print the precise
803 meaning of a token, for further debugging info. */
805 YYPRINT (YYSTDERR, yychar, yylval);
807 YYFPRINTF (YYSTDERR, ")\n");
813 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
818 /* yyn is what to do for this token type in this state.
819 Negative => reduce, -yyn is rule number.
820 Positive => shift, yyn is new state.
821 New state is final state => don't bother to shift,
823 0, or most negative number => error. */
838 /* Shift the lookahead token. */
839 YYDPRINTF ((YYSTDERR, "Shifting token %d (%s), ",
840 yychar, yytname[yychar1]));
842 /* Discard the token being shifted unless it is eof. */
851 /* Count tokens shifted since error; after three, turn off error
860 /*-----------------------------------------------------------.
861 | yydefault -- do the default action for the current state. |
862 `-----------------------------------------------------------*/
864 yyn = yydefact[yystate];
870 /*-----------------------------.
871 | yyreduce -- Do a reduction. |
872 `-----------------------------*/
874 /* yyn is the number of a rule to reduce with. */
877 /* If YYLEN is nonzero, implement the default value of the action:
880 Otherwise, the following line sets YYVAL to the semantic value of
881 the lookahead token. This behavior is undocumented and Bison
882 users should not rely upon it. Assigning to YYVAL
883 unconditionally makes the parser a bit smaller, and it avoids a
884 GCC warning that YYVAL may be used uninitialized. */
885 yyval = yyvsp[1-yylen];
888 /* Similarly for the default location. Let the user run additional
889 commands if for instance locations are ranges. */
890 yyloc = yylsp[1-yylen];
891 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
895 /* We have to keep this `#if YYDEBUG', since we use variables which
896 are defined only if `YYDEBUG' is set. */
901 YYFPRINTF (YYSTDERR, "Reducing via rule %d (line %d), ",
904 /* Print the symbols being reduced, and their result. */
905 for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
906 YYFPRINTF (YYSTDERR, "%s ", yytname[yyrhs[yyi]]);
907 YYFPRINTF (YYSTDERR, " -> %s\n", yytname[yyr1[yyn]]);
915 /* Line %%skeleton-line of %%skeleton. */
916 #line %%line "%%parser-file-name"
927 short *yyssp1 = yyss - 1;
928 YYFPRINTF (YYSTDERR, "state stack now");
929 while (yyssp1 != yyssp)
930 YYFPRINTF (YYSTDERR, " %d", *++yyssp1);
931 YYFPRINTF (YYSTDERR, "\n");
940 /* Now `shift' the result of the reduction. Determine what state
941 that goes to, based on the state we popped back to and the rule
942 number reduced by. */
946 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
947 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
948 yystate = yytable[yystate];
950 yystate = yydefgoto[yyn - YYNTOKENS];
955 /*------------------------------------.
956 | yyerrlab -- here on detecting error |
957 `------------------------------------*/
959 /* If not already recovering from an error, report this error. */
965 yyn = yypact[yystate];
967 if (yyn > YYFLAG && yyn < YYLAST)
974 /* Start YYX at -YYN if negative to avoid negative indexes in
976 for (yyx = yyn < 0 ? -yyn : 0;
977 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
978 if (yycheck[yyx + yyn] == yyx)
979 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
980 yysize += yystrlen ("parse error, unexpected ") + 1;
981 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
982 yymsg = (char *) YYSTACK_ALLOC (yysize);
985 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
986 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
991 for (yyx = yyn < 0 ? -yyn : 0;
992 yyx < (int) (sizeof (yytname) / sizeof (char *));
994 if (yycheck[yyx + yyn] == yyx)
996 const char *yyq = ! yycount ? ", expecting " : " or ";
997 yyp = yystpcpy (yyp, yyq);
998 yyp = yystpcpy (yyp, yytname[yyx]);
1003 YYSTACK_FREE (yymsg);
1006 yyerror ("parse error; also virtual memory exhausted");
1009 #endif /* YYERROR_VERBOSE */
1010 yyerror ("parse error");
1015 /*----------------------------------------------------.
1016 | yyerrlab1 -- error raised explicitly by an action. |
1017 `----------------------------------------------------*/
1019 if (yyerrstatus == 3)
1021 /* If just tried and failed to reuse lookahead token after an
1022 error, discard it. */
1024 /* Return failure if at end of input. */
1025 if (yychar == YYEOF)
1027 YYDPRINTF ((YYSTDERR, "Discarding token %d (%s).\n",
1028 yychar, yytname[yychar1]));
1032 /* Else will try to reuse lookahead token after shifting the error
1035 yyerrstatus = 3; /* Each real token shifted decrements this. */
1040 /*-------------------------------------------------------------------.
1041 | yyerrdefault -- current state does not do anything special for the |
1043 `-------------------------------------------------------------------*/
1046 /* This is wrong; only states that explicitly want error tokens
1047 should shift them. */
1049 /* If its default is to accept any token, ok. Otherwise pop it. */
1050 yyn = yydefact[yystate];
1056 /*---------------------------------------------------------------.
1057 | yyerrpop -- pop the current state because it cannot handle the |
1059 `---------------------------------------------------------------*/
1072 short *yyssp1 = yyss - 1;
1073 YYFPRINTF (YYSTDERR, "Error: state stack now");
1074 while (yyssp1 != yyssp)
1075 YYFPRINTF (YYSTDERR, " %d", *++yyssp1);
1076 YYFPRINTF (YYSTDERR, "\n");
1084 yyn = yypact[yystate];
1089 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1106 YYDPRINTF ((YYSTDERR, "Shifting error token, "));
1117 /*-------------------------------------.
1118 | yyacceptlab -- YYACCEPT comes here. |
1119 `-------------------------------------*/
1124 /*-----------------------------------.
1125 | yyabortlab -- YYABORT comes here. |
1126 `-----------------------------------*/
1131 /*---------------------------------------------.
1132 | yyoverflowab -- parser overflow comes here. |
1133 `---------------------------------------------*/
1135 yyerror ("parser stack overflow");
1142 YYSTACK_FREE (yyss);