mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 23:33:03 +00:00
All the hacks using a final pseudo state are now useless.
* src/LR0.c (set_state_table): state_table holds exactly nstates. * src/lalr.c (nLA): New. (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it instead of lookaheadsp from the pseudo state (nstate + 1).
This commit is contained in:
@@ -541,10 +541,7 @@ save_reductions (void)
|
||||
static void
|
||||
set_state_table (void)
|
||||
{
|
||||
/* NSTATES + 1 because lookahead for the pseudo state number NSTATES
|
||||
might be used (see conflicts.c). It is too opaque for me to
|
||||
provide a probably less hacky implementation. --akim */
|
||||
state_table = XCALLOC (state_t *, nstates + 1);
|
||||
state_table = XCALLOC (state_t *, nstates);
|
||||
|
||||
{
|
||||
state_t *sp;
|
||||
|
||||
Reference in New Issue
Block a user