Haskell Hierarchical Libraries (Cabal package)Source codeContentsIndex
Distribution.Compat.ReadP
Portabilityportable
Stabilityprovisional
Maintainerlibraries@haskell.org
Contents
The ReadP type
Primitive operations
Other operations
Running a parser
Description

This is a library of parser combinators, originally written by Koen Claessen. It parses all alternatives in parallel, so it never keeps hold of the beginning of the input string, a common source of space leaks with other parsers. The '(+++)' choice combinator is genuinely commutative; it makes no difference which branch is "shorter".

See also Koen's paper Parallel Parsing Processes (http://www.cs.chalmers.se/~koen/publications.html).

This version of ReadP has been locally hacked to make it H98, by Martin Sjögren mailto:msjogren@gmail.com

Synopsis
type ReadP r a = ReadP a
get
look
+++
<++
gather
pfail
satisfy
char
string
munch
munch1
skipSpaces
choice
count
between
option
optional
many
many1
skipMany
skipMany1
sepBy
sepBy1
endBy
endBy1
chainr
chainl
chainl1
chainr1
manyTill
ReadS
readP_to_S
readS_to_P
The ReadP type
type ReadP r a = ReadP a
Primitive operations
get
look
+++
<++
gather
Other operations
pfail
satisfy
char
string
munch
munch1
skipSpaces
choice
count
between
option
optional
many
many1
skipMany
skipMany1
sepBy
sepBy1
endBy
endBy1
chainr
chainl
chainl1
chainr1
manyTill
Running a parser
ReadS
readP_to_S
readS_to_P
Produced by Haddock version 0.8