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

Class NullOp

source code

Expression --+
             |
            NullOp

Instance Methods [hide private]
 
__init__(self)
()
source code
 
_select_names(self, names)
internal function used by 'select_names'.
source code
 
copy(self)
do a deep copy on this Expression tree
source code
 
__str__(self)
the corresponding pattern string
source code
 
__add__(self, other)
returns an Expression to match this Expression then the other one
source code
 
__or__(self, other)
returns an Expression matching this Expression or (if that fails) the other one
source code

Inherited from Expression: features, group_names, make_iterator, make_parser

Inherited from Expression (private): _find_groups, _modify_leaves

Method Details [hide private]

__init__(self)
(Constructor)

source code 
()

Doesn't match anything.  This is a null operation.  It's
useful if you want a valid initial object from which to build,
as in:

  exp = NullOp()
  for c in string.split(line):
    exp = exp + Str(c)

(That's contrived -- see Time.py for a real use.)

_select_names(self, names)

source code 

internal function used by 'select_names'.

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

Overrides: Expression._select_names
(inherited documentation)

copy(self)

source code 

do a deep copy on this Expression tree

Overrides: Expression.copy
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

the corresponding pattern string

Overrides: Expression.__str__
(inherited documentation)

__add__(self, other)
(Addition operator)

source code 

returns an Expression to match this Expression then the other one

Overrides: Expression.__add__
(inherited documentation)

__or__(self, other)
(Or operator)

source code 

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

Overrides: Expression.__or__
(inherited documentation)