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:
Akim Demaille
2002-11-06 14:11:47 +00:00
parent 900c5db537
commit 437c2d8000
11 changed files with 58 additions and 56 deletions

View File

@@ -195,10 +195,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
@@ -228,7 +228,7 @@ static YYLTYPE yyloc_default;
]b4_post_prologue[
]/* Line __line__ of __file__. */
#line __oline__ "__ofile__"
b4_syncline([__oline__], [__ofile__])
[
#if ! defined (__cplusplus)
typedef char bool;
@@ -656,7 +656,7 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
# undef yyclearin
# undef YYRECOVERING
/* Line __line__ of __file__. */
#line __oline__ "__ofile__"
b4_syncline([__oline__], [__ofile__])
}
@@ -1906,10 +1906,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