mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-24 03:33:03 +00:00
* src/files.c (output_files): Free the output_obstack.
* src/main.c (main): Call print and print_graph conditionally. * src/print.c (print): Work unconditionally. * src/print_graph.c (print_graph): Work unconditionally. * src/conflicts.c (log_resolution): Output only if verbose_flag.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2001-12-17 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* src/files.c (output_files): Free the output_obstack.
|
||||||
|
* src/main.c (main): Call print and print_graph conditionally.
|
||||||
|
* src/print.c (print): Work unconditionally.
|
||||||
|
* src/print_graph.c (print_graph): Work unconditionally.
|
||||||
|
* src/conflicts.c (log_resolution): Output only if verbose_flag.
|
||||||
|
|
||||||
2001-12-16 Marc Autret <autret_m@epita.fr>
|
2001-12-16 Marc Autret <autret_m@epita.fr>
|
||||||
|
|
||||||
* src/output.c (actions_output): Fix. When we use %no-lines,
|
* src/output.c (actions_output): Fix. When we use %no-lines,
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ static unsigned *lookaheadset = NULL;
|
|||||||
static inline void
|
static inline void
|
||||||
log_resolution (int state, int LAno, int token, char *resolution)
|
log_resolution (int state, int LAno, int token, char *resolution)
|
||||||
{
|
{
|
||||||
|
if (verbose_flag)
|
||||||
obstack_fgrow4 (&output_obstack,
|
obstack_fgrow4 (&output_obstack,
|
||||||
_("\
|
_("\
|
||||||
Conflict in state %d between rule %d and token %s resolved as %s.\n"),
|
Conflict in state %d between rule %d and token %s resolved as %s.\n"),
|
||||||
|
|||||||
@@ -489,12 +489,13 @@ output_files (void)
|
|||||||
char *temp_name;
|
char *temp_name;
|
||||||
|
|
||||||
obstack_save (&attrs_obstack, attrsfile);
|
obstack_save (&attrs_obstack, attrsfile);
|
||||||
obstack_free (&attrs_obstack, NULL);
|
|
||||||
temp_name = stringappend (short_base_name, EXT_GUARD_C);
|
temp_name = stringappend (short_base_name, EXT_GUARD_C);
|
||||||
#ifndef MSDOS
|
#ifndef MSDOS
|
||||||
temp_name = stringappend (temp_name, src_extension);
|
temp_name = stringappend (temp_name, src_extension);
|
||||||
#endif /* MSDOS */
|
#endif /* MSDOS */
|
||||||
obstack_save (&guard_obstack, temp_name);
|
obstack_save (&guard_obstack, temp_name);
|
||||||
|
}
|
||||||
|
|
||||||
obstack_free (&guard_obstack, NULL);
|
obstack_free (&guard_obstack, NULL);
|
||||||
}
|
obstack_free (&attrs_obstack, NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,9 +93,11 @@ main (int argc, char *argv[])
|
|||||||
exit (1);
|
exit (1);
|
||||||
|
|
||||||
/* Output the detailed report on the grammar. */
|
/* Output the detailed report on the grammar. */
|
||||||
|
if (verbose_flag)
|
||||||
print_results ();
|
print_results ();
|
||||||
|
|
||||||
/* Output the VCG graph. */
|
/* Output the VCG graph. */
|
||||||
|
if (graph_flag)
|
||||||
print_graph ();
|
print_graph ();
|
||||||
|
|
||||||
/* Output the tables and the parser to ftable. In file output. */
|
/* Output the tables and the parser to ftable. In file output. */
|
||||||
|
|||||||
@@ -306,8 +306,6 @@ print_grammar (FILE *out)
|
|||||||
|
|
||||||
void
|
void
|
||||||
print_results (void)
|
print_results (void)
|
||||||
{
|
|
||||||
if (verbose_flag)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -317,6 +315,8 @@ print_results (void)
|
|||||||
|
|
||||||
size_t size = obstack_object_size (&output_obstack);
|
size_t size = obstack_object_size (&output_obstack);
|
||||||
fwrite (obstack_finish (&output_obstack), 1, size, out);
|
fwrite (obstack_finish (&output_obstack), 1, size, out);
|
||||||
|
obstack_free (&output_obstack, NULL);
|
||||||
|
|
||||||
if (size)
|
if (size)
|
||||||
fputs ("\n\n", out);
|
fputs ("\n\n", out);
|
||||||
|
|
||||||
@@ -337,5 +337,3 @@ print_results (void)
|
|||||||
|
|
||||||
xfclose (out);
|
xfclose (out);
|
||||||
}
|
}
|
||||||
obstack_free (&output_obstack, NULL);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -207,9 +207,6 @@ print_graph (void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!graph_flag)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Output file. */
|
/* Output file. */
|
||||||
fgraph = xfopen (spec_graph_file, "w");
|
fgraph = xfopen (spec_graph_file, "w");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user