Lably
Skip to content

Parse tree

Tree in formal language theory

  • 5 min read
  • 5 chapters

Related on Lably

Through Syntax, String (computer science) and Context-free grammar

Concrete syntax trees reflect the syntax of the input language, making them distinct from the abstract syntax trees used in computer programming. Unlike Reed-Kellogg sentence diagrams used for teaching grammar, parse trees do not use distinct symbol shapes for different types of constituents.

Parse trees are usually constructed based on either the constituency relation of constituency grammars (phrase structure grammars) or the dependency relation of dependency grammars. Parse trees may be generated for sentences in natural languages (see natural language processing), as well as during processing of computer languages, such as programming languages.

A related concept is that of phrase marker or P-marker, as used in transformational generative grammar. A phrase marker is a linguistic expression marked as to its phrase structure. This may be presented in the form of a tree, or as a bracketed expression. Phrase markers are generated by applying phrase structure rules, and themselves are subject to further transformational rules. A set of possible parse trees for a syntactically ambiguous sentence is called a "parse forest".

History

A form of parse tree was in use as early as 1879 in Gottlob Frege's Begriffsschrift book.

Sign in to keep reading

4 more chapters are free with a Lably account.

More in Computing and communication