mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
* src/files.h, src/files.c (open_files, close_files): Remove.
* src/main.c (main): Don't open/close files, nor invoke lex_free, let... * src/reader.c (reader): Do it.
This commit is contained in:
11
src/reader.c
11
src/reader.c
@@ -1865,6 +1865,14 @@ reader (void)
|
||||
undeftoken->class = token_sym;
|
||||
undeftoken->user_token_number = 2;
|
||||
|
||||
/* Initialize the obstacks. */
|
||||
obstack_init (&action_obstack);
|
||||
obstack_init (&attrs_obstack);
|
||||
obstack_init (&guard_obstack);
|
||||
obstack_init (&output_obstack);
|
||||
|
||||
finput = xfopen (infile, "r");
|
||||
|
||||
/* Read the declaration section. Copy %{ ... %} groups to
|
||||
TABLE_OBSTACK and FDEFINES file. Also notice any %token, %left,
|
||||
etc. found there. */
|
||||
@@ -1875,6 +1883,9 @@ reader (void)
|
||||
/* Some C code is given at the end of the grammar file. */
|
||||
read_additionnal_code ();
|
||||
|
||||
lex_free ();
|
||||
xfclose (finput);
|
||||
|
||||
/* Assign the symbols their symbol numbers. Write #defines for the
|
||||
token symbols into FDEFINES if requested. */
|
||||
packsymbols ();
|
||||
|
||||
Reference in New Issue
Block a user