mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 15:53:03 +00:00
* src/state.h (state_t): `solved_conflicts' is a new member.
* src/LR0.c (new_state): Set it to 0. * src/conflicts.h, src/conflicts.c (print_conflicts) (free_conflicts, solve_conflicts): Rename as... (conflicts_print, conflicts_free, conflicts_solve): these. Adjust callers. * src/conflicts.c (enum conflict_resolution_e) (solved_conflicts_obstack): New, used by... (log_resolution): this. Adjust to attach the conflict resolution to each state. Complete the description with the precedence/associativity information. (resolve_sr_conflict): Adjust. * src/print.c (print_state): Output its solved_conflicts. * tests/conflicts.at (Unresolved SR Conflicts) (Solved SR Conflicts): Exercise --report=all.
This commit is contained in:
@@ -200,8 +200,9 @@ new_state (symbol_number_t symbol, size_t core_size, item_number_t *core)
|
||||
p = STATE_ALLOC (core_size);
|
||||
p->accessing_symbol = symbol;
|
||||
p->number = nstates;
|
||||
p->nitems = core_size;
|
||||
p->solved_conflicts = NULL;
|
||||
|
||||
p->nitems = core_size;
|
||||
memcpy (p->items, core, core_size * sizeof (core[0]));
|
||||
|
||||
/* If this is the eoftoken, and this is not the initial state, then
|
||||
|
||||
Reference in New Issue
Block a user