-
Notifications
You must be signed in to change notification settings - Fork 39
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
Consider generating the grammar.js from the official language spec #36
Comments
I think that would be great if it works well. I can help review. However note that this might be difficult since the tree sitter grammar is a different sort of grammar. |
That makes sense. The main thing we could run into is the deep nesting discussed at https://tree-sitter.github.io/tree-sitter/creating-parsers#structuring-rules-well. I think this can be avoided by having rules that solely exist as choices between non-terminal simply not appear in the AST. |
I like the idea, right now I'm working on making the grammar conform more closely to the Antler spec that is checked into the dart sdk repo. After that, we can figure out whether we still want to migrate to a generator. The main problem with be figuring out the rule conflicts to insert. |
@TzviPM if you're not actively working on this, should we close the PR? As tim said, looks cool but I think there would be a bit too many conflicts atm. |
I have to personal attachment to it, yeah. Feel free to close |
Would you be open to a contribution that generates the grammar.js from the .tex file of the official specification in the dart/language repo?
The text was updated successfully, but these errors were encountered: