From: Paul Eggert Date: Mon, 9 Dec 2002 04:48:38 +0000 (+0000) Subject: * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__, X-Git-Tag: BISON-1_875~152 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=996b1c7e8cb8168c5c533e387b03ddab7d270af7;p=platform%2Fupstream%2Fbison.git * 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 . --- diff --git a/ChangeLog b/ChangeLog index a241c2f..b96950b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-12-08 Paul Eggert + + * 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 + . + 2002-12-06 Paul Eggert Add support for rules that do not have trailing semicolons, as diff --git a/data/glr.c b/data/glr.c index 798b7c6..e946a02 100644 --- a/data/glr.c +++ b/data/glr.c @@ -187,7 +187,7 @@ b4_pre_prologue[ ]m4_ifdef([b4_stype], [b4_syncline([b4_stype_line], [b4_filename]) typedef union b4_stype yystype; -/* Line __line__ of __file__. */ +/* Line __line__ of glr.c. */ b4_syncline([@oline@], [@ofile@])], [typedef int yystype;])[ # define YYSTYPE yystype @@ -217,7 +217,7 @@ static YYLTYPE yyloc_default; /* Copy the second part of user declarations. */ ]b4_post_prologue[ -]/* Line __line__ of __file__. */ +]/* Line __line__ of glr.c. */ b4_syncline([@oline@], [@ofile@]) [ #if ! defined (__cplusplus) @@ -671,7 +671,7 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp, # undef YYBACKUP # undef yyclearin # undef YYRECOVERING -/* Line __line__ of __file__. */ +/* Line __line__ of glr.c. */ b4_syncline([@oline@], [@ofile@]) } @@ -1959,7 +1959,7 @@ b4_token_defines(b4_tokens) m4_ifdef([b4_stype], [b4_syncline([b4_stype_line], [b4_filename]) typedef union b4_stype yystype; -/* Line __line__ of __file__. */ +/* Line __line__ of glr.c. */ b4_syncline([@oline@], [@ofile@])], [typedef int yystype;]) # define YYSTYPE yystype diff --git a/data/lalr1.cc b/data/lalr1.cc index 48cfe3e..1e3162d 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -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_); diff --git a/data/yacc.c b/data/yacc.c index 631547d..455130b 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -190,7 +190,7 @@ b4_location_if([#define yylloc b4_prefix[]lloc])])[ ]m4_ifdef([b4_stype], [b4_syncline([b4_stype_line], [b4_filename]) typedef union b4_stype yystype; -/* Line __line__ of __file__. */ +/* Line __line__ of yacc.c. */ b4_syncline([@oline@], [@ofile@])], [typedef int yystype;])[ # define YYSTYPE yystype @@ -212,7 +212,7 @@ typedef struct yyltype /* Copy the second part of user declarations. */ ]b4_post_prologue -/* Line __line__ of __file__. */ +/* Line __line__ of yacc.c. */ b4_syncline([@oline@], [@ofile@])[ #if ! defined (yyoverflow) || YYERROR_VERBOSE @@ -988,7 +988,7 @@ yyreduce: b4_actions } -/* Line __line__ of __file__. */ +/* Line __line__ of yacc.c. */ b4_syncline([@oline@], [@ofile@]) [ yyvsp -= yylen; @@ -1197,7 +1197,7 @@ b4_token_defines(b4_tokens) m4_ifdef([b4_stype], [b4_syncline([b4_stype_line], [b4_filename]) typedef union b4_stype yystype; -/* Line __line__ of __file__. */ +/* Line __line__ of yacc.c. */ b4_syncline([@oline@], [@ofile@])], [typedef int yystype;]) # define YYSTYPE yystype