Package lepl :: Package matchers :: Module operators :: Class SmartSeparator1
[hide private]
[frames] | no frames]

Class SmartSeparator1

source code


Similar to Separator, but tried to be clever about whether the separator is needed. It replaces & with a matcher that only uses the separator if the second sub-matcher consumes some input.

Uses the OPERATORS namespace.

See also SmartSeparator2, which is less general, but more efficient.

Instance Methods [hide private]
 
_replacements(self, separator)
Require the separator on each And.
source code

Inherited from _BaseSeparator: __init__

Inherited from _BaseSeparator (private): _repeat

Inherited from support.context.Scope: __enter__, __exit__

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_replacements(self, separator)

source code 
Require the separator on each And.
Overrides: _BaseSeparator._replacements