Package lepl :: Package matchers :: Module memo :: Class _RMemo
[hide private]
[frames] | no frames]

Class _RMemo

source code


A simple memoizer for grammars that do not have left recursion.

Making this class Transformable did not improve performance (it's better to place the transformation on critical classes like Or and And).

Instance Methods [hide private]
 
__init__(self, matcher) source code
 
_match(self, stream)
Attempt to match the stream.
source code
 
_untagged_match(self, stream)
Match the stream without trampolining.
source code
 
__iadd__(self, other)
Allow memos to wrap Delayed in rewriting.
source code
Method Details [hide private]

_match(self, stream)

source code 
Attempt to match the stream.
Decorators:
  • @tagged