plsql-parser 0.1.0

PL/SQL parser frontend: ParseBackend trait, token tape, CST, AST types
Documentation

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.