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

Class 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)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
newConfiguration(self)
Return a new Configuration instance for this automaton.
source code
 
__str__(self)
str(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  __states = None
hash(x)
  __counterConditions = None
hash(x)
  __nullable = None
hash(x)
  __initialTransitions = None
hash(x)
  __containingState = None
hash(x)
  __finalStates = None
hash(x)
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.

Inherited from object: __class__

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 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

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.