When the current character is not accepted by the current state, a transition is made to the reject state. How is this implemented?
The last
statement is:
else state = reject ;
The last else
is reached when all the preceding if
and else if
s
have a false condition.
It causes a state transition to the reject state.
When this happens,
the current character is not accepted
by the current state and
the string is rejected by the automaton.
Say that state
is 1 and current
is 'm'.
Does the following evaluate to true
or false?
( state==1 && current >= 'a' && current <= 'y')