-
Notifications
You must be signed in to change notification settings - Fork 634
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 lexer for Promela #2620
Add lexer for Promela #2620
Conversation
(Another potential pygments contributor here...) |
Well, we (maintainers) update it ourselves; we don't ask contributors to do this. (But thank you for taking a look at the PR.) |
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
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.
Looks OK. Since it seems this language can contain embedded C, shouldn't 'types'
and 'keywords'
have an inherit
at the end to also highlight C types/keywords?
Promela does not have all the types and keywords of C. Only the ones I specified, so |
Sorry for the delay. Thanks for your contribution! |
This pull request adds a lexer for Promela. (https://spinroot.com/spin/whatispin.html)
Promela (Process Meta Language) is a C-like language used by SPIN to formally model software and hardware systems. SPIN (Simple Promela Interpreter) was originally developed in the 1980s at Bell Labs and since 1991 has been open-source and is a popular formal methods tool.
Pygments already supports other popular formal methods languages, including Isabelle, Coq, and NuSmv. Promela would be a fitting addition.
I have not included test snippets since PromelaLexer is derived from CLexer, though I have tested that it produces correct highlighting on a few of my own Promela files.Edit: I added snippets and examplefiles and rantox -e check
andtox -e mapfiles
which both succeeded.