Next: The if-then-else Solution
Up: No Title
A standard problem in parsing is the if-then-else:
reports a shift-reduce conflict. It resolves in favor of shifting,
which is what we want.
- Give ELSE higher priority than the production:
precedence left ELSE.
- Tell JavaCUP on the command line to expect one conflict:
- Fix the grammar properly!