Table of Contents

Class: Expression Martel/Expression.py

Base class for nodes in the Expression tree

Methods   
__add__
__or__
__str__
_find_groups
_modify_leaves
_select_names
copy
features
group_names
make_iterator
make_parser
  __add__ 
__add__ ( self,  other )

returns an Expression to match this Expression then the other one

  __or__ 
__or__ ( self,  other )

returns an Expression matching this Expression or (if that fails) the other one

  __str__ 
__str__ ( self )

the corresponding pattern string

Exceptions   
NotImplementedError
  _find_groups 
_find_groups ( self,  tag )

return a list of all groups matching the given tag

  _modify_leaves 
_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.

  _select_names 
_select_names ( self,  names )

internal function used by select_names.

Don't call this function. Will likely be removed in future versions.

  copy 
copy ( self )

do a deep copy on this Expression tree

Exceptions   
NotImplementedError
  features 
features ( self )

return a list of all features

  group_names 
group_names ( self )

the list of group names used by this Expression and its children

  make_iterator 
make_iterator (
        self,
        tag="record",
        debug_level=0,
        )

create an iterator for this regexp; the tag defines a record

  make_parser 
make_parser ( self,  debug_level=0 )

create a SAX compliant parser for this regexp


Table of Contents

This document was automatically generated on Mon Jul 1 12:03:20 2002 by HappyDoc version 2.0.1