2 ms·
A good example of the kind of ambiguitiy I mean is the "dangling else" problem. Sure, for this example, the solution is easy - just declare whichever you want
by tomp 9y ago
A good example of the kind of ambiguitiy I mean is the "dangling else" problem.
Sure, for this example, the solution is easy - just declare whichever you want first! But in more complex grammars, conflicting rules can be declared very far away, and it can be highly non-obvious which should be prioritised, or that there even is a conflict! LR parser generators point out these conflicts (the infamous shift/reduce and reduce/reduce conflicts), which I find very useful.