From 7fc117f6d2b98040875947793dba9e4b299292a5 Mon Sep 17 00:00:00 2001 From: rocky Date: Fri, 30 Aug 2024 12:50:40 -0400 Subject: [PATCH] More operator information --- mathics_scanner/data/OperatorTable.csv | 2 +- mathics_scanner/data/operators-additional.yml | 77 +++++++++++++++++-- mathics_scanner/data/operators.yml | 70 +++++++++++++---- 3 files changed, 127 insertions(+), 22 deletions(-) diff --git a/mathics_scanner/data/OperatorTable.csv b/mathics_scanner/data/OperatorTable.csv index b8d7d03..1d81468 100644 --- a/mathics_scanner/data/OperatorTable.csv +++ b/mathics_scanner/data/OperatorTable.csv @@ -57,7 +57,7 @@ PartialUnderscriptBox,PartialUnderscriptBox,950,670,710,,7,,790,{},"{""""}",{ UnderscriptBox,Underscript,950,670,710,7,7,,790,{},"{""\+""}",{},"{{""expr1"", ""\+"", ""expr2""}}","{""UnderscriptBox"", ""["", ""expr1"", "","", ""expr2"", ""]""}",,Binary,Infix,"Missing[""Unknown""]",True, OverunderscriptBox,Underoverscript,940,670,700,7,7.5,,785,{},"{""\&""}","{""\%""}","{{""expr1"", ""\&"", ""expr2"", ""\%"", ""expr3""}}","{""UnderoverscriptBox"", ""["", ""expr1"", "","", ""expr3"", "","", ""expr2"", ""]""}",,Ternary,Infix,"Missing[""Unknown""]",True, UnderoverscriptBox,Underoverscript,940,670,700,7,7.5,,785,{},"{""\+""}","{""\%""}","{{""expr1"", ""\+"", ""expr2"", ""\%"", ""expr3""}}","{""UnderoverscriptBox"", ""["", ""expr1"", "","", ""expr2"", "","", ""expr3"", ""]""}",,Ternary,Infix,"Missing[""Unknown""]",True, -InterpretBoxes,None,930,670,695,,7.6,,780,"{""\*""}",{},{},"{{""\*"", ""expr""}}",,,Unary,Prefix,Right,True, +InterpretationBox,None,930,670,695,,7.6,,780,"{""\*""}",{},{},"{{""\*"", ""expr""}}",,,Unary,Prefix,Right,True, PartialSubscriptBox,PartialSubscriptBox,920,670,690,,8,,775,{},"{""""}",{},"{{""expr"", """"}}","{""FractionBox"", ""["", ""expr"", "",""\["", ""Placeholder"", ""]""]""}",,Unary,Postfix,Left,False,This operator is an invisible Unicode character and is used in the layout of displayed expressions. SubscriptBox,Subscript,920,670,690,8,8,,775,{},"{""\_""}",{},"{{""expr1"", ""\_"", ""expr2""}}","{""SubscriptBox"", ""["", ""expr1"", "","", ""expr2"", ""]""}",,Binary,Infix,"Missing[""Unknown""]",True, SubsuperscriptBox,Subsuperscript,920,670,690,8,8,,775,{},"{""\_""}","{""\%""}","{{""expr1"", ""\_"", ""expr2"", ""\%"", ""expr3""}}","{""SubsuperscriptBox"", ""["", ""expr1"", "","", ""expr2"", "","", ""expr3"", ""]""}",,Ternary,Infix,"Missing[""Unknown""]",True, diff --git a/mathics_scanner/data/operators-additional.yml b/mathics_scanner/data/operators-additional.yml index c072a77..8a26fbb 100644 --- a/mathics_scanner/data/operators-additional.yml +++ b/mathics_scanner/data/operators-additional.yml @@ -3,8 +3,52 @@ # Note: we keep the misspelling of "meaningfull" # and the uncoverted types like None and True -Postfix: - name: Postfix +Derivative: + name: Derivative + actual-precedence: 770 + Precedence: 670 # CSV has 604 which is wrong + Precedence-Function: 670 + WolframLanguageData: 19 + WolframLanguageData-corrected: 19 + UnicodeCharacters.tr: + UnicodeCharacters-corrected.tr: 680 + # N-tokens: {} + # L-tokens: {"''"} + # O-tokens: {} + # usage: {{"expr", "''"}} + # parse: {"Derivative", "[", "n", "]", "[", "expr", "]"} + # FullForm: Derivative[n][expr] + arity: Unary + affix: Postfix + associativity: left + meaningfull: "true" + # comments: + +# This operator is a little sketchy +Information: + name: Information + actual-precedence: 670 + Precedence: 670 + Precedence-corrected: 670 + WolframLanguageData: null + WolframLanguageData-corrected: + UnicodeCharacters.tr: + UnicodeCharacters-corrected.tr: + # N-tokens: + # L-tokens: + # O-tokens: + # usage: "?? AddTo" + # parse: {"Information", "[", "AddTo", "]"} + # FullForm: Information[AddTo] + arity: Binary + affix: Infix + associativity: None + meaningfull: "true" + # comments: + +# This operator is a little sketchy +InterpretedBox: + name: InterpretedBox actual-precedence: 670 Precedence: 670 Precedence-corrected: 670 @@ -15,7 +59,7 @@ Postfix: # N-tokens: # L-tokens: # O-tokens: - # usage: {{"expr", "//", "FormName"}} + # usage: "\! \(2+2\)" # parse: {"FullForm", "[", "expr1", "]"} # FullForm: FullForm[expr] arity: Binary @@ -24,8 +68,8 @@ Postfix: meaningfull: "true" # comments: -Prefix: - name: Prefix +Postfix: + name: Postfix actual-precedence: 640 Precedence: 640 Precedence-corrected: 640 @@ -36,7 +80,7 @@ Prefix: # N-tokens: # L-tokens: # O-tokens: - # usage: {{"expr", "//", "FormName"}} + usage: "expr // FormName" # parse: {"FullForm", "[", "expr1", "]"} # FullForm: FullForm[expr] arity: Binary @@ -44,3 +88,24 @@ Prefix: associativity: None meaningfull: "true" # comments: + +Prefix: + name: Prefix + actual-precedence: 640 + Precedence: 640 + Precedence-corrected: 640 + WolframLanguageData: null + WolframLanguageData-corrected: + UnicodeCharacters.tr: + UnicodeCharacters-corrected.tr: + # N-tokens: + # L-tokens: + # O-tokens: + usage: "expr1 @ expr2" + # parse: {"expr1", "[", "expr2", "]"} + # FullForm: expr1[expr2] + arity: Binary + affix: Infix + associativity: None + meaningfull: "true" + # comments: diff --git a/mathics_scanner/data/operators.yml b/mathics_scanner/data/operators.yml index d3c7731..7ca4b42 100644 --- a/mathics_scanner/data/operators.yml +++ b/mathics_scanner/data/operators.yml @@ -1,4 +1,4 @@ -# Autogenerated from operator_csv_to_yaml.py on 2024-08-30 11:18:52.480021 +# Autogenerated from operator_csv_to_yaml.py on 2024-08-30 13:14:29.557630 # Information about Wolfram Language named operators. # This information comes from Robert L. Jacobson's Table of Wolfram @@ -1103,22 +1103,22 @@ Derivative: name: Derivative actual-precedence: 770 Precedence-Function: 670 - precedence: 604 + precedence: None WolframLanguageData: 19 WolframLanguageData-corrected: 19 - UnicodeCharacters.tr: + UnicodeCharacters.tr: None UnicodeCharacters-corrected.tr: 680 - # N-tokens: {} - # L-tokens: {"''"} - # O-tokens: {} - # usage: {{"expr", "''"}} - # parse: {"Derivative", "[", "n", "]", "[", "expr", "]"} - FullForm: Derivative[n][expr] + # N-tokens: None + # L-tokens: None + # O-tokens: None + # usage: None + # parse: None + FullForm: None arity: Unary affix: Postfix associativity: left meaningful: true - # comments: + # comments: None Diamond: name: Diamond @@ -2677,6 +2677,26 @@ Increment: meaningful: true # comments: +Information: + name: Information + actual-precedence: 670 + precedence: 670 + WolframLanguageData: None + WolframLanguageData-corrected: None + UnicodeCharacters.tr: None + UnicodeCharacters-corrected.tr: None + # N-tokens: None + # L-tokens: None + # O-tokens: None + # usage: None + # parse: None + FullForm: None + arity: Binary + affix: Infix + associativity: null + meaningful: true + # comments: None + InlinePart: name: InlinePart actual-precedence: 900 @@ -2718,7 +2738,7 @@ Integrate: meaningful: true # comments: -InterpretBoxes: +InterpretationBox: name: None actual-precedence: 930 Precedence-Function: 670 @@ -2739,6 +2759,26 @@ InterpretBoxes: meaningful: true # comments: +InterpretedBox: + name: InterpretedBox + actual-precedence: 670 + precedence: 670 + WolframLanguageData: None + WolframLanguageData-corrected: None + UnicodeCharacters.tr: None + UnicodeCharacters-corrected.tr: None + # N-tokens: None + # L-tokens: None + # O-tokens: None + # usage: None + # parse: None + FullForm: None + arity: Binary + affix: Infix + associativity: null + meaningful: true + # comments: None + Intersection: name: Intersection actual-precedence: 390 @@ -5528,8 +5568,8 @@ PlusMinus: Postfix: name: Postfix - actual-precedence: 670 - precedence: 670 + actual-precedence: 640 + precedence: 640 WolframLanguageData: None WolframLanguageData-corrected: None UnicodeCharacters.tr: None @@ -5537,7 +5577,7 @@ Postfix: # N-tokens: None # L-tokens: None # O-tokens: None - # usage: None + # usage: expr // FormName # parse: None FullForm: None arity: Binary @@ -5697,7 +5737,7 @@ Prefix: # N-tokens: None # L-tokens: None # O-tokens: None - # usage: None + # usage: expr1 @ expr2 # parse: None FullForm: None arity: Binary