
In computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the syntax of some source code (that has been written in a programming language). Each node of the tree denotes a construct occurring in the source code. The tree is abstract in the sense that it may not represent some constructs that appear in the original source. For instance, the classic example of such an omission is grouping parentheses, since in an AST the grouping of operands is implicit in the tree structure.
An AST is often built by a parser as part of the processing of compiling source code. Once built, additional information is added to the AST by subsequent processing, e.g., semantic analysis.
This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.
Why are we here?
All text is available under the terms of the GNU Free Documentation License
This page is cache of Wikipedia. History