From e83d80b8ed8587fd05437d33f2011403f55f1f9d Mon Sep 17 00:00:00 2001 From: Marc Autret Date: Mon, 10 Dec 2001 23:19:09 +0000 Subject: [PATCH] * src/reader.c (copy_definition): Re-use CPP-outed code which replace precedent remove. * src/bison.simple: Remove #line before %%prologue because %%input-line is wrong at this time. --- ChangeLog | 7 +++++++ TODO | 6 ++++-- src/bison.simple | 1 - src/output.c | 2 ++ src/reader.c | 2 -- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 258243e5..2e2cbb0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-12-10 Marc Autret + + * src/reader.c (copy_definition): Re-use CPP-outed code which + replace precedent remove. + * src/bison.simple: Remove #line before %%prologue because + %%input-line is wrong at this time. + 2001-12-10 Marc Autret * src/reader.c (symbols_output): Clean up. diff --git a/TODO b/TODO index 596bd1ee..a46c66f1 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,12 @@ -*- outline -*- * src/reader.c -Check and cleanup for CPP-out code. [] +Check and cleanup for CPP-out code. [ok] * src/output.c -Check and cleanup for CPP-out code. [] +Check and cleanup for CPP-out code. [ok] +** %%input-line is not correct at this time. +Rely with bison.simple. * Broken options ?. ** %no-lines [] diff --git a/src/bison.simple b/src/bison.simple index a55a66bd..6228f2be 100644 --- a/src/bison.simple +++ b/src/bison.simple @@ -76,7 +76,6 @@ typedef struct yyltype #endif /* Copy the user declarations. */ -#line %%input-line "%%filename" %%prologue #line %%line "%%skeleton" diff --git a/src/output.c b/src/output.c index 485d5873..3833ec9e 100644 --- a/src/output.c +++ b/src/output.c @@ -959,6 +959,8 @@ output_parser (const char *skel_filename, struct obstack *oout) obstack_sgrow (oout, muscle_value); else if (!strcmp (muscle_key, "line")) obstack_fgrow1 (oout, "%d", line + 1); + /* How can lineno be correct after having finished reading + input file ? --Marc. */ else if (!strcmp (muscle_key, "input-line")) obstack_fgrow1 (oout, "%d", lineno); else diff --git a/src/reader.c b/src/reader.c index 3974f069..099ce309 100644 --- a/src/reader.c +++ b/src/reader.c @@ -437,14 +437,12 @@ copy_definition (void) /* -1 while reading a character if prev char was %. */ int after_percent; -#if 0 if (!no_lines_flag) { obstack_fgrow2 (&attrs_obstack, muscle_find ("linef"), lineno, quotearg_style (c_quoting_style, muscle_find("filename"))); } -#endif after_percent = 0; -- 2.45.2