You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the sql output of the lemon parser generator with the query shown bellow give us an EBNF understood by https://www.bottlecaps.de/rr/ui to generate railroad diagrams.
lemon -S zc-parse.lemon
select name || ' ::=' || group_concat(
case when hasOr == 1 then ' (' || trim(rtxt) || ')'
else
case when length(rtxt) == 0 then ' /* empty */' else rtxt end
end, '
|')
from (
select lhs, name, substr(txt, instr(txt, tbl.sep) + length(tbl.sep)) rtxt, (instr(txt, '|') > 0) hasOr
from rule left join symbol on lhs=id, (select '::=' as sep) tbl
) as t
group by lhs;
We can see a railroad diagram for the grammar in src/common/scripting/frontend/zcc-parse.lemon , copy and paste the EBNF shown bellow on https://www.bottlecaps.de/rr/ui in the tab Edit Grammar then switching to the tab View Diagram.
Using the sql output of the lemon parser generator with the query shown bellow give us an EBNF understood by https://www.bottlecaps.de/rr/ui to generate railroad diagrams.
We can see a railroad diagram for the grammar in
src/common/scripting/frontend/zcc-parse.lemon
, copy and paste the EBNF shown bellow on https://www.bottlecaps.de/rr/ui in the tab Edit Grammar then switching to the tab View Diagram.It can be made nicer if we add the tokens to it, see zephir-lang/php-zephir-parser#106
The text was updated successfully, but these errors were encountered: