Chapter 18. Syntax-Directed Translation
Computer languages naturally tend to follow a hierarchical structure with multiple levels of context. We can define the legal syntax of such a language by writing a grammar that describes how elements of a language get broken down into subelements.
Syntax-Directed Translation uses this grammar to define the creation of a parser that can turn input text into a parse tree that mimics the structure of the grammar rules.
18.1 How It Works
If you’ve read any book on programming languages, you’ll have come across the ...