Skip to content

fix: charset alias resolution in class context — din-grc green (sweep 395→132) - #783

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

Imported charset aliases (and local aliases composed of them) used bare in constraints or inside any(...) compiled to vacuous fragments — legacy Any(nil) parity. din-grc's velar rules then fired word-initially: γκέγκε → "nkenke" instead of "gkenke" (263 sweep failures, the single biggest chunk of the sweep tail).

The adapter now resolves charset aliases at build time to class-semantics nodes — Stdlib values, imported library sets (Any or charset String), and local aliases composed of either — with a cycle guard and memoization. Word-position aliases keep runtime Alias semantics; unresolvable names stay vacuous in class context.

Also: \U accepts 4..8 hex digits (the corpus converter emits \U040E), and a bare \U (un-mar's converter-corrupted output) parses as a literal U so every corpus map loads.

  • din-grc: 520 examples, 0 failures (was 263 failures)
  • Sweep tail: 395 → 132 (var-kor 94, kp-kor 16, var-zho 16, odni-uzb 6 — remaining classes are NFC/NFD corpus-form issues for the converter, not runtime)
  • Full suite: 1149 examples, 0 failures
  • .parg gate: unchanged at 283/285

Imported charset aliases (and local aliases composed of them) used bare
in constraints or inside any(...) compiled to vacuous fragments (legacy
Any(nil) parity) — din-grc's velar rules then fired word-initially
(gkenke -> nkenke, 263 sweep failures). The adapter now resolves
charset aliases at build time to class-semantics nodes: Stdlib values,
imported library sets (Any or charset String), and local aliases
composed of either — with a cycle guard and memoization; word-position
aliases keep runtime Alias semantics, and unresolvable names stay
vacuous in class context.

Also: accept 4..8-hex \U (converter emits \U040E) and a bare \U as a
literal U (un-mar's converter-corrupted output), so every corpus map
parses.

din-grc: 520 examples, 0 failures (was 263 failures). Sweep tail:
395 -> 132.
@ronaldtse
ronaldtse merged commit f2d29c1 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