Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module is an efficient implementation of the derivative algorithm for trees.
It is intended to be used for production purposes.
This means that it gives up some readability for speed.
This module provides memoization of the nullable, calls and returns functions.
Documentation
derive :: Tree t => Grammar -> [t] -> Either String Pattern Source #
derive is the classic derivative implementation for trees.
Mem is the object used to store memoized results of the nullable, calls and returns functions.
newMem creates a object used for memoization by the validate function. Each grammar should create its own memoize object.