Difference between revisions of "Abstract syntax tree"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(See also)
(External links)
Line 29: Line 29:
  
 
* [https://en.wikipedia.org/wiki/Abstract_syntax_tree Abstract syntax tree] @ Wikipedia
 
* [https://en.wikipedia.org/wiki/Abstract_syntax_tree Abstract syntax tree] @ Wikipedia
 +
 +
[[Category:Mathematics]]

Revision as of 06:59, 17 March 2016

In computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the abstract syntactic structure of source code written in a programming language.

Description

Each node of the tree denotes a construct occurring in the source code.

The syntax is "abstract" in not representing every detail appearing in the real syntax.

For instance, grouping parentheses are implicit in the tree structure, and a syntactic construct like an if-condition-then expression may be denoted by means of a single node with three branches.

This distinguishes abstract syntax trees from concrete syntax trees.

Subsequent processing

Once built, additional information is added to the AST by means of subsequent processing, e.g., contextual analysis.

Abstract syntax trees are also used in program analysis and program transformation systems.

Concrete syntax trees

Concrete syntax trees, traditionally designated parse trees, are often built by a parser during the source code translation and compiling process.

See also

External links