From: Akim Demaille Date: Tue, 29 Jan 2013 07:14:15 +0000 (+0100) Subject: c++: improve the signature of yysyntax_error_ X-Git-Tag: v2.7.90~138 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/38cea49be1670782636ce2e7bc300ef761e78fc2 c++: improve the signature of yysyntax_error_ * data/lalr1.cc: This function is const. It takes a symbol_number_type. --- diff --git a/data/lalr1.cc b/data/lalr1.cc index 24156030..a0a059ae 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -206,8 +206,9 @@ b4_location_define])])[ /// Generate an error message. /// \param yystate the state where the error occurred. - /// \param yytoken the lookahead token. - virtual std::string yysyntax_error_ (state_type yystate, int yytoken); + /// \param yytoken the lookahead token type, or yyempty_. + virtual std::string yysyntax_error_ (state_type yystate, + symbol_number_type yytoken) const; /// Compute post-reduction state. /// \param yystate the current state @@ -1011,8 +1012,8 @@ b4_dollar_popdef])[]dnl // Generate an error message. std::string ]b4_parser_class_name[::yysyntax_error_ (]dnl -b4_error_verbose_if([state_type yystate, int yytoken], - [int, int])[) +b4_error_verbose_if([state_type yystate, symbol_number_type yytoken], + [state_type, symbol_number_type])[) const {]b4_error_verbose_if([[ std::string yyres; // Number of reported tokens (one for the "unexpected", one per