/**
* Returned by a Bison action in order to request a new token.
*/
- public static final int YYMORE = 4;])[
+ public static final int YYPUSH_MORE = 4;])[
/**
* Returned by a Bison action in order to start error recovery without
return yyerrstatus_ == 0;
}
+ /** Compute post-reduction state.
+ * @@param yystate the current state
+ * @@param yysym the nonterminal to push on the stack
+ */
+ private int yy_lr_goto_state_ (int yystate, int yysym)
+ {
+ int yyr = yypgoto_[yysym - yyntokens_] + yystate;
+ if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate)
+ return yytable_[yyr];
+ else
+ return yydefgoto_[yysym - yyntokens_];
+ }
+
private int yyaction (int yyn, YYStack yystack, int yylen) ]b4_maybe_throws([b4_throws])[
{
]b4_yystype[ yyval;
yylen = 0;
/* Shift the result of the reduction. */
- yyn = yyr1_[yyn];
- int yystate = yypgoto_[yyn - yyntokens_] + yystack.stateAt (0);
- if (0 <= yystate && yystate <= yylast_
- && yycheck_[yystate] == yystack.stateAt (0))
- yystate = yytable_[yystate];
- else
- yystate = yydefgoto_[yyn - yyntokens_];
-
+ int yystate = yy_lr_goto_state_ (yystack.stateAt (0), yyr1_[yyn]);
yystack.push (yystate, yyval]b4_locations_if([, yyloc])[);
return YYNEWSTATE;
}
* @@param yylexval current lval
]b4_locations_if([ * @@param yylexloc current position])[
*
- * @@return <tt>YYACCEPT, YYABORT, YYMORE</tt>
+ * @@return <tt>YYACCEPT, YYABORT, YYPUSH_MORE</tt>
*/
public int push_parse (int yylextoken, b4_yystype yylexval[]b4_locations_if([, b4_location_type yylexloc]))
b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])])[
{
]b4_push_if([[
if (!push_token_consumed)
- return YYMORE;
+ return YYPUSH_MORE;
yycdebug ("Reading a token: ");
yychar = yylextoken;
yylval = yylexval;]b4_locations_if([
* @@param yylexval current lval
* @@param yyylexpos current position
*
- * @@return <tt>YYACCEPT, YYABORT, YYMORE</tt>
+ * @@return <tt>YYACCEPT, YYABORT, YYPUSH_MORE</tt>
*/
public int push_parse (int yylextoken, b4_yystype yylexval, b4_position_type yylexpos)
b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])
]b4_locations_if([dnl
b4_location_type yyloc = new b4_location_type (yylexer.getStartPos (),
yylexer.getEndPos ());])[
- this.yyerrstatus_ = 0;
]b4_locations_if([status = push_parse(token,lval,yyloc);],[
status = push_parse(token,lval);])[
- } while (status == YYMORE);
+ } while (status == YYPUSH_MORE);
return (status == YYACCEPT);
}
]])[