-
Notifications
You must be signed in to change notification settings - Fork 705
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
Lexer for new language Maxima #1885
Conversation
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! I found a few minor things, please check the review comments.
* New lexer class MaximaLexer * Update _mapping.py to include Maxima lexer * New test input file maxima/foo.mac I find that the commands $ python3 -m pygments -O full -f html -o /tmp/foo.html tests/examplefiles/maxima/foo.mac $ python3 -m pygments -x -l pygments/lexers/maxima.py:MaximaLexer tests/examplefiles/maxima/foo.mac both produce expected output.
Commit output from pytest tests/examplefiles/maxima --update-goldens as obtained by Cameron Smith.
all at once, instead of capturing each character separately. Update expected output for example input file, as produce by: $ pytest tests/examplefiles/maxima --update-goldens
instead of just calling them Text.
as Punctuation instead of Text.
…gs such as operators via the words function, instead of a long regex with alternation. Incidentally update the example output, for which one symbol (namely "done") has changed classification.
…e output accordingly.
so integers are more accurately identified. Update test example output accordingly.
Include additional test input for floats and update expected output.
(1) adjust package name underline (2) put in copyright notice
Hi @Anteru I'm sorry for the bother, but can I ask you to review this PR again? I made the changes you requested (and some other improvements as well). |
I'll take another look this weekend. Please keep in mind that the next release will be in 2-3 months so it'll be a while until you'll see this packaged in a PyPI release. |
Sounds good, you can let me know how it goes. There's no hurry, I just want to make sure the wheels are in motion. Thanks a lot for your help. |
Merged, thanks a lot! |
This PR implements a Pygments lexer for Maxima, a computer algebra system. See: https://maxima.sourceforge.io
The Maxima lexer is derived from the lexer for MuPAD, another computer algebra system.
The PR contains the lexer implementation and an example input, foo.mac, and its expected output from pytest --update-goldens.