Skip to content

CI: gate the emitted parser against createParser (run emit-parser-verify) #7

@johnsoncodehk

Description

@johnsoncodehk

test/emit-parser-verify.ts checks that the emitted parser (emitParser, PR #4) is byte-identical to createParser (the oracle) across the tests/cases corpus — but it is not run in CI. So a future change to gen-parser.ts, emit-parser.ts, gen-lexer.ts, or a grammar could silently make the emitted parser diverge from the oracle.

Add it to the CI test job over a stride-sample (a few hundred to a few thousand files, for runtime), so emitted == createParser is enforced on every push.

Optionally: emit the parser from cli.ts and add the emitted artifact to the npm run gen "must be in sync" check, so the committed emitted parser can't drift from the grammar either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions