Package fsa_recognizer :: Module class_nondet_fsa_recognize :: Class search_state
[hide private]
[frames] | no frames]

Class search_state

source code

search_states are what populate the Agenda, determining a string position and machine state to resume recognition from, for example, after backtracking.

A search_state is essentially a pair of a string position (self.tape_index) and a machine state (self.machine_state).

Retrieval/setting by keyword (self.tape_index and self.machine_state) and by index (self[0] and self[1]) are both allowed. The latter are implemented through Python special methods __get_item__ and __set_item__.

Instance Methods [hide private]
 
__init__(self, machine_state, tape_index) source code
 
__getitem__(self, index) source code
 
__setitem__(self, index, item) source code
 
__repr__(self) source code