Skip to content

Commit

Permalink
Add rljacobson's heursitic on Unicode (#78)
Browse files Browse the repository at this point in the history
* Add rljacobson's heursitic on Unicode

* Some small corrections
  • Loading branch information
rocky authored Sep 17, 2024
1 parent 23c1367 commit 9cc2050
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions mathics_scanner/data/named-characters.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Information about Wolfram Language named characters, indexed by
# their fully qualified names.
# Information about Wolfram Language Named Characters.
# See https://reference.wolfram.com/language/tutorial/InputAndOutputInNotebooks.html#4718

# Heuristics to consider in adding a Named Character.
# ===================================================

# 1. Unicode symbols used by Mathematica that are not in the Unicode Private Use Area are the same in Mathics3
# 2. Unicode symbols that correspond semantically with existing mathematical symbols are included. Example: − (U+2212, "Minus Sign")
# is an alias for ASCII - even though Mathematica does not consider it so.
# 3. Unicode symbols outside of the Mathematical Operators Block (and the ASCII block) should be excluded unless one of the previous
# heuristics includes it. Example: ✕ (U+2715, "Multiplication X") can be used for Times but is in the Dingbats Block and is thus excluded.
# 4. All typographical variants of "plain"/"regular" symbols are be excluded unless included by a previous heuristic.
# For example, all Full Width variants, bold variants, italic variants, and so forth are excluded.
# 5. Unicode symbols cannot be overloaded, i.e. should not be used for more than one underlying function.
# For example, ≫ (U+226B, "Much Greater-Than") is already used for GreaterGreater and therefore should not be an alias for >> for Put.
# Likewise, ≪ (U+226A, "Much Less-Than") for Get, ∷ (U+2237, "Proportion") for MessageName, etc.

#
# Field definitions
# =================
Expand Down
2 changes: 1 addition & 1 deletion mathics_scanner/data/operators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# WolframLanguageData: a "PrecedenceRanks" value returned using:
# WolframLanguageData[*operator_name*, "PrecedenceRanks"]
# Example:
# In[1] := WolframLanguageData[AddTo, "PrecedenceRanks"]
# In[1] := WolframLanguageData["AddTo", "PrecedenceRanks"]
# Out[1]= {{expr1 +=expr2 , AddTo[expr1 ,expr2]} -> 73
#
# Note that 73 uses a diffrent precedence scheme than the one
Expand Down

0 comments on commit 9cc2050

Please sign in to comment.