Safe Haskell | None |
---|---|
Language | Haskell2010 |
- advanceChar :: Char -> Loc -> Loc
- locations :: FoldableLL full Char => full -> Seq (Char, Loc)
- noLocations :: FoldableLL full item => full -> Seq (item, ())
- locatedFullParses :: FoldableLL full Char => (forall r. Grammar r (Prod r String (Char, Loc) (p Char Loc))) -> full -> ([p Char Loc], Report String (Seq (Char, Loc)))
Documentation
advanceChar :: Char -> Loc -> Loc Source #
Advances the location for Char
values. Tabs advance to the
next eight-column tab stop; newlines advance to the next line and
reset the column number to 1. All other characters advance the
column by 1.
locations :: FoldableLL full Char => full -> Seq (Char, Loc) Source #
Takes any ListLike value based on Char
(Seq
, Text
,
String
, etc.) and creates a Seq
which pairs each Char
with
its location. Example: locatedFullParses
.
noLocations :: FoldableLL full item => full -> Seq (item, ()) Source #
Breaks a ListLike into a Seq
but does not assign locations.
:: FoldableLL full Char | |
=> (forall r. Grammar r (Prod r String (Char, Loc) (p Char Loc))) | Earley grammar with production that you want to parse. |
-> full | |
-> ([p Char Loc], Report String (Seq (Char, Loc))) | A list of successful parses that when to the end of the source string, along with the Earley report showing possible errors. |