diff --git a/examples/variant-11.yy b/examples/variant-11.yy index 64afd3ee..4cd581ca 100644 --- a/examples/variant-11.yy +++ b/examples/variant-11.yy @@ -116,7 +116,8 @@ namespace yy // TEXT "I have three numbers for you." // NUMBER 1 // NUMBER 2 - // NUMBER 3 + // NUMBER ... + // NUMBER max - 1 // TEXT "And that's all!" // END_OF_FILE diff --git a/examples/variant.yy b/examples/variant.yy index 109eb53a..f77a746a 100644 --- a/examples/variant.yy +++ b/examples/variant.yy @@ -99,7 +99,9 @@ namespace yy { // Use nullptr with pre-C++11. #if defined __cplusplus && __cplusplus < 201103L -# define nullptr 0 +# define NULLPTR 0 +#else +# define NULLPTR nullptr #endif // The yylex function providing subsequent tokens: @@ -117,7 +119,7 @@ namespace yy static int count = 0; const int stage = count; ++count; - parser::location_type loc (nullptr, unsigned (stage + 1), unsigned (stage + 1)); + parser::location_type loc (NULLPTR, unsigned (stage + 1), unsigned (stage + 1)); switch (stage) { case 0: