Chapter 21. Recursive Descent Parser by Rebecca Parsons

Create a top-down parser using control flow for grammar operators and recursive functions for nonterminal recognizers.

image

Many DSLs are quite simple as languages. While the flexibility of external languages is appealing, using a Parser Generator to create a parser introduces new tools and languages into a project, complicating the build process.

A Recursive Descent Parser supports the flexibility of an external DSL without requiring a Parser Generator. The Recursive Descent Parser can be implemented in whatever general-purpose language one chooses. It uses control flow operators to implement ...

Get Domain Specific Languages now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.