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

# type Configuration_ABC

source code

    object --+
             |
            Configuration_ABC

Known Subclasses:
  - Configuration
  - , MultiConfiguration

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

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: `symbol` - A symbol from the alphabet of the automaton's language. This is a Python value that should be accepted by the SymbolMatch_mixin.match method of a State.symbol. It is not a Symbol instance. Returns: The new configuration resulting from the step. Raises: `AutomatonStepError` - UnrecognizedSymbolError when no transition compatible with `symbol` is available, and NondeterministicSymbolError if `symbol` admits multiple transitions and the subclass does not support non-deterministic steps (see MultiConfiguration). 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)