- count = 0;
- for (i = 0; i < nstates; i++)
- {
- int k;
-
- lookaheads[i] = count;
-
- rp = reduction_table[i];
- sp = shift_table[i];
- if (rp && (rp->nreds > 1
- || (sp && !ISVAR (accessing_symbol[sp->shifts[0]]))))
- count += rp->nreds;
- else
- consistent[i] = 1;
-
- if (sp)
- for (k = 0; k < sp->nshifts; k++)
- {
- if (accessing_symbol[sp->shifts[k]] == error_token_number)
- {
- consistent[i] = 0;
- break;
- }
- }
- }
-
- lookaheads[nstates] = count;
-
- if (count == 0)
- {
- LA = NEW2 (1 * tokensetsize, unsigned);
- LAruleno = NEW2 (1, short);
- lookback = NEW2 (1, shorts *);
- }
- else
- {
- LA = NEW2 (count * tokensetsize, unsigned);
- LAruleno = NEW2 (count, short);
- lookback = NEW2 (count, shorts *);
- }
+ LA = bitsetv_create (nLA, ntokens, BITSET_FIXED);
+ LArule = XCALLOC (rule_t *, nLA);
+ lookback = XCALLOC (shorts *, nLA);