Package rxpy :: Package graph :: Module opcode :: Class Repeat
[hide private]
[frames] | no frames]

Class Repeat

source code


A numerical repeat. This node is only present if the _STATEFUL flag was used during compilation (otherwise numerical repeats are rewritten as appropriate splits/loops).

Instance Methods [hide private]
 
__init__(self, begin, end, lazy)
Subclasses should pay attention to the relationship between constructor kargs and attributes assumed in .clone.
source code
 
concatenate(self, next)
The given node is the next node in the sequence.
source code
 
__str__(self)
Subclasses must implement something useful here, which will be displayed in the graphviz node (see repr).
source code
 
size(self, groups)
The number of characters matched by this and subsequence nodes, if known, otherwise None.
source code
 
visit(self, visitor, state=None)
The visitor pattern - used to evaluate the graph by an interpreter, for example.
source code

Inherited from support.BaseNode: __repr__, clone, consumer, deep_eq, start

Inherited from support.BaseNode (private): _kargs, _node_eq

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, begin, end, lazy)
(Constructor)

source code 
Subclasses should pay attention to the relationship between constructor kargs and attributes assumed in .clone.
Overrides: object.__init__
(inherited documentation)

concatenate(self, next)

source code 

The given node is the next node in the sequence.

This method is only called on complex nodes after "initial node assembly" is complete (complex nodes are assembled, then connected). It is also only called once.

Overrides: support.BaseNode.concatenate
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
Subclasses must implement something useful here, which will be displayed in the graphviz node (see repr).
Overrides: object.__str__
(inherited documentation)

size(self, groups)

source code 
The number of characters matched by this and subsequence nodes, if known, otherwise None. Nodes must give a single, fixed number or None, so any loops should return None.
Overrides: support.BaseNode.size
(inherited documentation)

visit(self, visitor, state=None)

source code 
The visitor pattern - used to evaluate the graph by an interpreter, for example. Calls back to the visitor via the interface described in rxpy.parser.visitor.Visitor.
Overrides: support.BaseNode.visit
(inherited documentation)