Open mingodad opened 2 years ago
I've also added LunarML
grammar to https://mingodad.github.io/parsertl-playground/playground/ and Yacc/Lex
compatible online editor/tester (select LunaML parser (partially working)
from examples then click Parse
to view a parse tree for the content in Input source
).
There is some lexer definitions missing, pull requests are welcome !
Using a bit of Lua like string pattern replacements and adding the tokens from the lexer manually to obtain an EBNF understood by https://www.bottlecaps.de/rr/ui we can have a nice railroad diagram (https://en.wikipedia.org/wiki/Syntax_diagram).
Copy and paste the EBNF shown bellow on https://www.bottlecaps.de/rr/ui in the tab "Edit Grammar" then switch to the tab "View Diagram".
Script that transformed the grammar: