mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 13:23:04 +00:00
skeletons: use better names when computing a "goto"
* data/glr.c (yyLRgotoState): Name the symbol argument yysym, instead of yylhs. * data/lalr1.cc (yy_lr_goto_state_): Likewise. * data/lalr1.java (yy_lr_goto_state_): New, modeled after the previous two routines. Use it.
This commit is contained in:
10
data/glr.c
10
data/glr.c
@@ -910,14 +910,18 @@ yygetLRActions (yyStateNum yystate, int yytoken,
|
||||
}
|
||||
}
|
||||
|
||||
/** Compute post-reduction state.
|
||||
* \param yystate the current state
|
||||
* \param yysym the nonterminal to push on the stack
|
||||
*/
|
||||
static inline yyStateNum
|
||||
yyLRgotoState (yyStateNum yystate, yySymbol yylhs)
|
||||
yyLRgotoState (yyStateNum yystate, yySymbol yysym)
|
||||
{
|
||||
int yyr = yypgoto[yylhs - YYNTOKENS] + yystate;
|
||||
int yyr = yypgoto[yysym - YYNTOKENS] + yystate;
|
||||
if (0 <= yyr && yyr <= YYLAST && yycheck[yyr] == yystate)
|
||||
return yytable[yyr];
|
||||
else
|
||||
return yydefgoto[yylhs - YYNTOKENS];
|
||||
return yydefgoto[yysym - YYNTOKENS];
|
||||
}
|
||||
|
||||
static inline yybool
|
||||
|
||||
Reference in New Issue
Block a user