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

Class Assert

Expression --+
             |
            Assert


Method Summary
  __init__(self, expression, invert)
(expression, invert = 0)
  __str__(self)
the corresponding pattern string
  copy(self)
do a deep copy on this Expression tree
  _modify_leaves(self, func)
internal function for manipulating the leaves of an expression
    Inherited from Expression
  __add__(self, other)
returns an Expression to match this Expression then the other one
  __or__(self, other)
returns an Expression matching this Expression or (if that fails) the other one
  features(self)
return a list of all features
  group_names(self)
the list of group names used by this Expression and its children
  make_iterator(self, tag, debug_level)
create an iterator for this regexp; the 'tag' defines a record
  make_parser(self, debug_level)
create a SAX compliant parser for this regexp
  _find_groups(self, tag)
return a list of all groups matching the given tag
  _select_names(self, names)
internal function used by 'select_names'.

Method Details

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

(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.

__str__(self)
(Informal representation operator)

the corresponding pattern string
Overrides:
Martel.Expression.Expression.__str__

copy(self)

do a deep copy on this Expression tree
Overrides:
Martel.Expression.Expression.copy

_modify_leaves(self, func)

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:
Martel.Expression.Expression._modify_leaves (inherited documentation)

Generated by Epydoc 2.1 on Thu Aug 10 20:01:08 2006 http://epydoc.sf.net