+ assert (!state->reductions);
+ state->reductions = reductions_new (num, reductions);
+}
+
+
+int
+state_reduction_find (state_t *state, rule_t *rule)
+{
+ int i;
+ reductions_t *reds = state->reductions;
+ for (i = 0; i < reds->num; ++i)
+ if (reds->rules[i] == rule)
+ return i;
+ return -1;
+}
+
+
+/*------------------------.
+| Set the errs of STATE. |
+`------------------------*/
+
+void
+state_errs_set (state_t *state, int num, symbol_t **tokens)
+{
+ assert (!state->errs);
+ state->errs = errs_new (num, tokens);