"Parser ambiguity and robustness inventory"

Parser ambiguity and robustness inventory

The canonical parser is recursive descent in crates/vox-compiler/src/parser/descent. It is not the tree-sitter-vox grammar (highlighting / editor tooling may diverge).

Error taxonomy

Each ParseError carries a ParseErrorClass:

ClassTypical cause
expect_tokenParser::expect mismatch (wrong token at a committed point).
top_levelToken cannot start a module-level declaration.
declarationpub / attribute / item head issues.
expression / statement / type_exprReserved for finer-grained classification in inner parsers.
otherDefault for legacy call sites.

Fixture corpus (reproducible)

IDFileIntent
INV-01examples/parser-inventory/top-level-garbage.voxInvalid top-level → recovery; subsequent valid decls still parsed when possible.
INV-02examples/parser-inventory/nested-unclosed.voxUnbalanced braces inside function → parser errors + recovery.
INV-03examples/parser-inventory/pub-bogus.voxpub not followed by fn/type → declaration-class error.

Automated no-panic corpus { crates/vox-compiler/tests/parser_corpus_no_panic.rs.