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
I’m having a hard time figuring out what is and is not ambiguous in a grammar.
For instance, in the grammar below, the "-" (U+002D HYPHEN MINUS) character alone in the unsescaped_char rule makes the grammar ambiguous and the parser return three results.
I’m having a hard time figuring out what is and is not ambiguous in a grammar.
For instance, in the grammar below, the
"-"
(U+002D HYPHEN MINUS) character alone in theunsescaped_char
rule makes the grammar ambiguous and the parser return three results.Remove the
"-"
and the grammar becomes unambiguous. 🤔This can be seen in this BNF Playground example:
This parses as a unambiguous.
Now, lets add a simple
"-"
(U+002D HYPHEN MINUS) character to theunescaped_char
rule.Now the grammar is ambiguous and the parser returns three results!
Am I missing something ?
The text was updated successfully, but these errors were encountered: