Tree representation of the abstract syntactic structure of source code
For the trees used in linguistics, see parse tree.
This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. Please help improve this article by introducing more precise citations.(February 2013) (Learn how and when to remove this message)
An abstract syntax tree (AST) is a data structure used in computer science to represent the structure of a program or code snippet. It is a tree representation of the abstract syntactic structure of text (often source code) written in a formal language. Each node of the tree denotes a construct occurring in the text. It is sometimes called just a syntax tree.
The syntax is "abstract" in the sense that it does not represent every detail appearing in the real syntax, but rather just the structural or content-related details. For instance, grouping parentheses are implicit in the tree structure, so these do not have to be represented as separate nodes. Likewise, a syntactic construct like an if-condition-then statement may be denoted by means of a single node with three branches.
This distinguishes abstract syntax trees from concrete syntax trees, traditionally designated parse trees. Parse trees are typically built by a parser during the source code translation and compiling process. 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.
and 20 Related for: Abstract syntax tree information
An abstractsyntaxtree (AST) is a data structure used in computer science to represent the structure of a program or code snippet. It is a tree representation...
in a tree structure as an abstractsyntaxtree. Abstractsyntax, which only consists of the structure of data, is contrasted with concrete syntax, which...
A parse tree or parsing tree or derivation tree or concrete syntaxtree is an ordered, rooted tree that represents the syntactic structure of a string...
Syntaxtree may refer to: Abstractsyntaxtree, used in computer science Concrete syntaxtree, used in linguistics This disambiguation page lists articles...
expression's subterms. An ASG is at a higher level of abstraction than an abstractsyntaxtree (or AST), which is used to express the syntactic structure of an...
Each front end uses a parser to produce the abstractsyntaxtree of a given source file. Due to the syntaxtree abstraction, source files of any of the different...
represented in memory in the form of a Concrete SyntaxTree, then transformed into an AbstractSyntaxTree. The purpose of AST Transformations is to let...
relation between a sentence (given as a list of tokens) and its abstractsyntaxtree (AST). Example query: ?- phrase(sentence(AST), [a,=,1,+,3,*,b,;,b...
revised syntax for OCaml, the same programming language can use different concrete syntaxes. They would all converge to an abstractsyntaxtree in a unique...
notation string, also known as Reverse Polish notation (RPN), or an abstractsyntaxtree (AST). The algorithm was invented by Edsger Dijkstra and named the...
represent a document as a parse tree with respect to language's grammar, or as an abstractsyntaxtree (AST). For example, a DOM tree is essentially an AST with...
interact with Python by translating s-expressions into Python's abstractsyntaxtree (AST). Hy was introduced at Python Conference (PyCon) 2013 by Paul...
access exclusive information found in reference manuals and the AbstractSyntaxTree (AST). Which in return will advance ASIS to the capability of being...
SGML has an abstractsyntax implemented by many possible concrete syntaxes; however, this is not the same usage as in an abstractsyntaxtree and as in...
Attributes allow the transfer of information from anywhere in the abstractsyntaxtree to anywhere else, in a controlled and formal way. Each semantic function...
programming by means of manipulating abstractsyntaxtrees and 'splicing' results back into a program. The abstractsyntax is represented using ordinary Haskell...
Where the DOM operates on the document as a whole—building the full abstractsyntaxtree of an XML document for convenience of the user—SAX parsers operate...
can be manipulated as data, such as a sequence of characters or an abstractsyntaxtree (AST), and it has an execution semantics only in the context of a...