Portability | OverloadedStrings |
---|---|
Stability | experimental |
Maintainer | Douglas Burke |
Safe Haskell | Safe-Infered |
Support for the RDF Parsing modules.
- type SpecialMap = LookupMap (String, ScopedName)
- prefixTable :: [Namespace]
- specialTable :: Maybe ScopedName -> [(String, ScopedName)]
- runParserWithError :: Parser a b -> a -> Text -> Either String b
- type ParseResult = Either String RDFGraph
- ignore :: Applicative f => f a -> f ()
- char :: Char -> Parser s Char
- ichar :: Char -> Parser s ()
- string :: String -> Parser s String
- stringT :: Text -> Parser s Text
- symbol :: String -> Parser s String
- isymbol :: String -> Parser s ()
- lexeme :: Parser s a -> Parser s a
- notFollowedBy :: (Char -> Bool) -> Parser s ()
- whiteSpace :: Parser s ()
- skipMany :: Parser s a -> Parser s ()
- skipMany1 :: Parser s a -> Parser s ()
- endBy :: Parser s a -> Parser s b -> Parser s [a]
- sepEndBy :: Parser s a -> Parser s b -> Parser s [a]
- sepEndBy1 :: Parser s a -> Parser s b -> Parser s [a]
- manyTill :: Parser s a -> Parser s b -> Parser s [a]
- noneOf :: String -> Parser s Char
- eoln :: Parser s ()
- fullStop :: Parser s ()
- hex4 :: Parser a Char
- hex8 :: Parser a Char
- appendURIs :: URI -> URI -> Either String URI
Documentation
type SpecialMap = LookupMap (String, ScopedName)Source
Type for special name lookup table
prefixTable :: [Namespace]Source
Define default table of namespaces
:: Maybe ScopedName | initial base URI, otherwise uses |
-> [(String, ScopedName)] |
Define default special-URI table.
:: Parser a b | parser (carrying state) to apply |
-> a | starting state for the parser |
-> Text | input to be parsed |
-> Either String b |
Run the parser and return the successful parse or an error message which consists of the standard Polyparse error plus a fragment of the unparsed input to provide context.
type ParseResult = Either String RDFGraphSource
The result of a parse, which is either an error message or a graph.
ignore :: Applicative f => f a -> f ()Source
Run the parser and ignore the result.
lexeme :: Parser s a -> Parser s aSource
Convert a parser into one that also matches, and ignores,
trailing whiteSpace
.
notFollowedBy :: (Char -> Bool) -> Parser s ()Source
Succeed if the next character does not match the given function.
whiteSpace :: Parser s ()Source
Match white space: a space or a comment (#
character and anything following it
up to to a new line).
Match zero or more occurences of parser followed by separator.
Match zero or more occurences of the parser followed by the separator.
Accept one or more occurences of the parser
separated by the separator. Unlike endBy
the
last separator is optional.
Accept zero or more runs of the parser ending with the delimiter.
noneOf :: String -> Parser s CharSource
Accept any character that is not a member of the given string.
Append the two URIs. Should probably be moved
out of RDFParser. It is also just a thin wrapper around
relativeTo
.