Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data MatchCase l s e m a b = MatchCase {
- matchCaseLabel :: !(Maybe l)
- matchCaseChoose :: !(a -> Bool)
- matchCaseHandle :: !(ParserT l s e m b)
- type PureMatchCase l s e a b = MatchCase l s e Identity a b
- data MatchBlock l s e m a b = MatchBlock {
- matchBlockSelect :: !(ParserT l s e m a)
- matchBlockDefault :: !(ParserT l s e m b)
- matchBlockElems :: ![MatchCase l s e m a b]
- type PureMatchBlock l s e a b = MatchBlock l s e Identity a b
- lookAheadMatch :: Monad m => MatchBlock l s e m a b -> ParserT l s e m b
- data MatchPos l = MatchPos {
- matchPosIndex :: !Int
- matchPosLabel :: !(Maybe l)
- data LookAheadTestResult l
- lookAheadTest :: Monad m => MatchBlock l s e m a b -> s -> m (LookAheadTestResult l)
- pureLookAheadTest :: PureMatchBlock l s e a b -> s -> LookAheadTestResult l
- lookAheadSimple :: (Monad m, Eq a) => ParserT l s e m a -> ParserT l s e m b -> [(a, ParserT l s e m b)] -> ParserT l s e m b
Documentation
data MatchCase l s e m a b Source #
MatchCase | |
|
type PureMatchCase l s e a b = MatchCase l s e Identity a b Source #
data MatchBlock l s e m a b Source #
MatchBlock | |
|
type PureMatchBlock l s e a b = MatchBlock l s e Identity a b Source #
lookAheadMatch :: Monad m => MatchBlock l s e m a b -> ParserT l s e m b Source #
Parse with look-ahead for each case and follow the first that matches (or follow the default if none do).
MatchPos | |
|
data LookAheadTestResult l Source #
Instances
Eq l => Eq (LookAheadTestResult l) Source # | |
Defined in SimpleParser.LookAhead (==) :: LookAheadTestResult l -> LookAheadTestResult l -> Bool # (/=) :: LookAheadTestResult l -> LookAheadTestResult l -> Bool # | |
Show l => Show (LookAheadTestResult l) Source # | |
Defined in SimpleParser.LookAhead showsPrec :: Int -> LookAheadTestResult l -> ShowS # show :: LookAheadTestResult l -> String # showList :: [LookAheadTestResult l] -> ShowS # |
lookAheadTest :: Monad m => MatchBlock l s e m a b -> s -> m (LookAheadTestResult l) Source #
Test which branches match the look-ahead. Useful to assert that your parser makes exclusive choices.
pureLookAheadTest :: PureMatchBlock l s e a b -> s -> LookAheadTestResult l Source #