Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add list of box operators and operator-to-string #107

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion mathics_scanner/data/named-characters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# 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
121 changes: 0 additions & 121 deletions mathics_scanner/data/operators-additional.yml

This file was deleted.

134 changes: 67 additions & 67 deletions mathics_scanner/data/operators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,19 @@
# "non-associative-operators", "unknown" under the key "miscellaneous-operators",
# and None as "flat_binary_operators.
#
# box-operator
# ------------
#
# This field exists and is set true if the operator is used in boxing. Boxing
# operators are enclosed in \( \) pairs.
#
# operator
# --------
#
# This field exists for box-operators. In the future, we may expand to other operators.
# (Non box operators are listed in fields of named-characters.)
# It is the string vlaue for the operator.

# meaningful
# ---------
# This field "true" if WMA defines a meaning for the operator and "false" if not.
Expand Down Expand Up @@ -1911,13 +1924,12 @@ FormBox:
WolframLanguageData-corrected: 78
UnicodeCharacters.tr:
UnicodeCharacters-corrected.tr: 160
# N-tokens: {}
# L-tokens: {"\\`"}
# O-tokens: {}
usage: "expr1 \\ expr2"
operator: "\\`"
usage: ["\\(`input\\)", "\\(form\\`input\\)"]
arity: Binary
affix: Infix
associativity: "unknown"
box-operator: true
meaningful: true
# comments:

Expand All @@ -1928,13 +1940,12 @@ FractionBox:
WolframLanguageData-corrected: 31
UnicodeCharacters.tr:
UnicodeCharacters-corrected.tr: 590
# N-tokens: {}
# L-tokens: {"\/"}
# O-tokens: {}
usage: "\\( expr1 \/ expr2 \\)"
operator: "\/"
usage: "\\(x\/y\\)"
arity: Binary
affix: Infix
associativity: "unknown"
box-operator: true
meaningful: true
# comments:

Expand Down Expand Up @@ -2445,14 +2456,13 @@ InterpretedBox:
WolframLanguageData-corrected: None
UnicodeCharacters.tr: None
UnicodeCharacters-corrected.tr: None
# N-tokens: None
# L-tokens: None
# O-tokens: None
# usage: "None"
operator: "\\!"
# usage: "\\!\(...\)"
FullForm: None
arity: Binary
affix: Infix
arity: Unary
affix: Prefix
associativity: null
box-operator: true
meaningful: true
# comments: None

Expand Down Expand Up @@ -4511,13 +4521,12 @@ OverscriptBox:
WolframLanguageData-corrected: 7
UnicodeCharacters.tr:
UnicodeCharacters-corrected.tr: 790
# N-tokens: {}
# L-tokens: {"\&"}
# O-tokens: {}
# usage: "expr1 \& expr2"
operator: "\\&"
usage: "\\(x\\&y\\)"
arity: Binary
affix: Infix
associativity: "unknown"
box-operator: true
meaningful: true
# comments:

Expand All @@ -4528,12 +4537,11 @@ OverunderscriptBox:
WolframLanguageData-corrected: 7.5
UnicodeCharacters.tr:
UnicodeCharacters-corrected.tr: 785
# N-tokens: {}
# L-tokens: {"\&"}
# O-tokens: {"\%"}
# usage: "expr1", "\&", "expr2 \% expr3"
operator: ["\\+", "\\%"]
usage: "\\(x\\+y\\%z\\)"
arity: Ternary
affix: Infix
box-operator: true
associativity: "unknown"
meaningful: true
# comments:
Expand Down Expand Up @@ -5079,13 +5087,12 @@ RadicalBox:
WolframLanguageData-corrected: 22
UnicodeCharacters.tr:
UnicodeCharacters-corrected.tr: 640
# N-tokens: {"\@"}
# L-tokens: {}
# O-tokens: {"\%"}
# usage: "\@", "expr1 \% expr2"
operator: ["\\@", "\\%"]
usage: "\\(\\@x\\%n\\)"
FullForm:
arity: Binary
arity: Ternary
affix: Prefix
box-operator: true
associativity: right
meaningful: true
# comments:
Expand Down Expand Up @@ -5868,14 +5875,13 @@ SqrtBox:
WolframLanguageData-corrected: 22
UnicodeCharacters.tr: 650
UnicodeCharacters-corrected.tr: 640
# N-tokens: {"\@"}
# L-tokens: {}
# O-tokens: {}
# usage: "{{"\@", "expr"}}"
operator: "\\@"
usage: "\\(\\@x\\)"
FullForm:
arity: Unary
affix: Prefix
associativity: "unknown"
box-operator: true
meaningful: true
# comments:

Expand Down Expand Up @@ -6056,14 +6062,13 @@ SubscriptBox:
WolframLanguageData-corrected: 8
UnicodeCharacters.tr:
UnicodeCharacters-corrected.tr: 775
# N-tokens: {}
# L-tokens: {"\_"}
# O-tokens: {}
# usage: "expr1 \_ expr2"
operator: "\\_"
usage: "\\(x\\\_y\\)"
FullForm:
arity: Binary
affix: Infix
associativity: "unknown"
box-operator: true
meaningful: true
# comments:

Expand Down Expand Up @@ -6274,20 +6279,19 @@ SuperDagger:
meaningful: true
# comments:

SuperscriptBox:
SubSuperscriptBox:
precedence: 590
WolframLanguageData: 21
WolframLanguageData-corrected: 21
UnicodeCharacters.tr:
UnicodeCharacters-corrected.tr: 660
# N-tokens: {}
# L-tokens: {"\^"}
# O-tokens: {}
# usage: "expr1 \^ expr2"
operator: ["\_", "\\%"]
usage: "\\(x\_y\\%z\\)"
FullForm:
arity: Binary
arity: Ternary
affix: Infix
associativity: "unknown"
box-operator: true
meaningful: true
# comments:

Expand All @@ -6308,6 +6312,22 @@ Superset:
meaningful: false
# comments:

SuperscriptBox:
precedence: 590
WolframLanguageData: 21
WolframLanguageData-corrected: 21
UnicodeCharacters.tr:
UnicodeCharacters-corrected.tr: 660
operator: "\\^"
usage: "\\(x\\^_y\\)"
FullForm:
arity: Binary
affix: Infix
associativity: "unknown"
box-operator: true
meaningful: true
# comments:

SupersetEqual:
precedence: 250
WolframLanguageData:
Expand All @@ -6325,24 +6345,6 @@ SupersetEqual:
meaningful: false
# comments:

SupersubscriptBox:
Precedence-Function: 690
precedence: 590
WolframLanguageData: 21
WolframLanguageData-corrected: 21
UnicodeCharacters.tr:
UnicodeCharacters-corrected.tr: 660
# N-tokens: {}
# L-tokens: {"\^"}
# O-tokens: {"\%"}
# usage: "expr1", "\^", "expr2 \% expr3"
FullForm:
arity: Ternary
affix: Infix
associativity: right
meaningful: true
# comments:

TagSet:
Precedence-Function: 670
precedence: 40
Expand Down Expand Up @@ -6666,14 +6668,13 @@ UnderoverscriptBox:
WolframLanguageData-corrected: 7.5
UnicodeCharacters.tr:
UnicodeCharacters-corrected.tr: 785
# N-tokens: {}
# L-tokens: {"\+"}
# O-tokens: {"\%"}
# usage: "expr1", "\+", "expr2 \% expr3"
operator: ["\\+", "\\%"]
usage: "\\(x\\+y\\%z\\)"
FullForm:
arity: Ternary
affix: Infix
associativity: "unknown"
box-operator: true
meaningful: true
# comments:

Expand All @@ -6684,13 +6685,12 @@ UnderscriptBox:
WolframLanguageData-corrected: 7
UnicodeCharacters.tr:
UnicodeCharacters-corrected.tr: 790
# N-tokens: {}
# L-tokens: {"\+"}
# O-tokens: {}
usage: "expr1 \\+ expr2"
operator: "\\+"
usage: "\\(x\\+y\\)"
FullForm:
arity: Binary
affix: Infix
box-operator: true
associativity: "unknown"
meaningful: true
# comments:
Expand Down
Loading
Loading