/[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.64 by akim, Sun May 26 18:39:05 2002 UTC revision 1.65 by akim, Mon Jun 10 08:35:39 2002 UTC
# Line 165  inaccessable_symbols (void) Line 165  inaccessable_symbols (void)
165    Pp = bitset_create (nrules + 1, BITSET_FIXED);    Pp = bitset_create (nrules + 1, BITSET_FIXED);
166    
167    /* If the start symbol isn't useful, then nothing will be useful. */    /* If the start symbol isn't useful, then nothing will be useful. */
168    if (bitset_test (N, start_symbol - ntokens))    if (bitset_test (N, axiom->number - ntokens))
169      {      {
170        bitset_set (V, start_symbol);        bitset_set (V, axiom->number);
171    
172        while (1)        while (1)
173          {          {
# Line 315  nonterminals_reduce (void) Line 315  nonterminals_reduce (void)
315            if (ISVAR (*rhsp))            if (ISVAR (*rhsp))
316              *rhsp =  symbol_number_as_item_number (nontermmap[*rhsp]);              *rhsp =  symbol_number_as_item_number (nontermmap[*rhsp]);
317        }        }
318      start_symbol = nontermmap[start_symbol];      axiom->number = nontermmap[axiom->number];
319    }    }
320    
321    nsyms -= nuseless_nonterminals;    nsyms -= nuseless_nonterminals;
# Line 435  reduce_grammar (void) Line 435  reduce_grammar (void)
435    
436    reduce_print ();    reduce_print ();
437    
438    if (!bitset_test (N, start_symbol - ntokens))    if (!bitset_test (N, axiom->number - ntokens))
439      fatal (_("Start symbol %s does not derive any sentence"),      fatal (_("Start symbol %s does not derive any sentence"),
440             quotearg_style (escape_quoting_style, symbols[start_symbol]->tag));             quotearg_style (escape_quoting_style, symbols[axiom->number]->tag));
441    
442    /* First reduce the nonterminals, as they renumber themselves in the    /* First reduce the nonterminals, as they renumber themselves in the
443       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.64  
changed lines
  Added in v.1.65

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