Skip to main content

Module sparql_grammar

Module sparql_grammar 

Source
Expand description

Recursive-descent SPARQL grammar — the parser front-end the engine was missing.

The AST (sparql_ast), planner (sparql_planner), and executor (sparql_executor + sparql_filter) already implement the full SPARQL algebra: Filter, Optional, Union, Minus, Bind/Project, GroupBy, Having, PropertyPath, Graph, Service, StarTripleScan, and a complete Expression evaluator. What was missing was a parser that produces that AST from a query string — the legacy sparql_parser.rs only recognised a flat basic graph pattern. This module supplies the real thing, built in verified slices (see docs/plans/sparql-full-implementation.md).

Re-exports§

pub use expr::parse_expression;
pub use pattern::parse_where_group;
pub use tokenizer::tokenize;
pub use tokenizer::Token;
pub use update::is_update;
pub use update::parse_update;

Modules§

expr
SPARQL expression parser — precedence-climbing recursive descent over the token stream, producing Expression nodes into the SparqlQueryContext arena. Used for FILTER, BIND, and HAVING expressions.
pattern
SPARQL group-graph-pattern parser — the WHERE-clause grammar.
tokenizer
SPARQL tokenizer.
update
SPARQL 1.1 Update parser.