|
|
|
|
Abstract syntax tree
|
| |
|
| |
In computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the abstract (simplified) syntactic structure of source code written in a certain programming language. Each node of the tree denotes a construct occurring in the source code. The syntax is abstract in the sense that it does not represent every detail that appears in the real syntax. For instance, grouping parentheses is implicit in the tree structure, and a syntactic construct such as if cond then expr may be denoted by a single node with two branches.
Abstract syntax trees are thus different from concrete syntax trees traditionally called parse trees, and are often built by the parser part of the source code translation and compiling process (despite a perhaps unintuitive naming).

Discussion
Ask a question about 'Abstract syntax tree'
Start a new discussion about 'Abstract syntax tree'
Answer questions from other users
|
Encyclopedia
In computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the abstract (simplified) syntactic structure of source code written in a certain programming language. Each node of the tree denotes a construct occurring in the source code. The syntax is abstract in the sense that it does not represent every detail that appears in the real syntax. For instance, grouping parentheses is implicit in the tree structure, and a syntactic construct such as if cond then expr may be denoted by a single node with two branches.
Abstract syntax trees are thus different from concrete syntax trees traditionally called parse trees, and are often built by the parser part of the source code translation and compiling process (despite a perhaps unintuitive naming). Once built, additional information is added to the AST by subsequent processing, e.g., semantic analysis.
See also
External links
- , an Eclipse plugin to visualize a Java abstract syntax tree
- Paper "" by Joel Jones (overview of AST implementation in various language families)
- Paper "" by Nicola Howarth (note that this merely presents the design of *one particular* project's AST, and is not generally informative)
- Paper "" by Iulian Neamtiu, Jeffrey S. Foster and Michael Hicks
- Paper "" by Beat Fluri, Michael Würsch, Martin Pinzger, and Harald C. Gall.
- Diploma thesis "" by Michael Würsch
- Article "" by Jason Lucas
- Tutorial ""
- uses AST representation to control code source quality
-
|
| |
|
|