* 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:45:28 +00:00
parent 24b1e65f04
commit ea451a17d7
4 changed files with 41 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