72 |
item_number_t *sitems = state->items; |
item_number_t *sitems = state->items; |
73 |
int snritems = state->nitems; |
int snritems = state->nitems; |
74 |
|
|
75 |
/* New experimental feature: if TRACE_FLAGS output all the items of |
/* Output all the items of a state, not only its kernel. */ |
76 |
a state, not only its kernel. */ |
if (report_flag & report_itemsets) |
|
if (trace_flag) |
|
77 |
{ |
{ |
78 |
closure (sitems, snritems); |
closure (sitems, snritems); |
79 |
sitems = itemset; |
sitems = itemset; |
104 |
for (/* Nothing */; *sp >= 0; ++sp) |
for (/* Nothing */; *sp >= 0; ++sp) |
105 |
fprintf (out, " %s", escape (symbols[*sp]->tag)); |
fprintf (out, " %s", escape (symbols[*sp]->tag)); |
106 |
|
|
107 |
/* Experimental feature: display the lookaheads. */ |
/* Display the lookaheads? */ |
108 |
if (trace_flag && state->nlookaheads) |
if (report_flag & report_lookaheads) |
109 |
{ |
{ |
110 |
int j, k; |
int j, k; |
111 |
int nlookaheads = 0; |
int nlookaheads = 0; |
512 |
|
|
513 |
print_grammar (out); |
print_grammar (out); |
514 |
|
|
515 |
/* New experimental feature: output all the items of a state, not |
/* If the whole state item sets, not only the kernels, are wanted, |
516 |
only its kernel. Requires to run closure, which need memory |
`closure' will be run, which needs memory allocation/deallocation. */ |
517 |
allocation/deallocation. */ |
if (report_flag & report_itemsets) |
|
if (trace_flag) |
|
518 |
new_closure (nritems); |
new_closure (nritems); |
519 |
/* Storage for print_reductions. */ |
/* Storage for print_reductions. */ |
520 |
shiftset = bitset_create (ntokens, BITSET_FIXED); |
shiftset = bitset_create (ntokens, BITSET_FIXED); |
523 |
print_state (out, states[i]); |
print_state (out, states[i]); |
524 |
bitset_free (shiftset); |
bitset_free (shiftset); |
525 |
bitset_free (lookaheadset); |
bitset_free (lookaheadset); |
526 |
if (trace_flag) |
if (report_flag & report_itemsets) |
527 |
free_closure (); |
free_closure (); |
528 |
|
|
529 |
xfclose (out); |
xfclose (out); |