-
An LR parser can be constructed to recognize virtually all programming language constructs for which a CFG can be written.
-
The LR parsing method is the most general, nonbacktracking shift-reduce method known. Yet it can be implemented as efficiently as any other method.
-
The class of grammars that can be parsed by using the LR method is a proper superset of the class of grammars that can be parsed with a predictive parser.
-
The LR parser can quickly detect a syntactic error via the left-to-right scanning of input.
The main drawback of the LR method is that it is too much work to construct an LR parser by hand for a typical programming language grammar. But fortunately, many LR parser generators are available that automatically generate the required LR parser.