-
Notifications
You must be signed in to change notification settings - Fork 660
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
Merge lexer support for ANSI-standard MUMPS #2089
base: master
Are you sure you want to change the base?
Conversation
…in string comparison test
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.
Some preliminary review, didn't get to the core parts as this is quite large. I think that by refactoring the lexer you will be able to simplify it enormously.
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.
A few more comments and I think we're good to go.
if re.search(r'^[%A-Za-z][A-Za-z0-9]* ;', text): | ||
return 0.3 | ||
if re.search(r'^[%A-Za-z][A-Za-z0-9]*\n', text): | ||
return 0.1 |
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.
Aren't there some more specific ways to recognize MUMPS? There patterns are very unspecific, it seems to me that they will trigger on many languages ...
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.
This is still an issue.
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.
True, I will work on finding some patterns that have better matching. The joys of old terse languages that existed on dedicated machines...
Creates a lexer, lexer tests, and example files for the MUMPS programming language, using the ANSI M standard.