Package pyxb :: Package binding :: Module content :: Class _DFAState
[hide private]
[frames] | no frames]

Class _DFAState

source code

object --+
         |
        _DFAState

Base class for a suspended DFA interpretation.

Instance Methods [hide private]
 
__init__(self, content_model, state=1)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
state(self)
The current state of the automaton, represented as an integer.
source code
 
contentModel(self)
The ContentModel to which the state belongs.
source code
 
updateState(self, state)
Change the automaton state recorded in this DFA state.
source code
 
step(self, dfa_stack, ctd_instance, value, element_use)
Execute a step within the content model.
source code
 
isFinal(self)
Return True iff the current state of the content model is a final state.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  __contentModel = None
  __state = None
  _DFAState__contentModel = None
  _DFAState__state = None
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, content_model, state=1)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

step(self, dfa_stack, ctd_instance, value, element_use)

source code 

Execute a step within the content model.

This determines whether the current state in the content model allows a transition on the given value. If a transition can be performed, the instance element use corresponding to the value is used to record the value.

The input value should be an instance of basis._TypeBinding_mixin, or a value that can be uniquely converted into such a instance using the transitions from the current state as clues.

Parameters:
  • dfa_stack (DFAStack) - The current state of the parse. Upon return, this may have been augmented with suspended content models.
  • value (xml.dom.Node or basis._TypeBinding_mixin or other value) - A value upon which transition should occur.
Returns:
True iff a transition successfully consumed the value