Chapter 5:Semantic Analysis

Parse tree for 9-5+2

 

This slide shows the parse tree for the above grammar with the actions at the correct places (in red). The traversal for the given example 9-5+2 is self explanatory.