Abstract Syntax Tree
. Condensed form of parse tree,
. useful for representing language constructs.
. The production S if B then s1 else s2
may appear as
In the next few slides we will see how abstract syntax trees can be constructed from syntax directed definitions. Abstract syntax trees are condensed form of parse trees. Normally operators and keywords appear as leaves but in an abstract syntax tree they are associated with the interior nodes that would be the parent of those leaves in the parse tree. This is clearly indicated by the examples in these slides.
|