Open mingodad opened 1 year ago
I'm working to achieve a LALR(1)/LEX to try grammars online with wasm based on https://github.com/BenHanson/gram_grep and I've got the Tameparse
grammar, view it here https://mingodad.github.io/parsertl-playground/playground/ select Tameparse parser (not working)
from the examples, you can edit the Grammar or the Input source and press Parse to see a parser tree.
I hope it can be a nice tool to experiment with LALR(1)/LEX grammars with instant feedback !
Would be nice if
tameparse
could also generate anEBNF
as understood by https://www.bottlecaps.de/rr/ui to generate railroad diagrams (https://en.wikipedia.org/wiki/Syntax_diagram).I extended
bison
,byacc
,lemon
andbtyacc
to do so and can be seen here https://github.com/mingodad/lalr-parser-test , alsoCocoR
here https://github.com/mingodad/CocoR-Java ,unicc
here https://github.com/mingodad/unicc , andpeg/leg
here https://github.com/mingodad/peg .Would be nice to have it output a consolidated
EBNF
to have a full global view of the final grammar because usage of inheritance can use several pieces to compose the final grammar.Bellow is a partial manual conversion of
TameParse/Language/definition.tp
to anEBNF
understood by https://www.bottlecaps.de/rr/ui .Copy and paste the
EBNF
shown bellow on https://www.bottlecaps.de/rr/ui on the tabEdit Grammar
the click on the tabView Diagram
to see/download a navigable railroad diagram.