* src/LR0.c (new_state, get_state): Complete TRACE code.

* src/closure.c: Include `reader.h' to get `tags', needed by the
trace code.
Rename the conditional DEBUG as TRACE.
Output consistently TRACEs to stderr, not stdout.
* src/derives.c: Likewise.
* src/reduce.c: (inaccessable_symbols): Using if is better style
than goto.
Use `#if TRACE' instead of `#if 0' for tracing code.
This commit is contained in:
Akim Demaille
2001-11-19 10:33:40 +00:00
parent 300f275f23
commit 2c5f66eda7
5 changed files with 69 additions and 70 deletions

View File

@@ -198,8 +198,8 @@ new_state (int symbol)
core *p;
#if TRACE
fprintf (stderr, "Entering new_state, symbol = %d, state = %d\n",
symbol, nstates);
fprintf (stderr, "Entering new_state, state = %d, symbol = %d\n",
nstates, symbol);
#endif
if (nstates >= MAXSHORT)
@@ -242,7 +242,8 @@ get_state (int symbol)
int n;
#if TRACE
fprintf (stderr, "Entering get_state, symbol = %d\n", symbol);
fprintf (stderr, "Entering get_state, state = %d, symbol = %d\n",
nstates, symbol);
#endif
isp1 = kernel_base[symbol];