Grammar playground
Pick a compiled PARG artifact, edit the input, and watch the wasm engine parse it live. Break the input on the Error recovery grammar and the engine reports the deepest failure position, keeps the partial tree, and — because that grammar declares aresync policy — shows the exact span it consumed so parsing could resume. Every tree is produced by the same @parsanol/wasm binary that the Rust and Ruby conformance suites validate, and the badge reports the artifact's embedded tests replayed on that binary.
What runs where
- Artifacts are checksummed
parsanol-tree/v2envelopes compiled ahead of time; the browser verifies the checksum before parsing. - Parsing, bindings application, the embedded self-test, and error recovery all run in the wasm engine (~1.4 MB,
@parsanol/wasm0.18.18). No network calls, no server-side parsing. - A failed parse returns the engine's recovery envelope: the deepest real-content position, the expected set, the partial tree parsed before the failure, and — for grammars that declare a
resyncpolicy — the exact spans consumed so parsing could resume. - The share button gzips the selected grammar id and input into the URL hash, so a link reproduces the playground state without an account or storage.
Grammar source is shown read-only in this release: compiling PARG text in the browser needs the compiler as a wasm module, which is tracked as the next playground milestone. The shipped artifact is the contract the runtime consumes.