feat: parse ISC with parsanol natively - #780
Merged
Merged
Conversation
Drop the parslet dependency for the native Parsanol API (Parsanol::Parser,
include Parsanol in the grammar concerns, Parsanol::Transform,
Parsanol::ParseFailed) — not the Parsanol::Parslet compat shim.
Two tree-shape optimizations that the old engine could not reward:
- quoted strings capture escape-free stretches as one run slice instead
of a per-char hash (a large map went from ~700k capture nodes to a
few thousand)
- the DocumentBuilder decodes {string:} fragments directly instead of
routing every quoted string through Transform pattern matching
acadsin parse+build: ~24 s -> ~15 s (parse 4.9 s, build 10 s). All 129
ISC/corpus/listing specs pass unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drops parslet for the native Parsanol API —
Parsanol::Parser,include Parsanolin the grammar concerns,Parsanol::Transform,Parsanol::ParseFailed— not theParsanol::Parsletcompat shim.Two tree-shape optimizations the old engine could not reward:
{string:}fragments directly instead of routing every quoted string through Transform pattern matchingacadsin parse+build: ~24 s → ~15 s (parse 4.9 s, build 10 s). All 129 ISC/corpus/listing specs pass unchanged; full suite 1149 examples, 0 failures with CI-equivalent flags.
Groundwork for the .parg step: the grammar source moves to a portable artifact next, shared with parsanol npm.
Dependency change
parslet (~> 2.0)→parsanol (~> 1.3). Prebuilt platform gems cover the CI matrix (arm64/x86_64 darwin, linux, mingw; Ruby >= 3.2 floor).