mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 22:33:03 +00:00
* src/LR0.c (new_state): Display `nstates' as the name of the
newly created state. Adjust to initialize first_state and last_state if needed. Be sure to distinguish the initial from the final state. (new_states): Create the itemset of the initial state, and use new_state. * src/closure.c (closure): Now that the initial state has its items properly set, there is no need for a special case when creating `ruleset'. As a result, now the rule 0, reducing to $axiom, is visible in the outputs. Adjust the test suite. * tests/conflicts.at (Solved SR Conflicts) (Unresolved SR Conflicts): Adjust. * tests/regression.at (Web2c Report, Rule Line Numbers): Idem. * tests/conflicts.at (S/R in initial): New.
This commit is contained in:
@@ -244,18 +244,11 @@ closure (short *core, int n)
|
||||
if (trace_flag)
|
||||
print_closure ("input", core, n);
|
||||
|
||||
if (n == 0)
|
||||
{
|
||||
bitset_copy (ruleset, FDERIVES (start_symbol));
|
||||
}
|
||||
else
|
||||
{
|
||||
bitset_zero (ruleset);
|
||||
bitset_zero (ruleset);
|
||||
|
||||
for (c = 0; c < n; ++c)
|
||||
if (ISVAR (ritem[core[c]]))
|
||||
bitset_or (ruleset, ruleset, FDERIVES (ritem[core[c]]));
|
||||
}
|
||||
for (c = 0; c < n; ++c)
|
||||
if (ISVAR (ritem[core[c]]))
|
||||
bitset_or (ruleset, ruleset, FDERIVES (ritem[core[c]]));
|
||||
|
||||
nitemset = 0;
|
||||
c = 0;
|
||||
|
||||
Reference in New Issue
Block a user