* 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:
Akim Demaille
2002-05-26 20:25:52 +00:00
parent a49aecd528
commit b408954b40
12 changed files with 159 additions and 53 deletions

View File

@@ -84,7 +84,7 @@ main (int argc, char *argv[])
lookahead is not enough to disambiguate the parsing. In file
conflicts. Also resolve s/r conflicts based on precedence
declarations. */
solve_conflicts ();
conflicts_solve ();
conflicts_print ();
/* Output file names. */
@@ -107,7 +107,7 @@ main (int argc, char *argv[])
output ();
reduce_free ();
free_conflicts ();
conflicts_free ();
free_nullable ();
free_derives ();
grammar_free ();