226 |
static void |
static void |
227 |
output_stos (void) |
output_stos (void) |
228 |
{ |
{ |
229 |
int i; |
size_t i; |
230 |
short *values = (short *) alloca (sizeof (short) * nstates); |
short *values = (short *) alloca (sizeof (short) * nstates); |
231 |
for (i = 0; i < nstates; ++i) |
for (i = 0; i < nstates; ++i) |
232 |
values[i] = states[i]->accessing_symbol; |
values[i] = states[i]->accessing_symbol; |
356 |
for (j = 0; j < ntokens; j++) |
for (j = 0; j < ntokens; j++) |
357 |
/* and record this rule as the rule to use if that |
/* and record this rule as the rule to use if that |
358 |
token follows. */ |
token follows. */ |
359 |
if (BITISSET (LA (state->lookaheadsp + i), j)) |
if (bitset_test (LA[state->lookaheadsp + i], j)) |
360 |
actrow[j] = -LAruleno[state->lookaheadsp + i]; |
actrow[j] = -LAruleno[state->lookaheadsp + i]; |
361 |
} |
} |
362 |
|
|
488 |
static void |
static void |
489 |
token_actions (void) |
token_actions (void) |
490 |
{ |
{ |
491 |
int i; |
size_t i; |
492 |
short *yydefact = XCALLOC (short, nstates); |
short *yydefact = XCALLOC (short, nstates); |
493 |
|
|
494 |
actrow = XCALLOC (short, ntokens); |
actrow = XCALLOC (short, ntokens); |
641 |
static int |
static int |
642 |
default_goto (int symbol) |
default_goto (int symbol) |
643 |
{ |
{ |
644 |
int i; |
size_t i; |
645 |
int m = goto_map[symbol]; |
size_t m = goto_map[symbol]; |
646 |
int n = goto_map[symbol + 1]; |
size_t n = goto_map[symbol + 1]; |
647 |
int default_state = -1; |
int default_state = -1; |
648 |
int max = 0; |
int max = 0; |
649 |
|
|
741 |
int w; |
int w; |
742 |
int prev; |
int prev; |
743 |
|
|
744 |
if (i >= nstates) |
if (i >= (int) nstates) |
745 |
return -1; |
return -1; |
746 |
|
|
747 |
t = tally[i]; |
t = tally[i]; |
913 |
static void |
static void |
914 |
output_actions (void) |
output_actions (void) |
915 |
{ |
{ |
916 |
int i; |
size_t i; |
917 |
nvectors = nstates + nvars; |
nvectors = nstates + nvars; |
918 |
|
|
919 |
froms = XCALLOC (short *, nvectors); |
froms = XCALLOC (short *, nvectors); |