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

Diff of /bison/src/reduce.c

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

revision 1.68 by akim, Sun Jun 30 17:31:19 2002 UTC revision 1.69 by akim, Sun Jun 30 17:34:52 2002 UTC
# Line 307  nonterminals_reduce (void) Line 307  nonterminals_reduce (void)
307          LOCATION_PRINT (stderr, symbols[i]->location);          LOCATION_PRINT (stderr, symbols[i]->location);
308          fprintf (stderr, ": %s: %s: %s\n",          fprintf (stderr, ": %s: %s: %s\n",
309                   _("warning"), _("useless nonterminal"),                   _("warning"), _("useless nonterminal"),
310                   symbol_tag_get (symbols[i]));                   symbols[i]->tag);
311        }        }
312    
313    
# Line 355  reduce_output (FILE *out) Line 355  reduce_output (FILE *out)
355        int i;        int i;
356        fprintf (out, "%s\n\n", _("Useless nonterminals:"));        fprintf (out, "%s\n\n", _("Useless nonterminals:"));
357        for (i = 0; i < nuseless_nonterminals; ++i)        for (i = 0; i < nuseless_nonterminals; ++i)
358          fprintf (out, "   %s\n", symbol_tag_get (symbols[nsyms + i]));          fprintf (out, "   %s\n", symbols[nsyms + i]->tag);
359        fputs ("\n\n", out);        fputs ("\n\n", out);
360      }      }
361    
# Line 368  reduce_output (FILE *out) Line 368  reduce_output (FILE *out)
368            if (!b)            if (!b)
369              fprintf (out, "%s\n\n", _("Terminals which are not used:"));              fprintf (out, "%s\n\n", _("Terminals which are not used:"));
370            b = TRUE;            b = TRUE;
371            fprintf (out, "   %s\n", symbol_tag_get (symbols[i]));            fprintf (out, "   %s\n", symbols[i]->tag);
372          }          }
373      if (b)      if (b)
374        fputs ("\n\n", out);        fputs ("\n\n", out);
# Line 440  reduce_grammar (void) Line 440  reduce_grammar (void)
440    
441    if (!bitset_test (N, axiom->number - ntokens))    if (!bitset_test (N, axiom->number - ntokens))
442      fatal (_("Start symbol %s does not derive any sentence"),      fatal (_("Start symbol %s does not derive any sentence"),
443             symbol_tag_get (symbols[axiom->number]));             symbols[axiom->number]->tag);
444    
445    /* First reduce the nonterminals, as they renumber themselves in the    /* First reduce the nonterminals, as they renumber themselves in the
446       whole grammar.  If you change the order, nonterms would be       whole grammar.  If you change the order, nonterms would be

Legend:
Removed from v.1.68  
changed lines
  Added in v.1.69

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