* data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,

since this causes problems when __file__ contains character
sequences like "@" that are treated specially by src/scan-skel.l.
Instead, just use the file's basename.  This fixes the bug
reported by Martin Mokrejs in
<http://mail.gnu.org/pipermail/bug-bison/2002-December/001949.html>.
This commit is contained in:
Paul Eggert
2002-12-09 04:48:38 +00:00
parent e19c4e5d1c
commit 996b1c7e8c
4 changed files with 21 additions and 12 deletions

View File

@@ -111,7 +111,7 @@ b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
/* Copy the first part of user declarations. */
]b4_pre_prologue[
]/* Line __line__ of __file__. */
]/* Line __line__ of lalr1.cc. */
b4_syncline([@oline@], [@ofile@])[
/* Enabling traces. */
@@ -128,7 +128,7 @@ b4_syncline([@oline@], [@ofile@])[
]m4_ifdef([b4_stype],
[b4_syncline([b4_stype_line], [b4_filename])
typedef union b4_stype yystype;
/* Line __line__ of __file__. */
/* Line __line__ of lalr1.cc. */
b4_syncline([@oline@], [@ofile@])],
[typedef int yystype;])[
# define YYSTYPE yystype
@@ -137,7 +137,7 @@ b4_syncline([@oline@], [@ofile@])],
/* Copy the second part of user declarations. */
]b4_post_prologue[
]/* Line __line__ of __file__. */
]/* Line __line__ of lalr1.cc. */
b4_syncline([@oline@], [@ofile@])[
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
@@ -445,7 +445,7 @@ yy::]b4_parser_class_name[::parse ()
]b4_actions[
}
]/* Line __line__ of __file__. */
]/* Line __line__ of lalr1.cc. */
b4_syncline([@oline@], [@ofile@])[
state_stack_.pop (len_);