parse tree

Show Summary Details

Quick Reference

A tree defining the syntactic structure of a sentence in a context-free language. The interior nodes are labeled by nonterminals of the context-free grammar; the descendants of a node labeled by A, say, spell from left to right the right-hand side of some production having left-hand side A. The leaf nodes of a parse tree may be terminals or nonterminals. If all the leaves are terminals then they spell from left to right a sentence of the language.An example of a parse tree is shown in the diagram. It is assumed that the grammar in question has productions ABC, Bb, Ccc Note that it is conventional for the top of the tree to be its root and the bottom to be its leaves.

ABC, Bb, Ccc

An early stage in compiling a program usually consists of generating a parse tree in which the constructs that make up the program are expressed in terms of the syntax of the programming language.

Parse tree.

Subjects: Computing.

Reference entries

Users without a subscription are not able to see the full content. Please, subscribe or login to access all content.