Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 :: Traversable t => t Char -> t (Char, Loc) Source #
Adds locations to a list of characters.
noLocations :: Functor f => f a -> f (a, ()) Source #
Takes a list of tokens and assigns empty locations.
:: (forall r. Grammar r (Prod r String (Char, Loc) (p Char Loc))) | Earley grammar with production that you want to parse. |
-> [Char] | Source text |
-> ([p Char Loc], Report String [(Char, Loc)]) | A list of successful parses that when to the end of the source string, along with the Earley report showing possible errors. |