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
@builtin "whitespace.ne"
d -> a
a -> b _ "&"
| b
b -> letter
| "(" _ d _ ")"
letter -> [a-z]
when run using nearley-test on (x), generates two (identical) parses [ [ [ '(', null, [ [ [ [ 'x' ] ] ] ], null, ')' ] ] ]. Since the above grammar is unambiguous, this is unexpected.
Notice that this does not occur if you omit the rule a -> b _ "&", which does not appear in the derivation, and this is even more unexpected. It has to do with the order of prediction.
I am preparing a pull request that suggests a fix.
The text was updated successfully, but these errors were encountered:
The following grammar:
when run using nearley-test on
(x)
, generates two (identical) parses[ [ [ '(', null, [ [ [ [ 'x' ] ] ] ], null, ')' ] ] ]
. Since the above grammar is unambiguous, this is unexpected.Notice that this does not occur if you omit the rule
a -> b _ "&"
, which does not appear in the derivation, and this is even more unexpected. It has to do with the order of prediction.I am preparing a pull request that suggests a fix.
The text was updated successfully, but these errors were encountered: