Portability | H98 |
---|---|
Stability | experimental |
Maintainer | Douglas Burke |
This Module implements a NTriples parser (see [1]), returning a
new RDFGraph
consisting of triples and namespace information parsed from
the supplied NTriples input string, or an error indication.
Uses the Parsec monadic parser library.
REFERENCES:
1 http://www.w3.org/TR/rdf-testcases/#ntriples RDF Test Cases W3C Recommendation 10 February 2004
- type ParseResult = Either String RDFGraph
- parseNT :: String -> ParseResult
- parsefromString :: NTParser a -> String -> Either String a
- type NTParser a = RDFParser NTState a
- data NTState = NTState {}
- ntripleDoc :: NTParser RDFGraph
- line :: NTParser ()
- ws :: NTParser ()
- comment :: NTParser ()
- eoln :: NTParser ()
- character :: NTParser Char
- name :: NTParser String
- triple :: NTParser ()
- subject :: NTParser RDFLabel
- predicate :: NTParser RDFLabel
- object :: NTParser RDFLabel
- uriref :: NTParser ScopedName
- urirefLbl :: NTParser RDFLabel
- nodeID :: NTParser RDFLabel
- literal :: NTParser RDFLabel
- language :: NTParser ScopedName
Documentation
type ParseResult = Either String RDFGraphSource
Function to supply initial context and parse supplied term.
We augment the Parsec error with the context.