Expand description
PL/SQL parser frontend.
This crate defines the backend-independent parsing API that all downstream crates consume. No ANTLR-generated types or grammar rule names escape this boundary (R2 / R20).
§Design
A ParseBackend implementation converts raw source text into a
BackendParseResult containing the lossless token tape, a CST
(concrete syntax tree), and a typed AST (abstract syntax tree).
The public parse_file / parse_with_backend functions wrap
BackendParseResult into a ParseResult that pairs the output with
the originating FileId.
§Lossless contract
The token tape is the source of truth for round-tripping. Every token and trivia element carries a byte-offset span. The AST is a semantic projection — it is NOT required to preserve whitespace or comments.
Re-exports§
pub use dialect::UNSUPPORTED_DIALECT_FEATURE_CODE;pub use dialect::unsupported_dialect_feature_diagnostic;pub use dialect::unsupported_dialect_feature_remediation;pub use ast::Ast;pub use ast::AstDecl;pub use ast::AstExpr;pub use ast::AstStatement;pub use ast::AstTypeDecl;pub use ast::ConcreteSyntaxTree;pub use ast::CstNodeId;pub use ast::SourceFile;pub use ast::SourceMap;pub use ast::Spanned;pub use tokens::Token;pub use tokens::TokenKind;pub use tokens::TokenTape;pub use tokens::Trivia;pub use tokens::TriviaTable;
Modules§
- ast
- Concrete syntax tree and abstract syntax tree types.
- dialect
- Dialect-mismatch diagnostics for the parser.
- tokens
- Token tape types.
- visit
- AST visitor and walker traits.
Structs§
- Backend
Parse Result - Raw output from a
ParseBackendimplementation. - Parse
Metrics - Observability counters emitted alongside every parse result.
- Parse
Options - Configuration knobs passed to every parse invocation.
- Parse
Result - Public-facing parse result, paired with the file that produced it.
Enums§
- Oracle
Target Version - Simplified Oracle version targeting for the parser.
- Recovery
Mode - Error-recovery strategy.
Traits§
- Parse
Backend - Backend-independent parser interface (R2 / R20).
Functions§
- parse_
file - Parse a single file with the given backend, using default
ParseOptions. - parse_
with_ backend - Parse a single file with the given backend and options.