Skip to main content

Syntax Trees

Syntax trees are abstract or compact representation of parse trees.

They are also called as Abstract Syntax Trees.

Example-



Problem-01:

Considering the following grammar-

E → E + T | T
T → T x F | F
F → ( E ) | id
Generate the following for the string id + id x id
  1. Parse tree
  2. Syntax tree
  3. Directed Acyclic Graph (DAG)

Solution-

Parse Tree-


 





Comments