* src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.

* src/conflicts.c: Use it.
Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
incorrectly ``simplified''.
This commit is contained in:
Akim Demaille
2001-12-05 09:32:23 +00:00
parent 9f136c0720
commit 9839bbe557
3 changed files with 33 additions and 12 deletions

View File

@@ -146,6 +146,15 @@ typedef struct shifts
#define SHIFT_IS_ERROR(Shifts, Shift) \
(SHIFT_SYMBOL (Shifts, Shift) == error_token_number)
/* When resolving a SR conflicts, if the reduction wins, the shift is
disabled. */
#define SHIFT_DISABLE(Shifts, Shift) \
(Shifts->shifts[Shift] = 0)
#define SHIFT_IS_DISABLED(Shifts, Shift) \
(Shifts->shifts[Shift] == 0)
/*-------.
| Errs. |