]> git.saurik.com Git - bison.git/commit - src/state.c
Use hash.h for the state hash table.
authorAkim Demaille <akim@epita.fr>
Sun, 30 Jun 2002 17:29:36 +0000 (17:29 +0000)
committerAkim Demaille <akim@epita.fr>
Sun, 30 Jun 2002 17:29:36 +0000 (17:29 +0000)
commitc7ca99d4b03860bb258914fbc228272031eec77c
tree9abd50c6e10e15752df2ff0a55ffa2a1ae18f259
parentdf0e7316a9b91827e01a9de2643a73baaa6382b4
Use hash.h for the state hash table.
* src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
(allocate_storage): Use state_hash_new.
(free_storage): Use state_hash_free.
(new_state, get_state): Adjust.
* src/lalr.h, src/lalr.c (states): Move to...
* src/states.h (state_t): Remove the `link' member, no longer
used.
* src/states.h, src/states.c: here.
(state_hash_new, state_hash_free, state_hash_lookup)
(state_hash_insert, states_free): New.
* src/states.c (state_table, state_compare, state_hash): New.
* src/output.c (output_actions): Do not free states now, since we
still need to know the final_state number in `prepare', called
afterwards.  Do it...
* src/main.c (main): here: call states_free after `output'.
ChangeLog
src/LR0.c
src/lalr.c
src/lalr.h
src/main.c
src/output.c
src/state.c
src/state.h