-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Parser can't differentiate between ReplaceAll and Division (Times [ , Power]) #989
Comments
I have tracked this issue to the tokenizer (mathics/mathics/core/parser/tokenizer.py): in line 125: but for some reason, this produces a failure on the "contribute" routine in the mathics.builtin module. If someone can help me in defining a more sensible regular expression, I am trying to fix this in the branch https://github.com/mathics/Mathics/tree/fix-tokenized |
It might just be a simple lexing issue, and adjusting your regexp to lookahead and then backup, but... Robert Jacobson's FoxySheep parser has the same problem. And although in spirit it is the same, it works very differently. Is it really just From what I understand about the scanner and parser, I would not attempt to fix this without understanding more about how this all works and the subtleties. Getting more pure parsing tests in place and a framework for adding test case bugs like this would be useful first too. To get some idea as to the subtleties involved and how this works see this or the the readme in the FoxySheep repostiory. |
Thanks Rocky, I was aware of that. This was a headake for implementing the Information operator |
Take a look at this example.
Mathics:
Wolfram:
Not really a big problem, but is something that needs to be fixed eventually.
The text was updated successfully, but these errors were encountered: