swish-0.3.1.2: A semantic web toolkit.

PortabilityH98
Stabilityexperimental
MaintainerDouglas Burke

Swish.RDF.NTParser

Contents

Description

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

Synopsis

Documentation

parseNTSource

Arguments

:: String

input in NTriples format.

-> ParseResult 

Parse a string.

parsefromStringSource

Arguments

:: NTParser a

parser to apply

-> String

input to be parsed

-> Either String a 

Function to supply initial context and parse supplied term.

We augment the Parsec error with the context.

Exports for parsers that embed NTriples in a bigger syntax

data NTState Source

NT parser state

Constructors

NTState 

Fields

graphState :: RDFGraph