Class for non_deterministic fsa recognizer. fsa is checked at init
time to assure it is non-deterministic.
Agenda is recreated with appropriate starting search state on every
call to recognize.
|
|
|
|
|
|
|
Boolean
|
recognize(self,
string)
Return True if string is in the language defined by
self.fsa, else False. |
source code
|
|
a list of search_states
|
generate_new_states(self,
current_search_state)
We assume every input alphabet includes ε and therefore
generate new states for ε-transitions first. |
source code
|
|
|
Boolean
|
accept_state(self,
current_search_state)
Return True iff tape_index for
current_search_state is the last index of
self.string and machine_state for current
search state is a final state. |
source code
|
|
a list of search_states
|
|
|
|
|
|
|
| epsilon_transition_message(self,
current_search_state,
states) |
source code
|
|
|
|
| symbolic_transition_message(self,
current_search_state,
obs,
states) |
source code
|
|
|
|
| backtracking_message(self,
current_search_state) |
source code
|
|
|
Inherited from class_fsa_recognize.fsa_recognizer:
__repr__,
non_final_state_message,
not_in_alphabet_message,
state_not_defined_for_message,
trace
|