spg_sql/lib.rs
1//! SPG SQL front-end. v0.2 ships only the lexer + a minimal recursive-descent
2//! parser for the `SELECT [..] FROM [..] WHERE [..]` subset.
3//!
4//! Layers (each in its own module):
5//!
6//! - [`lexer`] — byte stream → tokens
7//! - [`ast`] — abstract syntax tree types + `Display` (pretty-print)
8//! - [`parser`] — tokens → AST (Pratt parser for expression precedence)
9#![no_std]
10
11extern crate alloc;
12
13pub mod ast;
14pub mod lexer;
15pub mod parser;
16
17/// v7.12.4 — convenience re-export of the PL/pgSQL body parser.
18/// Used by the engine-side trigger executor to lazy-re-parse the
19/// function body that the catalog stores as raw source text.
20pub use parser::parse_function_body;