gudusoft.gsqlparser.pp formatter.See: Description
| Class | Description |
|---|---|
| FormatDiagnostic |
A single diagnostic event produced by the pp2 engine — a recovered parse
failure, a tokenizer gap, a guard fall-through, etc.
|
| Pp2FormatOptions |
Configuration for the pp2 fault-tolerant SQL formatter.
|
| Pp2FormatResult |
Immutable result of a
Pp2Formatter.format(...) call. |
| Pp2FormatResult.Region |
Per-region rendering record.
|
| Pp2Formatter |
Internal facade for the pp2 fault-tolerant SQL formatter.
|
| Enum | Description |
|---|---|
| FormatDiagnostic.Severity |
Severity level.
|
| FormatStatus |
Overall outcome of a pp2 format call.
|
| Pp2FormatOptions.ErrorRegionStrategy |
Strategy for rendering parse-failed, lexical-fallback regions.
|
| RendererId |
Identifies which strategy produced a given output region.
|
| Exception | Description |
|---|---|
| Pp2ParseException |
Thrown by the pp2 engine when
Pp2FormatOptions.tolerantMode is
false and parsing fails for one or more regions. |
gudusoft.gsqlparser.pp formatter.
The pp2 engine is a region-hybrid formatter built on a source-span ledger,
an immutable token spine, a guarded AST delegate that wraps the existing
FormatterFactory.pp() machinery, a conservative MVP renderer, and
(post-Phase-3) a lexical island fallback ported from the Delphi TSQLion
algorithm. Together these handle well-formed, partially broken, or completely
invalid SQL without throwing, without OOM, and without StackOverflowError.
Design and slice plan:
gsp_java_core/doc/formatter/v2/final_granular_plan.md.
TSourceTokenList is never mutated.SourceSpan; no byte is lost.FormatterFactory.pp() output is byte-identical for legal SQL after pp2 lands.The public entry point is FormatterFactory.pp2(...), added in slice S17
once the MVP is shippable. Prior slices test against the internal
Pp2Formatter facade only.