Skip to content

feat: parse ISC through the shipped .parg artifact - #790

Merged
ronaldtse merged 1 commit into
mainfrom
feat/parg-artifact-runtime
Oct 1, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
feat/parg-artifact-runtime

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

parsanol 1.3.61 ships Parsanol::PARG, clearing the blocker recorded when 1.3.56 lacked it. This wires the compiled grammar artifact into the runtime:

  • lib/interscript/isc/grammar/isc.artifact.json, compiled from isc.parg with the released CLI, ships via the existing lib/**/* files glob.
  • Isc::Parser.parse parses through the artifact (Parsanol::PARG::Artifact.load, memoized) and falls back to the Ruby-DSL grammar when parsanol predates PARG — load failures only; a genuine ParseFailed surfaces as ParseError like the DSL path. No gemspec version floor is forced (~> 1.3 stands); raise it if you prefer requiring PARG outright.
  • The Normalizer folds a comment-only/empty tests block — captured as raw text by the artifact, folded by the DSL grammar — the same way fix: capture-free blocks normalize to empty — .parg tree gate 289/289 #788 folded parallel/sequence blocks.
  • New differential gate (spec/interscript/isc/parg_artifact_spec.rb): every corpus map parses byte-identically through both paths — 289/289, now enforced in the suite rather than run ad hoc.

Verified locally: full three-compiler suite through the artifact runtime — 25,935 examples, 1 failure, the sole failure being the pre-existing secryst spec (fails identically on clean origin/main; local bundle includes the secryst gem, violating that spec's precondition).

parsanol 1.3.61 ships Parsanol::PARG; the runtime now parses ISC
sources through the compiled grammar artifact (lib/interscript/isc/
grammar/isc.artifact.json, compiled from isc.parg with the released
CLI) and falls back to the Ruby-DSL grammar when parsanol predates
PARG — no version floor is forced on the gemspec constraint. The
artifact ships via the existing lib/**/* files glob; a genuine
ParseFailed from the artifact surfaces as a ParseError like the DSL
path, only load failures fall back.

The Normalizer folds a comment-only or empty tests block — which the
artifact captures as raw text — the same way the DSL grammar does.

New differential gate: spec/interscript/isc/parg_artifact_spec.rb
parses every corpus map through both paths and requires byte-
identical normalized trees — 289/289.
@ronaldtse
ronaldtse merged commit 82a5a47 into main Oct 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant