Recursive-descent parsers belong to the more general class of top-down (also called LL parsers), which were introduced in Chapter 4. In this chapter, we discuss top-down parsers in greater detail, analyzing the conditions under which such parsers can be reliably and automatically constructed from grammars. Our analysis builds on the algorithms and grammar-processing concepts presented in Chapter 4.
Top-down parsers are in theory not as powerful as the bottom-up parsers we study in Chapter 6. However, because of their simplicity, performance, and excellent error diagnostics, top-down parsers have been constructed for many programming languages, almost always using the recursive-descent approach. Such parsers are also convenient for prototyping relatively simple front-ends of larger systems that require a rigorous definition and treatment of the system's input.