/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "bison.simple"
+#line
/* This file comes from bison-@bison_version@. */
/* Skeleton output parser for bison,
# endif /* not YYLSP_NEEDED */
#endif
-/* If nonreentrant, generate the variables here */
+/* If nonreentrant, generate the variables here. */
#ifndef YYPURE
+/* The lookahead symbol. */
+int yychar;
-int yychar; /* the lookahead symbol */
-YYSTYPE yylval; /* the semantic value of the */
- /* lookahead symbol */
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
# ifdef YYLSP_NEEDED
-YYLTYPE yylloc; /* location data for the lookahead */
- /* symbol */
+/* Location data for the lookahead symbol. */
+YYLTYPE yylloc;
# endif
-int yynerrs; /* number of parse errors so far */
+/* Number of parse errors so far. */
+int yynerrs;
#endif /* not YYPURE */
+
#if YYDEBUG != 0
int yydebug; /* nonzero means print parse trace */
-/* Since this is uninitialized, it does not stop multiple parsers
- from coexisting. */
+
+ /* [The following comment makes no sense to me. Could someone
+ clarify it? --akim] Since this is uninitialized, it does not
+ stop multiple parsers from coexisting. */
+#else
+ /* To avoid crippling this file with `#if YYDEBUG', define `yydebug'
+ as `0', so that the `if (yydebug)' be removed as dead code. */
+# define yydebug 0
#endif
/* YYINITDEPTH indicates the initial size of the parser's stacks */
# endif
#endif
\f
-#line 217 "bison.simple"
+#line
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
{
register int yystate;
register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* Lookahead token as an internal (translated) token number. */
int yychar1 = 0;
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yysv': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
/* The state stack. */
short yyssa[YYINITDEPTH];
+ short *yyss = yyssa;
+ register short *yyssp;
+
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
-
- /* Refer to the stacks thru separate pointers. */
- short *yyss = yyssa;
- /* To allow yyoverflow to reallocate them elsewhere. */
YYSTYPE *yyvs = yyvsa;
+ register YYSTYPE *yyvsp;
#ifdef YYLSP_NEEDED
/* The location stack. */
YYLTYPE yylsa[YYINITDEPTH];
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp;
+#endif
+#ifdef YYLSP_NEEDED
# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
#else
# define YYPOPSTACK (yyvsp--, yyssp--)
# endif
#endif
- YYSTYPE yyval; /* the variable used to return */
- /* semantic values from the action */
- /* routines */
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+# ifdef YYLSP_NEEDED
+ YYLTYPE yyloc;
+# endif
+
+ /* When reducing, the number of symbols on the RHS of the reduced
+ rule. */
int yylen;
-#if YYDEBUG != 0
if (yydebug)
- fprintf(stderr, "Starting parse\n");
-#endif
+ fprintf (stderr, "Starting parse\n");
yystate = 0;
yyerrstatus = 0;
# ifdef YYLSP_NEEDED
/* This used to be a conditional around just the two extra args,
but that might be undefined if yyoverflow is a macro. */
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yystacksize);
+ yyoverflow ("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yyls1, size * sizeof (*yylsp),
+ &yystacksize);
# else
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yystacksize);
+ yyoverflow ("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yystacksize);
# endif
yyss = yyss1; yyvs = yyvs1;
yylsp = yyls + size - 1;
#endif
-#if YYDEBUG != 0
if (yydebug)
- fprintf(stderr, "Stack size increased to %d\n", yystacksize);
-#endif
+ fprintf (stderr, "Stack size increased to %d\n", yystacksize);
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
-#if YYDEBUG != 0
if (yydebug)
- fprintf(stderr, "Entering state %d\n", yystate);
-#endif
+ fprintf (stderr, "Entering state %d\n", yystate);
goto yybackup;
yybackup:
if (yychar == YYEMPTY)
{
-#if YYDEBUG != 0
if (yydebug)
- fprintf(stderr, "Reading a token: ");
-#endif
+ fprintf (stderr, "Reading a token: ");
yychar = YYLEX;
}
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */
-#if YYDEBUG != 0
if (yydebug)
- fprintf(stderr, "Now at end of input.\n");
-#endif
+ fprintf (stderr, "Now at end of input.\n");
}
else
{
yychar1 = YYTRANSLATE(yychar);
-#if YYDEBUG != 0
if (yydebug)
{
fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
# endif
fprintf (stderr, ")\n");
}
-#endif
}
yyn += yychar1;
/* Shift the lookahead token. */
-#if YYDEBUG != 0
if (yydebug)
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
-#endif
+ fprintf (stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
/* Do a reduction. yyn is the number of a rule to reduce with. */
yyreduce:
yylen = yyr2[yyn];
+ /* Implement default value of the action:
+ `{dollar}{dollar} = {dollar}1'. */
if (yylen > 0)
- yyval = yyvsp[1-yylen]; /* implement default value of the action */
+ yyval = yyvsp[1-yylen];
+#ifdef YYLSP_NEEDED
+ /* Implement default location. If the rhs is empty, extend YYLOC to
+ YYLLOC, which corresponds to the current token, otherwise
+ implement `@{dollar} = Starts at @1, ends at @YYLEN'. */
+ if (yylen > 0)
+ {
+ yyloc = yylsp[1-yylen];
+ yyloc.last_line = yylsp[0].last_line;
+ yyloc.last_column = yylsp[0].last_column;
+ }
+ else
+ {
+ yyloc.last_line = yylsp[0].last_line;
+ yyloc.last_column = yylsp[0].last_column;
+ yyloc.text = 0;
+ }
+#endif
-#if YYDEBUG != 0
+#if YYDEBUG
+ /* We have to keep this `#if YYDEBUG', since we use variables which
+ are defined only if `YYDEBUG' is set. */
if (yydebug)
{
int i;
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
}
#endif
-
$ /* the action file gets copied in in place of this dollarsign */
-#line 543 "bison.simple"
+#line
\f
yyvsp -= yylen;
yyssp -= yylen;
yylsp -= yylen;
#endif
-#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
-#endif
*++yyvsp = yyval;
-
#ifdef YYLSP_NEEDED
- yylsp++;
- if (yylen == 0)
- {
- yylsp->first_line = yylloc.first_line;
- yylsp->first_column = yylloc.first_column;
- yylsp->last_line = (yylsp-1)->last_line;
- yylsp->last_column = (yylsp-1)->last_column;
- yylsp->text = 0;
- }
- else
- {
- yylsp->last_line = (yylsp+yylen-1)->last_line;
- yylsp->last_column = (yylsp+yylen-1)->last_column;
- }
+ *++yylsp = yyloc;
#endif
- /* Now "shift" the result of the reduction.
- Determine what state that goes to,
- based on the state we popped back to
- and the rule number reduced by. */
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
yyn = yyr1[yyn];
if (yychar == YYEOF)
YYABORT;
-#if YYDEBUG != 0
if (yydebug)
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
-#endif
+ fprintf (stderr, "Discarding token %d (%s).\n",
+ yychar, yytname[yychar1]);
yychar = YYEMPTY;
}
yylsp--;
#endif
-#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
-#endif
yyerrhandle:
if (yyn == YYFINAL)
YYACCEPT;
-#if YYDEBUG != 0
if (yydebug)
- fprintf(stderr, "Shifting error token, ");
-#endif
+ fprintf (stderr, "Shifting error token, ");
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED