Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The three most common situations that produce shift/reduce conflicts are expression grammars, if/then/else, and nested lists of items. After we see how to identify these three situations, we’ll look at ways to get rid of the conflicts.
Our first example is adapted from the original 1975 Unix yacc manual.