/[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.71 by akim, Sat Jun 15 18:23:50 2002 UTC revision 1.72 by akim, Sat Jun 15 18:24:25 2002 UTC
# Line 93  print_core (FILE *out, state_t *state) Line 93  print_core (FILE *out, state_t *state)
93    
94            /* Display the lookaheads?  */            /* Display the lookaheads?  */
95            if (report_flag & report_lookaheads)            if (report_flag & report_lookaheads)
96              {              state_rule_lookaheads_print (state, &rules[rule], out);
               int j, k;  
               int nlookaheads = 0;  
               /* Look for lookaheads corresponding to this rule. */  
               for (j = 0; j < state->nlookaheads; ++j)  
                 for (k = 0; k < ntokens; ++k)  
                   if (bitset_test (state->lookaheads[j], k)  
                       && state->lookaheads_rule[j]->number == rule)  
                     nlookaheads++;  
               if (nlookaheads)  
                 {  
                   fprintf (out, "  [");  
                   for (j = 0; j < state->nlookaheads; ++j)  
                     for (k = 0; k < ntokens; ++k)  
                       if (bitset_test (state->lookaheads[j], k)  
                           && state->lookaheads_rule[j]->number == rule)  
                         fprintf (out, "%s%s",  
                                  symbol_tag_get (symbols[k]),  
                                  --nlookaheads ? ", " : "");  
                   fprintf (out, "]");  
                 }  
             }  
97    
98            fprintf (out, _("   (rule %d)"), rule - 1);            fprintf (out, _("   (rule %d)"), rule - 1);
99            fputc ('\n', out);            fputc ('\n', out);

Legend:
Removed from v.1.71  
changed lines
  Added in v.1.72

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