* src/state.h, src/state.c (errs_new, errs_dup): New.

* src/LR0.c (set_state_table): Let all the states have an errs,
even if reduced to 0.
* src/print.c (print_errs, print_reductions): Adjust.
* src/output.c (output_actions, action_row): Adjust.
* src/conflicts.c (resolve_sr_conflict): Adjust.
This commit is contained in:
Akim Demaille
2001-12-27 18:10:48 +00:00
parent 13ca549a75
commit 2cec70b9f1
7 changed files with 70 additions and 45 deletions

View File

@@ -99,12 +99,7 @@ typedef struct shifts
short shifts[1];
} shifts;
#define SHIFTS_ALLOC(Nshifts) \
(shifts *) xcalloc ((unsigned) (sizeof (shifts) \
+ (Nshifts - 1) * sizeof (short)), 1)
shifts * shifts_new PARAMS ((int n));
shifts *shifts_new PARAMS ((int n));
/* What is the symbol which is shifted by SHIFTS->shifts[Shift]? Can
@@ -149,9 +144,8 @@ typedef struct errs
short errs[1];
} errs;
#define ERRS_ALLOC(Nerrs) \
(errs *) xcalloc ((unsigned) (sizeof (errs) \
+ (Nerrs - 1) * sizeof (short)), 1)
errs *errs_new PARAMS ((int n));
errs *errs_dup PARAMS ((errs *src));
/*-------------.