Safe Haskell | None |
---|---|
Language | Haskell2010 |
Parsing.
- data Report e i = Report {
- position :: Int
- expected :: [e]
- unconsumed :: i
- data Result s e i a
- parser :: ListLike i t => (forall r. Grammar r e (Prod r e t a)) -> i -> ST s (Result s e i a)
- allParses :: (forall s. ST s (Result s e i a)) -> ([(a, Int)], Report e i)
- fullParses :: ListLike i t => (forall s. ST s (Result s e i a)) -> ([a], Report e i)
Documentation
A parsing report, which contains fields that are useful for presenting errors to the user if a parse is deemed a failure. Note however that we get a report even when we successfully parse something.
Report | |
|
The result of a parse.
Ended (Report e i) | The parser ended. |
Parsed a Int i (i -> ST s (Result s e i a)) | The parser parsed something, namely an |
parser :: ListLike i t => (forall r. Grammar r e (Prod r e t a)) -> i -> ST s (Result s e i a) Source
Create a parser from the given grammar.