]> git.saurik.com Git - bison.git/blobdiff - etc/bench.pl.in
Use yy* consistently.
[bison.git] / etc / bench.pl.in
index f8fca8ac714f9f7a9cda4fb63dd4e97e073846e2..a95e646b56a62ac4e6ccb8bdab8d58a63efeec36 100755 (executable)
@@ -686,51 +686,48 @@ yy::parser::token_type yylex(yy::parser::semantic_type* yylval,
                              yy::parser::location_type* yylloc)
 #endif
 {
+  typedef yy::parser::location_type location_type;
   typedef yy::parser::token token;
   static int stage = -1;
   ++stage;
   if (stage == STAGE_MAX)
     {
 #if USE_LEX_SYMBOL
-      return yy::parser::make_symbol <token::END_OF_FILE> (yy::location());
+      return yy::parser::make_END_OF_FILE (yy::location());
 #else
-      *yylloc = yy::location ();
+      *yylloc = location_type ();
       return token::END_OF_FILE;
 #endif
     }
   else if (stage % 2)
     {
 #if USE_LEX_SYMBOL
-      return yy::parser::make_symbol <token::NUMBER> (stage, yy::location());
-#elif defined ONE_STAGE_BUILD
+      return yy::parser::make_NUMBER (stage, yy::location());
+#else
+# if defined ONE_STAGE_BUILD
       yylval->build(stage);
-      *yylloc = yy::location ();
-      return token::NUMBER;
-#elif USE_VARIANTS
+# elif USE_VARIANTS
       yylval->build<int>() = stage;
-      *yylloc = yy::location ();
-      return token::NUMBER;
-#else
+# else
       yylval->ival = stage;
-      *yylloc = yy::location ();
+# endif
+      *yylloc = location_type ();
       return token::NUMBER;
 #endif
     }
   else
     {
 #if USE_LEX_SYMBOL
-      return yy::parser::make_symbol <token::TEXT> ("A string.", yy::location());
-#elif defined ONE_STAGE_BUILD
+      return yy::parser::make_TEXT ("A string.", yy::location());
+#else
+# if defined ONE_STAGE_BUILD
       yylval->build(std::string("A string."));
-      *yylloc = yy::location ();
-      return token::TEXT;
-#elif USE_VARIANTS
+# elif USE_VARIANTS
       yylval->build<std::string>() = std::string("A string.");
-      *yylloc = yy::location ();
-      return token::TEXT;
-#else
+# else
       yylval->sval = new std::string("A string.");
-      *yylloc = yy::location ();
+# endif
+      *yylloc = location_type ();
       return token::TEXT;
 #endif
     }