163 |
ngotos = 0; |
ngotos = 0; |
164 |
for (state = 0; state < nstates; ++state) |
for (state = 0; state < nstates; ++state) |
165 |
{ |
{ |
166 |
shifts *sp = states[state]->shifts; |
shifts_t *sp = states[state]->shifts; |
167 |
int i; |
int i; |
168 |
for (i = sp->nshifts - 1; i >= 0 && SHIFT_IS_GOTO (sp, i); --i) |
for (i = sp->nshifts - 1; i >= 0 && SHIFT_IS_GOTO (sp, i); --i) |
169 |
{ |
{ |
196 |
|
|
197 |
for (state = 0; state < nstates; ++state) |
for (state = 0; state < nstates; ++state) |
198 |
{ |
{ |
199 |
shifts *sp = states[state]->shifts; |
shifts_t *sp = states[state]->shifts; |
200 |
int i; |
int i; |
201 |
for (i = sp->nshifts - 1; i >= 0 && SHIFT_IS_GOTO (sp, i); --i) |
for (i = sp->nshifts - 1; i >= 0 && SHIFT_IS_GOTO (sp, i); --i) |
202 |
{ |
{ |
258 |
for (i = 0; i < ngotos; i++) |
for (i = 0; i < ngotos; i++) |
259 |
{ |
{ |
260 |
state_number_t stateno = to_state[i]; |
state_number_t stateno = to_state[i]; |
261 |
shifts *sp = states[stateno]->shifts; |
shifts_t *sp = states[stateno]->shifts; |
262 |
|
|
263 |
int j; |
int j; |
264 |
for (j = 0; j < sp->nshifts && SHIFT_IS_SHIFT (sp, j); j++) |
for (j = 0; j < sp->nshifts && SHIFT_IS_SHIFT (sp, j); j++) |
420 |
|
|
421 |
for (rp = rules[*rulep].rhs; *rp >= 0; rp++) |
for (rp = rules[*rulep].rhs; *rp >= 0; rp++) |
422 |
{ |
{ |
423 |
shifts *sp = state->shifts; |
shifts_t *sp = state->shifts; |
424 |
int j; |
int j; |
425 |
for (j = 0; j < sp->nshifts; j++) |
for (j = 0; j < sp->nshifts; j++) |
426 |
{ |
{ |
522 |
int k; |
int k; |
523 |
int nlookaheads = 0; |
int nlookaheads = 0; |
524 |
reductions *rp = states[i]->reductions; |
reductions *rp = states[i]->reductions; |
525 |
shifts *sp = states[i]->shifts; |
shifts_t *sp = states[i]->shifts; |
526 |
|
|
527 |
/* We need a lookahead either to distinguish different |
/* We need a lookahead either to distinguish different |
528 |
reductions (i.e., there are two or more), or to distinguish a |
reductions (i.e., there are two or more), or to distinguish a |