Package Martel :: Module Expression :: Class Assert
[hide private]
[frames] | no frames]

Class Assert

source code

Expression --+
             |
            Assert

Instance Methods [hide private]
 
__init__(self, expression, invert=0)
(expression, invert = 0)
source code
 
copy(self)
do a deep copy on this Expression tree
source code
 
__str__(self)
the corresponding pattern string
source code
 
_modify_leaves(self, func)
internal function for manipulating the leaves of an expression
source code

Inherited from Expression: __add__, __or__, features, group_names, make_iterator, make_parser

Inherited from Expression (private): _find_groups, _select_names

Method Details [hide private]

__init__(self, expression, invert=0)
(Constructor)

source code 

(expression, invert = 0)

A non-consuming assertion using the given expression. The default is a positive lookahead, which matches if the expression matches at the current position, but does not affect the character position.

If 'invert' is false, this is a negative lookahead assertion, and matches if the expression does not match. Again, the character position is not affected.

copy(self)

source code 

do a deep copy on this Expression tree

Overrides: Expression.copy

__str__(self)
(Informal representation operator)

source code 

the corresponding pattern string

Overrides: Expression.__str__

_modify_leaves(self, func)

source code 

internal function for manipulating the leaves of an expression

This really needs to be some sort of visit pattern, but I'm not sure the best way to do it. THIS METHOD MAY CHANGE.

Overrides: Expression._modify_leaves
(inherited documentation)