Summary
In this chapter, you learned about the crucial technical skills and tools needed 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 to the tree built in the parser. You also learned how to check your trees and debug common tree construction problems.
You are done synthesizing the input source code to construct 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 what computations it specifies. This is done by walking through the parse tree using tree traversals to perform semantic...