* src/reader.c (reader): Remove call to free_symtab ().

* src/main.c (main): Call it here.
Include symtab.h.
* src/conflicts.c (initialize_conflicts): Rename as...
(solve_conflicts): this.
* src/print.c (print_core, print_actions, print_state)
(print_grammar): Dump to a file instead a `output_obstack'.
(print_results): Dump `output_obstack', and then proceed with the
FILE *.
* src/files.c (compute_output_file_names, close_files): New.
(output_files): Adjust.
* src/main.c (main): Adjust.
This commit is contained in:
Akim Demaille
2001-09-24 08:15:53 +00:00
parent 9a96ccfa20
commit bb84601097
23 changed files with 715 additions and 634 deletions

View File

@@ -30,12 +30,12 @@
#include "LR0.h"
int any_conflicts = 0;
errs **err_table;
errs **err_table = NULL;
int expected_conflicts;
static char *conflicts;
static char *conflicts = NULL;
static unsigned *shiftset;
static unsigned *lookaheadset;
static unsigned *shiftset = NULL;
static unsigned *lookaheadset = NULL;
static int src_total;
static int rrc_total;
static int src_count;
@@ -264,7 +264,7 @@ set_conflicts (int state)
}
void
initialize_conflicts (void)
solve_conflicts (void)
{
int i;
@@ -458,7 +458,7 @@ conflict_report (int src_num, int rrc_num)
`---------------------------------------------*/
void
print_conflicts (void)
print_conflicts (FILE *out)
{
int i;
@@ -478,9 +478,8 @@ print_conflicts (void)
if (verbose_flag)
{
obstack_fgrow1 (&output_obstack, _("State %d contains"), i);
obstack_sgrow (&output_obstack,
conflict_report (src_count, rrc_count));
fprintf (out, _("State %d contains"), i);
fputs (conflict_report (src_count, rrc_count), out);
}
}
}