* 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:
Akim Demaille
2002-11-12 08:26:38 +00:00
parent 573a6cd356
commit 7ec2d4cd39
7 changed files with 56 additions and 27 deletions

View File

@@ -42,6 +42,7 @@ extern FILE *gram_in;
extern int gram__flex_debug;
void scanner_initialize (void);
void scanner_free (void);
void scanner_last_string_free (void);
# define YY_DECL \
int gram_lex (yystype *yylval, location_t *yylloc, \
@@ -69,7 +70,7 @@ extern braced_code_t current_braced_code;
/* From reader.c. */
void grammar_start_symbol_set (symbol_t *s, location_t l);
void prologue_augment (const char *prologue, location_t location);
void epilogue_set (const char *epilogue, location_t location);
void epilogue_augment (const char *epilogue, location_t location);
void grammar_symbol_append (symbol_t *s, location_t l);
void grammar_rule_begin (symbol_t *lhs, location_t l);
void grammar_rule_end (location_t l);