-
-
Notifications
You must be signed in to change notification settings - Fork 414
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
Lark grammar? #391
Comments
There is a reference-quality grammar in ./examples: https://github.com/lark-parser/lark/blob/master/examples/lark.lark Do you think there is a benefit to making it formal? |
Yes, I think there should be a formal lark-grammar for lark. Mainly, so that I can apply it to the intellij-plugin I am developing and the theoretically planed linter I think about developing. |
Well, you can already use the grammar I linked to. It's correct and fairly comprehensive. |
There are some things in |
You're welcome to submit a PR that fixes lark.lark |
Sounds good. I wasn't sure which version was definitive. So, basically the loader is correct and the grammar should reflect what it does, right? While I'm at it, I'll take a look at the grammar reference documentation and make sure it agrees with the loader code. |
Yes, load_grammar.py is the "ground truth", for better or worse. |
PR #1388 submitted for my observations above, plus several others I found. |
Are there any plans to create a Lark grammar for Lark? The only file currently in lark/grammars is common.lark, which defines a few terminals.
The authoritative definition of Lark would logically be expressed as a grammar (as opposed to "what the grammar reference says" or "what the latest version of the code parses"). Note that RFC 5234 defines the ABNF grammar that authoritatively validates ABNF specifications.
The text was updated successfully, but these errors were encountered: