|
Text.ParserCombinators.ReadPrec | Portability | non-portable (uses Text.ParserCombinators.ReadP) | Stability | provisional | Maintainer | libraries@haskell.org |
|
|
|
|
|
Description |
This library defines parser combinators for precedence parsing. |
|
Synopsis |
|
|
|
Documentation |
|
data ReadPrec a |
|
|
Precedences |
|
type Prec = Int |
|
minPrec :: Prec |
|
Precedence operations |
|
lift :: ReadP a -> ReadPrec a |
Lift a predence-insensitive ReadP to a ReadPrec |
|
prec :: Prec -> ReadPrec a -> ReadPrec a |
(prec n p) checks that the precedence context is
less than or equal to n,
* if not, fails
* if so, parses p in context n |
|
step :: ReadPrec a -> ReadPrec a |
Increases the precedence context by one |
|
reset :: ReadPrec a -> ReadPrec a |
Resets the precedence context to zero |
|
Other operations |
|
get :: ReadPrec Char |
|
look :: ReadPrec String |
|
(+++) :: ReadPrec a -> ReadPrec a -> ReadPrec a |
|
(<++) :: ReadPrec a -> ReadPrec a -> ReadPrec a |
|
pfail :: ReadPrec a |
|
choice :: [ReadPrec a] -> ReadPrec a |
|
Converters |
|
readPrec_to_P :: ReadPrec a -> Int -> ReadP a |
|
readP_to_Prec :: (Int -> ReadP a) -> ReadPrec a |
|
readPrec_to_S :: ReadPrec a -> Int -> ReadS a |
|
readS_to_Prec :: (Int -> ReadS a) -> ReadPrec a |
|
Produced by Haddock version 0.6 |