Package pylilac :: Module DelegateFSA :: Class DelegateFSA
[frames | no frames]

Class DelegateFSA

FiniteStateAutomaton --+

A Finite-state Automaton, or Finite-state Machine (FSA). In general, it is a Nondeterministic Finite-state Automaton (NFA).

A Nondeterministic Finite-state Automaton is a tuple (S, Λ, s, F, δ) where A Deterministic Finite-state Automaton (DFA) is like NFA, except that the value of the transition function δ is a single state in S (instead of a subset of S).

Types of parameters

The structure is designed to support different data types, even though states are usually numbers and input tokens are characters.

In basic operations S and Λ must support equivalence and hashing.

For determinization, S must support comparability.

For recognition, Λ must also support callability.
Method Summary
    Inherited from FiniteStateAutomaton
Create an empty FSA (∅, Λ, None, ∅, ∅):
  __call__(self, start, token)
  __delitem__(self, start_label_end)
  __getitem__(self, start, label)
  __setitem__(self, start_label, end)
  add_state(self, state)
  add_transition(self, start, label, end)
Defines a new association δ(start, label) → end.
frozenset epsilon_closure(self, states)
Evaluates ε-closure(states).
  get_transitions(self, start, label)
Evaluate ...
  next_states(self, start, token)
Evaluate δ(start, label).
  parse(self, tokens)
  remove_state(self, state)
  remove_transitions(self, start, label, end)
  set_final(self, state)
  set_initial(self, state)
Return S, the states of the FSA.
  transitions_from(self, start)
Evaluate ...
  unset_final(self, state)

Generated by Epydoc 2.1 on Sat Aug 26 09:33:46 2006