Skip to content

Stop creating symbol tokens in RuleBuilder - #836

Merged
yui-knk merged 5 commits into
ruby:masterfrom
yui-knk:codex/store-symbol-ids-in-rules
Oct 31, 2026
Merged

yui-knk merged 5 commits into
ruby:masterfrom
yui-knk:codex/store-symbol-ids-in-rules

Conversation

@yui-knk

@yui-knk yui-knk commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Represent symbol names and lexical kinds in Grammar::Symbol::Id.
Use these values for grammar symbols, type declarations, and
unresolved rule sides.

Keep source locations separately for rule references and nonterminal
definitions so errors still point to the input. Validate character
literals in the lexer and reject unsupported symbol token types
when converting to IDs.
Represent generated parameterized and midrule action symbols with Grammar::Symbol::Id. Keep source locations and LHS aliases separately so rule construction and reference resolution retain their behavior.
Update parser spec expectations to construct symbol IDs directly and remove the token-to-ID conversion from the matcher.
Move the duplicate symbol_id helper from individual specs into RSpecHelper.
@yui-knk
yui-knk merged commit 4c9da2f into ruby:master Oct 31, 2026
23 checks passed
@yui-knk
yui-knk deleted the codex/store-symbol-ids-in-rules branch October 31, 2026 13:28
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