Skip to content

Reject invalid %prec usage in rule definitions - #822

Open
ydah wants to merge 1 commit into
masterfrom
fix/parameterized-rule-precedence
Open

ydah wants to merge 1 commit into
masterfrom
fix/parameterized-rule-precedence

Conversation

@ydah

@ydah ydah commented Oct 21, 2026

Copy link
Copy Markdown
Member

%rule definitions set @prec_seen, but precedence validation and reset logic use different flags. Duplicate %prec directives were therefore silently accepted.

Track opening and trailing %prec using the same flags as ordinary rules. This restores the existing checks for duplicate or intermediate %prec and multiple actions after it.

Add regression coverage for %rule and %rule %inline, including valid opening precedence and state resets between alternatives and rules.

This branch has not been deployed

No deployments
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