diff options
author | Joel E. Denny <jdenny@clemson.edu> | 2009-12-22 15:44:29 -0500 |
---|---|---|
committer | Joel E. Denny <jdenny@clemson.edu> | 2009-12-29 16:01:45 -0500 |
commit | 1e05521d4f74fc6770dd55e81c2fdc84191adf7b (patch) | |
tree | ac61584bbbe86b8297e0dc7ccb9a6d9db5abdcd5 /data | |
parent | 2728ac7ecd663c4a60f94fe7ab7679a9e83ebcd0 (diff) | |
download | bison-1e05521d4f74fc6770dd55e81c2fdc84191adf7b.tar.gz |
Port small part of master's 8901f32e so future ports are easier.
* data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
argument, but name it in the function definition only when
verbose error messages are enabled and it'll thus be used.
(yy::parser::parse): Update use of yysyntax_error_.
Diffstat (limited to 'data')
-rw-r--r-- | data/lalr1.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/data/lalr1.cc b/data/lalr1.cc index c36ba3de..a2d473db 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -153,8 +153,7 @@ b4_user_stype /// Generate an error message. /// \param state the state where the error occurred. /// \param tok the lookahead token. - virtual std::string yysyntax_error_ (int yystate]dnl -b4_error_verbose_if([, int tok])[); + virtual std::string yysyntax_error_ (int yystate, int tok); #if YYDEBUG /// \brief Report a symbol value on the debug stream. @@ -726,8 +725,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))[; if (!yyerrstatus_) { ++yynerrs_; - error (yylloc, yysyntax_error_ (yystate]dnl -b4_error_verbose_if([, yytoken])[)); + error (yylloc, yysyntax_error_ (yystate, yytoken)); } yyerror_range[0] = yylloc; @@ -851,8 +849,8 @@ b4_error_verbose_if([, yytoken])[)); // Generate an error message. std::string - ]b4_parser_class_name[::yysyntax_error_ (int yystate]dnl -b4_error_verbose_if([, int tok])[) + ]b4_parser_class_name[::yysyntax_error_ (int yystate, int]dnl +b4_error_verbose_if([ tok])[) { std::string res; YYUSE (yystate); |