kangaroo-0.1.0: Random access binary combinator parser.

Portabilityto be determined.
Stabilityhighly unstable
MaintainerStephen Tetley <stephen.tetley@gmail.com>

Data.ParserCombinators.Kangaroo.Combinators

Description

Combinators

Synopsis

Documentation

manyTill :: GenKangaroo ust a -> GenKangaroo ust b -> GenKangaroo ust [a]Source

genericManyTill :: (a -> c -> c) -> c -> GenKangaroo ust a -> GenKangaroo ust b -> GenKangaroo ust cSource

manyTillPC :: GenKangaroo ust a -> (a -> Bool) -> GenKangaroo ust ([a], a)Source

genericManyTillPC :: (a -> b -> b) -> b -> GenKangaroo ust a -> (a -> Bool) -> GenKangaroo ust (b, a)Source

count :: Int -> GenKangaroo ust a -> GenKangaroo ust [a]Source

countPrefixed :: Integral i => GenKangaroo ust i -> GenKangaroo ust a -> GenKangaroo ust (i, [a])Source

genericCount :: (a -> b -> b) -> b -> Int -> GenKangaroo ust a -> GenKangaroo ust bSource

runOn :: GenKangaroo ust a -> GenKangaroo ust [a]Source

genericRunOn :: (a -> b -> b) -> b -> GenKangaroo ust a -> GenKangaroo ust bSource

postCheck :: GenKangaroo ust a -> (a -> Bool) -> String -> GenKangaroo ust aSource

Apply parse then apply the check, if the check fails report the error message.

buildWhile :: (a -> Bool) -> (a -> b -> b) -> (a -> b -> b) -> b -> GenKangaroo ust a -> GenKangaroo ust bSource

Build a value by while the test holds. When the test fails the position is not backtracked, instead we use the "failing" element with lastOp potentially still building the value with it.

buildPrimitive :: Int -> (Word8 -> Bool) -> (Word8 -> b -> b) -> b -> GenKangaroo ust bSource