[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Simplify yysyntax_error_ use.
From: |
Akim Demaille |
Subject: |
[PATCH] Simplify yysyntax_error_ use. |
Date: |
Mon, 03 Nov 2008 21:01:26 -0000 |
* data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
type, but make it unnamed in the declaration when it is not used.
---
ChangeLog | 6 ++++++
data/lalr1-fusion.cc | 10 ++++------
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0400e19..28c3ce8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2008-11-03 Akim Demaille <address@hidden>
+ Simplify yysyntax_error_ use.
+ * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
+ type, but make it unnamed in the declaration when it is not used.
+
+2008-11-03 Akim Demaille <address@hidden>
+
Let yy::variant::build return an lvalue.
* data/lalr1-fusion.cc (variant::build): Return a reference to the
object.
diff --git a/data/lalr1-fusion.cc b/data/lalr1-fusion.cc
index 3a629aa..743a05a 100644
--- a/data/lalr1-fusion.cc
+++ b/data/lalr1-fusion.cc
@@ -309,8 +309,7 @@ m4_ifdef([b4_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.
@@ -896,8 +895,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].location = yylloc;
@@ -1019,8 +1017,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);
--
1.6.0.2.588.g3102
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Simplify yysyntax_error_ use.,
Akim Demaille <=