A parse tree is an entity which represents the structure of the derivation of
a terminal string from some non-terminal (not necessarily the start symbol).
The definition is as in the book. Key features to define are the root
∈ V
and yield
∈ Σ*
of each tree.
4 + 2 * 3 E → E + T | E - T | T T → T * F | F F → a| ( E )represents an operand of some type, be it a number or variable. The trees are grouped by height.
Content | Description |
---|---|
Leaves | Labeled By Terminal or ε |
Interior Nodes | Labeled By a Variable |
Children | Labeled BY the right side of a Production for the Parent |
Root | Labeled by the Start symbol |