haz_query_lang/lib.rs
1//! Boolean filter-expression grammar for `haz`.
2//!
3//! `haz-query-lang` is a self-contained recursive-descent parser
4//! for the per-flag filter expressions consumed by `haz query`
5//! (see the `QRY-*` rules). The grammar is the five-line shape
6//!
7//! ```ebnf
8//! Expr ::= Or
9//! Or ::= And ("|" And)*
10//! And ::= Not ("&" Not)*
11//! Not ::= "!"? Atom
12//! Atom ::= "(" Expr ")" | Token
13//! ```
14//!
15//! The crate is intentionally domain-free: a parsed atom is
16//! returned as a raw `(text, span)` pair, leaving identifier,
17//! path-pattern, and relational-kind validation to the
18//! consumer (`haz-query`). This keeps the language layer
19//! reusable across attribute kinds and avoids a dependency on
20//! workspace-domain types.
21//!
22//! # Module map
23//!
24//! - [`span`]: byte-offset spans into the parsed input
25//! ([`span::Span`]).
26//! - [`expr`]: the syntax tree ([`expr::Expr`],
27//! [`expr::RawAtom`]).
28//! - [`error`]: parser-level failures ([`error::ParseError`]).
29//! - [`parser`]: the [`parser::parse`] entry point.
30
31#![deny(missing_docs)]
32
33pub mod error;
34pub mod expr;
35pub mod parser;
36pub mod span;