mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 22:03:02 +00:00
c++: do not exhibit private macros
* examples/variant-11.yy: here.
This commit is contained in:
@@ -97,6 +97,11 @@ item:
|
||||
|
||||
namespace yy
|
||||
{
|
||||
// Use nullptr with pre-C++11.
|
||||
#if defined __cplusplus && __cplusplus < 201103L
|
||||
# define nullptr 0
|
||||
#endif
|
||||
|
||||
// The yylex function providing subsequent tokens:
|
||||
// TEXT "I have three numbers for you."
|
||||
// NUMBER 1
|
||||
@@ -111,7 +116,7 @@ namespace yy
|
||||
{
|
||||
static int stage = -1;
|
||||
++stage;
|
||||
parser::location_type loc (YY_NULLPTR, stage + 1, stage + 1);
|
||||
parser::location_type loc (nullptr, stage + 1, stage + 1);
|
||||
switch (stage)
|
||||
{
|
||||
case 0:
|
||||
|
||||
Reference in New Issue
Block a user