mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
* src/scan-gram.l, src/reader.h (scanner_last_string_free):
Restore. * src/scan-gram.l (last_string): Is global to the file, not to yylex. * src/parse-gram.y (input): Don't append the epilogue here, (epilogue.opt): do it here, and free the scanner's obstack. * src/reader.c (epilogue_set): Rename as... (epilogue_augment): this. * data/c.m4 (b4_epilogue): Defaults to empty.
This commit is contained in:
@@ -84,8 +84,9 @@ prologue_augment (const char *prologue, location_t location)
|
||||
`----------------------*/
|
||||
|
||||
void
|
||||
epilogue_set (const char *epilogue, location_t location)
|
||||
epilogue_augment (const char *epilogue, location_t location)
|
||||
{
|
||||
char *extension = NULL;
|
||||
obstack_fgrow1 (&muscle_obstack, "]b4_syncline([[%d]], [[",
|
||||
location.first_line);
|
||||
MUSCLE_OBSTACK_SGROW (&muscle_obstack,
|
||||
@@ -93,7 +94,9 @@ epilogue_set (const char *epilogue, location_t location)
|
||||
obstack_sgrow (&muscle_obstack, "]])[\n");
|
||||
obstack_sgrow (&muscle_obstack, epilogue);
|
||||
obstack_1grow (&muscle_obstack, 0);
|
||||
muscle_insert ("epilogue", obstack_finish (&muscle_obstack));
|
||||
extension = obstack_finish (&muscle_obstack);
|
||||
muscle_grow ("epilogue", extension, "");
|
||||
obstack_free (&muscle_obstack, extension);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user