Expand description
pgparser: hand-written lexer + recursive-descent/Pratt parser producing the crabgresql AST for the SP2 SQL slice.
Re-exports§
pub use error::ParseError;pub use parser::parse;pub use parser::parse_with_command_identities;pub use parser::parse_with_source;
Modules§
- ast
- The crabgresql AST for the SP2 slice.
- command
- Parser-owned registry of accepted
PostgreSQLcommand identities. - error
- Parse/lex errors. Most map to SQLSTATE 42601 (
syntax_error) and carry the byte offset where the problem was detected. A too-deep query — one whose nesting would overflow the parser/evaluator stack — instead maps to 54001 (statement_too_complex/ “stack depth limit exceeded”), matchingPostgreSQL. - lexer
- Hand-written lexer. Produces (Token, byte-offset) pairs; offsets feed 42601 error positions. Integer literals only (the slice has no float type).
- parser
- Recursive-descent statement parser with Pratt expression parsing.
- token
- Lexical tokens for the SP2 SQL slice.