* src/state.h (reductions_t): Rename member `nreds' as num.

(errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
* src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
This commit is contained in:
Akim Demaille
2002-06-30 17:34:31 +00:00
parent ccaf65bc63
commit d257636504
7 changed files with 42 additions and 34 deletions

View File

@@ -439,7 +439,7 @@ action_row (state_t *state)
for (i = 0; i < ntokens; i++)
actrow[i] = conflrow[i] = 0;
if (redp->nreds >= 1)
if (redp->num >= 1)
{
int j;
/* loop over all the rules available here which require
@@ -478,16 +478,16 @@ action_row (state_t *state)
/* See which tokens are an explicit error in this state (due to
%nonassoc). For them, record SHRT_MIN as the action. */
for (i = 0; i < errp->nerrs; i++)
for (i = 0; i < errp->num; i++)
{
int symbol = errp->errs[i];
symbol_number_t symbol = errp->symbols[i];
actrow[symbol] = SHRT_MIN;
}
/* Now find the most common reduction and make it the default action
for this state. */
if (redp->nreds >= 1 && !nodefault)
if (redp->num >= 1 && !nodefault)
{
if (state->consistent)
default_rule = redp->rules[0];