Copyright | Koen Claessen 2003 |
---|---|
License | GPL |
Maintainer | JP Bernardy |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module provides the Parsek library developed by Koen Claessen in his functional pearl article Parallel Parsing Processes, Journal of Functional Programming, 14(6), 741757, Cambridge University Press, 2004:
http://www.cs.chalmers.se/~koen/pubs/entry-jfp04-parser.html
http://www.cs.chalmers.se/Cs/Grundutb/Kurser/afp/
http://www.cs.chalmers.se/Cs/Grundutb/Kurser/afp/code/week3/Parsek.hs
- data Parser s a
- type Expect s = [(String, Maybe s)]
- module Text.ParserCombinators.Class
- type ParseMethod s a r = P s a -> [s] -> ParseResult s r
- type ParseResult s r = Either (Err s) r
- mapErrR :: (s -> s') -> ParseResult s r -> ParseResult s' r
- parseFromFile :: Parser Char a -> ParseMethod Char a r -> FilePath -> IO (ParseResult Char r)
- parse :: Parser s a -> ParseMethod s a r -> [s] -> ParseResult s r
- shortestResult :: ParseMethod s a a
- longestResult :: ParseMethod s a a
- longestResults :: ParseMethod s a [a]
- allResults :: ParseMethod s a [a]
- allResultsStaged :: ParseMethod s a [[a]]
- completeResults :: ParseMethod s a [a]
- shortestResultWithLeftover :: ParseMethod s a (a, [s])
- longestResultWithLeftover :: ParseMethod s a (a, [s])
- longestResultsWithLeftover :: ParseMethod s a ([a], Maybe [s])
- allResultsWithLeftover :: ParseMethod s a [(a, [s])]
- module Control.Applicative
- module Control.Monad
Documentation
module Text.ParserCombinators.Class
type ParseMethod s a r = P s a -> [s] -> ParseResult s r Source
type ParseResult s r = Either (Err s) r Source
mapErrR :: (s -> s') -> ParseResult s r -> ParseResult s' r Source
parseFromFile :: Parser Char a -> ParseMethod Char a r -> FilePath -> IO (ParseResult Char r) Source
parse :: Parser s a -> ParseMethod s a r -> [s] -> ParseResult s r Source
shortestResult :: ParseMethod s a a Source
longestResult :: ParseMethod s a a Source
longestResults :: ParseMethod s a [a] Source
allResults :: ParseMethod s a [a] Source
allResultsStaged :: ParseMethod s a [[a]] Source
completeResults :: ParseMethod s a [a] Source
shortestResultWithLeftover :: ParseMethod s a (a, [s]) Source
longestResultWithLeftover :: ParseMethod s a (a, [s]) Source
longestResultsWithLeftover :: ParseMethod s a ([a], Maybe [s]) Source
allResultsWithLeftover :: ParseMethod s a [(a, [s])] Source
module Control.Applicative
module Control.Monad