Home | History | Annotate | Download | only in src

Lines Matching full:state

1 /* Type definitions for nondeterministic finite state machine for Bison.
25 finite state machine that parses the specified grammar. This
29 Each state of the machine is described by a set of items --
32 state. These symbols at these items are the allowable inputs that
35 A core represents one state. States are numbered in the NUMBER
36 field. When generate_states is finished, the starting state is
37 state 0 and NSTATES is the number of states. (FIXME: This sentence
38 is no longer true: A transition to a state whose state number is
40 and FIRST_STATE points to the first one (state 0).
42 For each state there is a particular symbol which must have been
43 the last thing accepted to reach that state. It is the
47 in the RITEMS vector of the items that are selected in this state.
50 and read another/goto to the state designated by a nterm) and
57 of one state, the state whose number is in the number field. Each
62 A transition to state zero should be ignored: conflict resolution
66 state whose number is in the number field. The data is a list of
72 For each state, the tokens that are errors for this reason are
75 There is at least one goto transition present in state zero. It
76 leads to a next-to-final state whose accessing_symbol is the
77 grammar's start symbol. The next-to-final state has one shift to
78 the final state, whose accessing_symbol is zero (end of input).
79 The final state has one shift, which goes to the termination state.
80 The reason for the extra state at the end is to placate the
108 typedef struct state state;
117 state *states[1];
163 /* Return the state such SHIFTS contain a shift/goto to it on SYM.
165 struct state *transitions_to (transitions *shifts, symbol_number sym);
198 struct state
206 /* Nonzero if no look-ahead is needed to decide what to do in state S. */
220 extern state *final_state;
222 /* Create a new state with ACCESSING_SYMBOL for those items. */
223 state *state_new (symbol_number accessing_symbol,
226 /* Set the transitions of STATE. */
227 void state_transitions_set (state *s, int num, state **trans);
229 /* Set the reductions of STATE. */
230 void state_reductions_set (state *s, int num, rule **reds);
232 int state_reduction_find (state *s, rule *r);
234 /* Set the errs of STATE. */
235 void state_errs_set (state *s, int num, symbol **errors);
237 /* Print on OUT all the look-ahead tokens such that this STATE wants to
239 void state_rule_look_ahead_tokens_print (state *s, rule *r, FILE *out);
245 /* Find the state associated to the CORE, and return it. If it does
247 state *state_hash_lookup (size_t core_size, item_number *core);
249 /* Insert STATE in the state hash table. */
250 void state_hash_insert (state *s);
252 /* All the states, indexed by the state number. */
253 extern state **states;