Package lepl :: Package regexp :: Module core :: Class Compiler
[hide private]
[frames] | no frames]

Class Compiler

source code


Compile an expression.
Instance Methods [hide private]
 
__init__(self, expression, alphabet)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
nfa(self)
Generate a NFA-based matcher.
source code
 
dfa(self)
Generate a DFA-based matcher (faster than NFA, but returns only a single, greedy match).
source code
 
re(self)
Generate a matcher that wraps the standard "re" package.
source code
 
__str__(self)
Show the expression itself.
source code

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

Static Methods [hide private]
 
_coerce(regexp, alphabet)
Coerce to a regexp.
source code
 
single(alphabet, regexp, label='label')
Generate an instance for a single expression or sequence.
source code
 
multiple(alphabet, regexps)
Generate an instance for several expressions.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, expression, alphabet)
(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 
Show the expression itself.
Overrides: object.__str__