Syntax diagram generation
See original GitHub issueSuggestion Provide a clear and concise description of what the problem is, what you want to happen.
How difficult would it be to add a generator of syntax diagrams for lark? Like this one: https://www.bottlecaps.de/rr/ui
Describe alternatives you’ve considered A clear and concise description of any alternative solutions or features you’ve considered.
I tried converting the lark
syntax into the EBNF convention they use for those diagrams. Doing a string replace of :
for ::=
gets you a long way, but the aliases and a few operators create problems. I was just wondering whether the internal representations of lark already provide an easy way to do something like that.
Additional context Add any other context or screenshots about the feature request here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (8 by maintainers)
Top GitHub Comments
Cool. If it works I’ll find somewhere in the codebase to add it.
I create a simple generator using railroad, which is a perfect fit for the lark Transformer way of work: https://github.com/MegaIng/lark-railroad. Results are useable, and include links from rules to each other.