module Data.ParserCombinators.KangarooReader
(
Kangaroo
, parse
, runKangaroo
, ask
, ParseErr
, RegionCoda(..)
, RegionName
, liftIOAction
, reportError
, substError
, word8
, satisfy
, checkWord8
, opt
, position
, region
, atEnd
, lengthRemaining
, regionSize
, intraparse
, advance
, advanceRelative
, restrict
, restrictToPos
, printHexAll
, printRegionStack
, module Data.ParserCombinators.Kangaroo.Combinators
, module Data.ParserCombinators.Kangaroo.Prim
) where
import Data.ParserCombinators.Kangaroo.Combinators
import Data.ParserCombinators.Kangaroo.ParseMonad
import Data.ParserCombinators.Kangaroo.Prim
import Control.Monad ( liftM )
type Kangaroo e a = GenKangaroo e a
parse :: Kangaroo e a
-> e
-> FilePath
-> IO (Either ParseErr a)
parse = runKangaroo
runKangaroo :: Kangaroo e a
-> e
-> FilePath
-> IO (Either ParseErr a)
runKangaroo p env filename = liftM fst (runGenKangaroo p env filename)
ask :: Kangaroo e e
ask = getUserSt