-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Description
I thought if it is possible to create disambiguation operators, see
- https://goccmack.github.io/posts/2020-05-31_gogll/#disambiguating-the-parse-forest
- https://spoofax.dev/references/sdf3/disambiguation/
And I realized that priority (or precedence) should be possible to express with ordered choice (from PEG):
<E> = <"("> E <")"> / or / and / id
and = E <"&"> E
or = E <"|"> E
id = #"\w+"And it gives correct result for insta/parse. But when I use insta/parses (s). It gives me both trees as if I was using | instead of /. There are only two possible trees for a|b&c.
So I wonder why? And wouldn't it be beneficial (for memory/performance) to throw away second tree?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels