]> git.saurik.com Git - bison.git/commit
Instead of attaching lookaheads and duplicating the rules being
authorAkim Demaille <akim@epita.fr>
Thu, 1 Aug 2002 18:14:30 +0000 (18:14 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 1 Aug 2002 18:14:30 +0000 (18:14 +0000)
commitcd08e51edafa326fd8a6327f0b659fdbceb24dda
tree81e372d4230dd515044d0499e2ab72c549c4023a
parentbb0027a9aca454a80f737e0c49df0a231c50b996
Instead of attaching lookaheads and duplicating the rules being
reduced by a state, attach the lookaheads to the reductions.
* src/state.h (state_t): Remove the `lookaheads',
`lookaheads_rule' member.
(reductions_t): Add a `lookaheads' member.
Use a regular array for the `rules'.
* src/state.c (reductions_new): Initialize the lookaheads member
to 0.
(state_rule_lookaheads_print): Adjust.
* src/state.h, src/state.c (state_reductions_find): New.
* src/conflicts.c (resolve_sr_conflict, set_conflicts)
(count_rr_conflicts): Adjust.
* src/lalr.c (LArule): Remove.
(add_lookback_edge): Adjust.
(state_lookaheads_count): New.
(states_lookaheads_initialize): Merge into...
(initialize_LA): this.
(lalr_free): Adjust.
* src/main.c (main): Don't free nullable and derives too early: it
is used by --verbose.
* src/print.c, src/print_graph.c, src/tables.c: Adjust.
ChangeLog
src/conflicts.c
src/lalr.c
src/main.c
src/print.c
src/print_graph.c
src/state.c
src/state.h
src/tables.c