Difference between revisions of "Abstract syntax tree"
Karl Jones (Talk | contribs) (etc) |
Karl Jones (Talk | contribs) (→External links) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
== Description == | == Description == | ||
− | Each [[Node ( | + | Each [[Node (computer science)|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. | The syntax is "abstract" in not representing every detail appearing in the real syntax. | ||
Line 24: | Line 24: | ||
* [[Computer science]] | * [[Computer science]] | ||
+ | * [[Node (computer science)]] | ||
== External links == | == External links == | ||
* [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