mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 10:13:03 +00:00
glr: style change
* data/skeletons/glr.c (YYDPRINTF): Expand into an empty statement, instead of nothing. Simplify callers.
This commit is contained in:
@@ -502,7 +502,7 @@ static void yypdumpstack (struct yyGLRStack* yystackp)
|
|||||||
|
|
||||||
#else /* !]b4_api_PREFIX[DEBUG */
|
#else /* !]b4_api_PREFIX[DEBUG */
|
||||||
|
|
||||||
# define YYDPRINTF(Args)
|
# define YYDPRINTF(Args) do {} while (yyfalse)
|
||||||
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
|
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
|
||||||
|
|
||||||
#endif /* !]b4_api_PREFIX[DEBUG */
|
#endif /* !]b4_api_PREFIX[DEBUG */
|
||||||
@@ -1272,9 +1272,7 @@ yyremoveDeletes (yyGLRStack* yystackp)
|
|||||||
if (yystackp->yytops.yystates[yyi] == YY_NULLPTR)
|
if (yystackp->yytops.yystates[yyi] == YY_NULLPTR)
|
||||||
{
|
{
|
||||||
if (yyi == yyj)
|
if (yyi == yyj)
|
||||||
{
|
YYDPRINTF ((stderr, "Removing dead stacks.\n"));
|
||||||
YYDPRINTF ((stderr, "Removing dead stacks.\n"));
|
|
||||||
}
|
|
||||||
yystackp->yytops.yysize -= 1;
|
yystackp->yytops.yysize -= 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1288,10 +1286,8 @@ yyremoveDeletes (yyGLRStack* yystackp)
|
|||||||
yystackp->yytops.yylookaheadNeeds[yyj] =
|
yystackp->yytops.yylookaheadNeeds[yyj] =
|
||||||
yystackp->yytops.yylookaheadNeeds[yyi];
|
yystackp->yytops.yylookaheadNeeds[yyi];
|
||||||
if (yyj != yyi)
|
if (yyj != yyi)
|
||||||
{
|
YYDPRINTF ((stderr, "Rename stack %ld -> %ld.\n",
|
||||||
YYDPRINTF ((stderr, "Rename stack %ld -> %ld.\n",
|
YY_CAST (long, yyi), YY_CAST (long, yyj)));
|
||||||
YY_CAST (long, yyi), YY_CAST (long, yyj)));
|
|
||||||
}
|
|
||||||
yyj += 1;
|
yyj += 1;
|
||||||
}
|
}
|
||||||
yyi += 1;
|
yyi += 1;
|
||||||
@@ -1451,11 +1447,9 @@ yyglrReduce (yyGLRStack* yystackp, ptrdiff_t yyk, yyRuleNum yyrule,
|
|||||||
|
|
||||||
YYRESULTTAG yyflag = yydoAction (yystackp, yyk, yyrule, &yysval]b4_locuser_args([&yyloc])[);
|
YYRESULTTAG yyflag = yydoAction (yystackp, yyk, yyrule, &yysval]b4_locuser_args([&yyloc])[);
|
||||||
if (yyflag == yyerr && yystackp->yysplitPoint != YY_NULLPTR)
|
if (yyflag == yyerr && yystackp->yysplitPoint != YY_NULLPTR)
|
||||||
{
|
YYDPRINTF ((stderr,
|
||||||
YYDPRINTF ((stderr,
|
"Parse on stack %ld rejected by rule %d (line %d).\n",
|
||||||
"Parse on stack %ld rejected by rule %d (line %d).\n",
|
YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule - 1]));
|
||||||
YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule - 1]));
|
|
||||||
}
|
|
||||||
if (yyflag != yyok)
|
if (yyflag != yyok)
|
||||||
return yyflag;
|
return yyflag;
|
||||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyrule], &yysval, &yyloc);
|
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyrule], &yysval, &yyloc);
|
||||||
|
|||||||
Reference in New Issue
Block a user