Skip to content

fix(parser): split "and he/she <verb>" gendered-pronoun compound continuations#5446

Merged
matthewevans merged 2 commits into
phase-rs:mainfrom
davion-knight:fix/gendered-pronoun-compound-continuation
Jul 9, 2026
Merged

fix(parser): split "and he/she <verb>" gendered-pronoun compound continuations#5446
matthewevans merged 2 commits into
phase-rs:mainfrom
davion-knight:fix/gendered-pronoun-compound-continuation

Conversation

@davion-knight

Copy link
Copy Markdown
Contributor

Fixes #5445.

Problem

A bare gendered pronoun ("he"/"she") used as an Oracle-text subject refers to the card itself (CR 109.3 + CR 201.4b). In a compound effect chain the clause-boundary splitter (starts_bare_and_clause_lower) recognized the singular anaphor it <verb> as a subject-predicate clause start but omitted the gendered pronouns, so a conjunct like Machine Man, Model X-51's

Whenever you cast a noncreature spell, put a +1/+1 counter on Machine Man and he gains flying until end of turn.

fell through to the imperative-only path and failed closed to Effect::Unimplemented { name: "he" }. (The ... and it gains flying ... form and the standalone he gains flying both already parse correctly.)

Fix

Add a composed ("he"|"she") × (gains|gets|has|loses|doesn't|can't|cannot) arm mirroring the singular it verb set — not the plural they arm, which excludes P/T get for its conditional-rider path. The split routes the conjunct through the subject-predicate parser, where parse_subject_application already maps "he"/"she" to SelfRef. Pronoun × verb are composed rather than enumerated per permutation (per the parser's combinator conventions).

Parser-only: no new engine type, variant, or runtime — the grant reuses the existing SelfRef continuous-modification path.

Verification

  • Live parse (before → after): Machine Man's he gains flying conjunct goes from Unimplemented { name: "he" }sub_ability granting AddKeyword(Flying) on SelfRef, UntilEndOfTurn — matching the it-form parse. she gains, he gets +1/+1, he loses … variants likewise resolve.
  • No regressions: full-corpus parser-gap sweep is unchanged at 3977 unsupported cards. The new split only fires on and he/she <verb> boundaries, which previously always produced Unimplemented, so it cannot alter a currently-working parse.
  • Test: added bare_and_clause_starts_on_gendered_pronoun_subjects next to the existing it/they boundary tests (positive verb-axis coverage + negative guards for non-continuous tails).
  • cargo check -p engine + cargo fmt clean.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Parse changes introduced by this PR · 1 card(s), 3 signature(s) (baseline: main e8244c78d4a9)

1 card(s) · ability/PutCounter · field duration: until end of turn

Examples: Machine Man, Model X-51

1 card(s) · ability/grant Flying · added: grant Flying (affects=self, duration=until end of turn, grants=grant Flying)

Examples: Machine Man, Model X-51

1 card(s) · ability/he · removed: he

Examples: Machine Man, Model X-51

1 card(s) had Oracle-text changes (errata/reprint) — excluded as non-parser.

…inuations

A bare gendered pronoun ("he"/"she") used as an Oracle-text subject refers to
the card itself (CR 109.3 + CR 201.4b). In a compound effect chain the clause-
boundary splitter (`starts_bare_and_clause_lower`) recognized the singular
anaphor "it <verb>" as a subject-predicate clause start but omitted the
gendered pronouns, so a conjunct like Machine Man, Model X-51's "... put a
+1/+1 counter on ~ and he gains flying until end of turn" fell through to the
imperative-only path and failed closed to `Effect::Unimplemented { name: "he" }`.

Add a composed `("he"|"she") × (gains|gets|has|loses|doesn't|can't|cannot)`
arm mirroring the singular "it" verb set (not the plural "they" arm, which
excludes P/T "get"). The split routes the conjunct through the subject-predicate
parser, where `parse_subject_application` already maps "he"/"she" to `SelfRef`.

Machine Man now parses to PutCounter(self) + a sub_ability granting Flying
(SelfRef, until end of turn). Full-corpus parser-gap sweep shows zero
regressions (3977 unsupported cards unchanged).
@davion-knight
davion-knight force-pushed the fix/gendered-pronoun-compound-continuation branch from 55c9ee3 to 5834b01 Compare July 9, 2026 15:29
@matthewevans matthewevans added the bug Bug fix label Jul 9, 2026
@matthewevans matthewevans self-assigned this Jul 9, 2026

@matthewevans matthewevans left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed current head 5834b01: the parser split is at the existing subject-predicate boundary seam, composes the pronoun and verb axes, keeps negative guards for non-continuous clauses, and the current parse-diff is limited to Machine Man gaining the intended Flying grant while removing the stale duration from the counter effect.

@matthewevans
matthewevans added this pull request to the merge queue Jul 9, 2026
@matthewevans matthewevans removed their assignment Jul 9, 2026
Merged via the queue into phase-rs:main with commit 2c07664 Jul 9, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parser: compound "and he/she <verb>" gendered-pronoun continuation strict-fails (Machine Man, Model X-51)

2 participants