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

Class Choice

source code

object --+        
         |        
      Node --+    
             |    
 MultiTermNode --+
                 |
                Choice

A term that may be any one of a set of terms.

This term matches if any one of its contained terms matches.

Instance Methods [hide private]
 
__init__(self, *terms, **kw)
Term that selects one of a set of terms.
source code
 
_first(self)
Abstract method that defines first for the subclass.
source code
 
_last(self)
Abstract method that defines last for the subclass.
source code
 
_nullable(self)
Abstract method that defines nullable for the subclass.
source code
 
_follow(self)
Abstract method that defines follow for the subclass.
source code
 
__str__(self)
str(x)
source code

Inherited from MultiTermNode: clone

Inherited from MultiTermNode (private): _walkTermTree

Inherited from Node: buildAutomaton, counterSubPositions, reset, walkTermTree

Inherited from Node (private): _facToString

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

Class Methods [hide private]
Class Variables [hide private]
  _Precedence = -3
An integral value used for parenthesizing expressions.

Inherited from Node: INCREMENT, RESET

Properties [hide private]

Inherited from MultiTermNode: terms

Inherited from Node: counterPositions, first, follow, last, metadata, nodePosMap, nullable, posNodeMap

Inherited from object: __class__

Method Details [hide private]

__init__(self, *terms, **kw)
(Constructor)

source code 

Term that selects one of a set of terms.

The terms are provided as arguments. All must be instances of a subclass of Node.

Parameters:
  • metadata - Any application-specific metadata retained in the term tree for transfer to the resulting automaton.
Overrides: object.__init__

_first(self)

source code 

Abstract method that defines first for the subclass.

The return value should be an iterable of tuples of integers denoting paths from this node through the term tree to a symbol.

Overrides: Node._first
(inherited documentation)

_last(self)

source code 

Abstract method that defines last for the subclass.

The return value should be an iterable of tuples of integers denoting paths from this node through the term tree to a symbol.

Overrides: Node._last
(inherited documentation)

_nullable(self)

source code 

Abstract method that defines nullable for the subclass.

The return value should be True or False.

Overrides: Node._nullable
(inherited documentation)

_follow(self)

source code 

Abstract method that defines follow for the subclass.

The return value should be a map from tuples of integers (positions) to a list of transitions, where a transition is a position and an update instruction.

Overrides: Node._follow
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)