Skip to content

gh-160284: Number each keyword once in the PEG generator - #160290

Merged
lysnikolaou merged 1 commit into
python:mainfrom
lysnikolaou:pegen-keyword-numbering
Oct 22, 2026
Merged

lysnikolaou merged 1 commit into
python:mainfrom
lysnikolaou:pegen-keyword-numbering

Conversation

@lysnikolaou

@lysnikolaou lysnikolaou commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

KeywordCollectorVisitor checked the quoted spelling of a keyword against keys stored without quotes, so the check never matched and every occurrence of a keyword in the grammar took a new token type. The 35 hard keywords were numbered between 500 and 721 instead of 500 to 534.

KeywordCollectorVisitor checked the quoted spelling of a keyword against
keys stored without quotes, so the check never matched and every
occurrence of a keyword in the grammar took a new token type. The 35
hard keywords were numbered between 500 and 721 instead of 500 to 534.
@lysnikolaou
lysnikolaou enabled auto-merge (squash) October 22, 2026 18:39
@lysnikolaou
lysnikolaou merged commit 0b8bb71 into python:main Oct 22, 2026
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants