Repository navigation
Mark EmptySmallCircle, EmptySet and eight other shapes as letter-like - #182
Merged
rocky merged 1 commit intoOct 16, 2026
Merged
Conversation
WMA documents EmptyCircle, EmptyDiamond, EmptyDownTriangle, EmptyRectangle, EmptySet, EmptySmallCircle, EmptySmallSquare, EmptySquare, EmptyUpTriangle and FilledDiamond as "Letter-like form" (e.g. EmptySmallCircle: "Not the same as the infix operator \[SmallCircle]"). Here they were neither letter-like nor operators, so the tokeniser rejected them: Infix[t, \[EmptySmallCircle]] was a syntax error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
LGTM - thanks for finding this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WMA documents these named characters as "Letter-like form":
\[EmptyCircle]\[EmptyDiamond]\[EmptyDownTriangle]\[EmptyRectangle]\[EmptySet]\[EmptySmallCircle]\[SmallCircle]")\[EmptySmallSquare]\[EmptySquare]\[EmptyUpTriangle]\[FilledDiamond]In
named-characters.ymlthey hadis-letter-like: falseand are not operators either, so the tokeniser rejected them wherever they appeared. For example, in Mathics3:This PR sets
is-letter-like: truefor these ten characters.A wider note: about 215 named characters are currently neither letter-like nor operators, so they can't be used in an expression. Many of them are legitimately so (spaces,
Raw*characters, brackets), but some others may also be letter-like in WMA (e.g.Euro,Cent, the chess pieces). I only changed the ten above, which I checked one by one against the WMA reference pages.Tests:
test_letterlike_geometric_shapesintest/test_tokeniser.py.🤖 Generated with Claude Code