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

Diff of /bison/src/lalr.c

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

revision 1.81 by akim, Sun Jun 30 17:34:52 2002 UTC revision 1.82 by akim, Tue Jul 2 13:51:26 2002 UTC
# Line 420  lookaheads_print (FILE *out) Line 420  lookaheads_print (FILE *out)
420    fprintf (out, "Lookaheads: BEGIN\n");    fprintf (out, "Lookaheads: BEGIN\n");
421    for (i = 0; i < nstates; ++i)    for (i = 0; i < nstates; ++i)
422      {      {
423          bitset_iterator iter;
424    
425        fprintf (out, "State %d: %d lookaheads\n",        fprintf (out, "State %d: %d lookaheads\n",
426                 i, states[i]->nlookaheads);                 i, states[i]->nlookaheads);
427    
428        for (j = 0; j < states[i]->nlookaheads; ++j)        for (j = 0; j < states[i]->nlookaheads; ++j)
429          BITSET_EXECUTE (states[i]->lookaheads[j], 0, k,          BITSET_FOR_EACH (iter, states[i]->lookaheads[j], k, 0)
430          {          {
431            fprintf (out, "   on %d (%s) -> rule %d\n",            fprintf (out, "   on %d (%s) -> rule %d\n",
432                     k, symbols[k]->tag,                     k, symbols[k]->tag,
433                     states[i]->lookaheads_rule[j]->number - 1);                     states[i]->lookaheads_rule[j]->number - 1);
434          });          };
435      }      }
436    fprintf (out, "Lookaheads: END\n");    fprintf (out, "Lookaheads: END\n");
437  }  }

Legend:
Removed from v.1.81  
changed lines
  Added in v.1.82

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