RTUComputer ScienceYr 2023 · Sem 52023

Q5Compiler Design

Question

2 marks

Define Parse Tree.

Answer

A parse tree visually graphs the syntactic derivation of a string using CFG rules.

A Parse Tree, or derivation tree, is a rigorous hierarchical graphical data structure. It mathematically represents the exact syntactic structure of a string according to a specific Context-Free Grammar. The interior nodes violently represent the grammar's non-terminals, while the absolute leaf nodes represent the terminal symbols (the actual tokens) of the language.

Back to Paper