+ 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);