Package pyxb :: Package utils :: Module fac :: Class Automaton
[hide private]
[frames] | no frames]

type Automaton

source code

object --+
         |
        Automaton

Representation of a Finite Automaton with Counters.

This has all the standard FAC elements, plus links to other states/automata as required to support the nested automata construct used for matching unordered catenation terms.

Instance Methods [hide private]
 
__get_states(self)
The set of States in the automaton.
source code
 
__get_counterConditions(self)
The set of CounterConditions in the automaton.
source code
 
__get_nullable(self)
True iff the automaton accepts the empty string.
source code
 
__get_initialTransitions(self)
The set of transitions that may be made to enter the automaton.
source code
 
__get_containingState(self)
The State instance for which this is a sub-automaton.
source code
 
__get_finalStates(self)
The set of State members which can terminate a match.
source code
 
__init__(self, states, counter_conditions, nullable, containing_state=None) source code
 
newConfiguration(self)
Return a new Configuration instance for this automaton.
source code
 
__str__(self) source code
Class Variables [hide private]
  __states = None
  __counterConditions = None
  __nullable = None
  __initialTransitions = None
  __containingState = None
  __finalStates = None
Properties [hide private]
  states
The set of States in the automaton.
  counterConditions
The set of CounterConditions in the automaton.
  nullable
True iff the automaton accepts the empty string.
  initialTransitions
The set of transitions that may be made to enter the automaton.
  containingState
The State instance for which this is a sub-automaton.
  finalStates
The set of State members which can terminate a match.
Method Details [hide private]

__get_states(self)

source code 

The set of States in the automaton.

These correspond essentially to marked symbols in the original regular expression, or element declarations in an XML schema.

Note: These are conceptually a set and are stored that way. When an Automaton is constructed the incoming states should be passed as a list so the calculated initial transitions are executed in a deterministic order.

__get_counterConditions(self)

source code 

The set of CounterConditions in the automaton.

These are marked positions in the regular expression, or particles in an XML schema, paired with their occurrence constraints.

__get_initialTransitions(self)

source code 

The set of transitions that may be made to enter the automaton.

These are full transitions, including chains into subautomata if an initial state represents a node with sub-automata.

Note: As with State.transitionSet, the set is represented as a list to preserve priority when resolving non-deterministic matches.

__get_containingState(self)

source code 

The State instance for which this is a sub-automaton.

None if this is not a sub-automaton.

__init__(self, states, counter_conditions, nullable, containing_state=None)
(Constructor)

source code 
Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
Overrides: object.__str__
(inherited documentation)

Property Details [hide private]

states

The set of States in the automaton.

These correspond essentially to marked symbols in the original regular expression, or element declarations in an XML schema.

Get Method:
__get_states(self) - The set of States in the automaton.

Note: These are conceptually a set and are stored that way. When an Automaton is constructed the incoming states should be passed as a list so the calculated initial transitions are executed in a deterministic order.

counterConditions

The set of CounterConditions in the automaton.

These are marked positions in the regular expression, or particles in an XML schema, paired with their occurrence constraints.

Get Method:
__get_counterConditions(self) - The set of CounterConditions in the automaton.

nullable

True iff the automaton accepts the empty string.

Get Method:
__get_nullable(self) - True iff the automaton accepts the empty string.

initialTransitions

The set of transitions that may be made to enter the automaton.

These are full transitions, including chains into subautomata if an initial state represents a node with sub-automata.

Get Method:
__get_initialTransitions(self) - The set of transitions that may be made to enter the automaton.

Note: As with State.transitionSet, the set is represented as a list to preserve priority when resolving non-deterministic matches.

containingState

The State instance for which this is a sub-automaton.

None if this is not a sub-automaton.

Get Method:
__get_containingState(self) - The State instance for which this is a sub-automaton.

finalStates

The set of State members which can terminate a match.

Get Method:
__get_finalStates(self) - The set of State members which can terminate a match.