]> git.saurik.com Git - bison.git/blobdiff - data/lalr1.cc
* TODO: Remove dead items.
[bison.git] / data / lalr1.cc
index af67b220f8ec4e57452f51fcf4397868e84e0b94..8f0ebe8f52de10e5df0f68b15a2a742ccd6df79c 100644 (file)
@@ -120,6 +120,8 @@ b4_syncline([@oline@], [@ofile@])
     {
       ]b4_token_enums(b4_tokens)[
     };
+    /// Token type.
+    typedef token::yytokentype token_type;
 
     /// Build a parser object.
     ]b4_parser_class_name[ (]b4_parse_param_decl[);
@@ -248,7 +250,7 @@ b4_error_verbose_if([, int tok])[);
 #endif
 
     /// Convert a scanner token number to a symbol number.
-    inline token_number_type yytranslate_ (int token);
+    token_number_type yytranslate_ (int token);
 
     /// \brief Reclaim the memory associated to a symbol.
     /// \param yymsg        Why this token is reclaimed.
@@ -783,7 +785,7 @@ b4_error_verbose_if([, yytoken])[));
     yyerror_range[1] = yylloc;
     // Using YYLLOC is tempting, but would change the location of
     // the look-ahead.  YYLOC is available though.
-    YYLLOC_DEFAULT (yyloc, yyerror_range - 1, 2);
+    YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
     yysemantic_stack_.push (yylval);
     yylocation_stack_.push (yyloc);