* src/reduce.c (nonterminals_reduce): Instead of throwing away

useless nonterminals, move them at the end of the symbol arrays.
(reduce_output): Adjust.
* tests/reduce.at (Useless Nonterminals): Adjust.
This commit is contained in:
Akim Demaille
2001-11-30 10:48:14 +00:00
parent 002389585a
commit 760b53a84b
3 changed files with 38 additions and 18 deletions

View File

@@ -88,10 +88,12 @@ AT_DATA([[input.y]],
exp: useful;
]])
AT_CHECK([[bison input.y]])
AT_CHECK([[bison input.y]], 0, [],
[[input.y contains 9 useless nonterminals
]])
AT_CHECK([[sed -n '/^Grammar/q;/^$/!p' input.output]], 0,
[[Terminals which are not used:
[[Useless nonterminals:
useless1
useless2
useless3