modules/rdf/sparql/lexer.zzm

rdf-0.0.3 documentation

NAME

rdf/sparql/lexer - SPARQL 1.1 tokeniser.

SYNOPSIS

  from rdf/sparql/lexer import sparql_lex;

  let tokens := sparql_lex("SELECT * WHERE { ?s ?p ?o }");

DESCRIPTION

This module tokenises SPARQL 1.1 Query and Update source for the syntax parser. It is mostly intended for parser and diagnostic code. Tokens are dictionaries containing kind, value, line, and column.

EXPORTS

Functions

  • sparql_lex(String source)

    Returns an array of token dictionaries. Throws SPARQLError for invalid lexical input.

COPYRIGHT AND LICENCE

rdf/sparql/lexer 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.