Skip to content

Merge lexer support for ANSI-standard MUMPS#2089

Open
saint-erk wants to merge 259 commits intopygments:masterfrom
saint-erk:ansi-mumps
Open

Merge lexer support for ANSI-standard MUMPS#2089
saint-erk wants to merge 259 commits intopygments:masterfrom
saint-erk:ansi-mumps

Conversation

@saint-erk
Copy link
Copy Markdown

Creates a lexer, lexer tests, and example files for the MUMPS programming language, using the ANSI M standard.

Copy link
Copy Markdown
Contributor

@jeanas jeanas left a 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.

@jeanas jeanas added the update needed Waiting for an update from the PR/issue creator label Mar 21, 2022
@jeanas jeanas removed the update needed Waiting for an update from the PR/issue creator label Jun 28, 2022
Copy link
Copy Markdown
Contributor

@jeanas jeanas left a 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.

Comment on lines +56 to +59
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
Copy link
Copy Markdown
Contributor

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 ...

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Author

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants