mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 08:13:02 +00:00
* data/lalr1.cc: Use temporary variables instead of casts to
change integer types. Suggested by Paul Eggert.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2003-02-21 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* data/lalr1.cc: Use temporary variables instead of casts to
|
||||||
|
change integer types.
|
||||||
|
Suggested by Paul Eggert.
|
||||||
|
|
||||||
2003-02-21 Akim Demaille <akim@epita.fr>
|
2003-02-21 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* doc/bison.texinfo: Use "location" consistently to refer to @n,
|
* doc/bison.texinfo: Use "location" consistently to refer to @n,
|
||||||
|
|||||||
@@ -432,8 +432,9 @@ yy::]b4_parser_class_name[::parse ()
|
|||||||
// Short files will use "unsigned char" for line numbers,
|
// Short files will use "unsigned char" for line numbers,
|
||||||
// in which case they will be output as character litterals
|
// in which case they will be output as character litterals
|
||||||
// by "<<".
|
// by "<<".
|
||||||
|
unsigned yylineno = rline_[n_];
|
||||||
YYCDEBUG << "Reducing via rule " << n_ - 1
|
YYCDEBUG << "Reducing via rule " << n_ - 1
|
||||||
<< " (line " << static_cast <unsigned> (rline_[n_]) << "), ";
|
<< " (line " << yylineno << "), ";
|
||||||
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]] << ' ';
|
||||||
@@ -923,7 +924,9 @@ namespace yy
|
|||||||
/** \brief (column related) Advance to the COLUMNS next columns. */
|
/** \brief (column related) Advance to the COLUMNS next columns. */
|
||||||
inline void columns (int columns = 1)
|
inline void columns (int columns = 1)
|
||||||
{
|
{
|
||||||
if (int (initial_column) < columns + int (column))
|
int leftmost = initial_column;
|
||||||
|
int current = column;
|
||||||
|
if (leftmost <= current + columns)
|
||||||
column += columns;
|
column += columns;
|
||||||
else
|
else
|
||||||
column = initial_column;
|
column = initial_column;
|
||||||
|
|||||||
Reference in New Issue
Block a user