Shift-reduce conflicts in LR parsers

S. D. Pezaris · ACM SIGPLAN Notices · 1989

In this note, the shift-reduce conflicts of LR(1) and LR(0) are compared. It is concluded that, if LR(1) has no shift-reduce conflicts, or, if the LR(1) shift-reduce conflicts are resolved in favor of the shift, then all shift-reduce conflicts of the corresponding LR(0) can be correctly resolved by the simple rule: resolve in favor of the shift. With this resolution, LR(0) is adequate for parsing the C grammar.

Read the paper · More papers on PaperTik