/[bison]/bison/src/print.c
ViewVC logotype

Diff of /bison/src/print.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.64 by akim, Sun May 5 11:56:49 2002 UTC revision 1.65 by akim, Sat May 25 16:12:40 2002 UTC
# Line 72  print_core (FILE *out, state_t *state) Line 72  print_core (FILE *out, state_t *state)
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;
# Line 105  print_core (FILE *out, state_t *state) Line 104  print_core (FILE *out, state_t *state)
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;
# Line 513  print_results (void) Line 512  print_results (void)
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);
# Line 525  print_results (void) Line 523  print_results (void)
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);

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26