mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 13:23:04 +00:00
Fix the `GAWK Grammar' failure.
* src/LR0.c (final_state): Initialize to -1 so that we do compute the reductions of the first state which was mistakenly confused with the final state because precisely final_state was initialized to 0. * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads, now noticed by Bison. * tests/regression.at (Rule Line Numbers): Adjust: state 0 does have a reduction on $default.
This commit is contained in:
@@ -34,7 +34,14 @@
|
||||
#include "reduce.h"
|
||||
|
||||
int nstates;
|
||||
int final_state;
|
||||
/* Initialize the final state to -1, otherwise, it might be set to 0
|
||||
by default, and since we don't compute the reductions of the final
|
||||
state, we end up not computing the reductions of the initial state,
|
||||
which is of course needed.
|
||||
|
||||
FINAL_STATE is properly set by new_state when it recognizes the
|
||||
accessing symbol: EOF. */
|
||||
int final_state = -1;
|
||||
static state_t *first_state = NULL;
|
||||
|
||||
static state_t *this_state = NULL;
|
||||
|
||||
Reference in New Issue
Block a user