124 |
(shifts *) xcalloc ((unsigned) (sizeof (shifts) \ |
(shifts *) xcalloc ((unsigned) (sizeof (shifts) \ |
125 |
+ (Nshifts - 1) * sizeof (short)), 1) |
+ (Nshifts - 1) * sizeof (short)), 1) |
126 |
|
|
127 |
|
/* What is the symbol which is shifted by SHIFTS->shifts[Shift]? Can |
128 |
|
be a token (amongst which the error token), or non terminals in |
129 |
|
case of gotos. */ |
130 |
|
|
131 |
|
#define SHIFT_SYMBOL(Shifts, Shift) \ |
132 |
|
(state_table[Shifts->shifts[Shift]].accessing_symbol) |
133 |
|
|
134 |
/* Is the SHIFTS->shifts[Shift] a real shift? (as opposed to gotos.) */ |
/* Is the SHIFTS->shifts[Shift] a real shift? (as opposed to gotos.) */ |
135 |
|
|
136 |
#define SHIFT_IS_SHIFT(Shifts, Shift) \ |
#define SHIFT_IS_SHIFT(Shifts, Shift) \ |
137 |
(ISTOKEN (state_table[Shifts->shifts[Shift]].accessing_symbol)) |
(ISTOKEN (SHIFT_SYMBOL (Shifts, Shift))) |
138 |
|
|
139 |
/* Is the SHIFTS->shifts[Shift] a goto?. */ |
/* Is the SHIFTS->shifts[Shift] a goto?. */ |
140 |
|
|
144 |
/* Is the SHIFTS->shifts[Shift] then handling of the error token?. */ |
/* Is the SHIFTS->shifts[Shift] then handling of the error token?. */ |
145 |
|
|
146 |
#define SHIFT_IS_ERROR(Shifts, Shift) \ |
#define SHIFT_IS_ERROR(Shifts, Shift) \ |
147 |
(state_table[Shifts->shifts[Shift]].accessing_symbol == error_token_number) |
(SHIFT_SYMBOL (Shifts, Shift) == error_token_number) |
148 |
|
|
149 |
|
|
150 |
/*-------. |
/*-------. |