* src/state.h (SHIFT_SYMBOL): New.

* src/conflicts.c: Use it to deobfuscate.
This commit is contained in:
Akim Demaille
2001-12-05 09:31:46 +00:00
parent 52afa962d1
commit b608206eca
3 changed files with 25 additions and 34 deletions

View File

@@ -124,10 +124,17 @@ typedef struct shifts
(shifts *) xcalloc ((unsigned) (sizeof (shifts) \
+ (Nshifts - 1) * sizeof (short)), 1)
/* What is the symbol which is shifted by SHIFTS->shifts[Shift]? Can
be a token (amongst which the error token), or non terminals in
case of gotos. */
#define SHIFT_SYMBOL(Shifts, Shift) \
(state_table[Shifts->shifts[Shift]].accessing_symbol)
/* Is the SHIFTS->shifts[Shift] a real shift? (as opposed to gotos.) */
#define SHIFT_IS_SHIFT(Shifts, Shift) \
(ISTOKEN (state_table[Shifts->shifts[Shift]].accessing_symbol))
(ISTOKEN (SHIFT_SYMBOL (Shifts, Shift)))
/* Is the SHIFTS->shifts[Shift] a goto?. */
@@ -137,7 +144,7 @@ typedef struct shifts
/* Is the SHIFTS->shifts[Shift] then handling of the error token?. */
#define SHIFT_IS_ERROR(Shifts, Shift) \
(state_table[Shifts->shifts[Shift]].accessing_symbol == error_token_number)
(SHIFT_SYMBOL (Shifts, Shift) == error_token_number)
/*-------.