Site icon i2tutorials

Compiler Design-Derivations and Parse Tree

Derivations and Parse Tree

 

What is a Parse Tree?

Parse tree is a hierarchical representation of terminals or non-terminals.

 

The rules for drawing a Parse Tree

  1. All leaf nodes need to be terminals
  2. All inner nodes need to be non-terminals.
  3. In-order traversal gives the original input string.

 

Reference Link

Derivations and Parse Tree

Exit mobile version