rocky / foxysheep2 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from rljacobson/foxysheep
Mathematica Language Parser/Translator
License: BSD 2-Clause "Simplified" License
This project forked from rljacobson/foxysheep
Mathematica Language Parser/Translator
License: BSD 2-Clause "Simplified" License
My deep dive into Mathematica's operators and characters occurred after the last commit to the lexer. I would not trust the Letter
and Letterlike
lists to be 100% complete, nor do I think I included all named characters. I might be missing a small number of obscure operators, too.
More information that you probably want: What is really amazing is, determining membership in the set of Mathematica LetterLike
characters is an open problem. Or more accurately, which of the valid Unicode characters Mathematica accepts as a valid variable name is an open question. There are a few reasons for this:
One strategy is to use the undocumented Mathematica system file UnicodeCharacters.tr
, which contains data about most characters. Another strategy is to use the output of one of the built-in functions.
An example of inconsistent behavior:
In[1]:= isLetter[char_]:= StringMatchQ[char, LetterCharacter]
In[2]:= isLetter["\[RawEscape]"]
Out[2]= True
In[3]:= LetterLikeQ["\[RawEscape]"]
Out[3]= False
In[4]:= isLetter["\[BlackKing]"]
Out[4]= False
In[5]:= LetterLikeQ["\[BlackKing]"]
Out[5]= LetterLikeQ[โ]
(* ?!? Remains unevaluated. *)
In[8]:= \[BlackKing] = 7
Out[8]= 7
In[9]:= \[BlackKing]^2
Out[9]= 49
So LetterLike
and "can be used as a variable" are distinct concepts. The output of these functions might change from version to version as well.
Document or describe the different flavors of Mathematica? (InputForm/FullForm dimension, notebook/cloud/.. platform)
In particular what's changed between releases. As an example for something similar, be See Section 4 page 166 of http://rocky.github.io/elisp-bytecode.pdf
Ideally, variants of the grammar would exist. I just googled to see if ANTL4 has includes. Not directly, but see https://stackoverflow.com/questions/56289605/how-to-implement-include-files-in-antlr/63280459#63280459
i get this error on running the binary
Traceback (most recent call last):
File "/home/antineutrino/.local/bin/foxy-sheep", line 5, in <module>
from FoxySheep.__main__ import main
File "/home/antineutrino/.local/lib/python3.7/site-packages/FoxySheep/__init__.py", line 13, in <module>
from FoxySheep.emitter.full_form import FullFormEmitter, input_form_to_full_form
ModuleNotFoundError: No module named 'FoxySheep.emitter'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.