Skip to main content

fsqlite_parser/
lib.rs

1// bd-2tu6: §10.1–10.2 SQL Lexer and Parser
2//
3// Hand-written recursive descent SQL parser with Pratt precedence-climbing
4// for expressions. Produces an AST from `fsqlite-ast`.
5
6pub mod expr;
7pub mod lexer;
8pub mod parser;
9pub mod semantic;
10pub mod token;
11
12pub use lexer::{
13    Lexer, TokenizeDurationSecondsHistogram, TokenizeMetricsSnapshot, reset_tokenize_metrics,
14    tokenize_metrics_snapshot,
15};
16pub use parser::{
17    ParseError, ParseMetricsSnapshot, Parser, parse_first_statement_with_tail,
18    parse_metrics_enabled, parse_metrics_snapshot, reset_parse_metrics, set_parse_metrics_enabled,
19};
20pub use semantic::{
21    ColumnDef as SemanticColumnDef, FunctionArity, ResolveResult, Resolver, Schema, Scope,
22    SemanticError, SemanticErrorKind, SemanticMetricsSnapshot, TableDef as SemanticTableDef,
23    reset_semantic_metrics, semantic_metrics_snapshot,
24};
25
26pub use token::{Token, TokenKind};