Skip to main content

Crate haz_query_lang

Crate haz_query_lang 

Source
Expand description

Boolean filter-expression grammar for haz.

haz-query-lang is a self-contained recursive-descent parser for the per-flag filter expressions consumed by haz query (see the QRY-* rules). The grammar is the five-line shape

Expr   ::= Or
Or     ::= And ("|" And)*
And    ::= Not ("&" Not)*
Not    ::= "!"? Atom
Atom   ::= "(" Expr ")" | Token

The crate is intentionally domain-free: a parsed atom is returned as a raw (text, span) pair, leaving identifier, path-pattern, and relational-kind validation to the consumer (haz-query). This keeps the language layer reusable across attribute kinds and avoids a dependency on workspace-domain types.

§Module map

Modules§

error
Errors produced by the filter-expression parser.
expr
The boolean filter-expression syntax tree.
parser
Recursive-descent parser for the QRY-002 boolean filter-expression grammar.
span
Byte-offset spans into the parsed filter-expression input.