Portability | portable |
---|---|
Stability | provisional |
Maintainer | otakar.smrz mff.cuni.cz |
This module provides the Parsek library developed by Koen Claessen in his functional pearl article Parallel Parsing Processes, Journal of Functional Programming, 14(6), 741–757, 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
Copyright (C) 2003 Koen Claessen
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Documentation
type ParseMethod s a e r = P s a -> [s] -> ParseResult e rSource
type ParseResult e r = Either (e, Expect, Unexpect) rSource
parseFromFile :: Parser Char a -> ParseMethod Char a e r -> FilePath -> IO (ParseResult e r)Source
parse :: Parser s a -> ParseMethod s a e r -> [s] -> ParseResult e rSource
shortestResult :: ParseMethod s a (Maybe s) aSource
longestResult :: ParseMethod s a (Maybe s) aSource
longestResults :: ParseMethod s a (Maybe s) [a]Source
allResults :: ParseMethod s a (Maybe s) [a]Source
allResultsStaged :: ParseMethod s a (Maybe s) [[a]]Source
completeResults :: ParseMethod s a (Maybe s) [a]Source
shortestResultWithLeftover :: ParseMethod s a (Maybe s) (a, [s])Source
longestResultWithLeftover :: ParseMethod s a (Maybe s) (a, [s])Source
longestResultsWithLeftover :: ParseMethod s a (Maybe s) ([a], Maybe [s])Source
allResultsWithLeftover :: ParseMethod s a (Maybe s) [(a, [s])]Source
completeResultsWithLine :: ParseMethod Char a Int [a]Source