-
Notifications
You must be signed in to change notification settings - Fork 711
Bqn lexer: lexer for the BQN array programming language #2472
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
Conversation
If it's almost a clone of APL, is there a way to make it a subclass of the APL lexer? (See https://pygments.org/docs/lexerdevelopment/#subclassing-lexers-derived-from-regexlexer) |
The languages are very similar in many ways, but most of the syntax is different. If we subclass the APL lexer there are only 4 rules that would be the same out of 19 as it stands currently. Is it possible to use the inherit special object in the root state but specify only a subset of rules to be inherited? The docs don't explain this from what I can find. If not, is there any point in sub classing as inherit will not be used at all? |
OK, if it's just 4 rules, never mind. |
All required changes have been committed but I am not sure about the mime-types, as this doesn't really apply to BQN. Thanks for your help @jeanas. |
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.
Changes are now completed for this PR
This is a pretty simple lexer based on the APL lexer. APL was the inspiration for BQN and the main differences are the unicode characters used for functions and BQN supports more features of other functional programming languages than APL.
The language documentation can be found at https://mlochbaum.github.io/BQN/doc/index.html
Thanks