Lines Matching defs:state
142 fsm_move(char c, small_type &b, small_type &s, small_type &state)
151 // The finite state machine (FMS) to parse these regular expressions
152 // has 4 states, 0 to 3. 0 is the initial state and 3 is the final
153 // state.
157 switch (state) {
158 case 0: // The initial state.
160 case '0': s = SC_POS; state = 1; return 0; // RE 1 or 3
161 case '+': s = SC_POS; state = 2; return 1; // RE 2
162 case '-': s = SC_NEG; state = 2; return 1; // RE 2
164 s = SC_POS; b = NB_DEFAULT_BASE; state = 3; return 0; // RE 1
169 case 'x': case 'X': b = SC_HEX; state = 3; return 2; // RE 3 or 4
170 case 'd': case 'D': b = SC_DEC; state = 3; return 2; // RE 3 or 4
171 case 'o': case 'O': b = SC_OCT; state = 3; return 2; // RE 3 or 4
172 case 'b': case 'B': b = SC_BIN; state = 3; return 2; // RE 3 or 4
173 default: b = NB_DEFAULT_BASE; state = 3; return 0; // RE 1
178 case '0': state = 1; return 0; // RE 2 or 4
179 default: b = NB_DEFAULT_BASE; state = 3; return 0; // RE 2
182 case 3: // The final state.
185 // Any other state is not possible.
186 sc_assert((0 <= state) && (state <= 3));
209 small_type state = STATE_START;
217 nskip += fsm_move(*u, b, s, state);
218 if (state == STATE_FINISH)