Skip to content

fix: .parg gate to 283/285 — alias-stop guard and 4-hex \U escapes - #782

Merged
ronaldtse merged 2 commits into
mainfrom
feat/parg-complete
Sep 30, 2026
Merged

ronaldtse merged 2 commits into
mainfrom
feat/parg-complete

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Closes the .parg gate to 283/285 byte-identical trees (from 278).

Two grammar bugs the gate flushed out:

  1. The item continuation lacked the alias-declaration stop guard. The Ruby grammar's item_continuation checks (identifier whitespace? "=")-absent — without it, the first alias value's concatenation swallowed the next alias declaration (srp_multichar = any([...]) ate srp_latupper), which failed six corpus maps (alalc-srp, bgnpcgn-rus-1947, bgnpcgn-srp-2005, din-grc, moct-kor, var-kor-mr). One shared construct — six maps.
  2. \U escapes demanded 8 hex digits; the corpus converter emits 4 ("\U040E", gki-bel/mvd-bel/odni-bel). The DSL grammar and the .parg now accept 4..8.

Remaining 2 of 285:

  • un-mar-Deva-Latn-2016: converter-corrupted escape output in the corpus file itself (from some("\U") + "0939" — the escape split from its hex digits). Needs a maps-repo/converter fix, not a parser fix.
  • odni-kor-Hang-Latn-2015: 2-element capture delta on comment-only parallel {} blocks.

Full suite: 1149 examples, 0 failures with CI-equivalent flags. Artifact-path perf fix landed upstream (parsanol#160).

The Ruby grammar's item_continuation checks (identifier ws? '=')-
absent — without it the first alias value's concatenation swallowed
the next alias declaration (srp_multichar = any([...]) ate
srp_latupper...), failing six corpus maps (alalc-srp, bgnpcgn-rus-1947,
bgnpcgn-srp-2005, din-grc, moct-kor, var-kor). Gate: 280/285.
The corpus converter emits \U040E-style escapes (gki-bel, mvd-bel,
odni-bel); the Ruby grammar demanded 8 hex digits for \U and rejected
the files. Accept 4..8 in both the DSL grammar and the .parg.
Gate: 283/285 (remaining: un-mar has converter-corrupted escape output
needing a maps-repo fix; odni-kor has a 2-element comment-parallel
capture delta).
@ronaldtse
ronaldtse merged commit 85673a3 into main Sep 30, 2026
4 of 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