rudb_parse/lib.rs
1//! The SQL lexer, parser and AST, with a textual form that round trips.
2//!
3//! Rank 1 in the layer rule. See `xtask/layers.toml` and `spec/18-package-layout.md`.
4//!
5//! The grammar under `grammar/` is DuckDB's own, vendored verbatim and checked by
6//! `cargo xtask grammar`. Everything derived from it lands in `generated` and is written by
7//! `cargo xtask gen-grammar`. `spec/20-the-grammar.md` is the argument for doing it that way and
8//! the list of what it does and does not buy.
9
10#![forbid(unsafe_code)]
11
12pub mod generated;
13pub mod token;
14pub mod tokenize;
15
16pub use generated::keywords::{
17 COLUMN_NAME, FUNC_NAME, KEYWORDS, LONGEST, RESERVED, TYPE_NAME, UNRESERVED,
18};
19pub use token::{Flags, Kind, NOT_A_KEYWORD, Token};
20pub use tokenize::{classes, lookup, tokenize};