Package lepl :: Package regexp :: Module rewriters :: Class RegexpContainer
[hide private]
[frames] | no frames]

Class RegexpContainer

source code


The container referred to above, which carries a regular expression and an alternative matcher "up the tree" during rewriting.
Instance Methods [hide private]
 
__init__(self, matcher, regexp, use, add_reqd=False)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code

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

Class Methods [hide private]
 
to_regexps(cls, use, possibles, have_add=False)
Convert to regular expressions.
source code
 
build(cls, node, regexp, alphabet, regexp_type, use, add_reqd=False, wrapper=None)
Construct a container or matcher.
source code
Static Methods [hide private]
 
to_matcher(possible)
Convert to a matcher.
source code
Class Variables [hide private]
  log = getLogger('lepl.regexp.rewriters.RegexpContainer')
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, matcher, regexp, use, add_reqd=False)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

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

to_regexps(cls, use, possibles, have_add=False)
Class Method

source code 

Convert to regular expressions.

have_add indicaes whether the caller can supply an "add". None - caller doesn't care what lower code needed. True - caller has add, and caller should need that. False - caller doesn't have add, and caller should not need it.