mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Restore --no-lines.
Reported by Jim Kent. * data/c.m4 (b4_syncline): New. * data/glr.c, data/yacc.c, data/lalr1.cc: Use it. * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline. * src/output.c (user_actions_output): Likewise. (prepare): Define 'b4_synclines_flag'.
This commit is contained in:
16
data/yacc.c
16
data/yacc.c
@@ -165,9 +165,9 @@ m4_define([b4_symbol_actions],
|
||||
[m4_pushdef([b4_dollar_dollar], [yyvalue.$6])dnl
|
||||
m4_pushdef([b4_at_dollar], [yylocation])dnl
|
||||
case $4: /* $3 */
|
||||
#line $2 "$1"
|
||||
b4_syncline([$2], [$1])
|
||||
$5;
|
||||
#line __oline__ "__ofile__"
|
||||
b4_syncline([__oline__], [__ofile__])
|
||||
break;
|
||||
m4_popdef([b4_at_dollar])dnl
|
||||
m4_popdef([b4_dollar_dollar])dnl
|
||||
@@ -229,10 +229,10 @@ b4_pre_prologue
|
||||
|
||||
#ifndef YYSTYPE
|
||||
m4_ifdef([b4_stype],
|
||||
[#line b4_stype_line "b4_filename"
|
||||
[b4_syncline([b4_stype_line], [b4_filename])
|
||||
typedef union b4_stype yystype;
|
||||
/* Line __line__ of __file__. */
|
||||
#line __oline__ "__ofile__"],
|
||||
b4_syncline([__oline__], [__ofile__])],
|
||||
[typedef int yystype;])
|
||||
# define YYSTYPE yystype
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
@@ -254,7 +254,7 @@ typedef struct yyltype
|
||||
b4_post_prologue
|
||||
|
||||
/* Line __line__ of __file__. */
|
||||
#line __oline__ "__ofile__"
|
||||
b4_syncline([__oline__], [__ofile__])
|
||||
|
||||
#if ! defined (yyoverflow) || YYERROR_VERBOSE
|
||||
|
||||
@@ -1053,7 +1053,7 @@ yyreduce:
|
||||
}
|
||||
|
||||
/* Line __line__ of __file__. */
|
||||
#line __oline__ "__ofile__"
|
||||
b4_syncline([__oline__], [__ofile__])
|
||||
|
||||
[ yyvsp -= yylen;
|
||||
yyssp -= yylen;
|
||||
@@ -1290,10 +1290,10 @@ b4_token_defines(b4_tokens)
|
||||
|
||||
#ifndef YYSTYPE
|
||||
m4_ifdef([b4_stype],
|
||||
[#line b4_stype_line "b4_filename"
|
||||
[b4_syncline([b4_stype_line], [b4_filename])
|
||||
typedef union b4_stype yystype;
|
||||
/* Line __line__ of __file__. */
|
||||
#line __oline__ "__ofile__"],
|
||||
b4_syncline([__oline__], [__ofile__])],
|
||||
[typedef int yystype;])
|
||||
# define YYSTYPE yystype
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user