c++: more YY_NULL

Caught by maintainer-check-g++.
* data/glr.c, data/lalr1.cc, data/yacc.c, tests/cxx-type.at,
* tests/glr-regression.at, tests/push.at:
When simple to do, avoid expliciting the null ptr.
Otherwise use YY_NULL.
This commit is contained in:
Akim Demaille
2012-04-01 13:15:41 +02:00
parent 3e75a2c92b
commit eeaf1dc646
6 changed files with 28 additions and 28 deletions

View File

@@ -829,7 +829,7 @@ yyfillin (yyGLRStackItem *yyvsp, int yylow0, int yylow1)
else
/* The effect of using yysval or yyloc (in an immediate rule) is
* undefined. */
yyvsp[i].yystate.yysemantics.yyfirstVal = NULL;
yyvsp[i].yystate.yysemantics.yyfirstVal = YY_NULL;
yyvsp[i].yystate.yyloc = s->yyloc;
s = yyvsp[i].yystate.yypred = s->yypred;
}
@@ -1434,7 +1434,7 @@ yyglrReduce (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
YYLTYPE yyloc;])[
yyflag = yydoAction (yystackp, yyk, yyrule, &yysval]b4_locuser_args([&yyloc])[);
if (yyflag == yyerr && yystackp->yysplitPoint != NULL)
if (yyflag == yyerr && yystackp->yysplitPoint != YY_NULL)
{
YYDPRINTF ((stderr, "Parse on stack %lu rejected by rule #%d.\n",
(unsigned long int) yyk, yyrule - 1));