Quiz solutions

1.

2. To avoid shift-reduce conflicts, prefer shift over reduce and/or create operator precedence rules. Set a rule to prefer the first of the rules with the same right-hand side to avoid reduce-reduce conflicts. Unambiguating the grammar can help with both types of conflicts.

3. Lookaheads can be used to correctly choose the rule when faced with a conflict.