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

Class Configuration_ABC

source code

object --+
         |
        Configuration_ABC
Known Subclasses:

Base class for something that represents an Automaton in execution.

For deterministic automata, this is generally a Configuration which records the current automaton state along with its counter values.

For non-deterministic automata, this is a MultiConfiguration which records a set of Configurations.

Instance Methods [hide private]
 
acceptableSymbols(self)
Return the acceptable Symbols given the current configuration.
source code
 
step(self, symbol)
Execute an automaton transition using the given symbol.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

acceptableSymbols(self)

source code 

Return the acceptable Symbols given the current configuration.

This method extracts the symbol from all candidate transitions that are permitted based on the current counter values. Because transitions are presented in a preferred order, the symbols are as well.

step(self, symbol)

source code 

Execute an automaton transition using the given symbol.

Parameters:
Returns:
The new configuration resulting from the step.
Raises:

Warning: If the step entered or left a sub-automaton the return value will not be the configuration that was used to execute the step. The proper pattern for using this method is:

  cfg = cfg.step(sym)