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

Module memo

source code

Memoisation (both as described by Norvig 1991, giving Packrat parsers for non-left recursive grammars, and the equivalent described by Frost and Hafiz 2006 which allows left-recursive grammars to be used).

Note that neither paper describes the extension to backtracking with generators implemented here.

Classes [hide private]
Exception raised for problems with memoisation.
A simple memoizer for grammars that do not have left recursion.
Functions [hide private]
Wrap in the _RMemo cache if required.
source code
LMemo(matcher, curtail=None)
Wrap in the _LMemo cache if required.
source code