Skip to content

Parser: grow the corpus from spec examples (§15, §16) + grammar fuzzing #68

Description

@StreamDemon

Summary

Grow tests/corpus/ beyond the current three fixtures (basic.sp, actor.sp, control_flow.sp) using the spec's own examples as the source of truth, then add grammar-generated fuzzing for the edges.

Part of the Frontend milestone (see the Compiler Roadmap, #66). The crates/AGENTS.md convention is "add a corpus fixture for every accepted grammar shape."

Spec

  • §15 (complete REST-API example) and the inline examples throughout §16 / §3–§11 are the canonical fixtures.

Scope

  • Port the §15 REST-API example into tests/corpus/ as parser coverage lands for its constructs.
  • Add a fixture for each §16 production as it becomes supported (track against the "Implemented subset" note in crates/AGENTS.md).
  • (Later) grammar-generated fuzzing — proptest/quickcheck over the EBNF to exercise edge cases hand-written fixtures miss.

Notes

Hand-written fixtures give the "obviously-correct" floor; grammar-gen fuzzing covers the edges. Defer the fuzzing sub-task until the parser covers most of §16 so generated inputs are mostly valid. Pairs with the round-trip issue — every corpus file should also round-trip.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions