-/*-----------------------------------------------------------------.
-| Subroutine of get_state. Create a new state for those items, if |
-| necessary. |
-`-----------------------------------------------------------------*/
-
-static state_t *
-new_state (int symbol)
-{
- state_t *p;
-
- if (trace_flag)
- fprintf (stderr, "Entering new_state, state = %d, symbol = %d (%s)\n",
- this_state->number, symbol, tags[symbol]);
-
- if (nstates >= MAXSHORT)
- fatal (_("too many states (max %d)"), MAXSHORT);
-
- p = STATE_ALLOC (kernel_size[symbol]);
- p->accessing_symbol = symbol;
- p->number = nstates;
- p->nitems = kernel_size[symbol];
-
- shortcpy (p->items, kernel_base[symbol], kernel_size[symbol]);
-
- last_state->next = p;
- last_state = p;
- nstates++;
-
- /* If this is the eoftoken, then this is the final state. */
- if (symbol == 0)
- final_state = p->number;
-
- return p;
-}
-
-