* data/lalr1.cc: When displaying a line number, be sure to make it

an int.
This commit is contained in:
Akim Demaille
2003-02-19 14:55:14 +00:00
parent 60a777aa24
commit 0d1c3a04b7
2 changed files with 9 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2003-02-19 Akim Demaille <akim@epita.fr>
* data/lalr1.cc: When displaying a line number, be sure to make it
an int.
2003-02-19 Akim Demaille <akim@epita.fr> 2003-02-19 Akim Demaille <akim@epita.fr>
* data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_): * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):

View File

@@ -429,8 +429,11 @@ yy::]b4_parser_class_name[::parse ()
#if YYDEBUG #if YYDEBUG
if (debug_) if (debug_)
{ {
// Short files will use "unsigned char" for line numbers,
// in which case they will be output as character litterals
// by "<<".
YYCDEBUG << "Reducing via rule " << n_ - 1 YYCDEBUG << "Reducing via rule " << n_ - 1
<< " (line " << rline_[n_] << "), "; << " (line " << static_cast <unsigned> (rline_[n_]) << "), ";
for (]b4_int_type_for([b4_prhs])[ i = prhs_[n_]; for (]b4_int_type_for([b4_prhs])[ i = prhs_[n_];
0 <= rhs_[i]; ++i) 0 <= rhs_[i]; ++i)
YYCDEBUG << name_[rhs_[i]] << ' '; YYCDEBUG << name_[rhs_[i]] << ' ';