\Zend_Search_Lucene_FSM
Abstract Finite State Machine
Take a look on Wikipedia state machine description: http://en.wikipedia.org/wiki/Finite_state_machine
Any type of Transducers (Moore machine or Mealy machine) also may be implemented by using this abstract FSM.
process() methods invokes a specified actions which may construct FSM output.
Actions may be also used to signal, that we have reached Accept State
- Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
- License: http://framework.zend.com/license/new-bsd New BSD License
Synopsis
class Zend_Search_Lucene_FSM
{
- // members
- private array $_states = ;
- private integer|string $_currentState = NULL;
- private array $_inputAphabet = ;
- private array $_rules = ;
- private array $_entryActions = ;
- private array $_exitActions = ;
- private array $_inputActions = ;
- private array $_transitionActions = ;
- // methods
- public void __construct()
- public void addStates()
- public void addState()
- public void setState()
- public integer|string getState()
- public void addInputSymbols()
- public void addInputSymbol()
- public void addRules()
- public void addRule()
- public void addEntryAction()
- public void addExitAction()
- public void addInputAction()
- public void addTransitionAction()
- public void process()
- public void reset()
Members
private
- $_currentState
—
integer|string
Current state - $_entryActions
—
array
List of entry actions Each action executes when entering the state - $_exitActions
—
array
List of exit actions Each action executes when exiting the state - $_inputActions
—
array
List of input actions Each action executes when entering the state - $_inputAphabet
—
array
Input alphabet - $_rules
—
array
State transition table - $_states
—
array
Machine States alphabet - $_transitionActions
—
array
List of input actions Each action executes when entering the state
Methods
public
- __construct() — Finite State machine constructor
- addEntryAction() — Add state entry action.
- addExitAction() — Add state exit action.
- addInputAction() — Add input action (defined by {state, input} pair).
- addInputSymbol() — Add symbol to the input alphabet
- addInputSymbols() — Add symbols to the input alphabet
- addRule() — Add symbol to the input alphabet
- addRules() — Add transition rules
- addState() — Add state to the state machine
- addStates() — Add states to the state machine
- addTransitionAction() — Add transition action (defined by {state, input} pair).
- getState() — Get FSM state.
- process() — Process an input
- reset()
- setState() — Set FSM state.