Add %define lr.keep_unreachable_states.

* NEWS (2.3a+): Mention it in the entry for unreachable state removal.
* doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
* src/main.c (main): Implement it.
* tests/conflicts.at (Unreachable States After Conflict Resolution):
Extend to test it, and fix a typo.
This commit is contained in:
Joel E. Denny
2007-10-19 06:14:44 +00:00
parent 88c7874756
commit 31984206a7
5 changed files with 86 additions and 12 deletions

12
NEWS
View File

@@ -3,8 +3,9 @@ Bison News
Changes in version 2.3a+ (????-??-??):
* Previously, Bison sometimes generated parser tables with states that were
unreachable due to conflicts in predecessor states. Bison now:
* Previously, Bison sometimes generated parser tables containing unreachable
states. A state can become unreachable during conflict resolution if Bison
disables a shift action leading to it from a predecessor state. Bison now:
1. Removes unreachable states.
@@ -15,6 +16,13 @@ Changes in version 2.3a+ (????-??-??):
3. For any rule used only in such states, Bison now reports the rule as
"never reduced because of conflicts".
This feature can be disabled with the following directive:
%define lr.keep_unreachable_states
See the %define entry in the `Bison Declaration Summary' in the Bison manual
for further discussion.
* When instructed to generate a `.output' file including lookahead sets
(using `--report=lookahead', for example), Bison now prints each reduction's
lookahead set only next to the associated state's one item that (1) is