-
-
Notifications
You must be signed in to change notification settings - Fork 55
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 SyntaxQ and add a new "String Tests" Section #1248
Conversation
messages = {"string": "String expected at position `1` in `2`."} | ||
|
||
summary_text = ( | ||
"test whether a string is as yntactically-correct a Mathics3 expression" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: syntactically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Should be fixed now.
BTW I don't know why this reminded me, but a long time ago I asked you in slack about packages that would be easy to get running. Your reply in slack history has been long removed. Do you remember what package or packages you mentioned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW I don't know why this reminded me, but a long time ago I asked you in slack about packages that would be easy to get running. Your reply in slack history has been long removed. Do you remember what package or packages you mentioned?
I only documented this one in the Wiki:
b005dbc
to
e8aa393
Compare
of a new "Testing Expressions" Guide Section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing that I think is missing here is to include some tests for SyntaxQ
There is a doctest for True and False. If there are other kinds of tests you'd like to see, please suggest them. Also, we probably have pretty extensive Syntax checks (or should add them elsewhere). Checking the scanner and parser here doesn't feel that right. |
OK, in that case, let's add them in another round. Merge this when you feel it is ready. |
There will indeed be more improvements down the line. We don't have SyntaxQ with a form. We don't have SyntaxLength implemented either. That tech-note class should be removed and the functions in that moved corresponding guide sections. However, this allows us the possibility of running PacletManager which was the motivation for doing this. |
SyntaxQ[]
mathics.eval
SyntaxQ[]
is used in the PacletManager.