[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
yylineno -> yylno to avoid collision with recent beta flex
From: |
Paul Eggert |
Subject: |
yylineno -> yylno to avoid collision with recent beta flex |
Date: |
Tue, 25 Feb 2003 00:00:02 -0800 (PST) |
I installed the following obvious workaround to a namespace collision
with flex.
2003-02-24 Paul Eggert <address@hidden>
* data/glr.c (yy_reduce_print): yylineno -> yylno,
to avoid collision with flex use of yylineno.
Problem reported by Bruce Lilly in
<http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
* data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
* data/yacc.c (yy_reduce_print): Likewise.
Index: data/glr.c
===================================================================
RCS file: /cvsroot/bison/bison/data/glr.c,v
retrieving revision 1.51
diff -p -u -r1.51 glr.c
--- data/glr.c 13 Feb 2003 07:14:29 -0000 1.51
+++ data/glr.c 25 Feb 2003 07:52:38 -0000
@@ -1123,9 +1123,9 @@ static inline void
yy_reduce_print (size_t yyk, yyRuleNum yyrule)
{
int yyi;
- unsigned int yylineno = yyrline[yyrule];
+ unsigned int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack %d by rule %d (line %u), ",
- yyk, yyrule - 1, yylineno);
+ yyk, yyrule - 1, yylno);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
YYFPRINTF (stderr, "%s ", yytokenName (yyrhs[yyi]));
Index: data/lalr1.cc
===================================================================
RCS file: /cvsroot/bison/bison/data/lalr1.cc,v
retrieving revision 1.28
diff -p -u -r1.28 lalr1.cc
--- data/lalr1.cc 21 Feb 2003 08:13:37 -0000 1.28
+++ data/lalr1.cc 25 Feb 2003 07:52:38 -0000
@@ -432,9 +432,9 @@ yy::]b4_parser_class_name[::parse ()
// Short files will use "unsigned char" for line numbers,
// in which case they will be output as character litterals
// by "<<".
- unsigned yylineno = rline_[n_];
+ unsigned yylno = rline_[n_];
YYCDEBUG << "Reducing via rule " << n_ - 1
- << " (line " << yylineno << "), ";
+ << " (line " << yylno << "), ";
for (]b4_int_type_for([b4_prhs])[ i = prhs_[n_];
0 <= rhs_[i]; ++i)
YYCDEBUG << name_[rhs_[i]] << ' ';
Index: data/yacc.c
===================================================================
RCS file: /cvsroot/bison/bison/data/yacc.c,v
retrieving revision 1.52
diff -p -u -r1.52 yacc.c
--- data/yacc.c 13 Feb 2003 07:13:57 -0000 1.52
+++ data/yacc.c 25 Feb 2003 07:52:38 -0000
@@ -583,9 +583,9 @@ do {
\
[[int yyrule], [yyrule]])[
{
int yyi;
- unsigned int yylineno = yyrline[yyrule];
+ unsigned int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
- yyrule - 1, yylineno);
+ yyrule - 1, yylno);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- yylineno -> yylno to avoid collision with recent beta flex,
Paul Eggert <=