GLL.Combinators.Memoisation
type MemoTable a = IntMap (IntMap a) Source #
A MemoTable maps left-extent l to right-extent r to some results a indicating the the substring ranging from l to r is derived with parse result a.
MemoTable
type MemoRef a = IORef (MemoTable a) Source #
An impure reference to a MemoTable.
memLookup :: (Int, Int) -> MemoTable a -> Maybe a Source #
memInsert :: (Int, Int) -> a -> MemoTable a -> MemoTable a Source #
memClear :: MemoRef a -> IO () Source #
Clears the MemoTable to which the given reference refers.
newMemoTable :: MemoRef a Source #
Create a reference to a fresh MemoTable.