mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
parsers: rename YY_NULL as YY_NULLPTR to avoid conflicts with Flex
Flex also defines YY_NULL (to 0). Avoid gratuitous conflicts. * data/c.m4 (b4_null_define): Rename YY_NULL as YY_NULLPTR. * data/glr.c, data/lalr1.cc, data/location.cc, data/variant.hh, * data/yacc.c, src/parse-gram.c, tests/actions.at, tests/c++.at, * tests/cxx-type.at, tests/glr-regression.at, tests/headers.at, * tests/push.at, tests/regression.at: Adjust.
This commit is contained in:
@@ -796,11 +796,11 @@ item:
|
||||
// Not just 'E', otherwise we reduce when 'E' is the lookahead, and
|
||||
// then the stack is emptied, defeating the point of the test.
|
||||
| 'E' 'a' { YYUSE($][1); $][$ = $][2; }
|
||||
| 'R' { ]AT_VARIANT_IF([], [$][$ = YY_NULL; delete $][1]; )[YYERROR; }
|
||||
| 'R' { ]AT_VARIANT_IF([], [$][$ = YY_NULLPTR; delete $][1]; )[YYERROR; }
|
||||
| 'p' { $][$ = $][1; }
|
||||
| 's' { $][$ = $][1; throw std::runtime_error ("reduction"); }
|
||||
| 'T' { ]AT_VARIANT_IF([], [$][$ = YY_NULL; delete $][1]; )[YYABORT; }
|
||||
| error { ]AT_VARIANT_IF([], [$][$ = YY_NULL; ])[yyerrok; }
|
||||
| 'T' { ]AT_VARIANT_IF([], [$][$ = YY_NULLPTR; delete $][1]; )[YYABORT; }
|
||||
| error { ]AT_VARIANT_IF([], [$][$ = YY_NULLPTR; ])[yyerrok; }
|
||||
;
|
||||
%%
|
||||
|
||||
@@ -868,7 +868,7 @@ main (int argc, const char *argv[])
|
||||
{
|
||||
std::cerr << "unknown exception caught" << std::endl;
|
||||
}
|
||||
Object::log (YY_NULL, "end");
|
||||
Object::log (YY_NULLPTR, "end");
|
||||
assert (Object::empty());
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user