* src/getargs.c (statistics_flag): Replace with...

(trace_flag): New.
(longopts): Accept --trace instead of --statistics.
* src/getargs.h, src/options.c: Adjust.
* src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
* src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
This commit is contained in:
Akim Demaille
2001-11-19 10:37:58 +00:00
parent 97db7bd4a1
commit 9bfe901c33
9 changed files with 52 additions and 59 deletions

View File

@@ -23,6 +23,7 @@
The entry point is generate_states. */
#include "system.h"
#include "getargs.h"
#include "gram.h"
#include "state.h"
#include "complain.h"
@@ -147,10 +148,8 @@ new_itemsets (void)
int i;
int shiftcount;
#if TRACE
fprintf (stderr, "Entering new_itemsets, state = %d\n",
this_state->number);
#endif
if (trace_flag)
fprintf (stderr, "Entering new_itemsets, state = %d\n", nstates);
for (i = 0; i < nsyms; i++)
kernel_end[i] = NULL;
@@ -192,10 +191,9 @@ new_state (int symbol)
int n;
core *p;
#if TRACE
fprintf (stderr, "Entering new_state, state = %d, symbol = %d\n",
nstates, symbol);
#endif
if (trace_flag)
fprintf (stderr, "Entering new_state, state = %d, symbol = %d\n",
nstates, symbol);
if (nstates >= MAXSHORT)
fatal (_("too many states (max %d)"), MAXSHORT);
@@ -233,10 +231,9 @@ get_state (int symbol)
int n = kernel_end[symbol] - kernel_base[symbol];
#if TRACE
fprintf (stderr, "Entering get_state, state = %d, symbol = %d\n",
nstates, symbol);
#endif
if (trace_flag)
fprintf (stderr, "Entering get_state, state = %d, symbol = %d\n",
nstates, symbol);
/* Add up the target state's active item numbers to get a hash key.
*/
@@ -296,9 +293,9 @@ append_states (void)
int j;
int symbol;
#if TRACE
fprintf (stderr, "Entering append_states\n");
#endif
if (trace_flag)
fprintf (stderr, "Entering append_states\n");
/* first sort shift_symbol into increasing order */