modules/rdf/sparql/parser.zzm

rdf-0.0.3 documentation

NAME

rdf/sparql/parser - SPARQL 1.1 syntax parser.

SYNOPSIS

  from rdf/sparql/parser import sparql_parse_ast;

  let ast := sparql_parse_ast("ASK { ?s ?p ?o }");

DESCRIPTION

This module parses SPARQL 1.1 Query and Update syntax into AST dictionaries used by rdf/sparql. It validates syntax structure, prologues, query forms, update operations, blank node scoping, and common SPARQL grammar constraints. It does not execute queries.

EXPORTS

Classes

  • SparqlSyntaxParser
    • parse(String source)

      Parses source and returns an AST dictionary. Throws SPARQLError on invalid syntax.

Functions

  • sparql_parse_ast(String source)

    Convenience function returning (new SparqlSyntaxParser()).parse(source).

COPYRIGHT AND LICENCE

rdf/sparql/parser is copyright Toby Inkster.

It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.