mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 17:53:02 +00:00
style: formatting and comment changes
* data/glr.c: Avoid empty lines. * data/lalr1.cc: Use the same comments as in glr.c and yacc.c.
This commit is contained in:
19
data/glr.c
19
data/glr.c
@@ -808,6 +808,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp,
|
|||||||
*yyvalp = yyval_default;
|
*yyvalp = yyval_default;
|
||||||
else
|
else
|
||||||
*yyvalp = yyvsp[YYFILL (1-yyrhslen)].yystate.yysemantics.yysval;]b4_locations_if([[
|
*yyvalp = yyvsp[YYFILL (1-yyrhslen)].yystate.yysemantics.yysval;]b4_locations_if([[
|
||||||
|
/* Default location. */
|
||||||
YYLLOC_DEFAULT ((*yylocp), (yyvsp - yyrhslen), yyrhslen);
|
YYLLOC_DEFAULT ((*yylocp), (yyvsp - yyrhslen), yyrhslen);
|
||||||
yystackp->yyerror_range[1].yystate.yyloc = *yylocp;
|
yystackp->yyerror_range[1].yystate.yyloc = *yylocp;
|
||||||
]])[
|
]])[
|
||||||
@@ -2305,8 +2306,8 @@ b4_dollar_popdef])[]dnl
|
|||||||
{
|
{
|
||||||
yyrule = yydefaultAction (yystate);
|
yyrule = yydefaultAction (yystate);
|
||||||
if (yyrule == 0)
|
if (yyrule == 0)
|
||||||
{
|
{]b4_locations_if([[
|
||||||
]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
|
yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
|
||||||
yyreportSyntaxError (&yystack]b4_user_args[);
|
yyreportSyntaxError (&yystack]b4_user_args[);
|
||||||
goto yyuser_error;
|
goto yyuser_error;
|
||||||
}
|
}
|
||||||
@@ -2345,8 +2346,8 @@ b4_dollar_popdef])[]dnl
|
|||||||
yystack.yyerrState -= 1;
|
yystack.yyerrState -= 1;
|
||||||
}
|
}
|
||||||
else if (yyisErrorAction (yyaction))
|
else if (yyisErrorAction (yyaction))
|
||||||
{
|
{]b4_locations_if([[
|
||||||
]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
|
yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
|
||||||
yyreportSyntaxError (&yystack]b4_user_args[);
|
yyreportSyntaxError (&yystack]b4_user_args[);
|
||||||
goto yyuser_error;
|
goto yyuser_error;
|
||||||
}
|
}
|
||||||
@@ -2391,8 +2392,8 @@ b4_dollar_popdef])[]dnl
|
|||||||
if (yystack.yytops.yysize == 0)
|
if (yystack.yytops.yysize == 0)
|
||||||
yyFail (&yystack][]b4_lpure_args[, YY_("syntax error"));
|
yyFail (&yystack][]b4_lpure_args[, YY_("syntax error"));
|
||||||
YYCHK1 (yyresolveStack (&yystack]b4_user_args[));
|
YYCHK1 (yyresolveStack (&yystack]b4_user_args[));
|
||||||
YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
|
YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));]b4_locations_if([[
|
||||||
]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
|
yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
|
||||||
yyreportSyntaxError (&yystack]b4_user_args[);
|
yyreportSyntaxError (&yystack]b4_user_args[);
|
||||||
goto yyuser_error;
|
goto yyuser_error;
|
||||||
}
|
}
|
||||||
@@ -2473,9 +2474,9 @@ b4_dollar_popdef])[]dnl
|
|||||||
{
|
{
|
||||||
while (yystates[yyk])
|
while (yystates[yyk])
|
||||||
{
|
{
|
||||||
yyGLRState *yys = yystates[yyk];
|
yyGLRState *yys = yystates[yyk];]b4_locations_if([[
|
||||||
]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;]]
|
yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;]])[
|
||||||
)[ if (yys->yypred != YY_NULLPTR)
|
if (yys->yypred != YY_NULLPTR)
|
||||||
yydestroyGLRState ("Cleanup: popping", yys]b4_user_args[);
|
yydestroyGLRState ("Cleanup: popping", yys]b4_user_args[);
|
||||||
yystates[yyk] = yys->yypred;
|
yystates[yyk] = yys->yypred;
|
||||||
yystack.yynextFree -= 1;
|
yystack.yynextFree -= 1;
|
||||||
|
|||||||
@@ -844,7 +844,7 @@ b4_dollar_popdef])[]dnl
|
|||||||
yylhs.value = yystack_@{0@}.value;])[
|
yylhs.value = yystack_@{0@}.value;])[
|
||||||
]b4_locations_if([dnl
|
]b4_locations_if([dnl
|
||||||
[
|
[
|
||||||
// Compute the default @@$.
|
// Default location.
|
||||||
{
|
{
|
||||||
slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
|
slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
|
||||||
YYLLOC_DEFAULT (yylhs.location, slice, yylen);
|
YYLLOC_DEFAULT (yylhs.location, slice, yylen);
|
||||||
|
|||||||
Reference in New Issue
Block a user