top of page
Search

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-

Syntax Tree-



Directed Acyclic Graph-



 
 
 

Comments


  • facebook
  • youtube
  • instagram

©2020 by School of CSWT. Proudly created with Wix.com

bottom of page