diff --git a/docs/isc-wf-1.md b/docs/isc-wf-1.md index ac44217..df13d19 100644 --- a/docs/isc-wf-1.md +++ b/docs/isc-wf-1.md @@ -259,3 +259,53 @@ system "ALALC:tha-Thai:Latn:2011" { ### 8.2 Language-conditioned variants (ISO 9 pattern) See §5.4. + +## 9. Canonical-adopted rs grammar extensions + +The interscript-rs portable grammar (`grammar/isc.parg`) extends the +ruby-DSL concern grammar with four constructs. They are the canonical +spelling of the workflow extension — every other runtime adopts them +(ts/py through the sha-pinned portable grammar, ruby through the +concern layer). All four are parse-additive and corpus-dormant at +adoption: no map in the corpus uses any of them at a position the +pre-WF-1 grammar would have parsed differently (verified against the +corpus at adoption time, re-verified at the WO19 G6 round). + +1. **`ruleset_decl`** — a named rule collection at document level + (`ruleset { stage-items }`). A ruleset body is a stage + body: it carries rules and rule-line items only — a funcall or + stage `run` inside a ruleset is a load error, because ruleset + content joins passes through W1 expansion (§3) where non-rule items + cannot participate. Duplicate ruleset declarations in one document + are a load error (WO18 G7). + +2. **`use_directive`** — `use [.] [override { … }]` + (§4). The bare form flattens the referenced ruleset's rules at this + position; the `override` form replaces rows whose collapsed from-key + matches, appending the survivors after the kept rows (§4.2, the + trailing-parallel join of §4.2.6). A stage-line `use` participates + in the stage like any other item; a `use` inside a + `parallel`/`sequence` block joins that block's single pass (§3.2, + ruby concern `rule_line`). + +3. **`languages_decl`** — `languages (","? )*` at + document level (§5.1). Declared once per map; a second declaration + is a parse error. The declaration gates §5.1: a caller's language + selection outside the declaration makes every `when` guard inert. + +4. **`when` guard on `sub` rules** — a trailing ident list on a rule, + inside the rule's own braces for the block form + (`sub { from … to … when kur }`; canonical binding, ruby parses the + inside form only — the ts/py outside-form tolerance was retired at + WO19 G6 item 5) and after the constraints for the compact form + (`sub "a" "b" when kur`). The list is comma- or whitespace- + separated, keyword-guarded so it never swallows the next rule (§5.2). + +The four new keywords (`use`, `override`, `languages`, `when`) join +the keyword table, as does `ruleset` (the block head; the ident-list +guards need every sibling block head keyworded). WO19 G6 item 1 +completed the table alignment: the six fn-literal names +(`upcase` `downcase` `title_case` `reverse` `strip` `swapcase`) are +reserved in every runtime's keyword table, while `name = any(...)` +alias declarations remain valid (the `alias_decl` production has no +keyword guard). diff --git a/docs/parity/README.md b/docs/parity/README.md index 966b77c..609688a 100644 --- a/docs/parity/README.md +++ b/docs/parity/README.md @@ -251,6 +251,20 @@ rs deliberately omits `ruleset` (`interscript-rs/grammar/isc.parg:119-122` — "`ruleset` deliberately stays OUT (§2 lists exactly these four)"); ts and py keyword all of them (`grammar-source.ts` / `grammar_source.py` `keyword` production). +ts and py keyword all of them (`grammar-source.ts` / `grammar_source.py` +`keyword` production). + +**WO19 G6 errata (2026-11-14).** G6 item 1 adopted ruby's table +everywhere: ts, py and rs now keyword the six fn-literal names +(`upcase` `downcase` `title_case` `reverse` `strip` `swapcase`), so +the fn-literal divergence rows above are resolved — all 44 probed +identifiers agree across the four runtimes. The `ruleset` row was +already stale at this audit's snapshot: rs joined `ruleset` to its +keyword table in the G7 round (the block-head guard needs it; the +`grammar/isc.parg` comment "ruleset joins too" postdates the cited +line range). Alias declarations NAMED after keywords remain valid +everywhere (`alias_decl` has no keyword guard); a bare keyword is +never an alias reference. Corpus equivalence: a ruby sweep of all 428 corpus maps (alias names + stage names + dependency aliases vs the full keyword list) reports diff --git a/maps/alalc-bel-Cyrl-Latn-1997.isc b/maps/alalc-bel-Cyrl-Latn-1997.isc index afe65a4..7abcfca 100644 --- a/maps/alalc-bel-Cyrl-Latn-1997.isc +++ b/maps/alalc-bel-Cyrl-Latn-1997.isc @@ -36,6 +36,11 @@ tests { "Кастрычніцкая" -> "Kastrychnitskai͡a" "Плошча Леніна" -> "Ploshcha Lenina" "Інстытут Культуры" -> "Instytut Kulʹtury" + # WO19 G6: the map's capital-\U row is spelled with a DOUBLED + # backslash ("\\U040E"), i.e. a literal backslash + the raw text + # U040E — not the \U040E escape — so it does NOT fire on Ў. Pin + # that dormancy (ruby and rs agree Ў passes through unchanged). + "Ў" -> "Ў" } stage main { diff --git a/maps/bgnpcgn-bel-Cyrl-Latn-1979.isc b/maps/bgnpcgn-bel-Cyrl-Latn-1979.isc index 0ad3b70..8672ff2 100644 --- a/maps/bgnpcgn-bel-Cyrl-Latn-1979.isc +++ b/maps/bgnpcgn-bel-Cyrl-Latn-1979.isc @@ -38,6 +38,10 @@ tests { "Беліца" -> "Byelitsa" "Ёдкавічы" -> "Yodkavichy" "Нёман" -> "Nyoman" + # WO19 G6: the map's capital-\U row is spelled with a DOUBLED + # backslash ("\\U040E") — not the \U040E escape — so it does NOT + # fire on Ў. Pin that dormancy (ruby and rs agree). + "Ў" -> "Ў" "Жлобін" -> "Zhlobin" "Ружаны" -> "Ruzhany" "Зоя" -> "Zoya" diff --git a/maps/gki-bel-Cyrl-Latn-2000.isc b/maps/gki-bel-Cyrl-Latn-2000.isc index 02b75bc..8b7d9ee 100644 --- a/maps/gki-bel-Cyrl-Latn-2000.isc +++ b/maps/gki-bel-Cyrl-Latn-2000.isc @@ -68,6 +68,11 @@ tests { "Баяры" -> "Bajary" "Вязынка" -> "Viazynka" "Валяр'яны" -> "Valiarjany" + # WO19 G6 item 4: pin the capital-\U escape row — the sub below + # spells "\U040E", which decodes to Ў (ruby/rs always decoded it; + # the generated ts/py parsers carried the literal "U040E" text and + # the row never fired). + "Ў" -> "Ŭ" } dependency "var-Cyrl" diff --git a/maps/mvd-bel-Cyrl-Latn-2008.isc b/maps/mvd-bel-Cyrl-Latn-2008.isc index ed80e27..687beaf 100644 --- a/maps/mvd-bel-Cyrl-Latn-2008.isc +++ b/maps/mvd-bel-Cyrl-Latn-2008.isc @@ -36,6 +36,10 @@ tests { "Чарняк" -> "Charniak" "Лябецкая" -> "Liabietskaja" # in reference doc it's Liabetskaja CAMOBAP waiting confirmation from officials "Дар’я" -> "Darja" + # WO19 G6 item 4: pin the capital-\U escape row (the sub below + # spells "\U040E", which decodes to Ў; the generated ts/py parsers + # carried the literal "U040E" text and the row never fired). + "Ў" -> "W" } stage main { diff --git a/maps/mvd-rus-Cyrl-Latn-2008.isc b/maps/mvd-rus-Cyrl-Latn-2008.isc index 7c04b52..98a7f1f 100644 --- a/maps/mvd-rus-Cyrl-Latn-2008.isc +++ b/maps/mvd-rus-Cyrl-Latn-2008.isc @@ -20,6 +20,11 @@ tests { "Ева" -> "Eva" "Васiльева" -> "Vasiĺeva" "Адъютантов" -> "Adjutantov" + # WO19 G6: the capital-\U row lives in stage translit and is + # spelled with a DOUBLED backslash ("\\U040E") — not the \U040E + # escape — so it does NOT fire on Ў. Pin that dormancy (ruby and + # rs agree). + "Ў" -> "Ў" } stage translit { diff --git a/maps/odni-bel-Cyrl-Latn-2015.isc b/maps/odni-bel-Cyrl-Latn-2015.isc index f429dab..e4ee81d 100644 --- a/maps/odni-bel-Cyrl-Latn-2015.isc +++ b/maps/odni-bel-Cyrl-Latn-2015.isc @@ -59,6 +59,10 @@ tests { "Бэз" -> "Bez" "Чабор" -> "Chabor" "Дзяўчына, дзяўчыначка пасярод гісторыі\nЗ прастадушнай шчырасьцю глядзіць на тэрыторыю.\nУ вакне заўсёды звыклая выява:\nШэры двор, шэры слуп, на слупе аб'явы." -> "Dzyawchyna, dzyawchynachka pasyarod historyi\nZ prastadushnay shchyrastsyu hlyadzits na terytoryyu.\nU vaknye zawsyody zvyklaya vyyava:\nShery dvor, shery slup, na slupye abyavy." + # WO19 G6 item 4: pin the capital-\U escape row (the sub below + # spells "\U040E", which decodes to Ў; the generated ts/py parsers + # carried the literal "U040E" text and the row never fired). + "Ў" -> "W" } stage main {