mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
style: glr.c: clarify
* data/skeletons/glr.c: Make the code a bit clearer.
This commit is contained in:
@@ -2034,7 +2034,7 @@ yyprocessOneStack (yyGLRStack* yystackp, ptrdiff_t yyk,
|
|||||||
const int yyaction = yygetLRActions (yystate, yytoken, &yyconflicts);
|
const int yyaction = yygetLRActions (yystate, yytoken, &yyconflicts);
|
||||||
yystackp->yytops.yylookaheadNeeds[yyk] = yytrue;
|
yystackp->yytops.yylookaheadNeeds[yyk] = yytrue;
|
||||||
|
|
||||||
while (*yyconflicts != 0)
|
for (/* nothing */; *yyconflicts; yyconflicts += 1)
|
||||||
{
|
{
|
||||||
YYRESULTTAG yyflag;
|
YYRESULTTAG yyflag;
|
||||||
ptrdiff_t yynewStack = yysplitStack (yystackp, yyk);
|
ptrdiff_t yynewStack = yysplitStack (yystackp, yyk);
|
||||||
@@ -2053,7 +2053,6 @@ yyprocessOneStack (yyGLRStack* yystackp, ptrdiff_t yyk,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
return yyflag;
|
return yyflag;
|
||||||
yyconflicts += 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (yyisShiftAction (yyaction))
|
if (yyisShiftAction (yyaction))
|
||||||
@@ -2450,7 +2449,7 @@ b4_dollar_popdef])[]dnl
|
|||||||
/* For efficiency, we have two loops, the first of which is
|
/* For efficiency, we have two loops, the first of which is
|
||||||
specialized to deterministic operation (single stack, no
|
specialized to deterministic operation (single stack, no
|
||||||
potential ambiguity). */
|
potential ambiguity). */
|
||||||
/* Standard mode */
|
/* Standard mode. */
|
||||||
while (yytrue)
|
while (yytrue)
|
||||||
{
|
{
|
||||||
yy_state_t yystate = yystack.yytops.yystates[0]->yylrState;
|
yy_state_t yystate = yystack.yytops.yystates[0]->yylrState;
|
||||||
@@ -2473,7 +2472,8 @@ b4_dollar_popdef])[]dnl
|
|||||||
yysymbol_kind_t yytoken = ]b4_yygetToken_call;[
|
yysymbol_kind_t yytoken = ]b4_yygetToken_call;[
|
||||||
const short* yyconflicts;
|
const short* yyconflicts;
|
||||||
int yyaction = yygetLRActions (yystate, yytoken, &yyconflicts);
|
int yyaction = yygetLRActions (yystate, yytoken, &yyconflicts);
|
||||||
if (*yyconflicts != 0)
|
if (*yyconflicts)
|
||||||
|
/* Enter nondeterministic mode. */
|
||||||
break;
|
break;
|
||||||
if (yyisShiftAction (yyaction))
|
if (yyisShiftAction (yyaction))
|
||||||
{
|
{
|
||||||
@@ -2499,6 +2499,7 @@ b4_dollar_popdef])[]dnl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Nondeterministic mode. */
|
||||||
while (yytrue)
|
while (yytrue)
|
||||||
{
|
{
|
||||||
yysymbol_kind_t yytoken_to_shift;
|
yysymbol_kind_t yytoken_to_shift;
|
||||||
|
|||||||
Reference in New Issue
Block a user