* 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:
Akim Demaille
2001-12-17 17:32:39 +00:00
parent be750e4c49
commit 331dbc1bb7
5 changed files with 19 additions and 37 deletions

View File

@@ -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 ();