Difference between revisions of "Abstract syntax tree"
Karl Jones (Talk | contribs) (→See also) |
Karl Jones (Talk | contribs) (→External links) |
||
(One intermediate revision by the same user not shown) | |||
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:Graph theory]] | ||
+ | [[Category:Mathematics]] |
Latest revision as of 10:00, 18 April 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
- Abstract syntax tree @ Wikipedia