- symbol_number_t i;
- rule_number_t r;
- shorts *p;
- rule_number_t *q;
- shorts **dset;
- shorts *delts;
-
- dset = XCALLOC (shorts *, nvars) - ntokens;
- delts = XCALLOC (shorts, nrules + 1);
-
- p = delts;
- for (r = nrules; r > 0; r--)
+ symbol_number i;
+ int r;
+ rule **q;
+
+ /* DSET[NTERM - NTOKENS] -- A linked list of the numbers of the rules
+ whose LHS is NTERM. */
+ rule_list **dset = CALLOC (dset, nvars);
+
+ /* DELTS[RULE] -- There are NRULES rule number to attach to nterms.
+ Instead of performing NRULES allocations for each, have an array
+ indexed by rule numbers. */
+ rule_list *delts = CALLOC (delts, nrules);
+
+ for (r = nrules - 1; r >= 0; --r)