Summary
In this chapter, you learned the crucial technical skills and tools used to build a syntax tree while the input program is being parsed. A syntax tree is the main data structure used to represent source code internally to a compiler or interpreter.
You learned how to develop code that identifies which production rule was used to build each internal node so that we can tell what we are looking at later on. You learned how to add tree node constructors for each rule in the scanner. You learned how to connect tree leaves from the scanner into the tree built in the parser. You learned how to check your trees and debug common tree construction problems.
You are done synthesizing the input source code to a data structure that you can use. Now, it is time to start analyzing the meaning of the program source code so that you can determine which computations it specifies. This is done by walking through the parse tree using tree traversals to perform semantic analysis.
The...