Open mingodad opened 2 years ago
When trying to add this project grammar to https://mingodad.github.io/parsertl-playground/playground/ I found that it contains several conflicts:
bison-nb -v urweb.y
urweb.y: warning: 76 shift/reduce conflicts [-Wconflicts-sr]
urweb.y: warning: 23 reduce/reduce conflicts [-Wconflicts-rr]
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
src/urweb.grm
: