nvim-neorg / tree-sitter-norg2

Attempt at a second generation parser for the Norg format.
10 stars 1 forks source link

Grammar railroad diagram #4

Open mingodad opened 1 year ago

mingodad commented 1 year ago

Using this page https://meimporta.eu/tree-sitter/json2ebnf.html we can get a navigable railroad diagram for tree-sitter grammars like this project.

See also https://github.com/tree-sitter/tree-sitter/issues/2268 .

Cheers !

vhyrro commented 1 year ago

Sweet, @mingodad this is superb! Thanks for working on it. I was going to write an EBNF grammar soon anyway, but this just automates it entirely. Any plans to support just pure EBNF? Notation like # for hashtag characters and also '\' are some failure points if you try to plug it in to an EBNF parser instead of bottlecaps, alongside a few other issues :p

mingodad commented 1 year ago

You are right about some dirty conversions I did to be able to get something working to start with, now with time and help of people interested it can be improved (it's a standalone HTML/Javascript page).