Open expipiplus1 opened 1 year ago
I think that the disambiguation work would be a good solution here. It's not an exact fix, but it solves the combinatorial explosion, and one could even make their expression type something like Unique Expr | Plural Int
I'm parsing an ambiguous grammar and I'd like to distinguish the following cases (more quickly than dealing with a list of all results):
The use case is being able to tell the user: "Hey, you gave me ambiguous input, here are some places to check for ambiguity". Giving them 20000 results isn't helpful, especially as any large number is bound to be the result of some combinatorial explosion, and solving one ambiguity makes good progress.
I had a quick go at modifying
fullParses
in a few ways to prompt an earlier return but there wasn't a quick "no-understanding" fix.