-
Notifications
You must be signed in to change notification settings - Fork 16
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
Easier/cleaner way to write tree-sitter grammar #118
Comments
Unfortunately, this repo has been archived for three years. While it may serve us to tweak the grammar once-a-while, for a long-running and continuous development like V, we need a sustainable and well supported toolchain in order to rely upon the solutions |
The code isn't big and I already did several fixes to it but a real parser would be better. |
In the long term, we should ditch tree-sitter completely, and use pure V imho. Because of Tree Sitter, this project uses V, C, and JS, and the relationships between them are unclear and easy to forget. It also uses a git submodule for tree-sitter, an improvement over the previous state, where you had to clone its repo separately and then keep it synchronized manually. However, it still complicates daily operations and requires a separate build process. From a maintenance point of view, it would have been much simpler to use a single language for all of it. |
I do not see how adding Lua to the mix will simplify things. |
The simplification is on the grammar used to write a tree-sitter grammar the fact that the one pointed here is implemented in Lua is a implementation detail. |
Describe the feature
Here https://mingodad.github.io/lua-wasm-playground/ there is an easier/cleaner way to write tree-sitter grammars like
V
(selectTree-sitter-ebnf-generator-V
fromExamples
then clickRun
to see a full commented outgrammar.js
from theEBNF
variant describng the grammar inInput Text (arg[1])
).I hope it can be helpful !
Use Case
Less work and better communication of the intent.
Other Information
No response
The text was updated successfully, but these errors were encountered: