Closed PhilippSalvisberg closed 1 month ago
It seems that you do not need the +
in | dataType (LSQB RSQB)+
.
It seems that you do not need the
+
in| dataType (LSQB RSQB)+
.
No, the +
is required. The result looks good when "Direct recursion elimination" is disabled. I'd expect a single path also when enabling "Direct recursion elimination".
The +
is not required the left recursive rule | dataType LSQB RSQB
already mean a dataType
followd by one or more LSQB RSQB
.
The
+
is not required the left recursive rule| dataType LSQB RSQB
already mean adataType
followd by one or moreLSQB RSQB
.
Oh you are correct @mingodad. I haven't seen that.
Based on the comment of @mingodad I think the visualization is correct. Enabling "Direct recursion elimination" just showed a flaw in the grammar.
I'm closing this issue. Thanks @mingodad.
Thanks for this excellent tool. I use it to visualize a SQL grammar. Here's a small excerpt of the grammar to reproduce the problem:
I use the following settings with the current version (8773d49e0d0dff4767ac094bfeb28c56d4a35e25) of the master branch.
The result looks like this:
I highlighted the duplicate path.
The result looks good when I disable the "Direct recursion elimination" option. Like this:
Disabling the option as a workaround is good enough for me.