Portability | to be determined. |
---|---|

Stability | highly unstable |

Maintainer | Stephen Tetley <stephen.tetley@gmail.com> |

Combinators

- satisfy :: (Word8 -> Bool) -> GenKangaroo ust Word8
- manyTill :: GenKangaroo ust a -> GenKangaroo ust b -> GenKangaroo ust [a]
- genericManyTill :: (a -> c -> c) -> c -> GenKangaroo ust a -> GenKangaroo ust b -> GenKangaroo ust c
- manyTillPC :: GenKangaroo ust a -> (a -> Bool) -> GenKangaroo ust ([a], a)
- genericManyTillPC :: (a -> b -> b) -> b -> GenKangaroo ust a -> (a -> Bool) -> GenKangaroo ust (b, a)
- count :: Int -> GenKangaroo ust a -> GenKangaroo ust [a]
- countPrefixed :: Integral i => GenKangaroo ust i -> GenKangaroo ust a -> GenKangaroo ust (i, [a])
- genericCount :: (a -> b -> b) -> b -> Int -> GenKangaroo ust a -> GenKangaroo ust b
- runOn :: GenKangaroo ust a -> GenKangaroo ust [a]
- genericRunOn :: (a -> b -> b) -> b -> GenKangaroo ust a -> GenKangaroo ust b
- postCheck :: GenKangaroo ust a -> (a -> Bool) -> String -> GenKangaroo ust a
- buildWhile :: (a -> Bool) -> (a -> b -> b) -> (a -> b -> b) -> b -> GenKangaroo ust a -> GenKangaroo ust b
- buildPrimitive :: Int -> (Word8 -> Bool) -> (Word8 -> b -> b) -> b -> GenKangaroo ust b

# 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