When the current token is the catch token, we never reduce; we only ever shift (see the user's guide for how catch works). More precisely, the mechanism considers multiple situations in which the catch token can be shifted in parallel, including situations that are reachable via reductions. Hence it does not make sense to report shift/reduce conflicts involving the catch token: Error resumption mode will only ever try to shift it.
The solution implemented in this patch is not to generate conflicting LR'Reduce actions in the first place by deleting the catch token from the lookahead sets of LR1 items.
When the current token is the catch token, we never reduce; we only ever shift (see the user's guide for how
catch
works). More precisely, the mechanism considers multiple situations in which thecatch
token can be shifted in parallel, including situations that are reachable via reductions. Hence it does not make sense to report shift/reduce conflicts involving the catch token: Error resumption mode will only ever try to shift it.The solution implemented in this patch is not to generate conflicting
LR'Reduce
actions in the first place by deleting thecatch
token from the lookahead sets of LR1 items.