mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 00:33:03 +00:00
* src/LR0.c (state_list_t, state_list_append): New.
(first_state, last_state): Now symbol_list_t. (this_state): Remove. (new_itemsets, append_states, save_reductions): Take a state_t as argument. (set_states, generate_states): Adjust. (save_shifts): Remove, replaced by... * src/state.h, src/state.c (state_shifts_set): New. (shifts): Rename as... (shifts_t): this. Adjust all dependencies. * src/state.h (state_t): Remove the `next' member.
This commit is contained in:
10
src/lalr.c
10
src/lalr.c
@@ -163,7 +163,7 @@ set_goto_map (void)
|
||||
ngotos = 0;
|
||||
for (state = 0; state < nstates; ++state)
|
||||
{
|
||||
shifts *sp = states[state]->shifts;
|
||||
shifts_t *sp = states[state]->shifts;
|
||||
int i;
|
||||
for (i = sp->nshifts - 1; i >= 0 && SHIFT_IS_GOTO (sp, i); --i)
|
||||
{
|
||||
@@ -196,7 +196,7 @@ set_goto_map (void)
|
||||
|
||||
for (state = 0; state < nstates; ++state)
|
||||
{
|
||||
shifts *sp = states[state]->shifts;
|
||||
shifts_t *sp = states[state]->shifts;
|
||||
int i;
|
||||
for (i = sp->nshifts - 1; i >= 0 && SHIFT_IS_GOTO (sp, i); --i)
|
||||
{
|
||||
@@ -258,7 +258,7 @@ initialize_F (void)
|
||||
for (i = 0; i < ngotos; i++)
|
||||
{
|
||||
state_number_t stateno = to_state[i];
|
||||
shifts *sp = states[stateno]->shifts;
|
||||
shifts_t *sp = states[stateno]->shifts;
|
||||
|
||||
int j;
|
||||
for (j = 0; j < sp->nshifts && SHIFT_IS_SHIFT (sp, j); j++)
|
||||
@@ -420,7 +420,7 @@ build_relations (void)
|
||||
|
||||
for (rp = rules[*rulep].rhs; *rp >= 0; rp++)
|
||||
{
|
||||
shifts *sp = state->shifts;
|
||||
shifts_t *sp = state->shifts;
|
||||
int j;
|
||||
for (j = 0; j < sp->nshifts; j++)
|
||||
{
|
||||
@@ -522,7 +522,7 @@ states_lookaheads_count (void)
|
||||
int k;
|
||||
int nlookaheads = 0;
|
||||
reductions *rp = states[i]->reductions;
|
||||
shifts *sp = states[i]->shifts;
|
||||
shifts_t *sp = states[i]->shifts;
|
||||
|
||||
/* We need a lookahead either to distinguish different
|
||||
reductions (i.e., there are two or more), or to distinguish a
|
||||
|
||||
Reference in New Issue
Block a user