Package lepl :: Package regexp :: Module interval :: Class _Character
[hide private]
[frames] | no frames]

Class _Character

source code


A set of intervals that is part of a DFA/NFA graph. This is separate from the Intervals instance since we need to clone the node, but can keep the intervals (necessary so that node equality works correctly when the same character is used more than once).
Instance Methods [hide private]
 
__init__(self, intervals)
Expects a single list of arguments, as will be received if invoked with the > operator.
source code
 
append(self, interval)
Add an interval to the range.
source code
 
__str__(self)
str(x)
source code
 
__repr__(self)
repr(x)
source code
 
len(self)
The number of intervals in the range.
source code
 
__getitem__(self, index) source code
 
__iter__(self) source code
 
__contains__(self, c) source code
 
build(self, graph, src, dest)
Insert within an NFA graph (although at this level, it's not clear it's NFA).
source code

Inherited from support.node.Node: __bool__, __dir__, __len__, __nonzero__

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, intervals)
(Constructor)

source code 
Expects a single list of arguments, as will be received if invoked with the > operator.
Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
str(x)
Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
repr(x)
Overrides: object.__repr__
(inherited documentation)

__getitem__(self, index)
(Indexing operator)

source code 
Overrides: support.node.Node.__getitem__

__iter__(self)

source code 
Overrides: support.node.Node.__iter__