Triptych

3.2. The scanner🔗

Triptych.scan fuses matching with the continuation that consumes the rest of the grammar. A failed split is discarded immediately, and a complete parse stops the search. It preserves the decoder's source-ordered alternatives, present-before-absent optionals, and stop-before-continue repetition policy.

For grammars accepted by the conservative Triptych.Grammar.staticUnique checker, the scanner first attempts a boundary-driven path. Fixed widths and following literals determine field boundaries without enumerating every prefix. Unsupported shapes fall back to the complete continuation scanner, not to the archived decoder.