Safe Haskell | None |
---|---|
Language | Haskell98 |
- Single-char parsers
- Whitespace and comments (comments - not yet supported)
- Lexeme parsers (as opposed to
Raw
parsers) - Raw parsers for numbers
- Lexeme parsers for numbers
- Parsers for Enums
- Parenthesized parsers
- Lexeme parsers for
Date
-s - Lexeme parser for quoted
String
-s - Read-compatability
- Basic facility for runninga parser, getting at most a single error message
This module provides some higher-level types and infrastructure to make it easier to use.
- pCR :: Parser Char
- pLF :: Parser Char
- pLower :: Parser Char
- pUpper :: Parser Char
- pLetter :: Parser Char
- pAscii :: Parser Char
- pDigit :: Parser Char
- pDigitAsNum :: Num a => Parser a
- pAnySym :: (IsLocationUpdatedBy loc Char, ListLike state Char) => String -> P (Str Char state loc) Char
- pSpaces :: Parser String
- lexeme :: ParserTrafo a a
- pDot :: Parser Char
- pComma :: Parser Char
- pDQuote :: Parser Char
- pLParen :: Parser Char
- pRParen :: Parser Char
- pLBracket :: Parser Char
- pRBracket :: Parser Char
- pLBrace :: Parser Char
- pRBrace :: Parser Char
- pSymbol :: (IsLocationUpdatedBy loc Char, ListLike state Char) => String -> P (Str Char state loc) String
- pNaturalRaw :: Num a => Parser a
- pIntegerRaw :: Num a => Parser a
- pDoubleRaw :: Read a => Parser a
- pDoubleStr :: Parser [Char]
- pNatural :: Num a => Parser a
- pInteger :: Num a => Parser a
- pDouble :: Parser Double
- pPercent :: Parser Double
- pEnumRaw :: forall a. (Enum a, Show a) => Parser a
- pEnum :: (Enum a, Show a) => Parser a
- pEnumStrs :: [String] -> Parser String
- pParens :: ParserTrafo a a
- pBraces :: ParserTrafo a a
- pBrackets :: ParserTrafo a a
- listParser :: ParserTrafo a [a]
- tupleParser :: ParserTrafo a [a]
- pTuple :: (IsLocationUpdatedBy loc Char, ListLike state Char) => [P (Str Char state loc) a] -> P (Str Char state loc) [a]
- pDay :: Parser Day
- pDayMonthYear :: (Num d, Num y) => Parser (d, Int, y)
- pParentheticalString :: Char -> Parser String
- pQuotedString :: Parser String
- parserReadsPrec :: Parser a -> Int -> ReadS a
- execParser :: Parser a -> String -> (a, [Error LineColPos])
- runParser :: String -> Parser a -> String -> a
Single-char parsers
pDigitAsNum :: Num a => Parser a Source
pAnySym :: (IsLocationUpdatedBy loc Char, ListLike state Char) => String -> P (Str Char state loc) Char Source
Whitespace and comments (comments - not yet supported)
Lexeme parsers (as opposed to Raw
parsers)
lexeme :: ParserTrafo a a Source
Lexeme Parsers skip trailing whitespace (this terminology comes from Parsec)
pSymbol :: (IsLocationUpdatedBy loc Char, ListLike state Char) => String -> P (Str Char state loc) String Source
Raw parsers for numbers
pNaturalRaw :: Num a => Parser a Source
pIntegerRaw :: Num a => Parser a Source
pDoubleRaw :: Read a => Parser a Source
pDoubleStr :: Parser [Char] Source
Lexeme parsers for numbers
Parsers for Enums
Parenthesized parsers
pParens :: ParserTrafo a a Source
pBraces :: ParserTrafo a a Source
pBrackets :: ParserTrafo a a Source
listParser :: ParserTrafo a [a] Source
eg [1,2,3]
tupleParser :: ParserTrafo a [a] Source
eg (1,2,3)
pTuple :: (IsLocationUpdatedBy loc Char, ListLike state Char) => [P (Str Char state loc) a] -> P (Str Char state loc) [a] Source
Lexeme parsers for Date
-s
Lexeme parser for quoted String
-s
Read-compatability
parserReadsPrec :: Parser a -> Int -> ReadS a Source
Converts a UU Parser into a read-style one.
This is intended to facilitate migration from read-style parsers to UU-based ones.
Basic facility for runninga parser, getting at most a single error message
execParser :: Parser a -> String -> (a, [Error LineColPos]) Source
The lower-level interface. Returns all errors.