Lines Matching refs:state

1 /* Type definitions for the finite state machine for Bison.
23 finite state machine that parses the specified grammar. This
27 Each state of the machine is described by a set of items --
30 state. These symbols at these items are the allowable inputs that
33 A core represents one state. States are numbered in the NUMBER
34 field. When generate_states is finished, the starting state is
35 state 0 and NSTATES is the number of states. (FIXME: This sentence
36 is no longer true: A transition to a state whose state number is
38 and FIRST_STATE points to the first one (state 0).
40 For each state there is a particular symbol which must have been
41 the last thing accepted to reach that state. It is the
45 in the RITEM vector of the items that are selected in this state.
48 and read another/goto to the state designated by a nterm) and
55 of one state, the state whose number is in the number field. Each
60 A transition to state zero should be ignored: conflict resolution
64 state whose number is in the number field. rules is an array of
69 For each state, the tokens that are errors for this reason are
72 There is at least one goto transition present in state zero. It
73 leads to a next-to-final state whose accessing_symbol is the
74 grammar's start symbol. The next-to-final state has one shift to
75 the final state, whose accessing_symbol is zero (end of input).
76 The final state has one shift, which goes to the termination state.
77 The reason for the extra state at the end is to placate the
105 typedef struct state state;
114 state *states[1];
160 /* Return the state such SHIFTS contain a shift/goto to it on SYM.
162 struct state *transitions_to (transitions *shifts, symbol_number sym);
198 struct state
208 store in this member a reference to the node containing each state. */
212 decide what to do in state S. */
227 extern state *final_state;
229 /* Create a new state with ACCESSING_SYMBOL for those items. */
230 state *state_new (symbol_number accessing_symbol,
232 state *state_new_isocore (state const *s);
235 void state_transitions_set (state *s, int num, state **trans);
238 void state_reductions_set (state *s, int num, rule **reds);
240 int state_reduction_find (state *s, rule *r);
243 void state_errs_set (state *s, int num, symbol **errors);
247 void state_rule_lookahead_tokens_print (state *s, rule *r, FILE *out);
248 void state_rule_lookahead_tokens_print_xml (state *s, rule *r,
255 /* Find the state associated to the CORE, and return it. If it does
257 state *state_hash_lookup (size_t core_size, item_number *core);
259 /* Insert STATE in the state hash table. */
260 void state_hash_insert (state *s);
263 write to OLD_TO_NEW a mapping of old state numbers to new state numbers such
264 that the old value of NSTATES is written as the new state number for removed
268 /* All the states, indexed by the state number. */
269 extern state **states;