Grammar railroad diagram #2269
Replies: 10 comments 2 replies
-
The mentioned HTML page is self contained and also I have it here https://github.com/mingodad/plgh/blob/main/json2ebnf.html just in case someone want to contribute any pull request. |
Beta Was this translation helpful? Give feedback.
-
This is spam. |
Beta Was this translation helpful? Give feedback.
-
Not really as I commented here mskelton/tree-sitter-mql5#11 (comment) . |
Beta Was this translation helpful? Give feedback.
-
You just sent the exact same comment to over 25 repositories. I understand being enthusiastic about your project, but this is not good behaviour. Just open an issue with |
Beta Was this translation helpful? Give feedback.
-
Thanks for your feedback ! |
Beta Was this translation helpful? Give feedback.
-
@mingodad I saw your mentions about your |
Beta Was this translation helpful? Give feedback.
-
I did an update to allow direct submit to https://www.bottlecaps.de/rr/ui and also added links to other parser related projects from the author (https://github.com/GuntherRademacher) of the railroad diagram generator. |
Beta Was this translation helpful? Give feedback.
-
Hello @Harrypotter19876 ! |
Beta Was this translation helpful? Give feedback.
-
I'm trying to build an online yacc/lex (LALR(1)) grammar editor/tester to help develop/debug/document grammars the main repository is here https://github.com/mingodad/parsertl-playground and the online playground with several non trivial examples is here https://mingodad.github.io/parsertl-playground/playground/ . Select a grammar/example from "Examples" select box and then click "Parse" to see a parser tree for the source in "Input source" editor. It's based on https://github.com/BenHanson/gram_grep and https://github.com/BenHanson/lexertl14 . Any feedback is welcome ! The grammars available so far (with varying state of correctness):
|
Beta Was this translation helpful? Give feedback.
-
I've just added From https://github.com/eatkins/tree-sitter-ebnf-generator/tree/master : Tree-sitter-ebnf-generator provides scripts that can convert files defined in an EBNF grammar into equivalent tree-sitter grammar.js dsl format and vice versa. The EBNF syntax is both more compact and readable than the tree-sitter js syntax and far more similar to published EBNF grammars for languages such as scala and lua which should make writing grammars more straightforward and less error prone. The extended EBNF format defined in this project supports all of the features in the tree-sitter js DSL. The examples directory shows how the ebnf format can be used to generate tree-sitter grammars for a language. The lua language context free grammar can be found here along with its generated tree-sitter grammar. Similarly, scala language context free grammar can be found here along with its generated tree-sitter grammar. All syntactical elements in the lua and scala grammars can be converted to the tree-sitter grammar. |
Beta Was this translation helpful? Give feedback.
-
I started a small attempt to generate an
EBNF
compatible with https://bottlecaps.de/rr/ui to be generated from thegrammar.json
you can see/play with it here https://mingodad.github.io/plgh/json2ebnf.html .It already does a good job on most grammars but it can still be improved and any feedback is welcome.
You can choose any of the grammars listed in https://github.com/tree-sitter/tree-sitter/blob/master/docs/index.md through the
select
element or enter theurl
to the rawgrammar.json
to get it converted.Cheers !
Beta Was this translation helpful? Give feedback.
All reactions