From 2e1f5829ee59d4b1d6a6eb92fd6afde3e4dab55b Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 15 Dec 2004 16:30:15 +0000 Subject: [PATCH] * data/lalr1.cc (lex_): Rename as... (yylex_): this. Move the trace here. Take the %name-prefix into account. Reported by Alexandre Duret-Lutz. --- ChangeLog | 8 ++++++++ data/lalr1.cc | 14 ++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43cdc008..3a3bb81d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-12-15 Akim Demaille + + * data/lalr1.cc (lex_): Rename as... + (yylex_): this. + Move the trace here. + Take the %name-prefix into account. + Reported by Alexandre Duret-Lutz. + 2004-12-15 Akim Demaille Simplify the C++ parser constructor. diff --git a/data/lalr1.cc b/data/lalr1.cc index 0ba7720d..d81ab7a7 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -243,7 +243,7 @@ namespace yy private: - virtual void lex_ (); + virtual void yylex_ (); virtual void error_ (); virtual void report_syntax_error_ (); #if YYDEBUG @@ -521,10 +521,7 @@ yybackup: /* Read a look-ahead token. */ if (looka_ == empty_) - { - YYCDEBUG << "Reading a token: "; - lex_ (); - } + yylex_ (); /* Convert token to internal form. */ if (looka_ <= eof_) @@ -757,12 +754,13 @@ yyabortlab: } void -yy::]b4_parser_class_name[::lex_ () +yy::]b4_parser_class_name[::yylex_ () { + YYCDEBUG << "Reading a token: "; #if YYLSP_NEEDED - looka_ = yylex (&value, &location); + looka_ = ]m4_default(b4_prefix, [yy])[lex (&value, &location); #else - looka_ = yylex (&value); + looka_ = ]m4_default(b4_prefix, [yy])[lex (&value); #endif } -- 2.47.2