* src/reduce.c (reduce_grammar): When the language is empty,

complain about the start symbol, not the axiom.
Use its location.
* tests/reduce.at (Empty Language): New.
This commit is contained in:
Akim Demaille committed 2002-07-29 17:28:56 +00:00
1 parent fc5734fe23
commit 1bfb97dba5
3 files changed
+31 -2

No files matched your search

+3 -2
View File
@@ -439,8 +439,9 @@ reduce_grammar (void)
reduce_print ();
if (!bitset_test (N, axiom->number - ntokens))
fatal (_("Start symbol %s does not derive any sentence"),
symbols[axiom->number]->tag);
fatal_at (startsymbol_location,
_("start symbol %s does not derive any sentence"),
startsymbol->tag);
/* First reduce the nonterminals, as they renumber themselves in the
whole grammar. If you change the order, nonterms would be