Report rules which are never reduced by the parser: those hidden
authorAkim Demaille <akim@epita.fr>
Tue, 30 Jul 2002 11:06:50 +0000 (11:06 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 30 Jul 2002 11:06:50 +0000 (11:06 +0000)
commite8832397ea06de8049828011aff948b5302ffe66
tree4a47c79c80d57e18676da258163c50c5a8644259
parentcaf23d249cfc6d9a807989cab399cd97496ef45d
Report rules which are never reduced by the parser: those hidden
by conflicts.
* src/LR0.c (save_reductions): Don't make the final state too
different: save its reduction (accept) instead of having a state
without any action (no shift or goto, no reduce).
Note: the final state is now a ``regular'' state, i.e., the
parsers now contain `reduce 0' as default reduction.
Nevertheless, since they decide to `accept' when yystate =
final_state, they still will not reduce rule 0.
* src/print.c (print_actions, print_reduction): Adjust.
* src/output.c (action_row): Track reduced rules.
(token_actions): Report rules never reduced.
* tests/conflicts.at, tests/regression.at: Adjust.
ChangeLog
NEWS
src/LR0.c
src/output.c
src/print.c
tests/conflicts.at
tests/regression.at