Global Information Lookup Global Information

Abstract syntax tree information


An abstract syntax tree for the following code for the Euclidean algorithm:
while b  0:
    if a > b:
        a := a - b
    else:
        b := b - a
return a

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

Request time (Page generated in 0.8694 seconds.)

Abstract syntax tree

Last Update:

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...

Word Count : 1214

Abstract syntax

Last Update:

in a tree structure as an abstract syntax tree. Abstract syntax, which only consists of the structure of data, is contrasted with concrete syntax, which...

Word Count : 467

Parse tree

Last Update:

A parse tree or parsing tree or derivation tree or concrete syntax tree is an ordered, rooted tree that represents the syntactic structure of a string...

Word Count : 1353

Syntax tree

Last Update:

Syntax tree may refer to: Abstract syntax tree, used in computer science Concrete syntax tree, used in linguistics This disambiguation page lists articles...

Word Count : 50

Abstract semantic graph

Last Update:

expression's subterms. An ASG is at a higher level of abstraction than an abstract syntax tree (or AST), which is used to express the syntactic structure of an...

Word Count : 862

GNU Compiler Collection

Last Update:

Each front end uses a parser to produce the abstract syntax tree of a given source file. Due to the syntax tree abstraction, source files of any of the different...

Word Count : 4911

Apache Groovy

Last Update:

represented in memory in the form of a Concrete Syntax Tree, then transformed into an Abstract Syntax Tree. The purpose of AST Transformations is to let...

Word Count : 3565

Prolog syntax and semantics

Last Update:

relation between a sentence (given as a list of tokens) and its abstract syntax tree (AST). Example query: ?- phrase(sentence(AST), [a,=,1,+,3,*,b,;,b...

Word Count : 1964

Binary expression tree

Last Update:

Term (logic) Context-free grammar Parse tree Abstract syntax tree Bruno R. Preiss (1998). "Expression Trees". Archived from the original on January 19...

Word Count : 367

Camlp4

Last Update:

revised syntax for OCaml, the same programming language can use different concrete syntaxes. They would all converge to an abstract syntax tree in a unique...

Word Count : 1029

Shunting yard algorithm

Last Update:

notation string, also known as Reverse Polish notation (RPN), or an abstract syntax tree (AST). The algorithm was invented by Edsger Dijkstra and named the...

Word Count : 1036

Structure editor

Last Update:

represent a document as a parse tree with respect to language's grammar, or as an abstract syntax tree (AST). For example, a DOM tree is essentially an AST with...

Word Count : 1190

Hy

Last Update:

interact with Python by translating s-expressions into Python's abstract syntax tree (AST). Hy was introduced at Python Conference (PyCon) 2013 by Paul...

Word Count : 407

Ada Semantic Interface Specification

Last Update:

access exclusive information found in reference manuals and the Abstract Syntax Tree (AST). Which in return will advance ASIS to the capability of being...

Word Count : 1723

Standard Generalized Markup Language

Last Update:

SGML has an abstract syntax implemented by many possible concrete syntaxes; however, this is not the same usage as in an abstract syntax tree and as in...

Word Count : 3850

Attribute grammar

Last Update:

Attributes allow the transfer of information from anywhere in the abstract syntax tree to anywhere else, in a controlled and formal way. Each semantic function...

Word Count : 1204

List of data structures

Last Update:

BSP tree Rapidly exploring random tree Abstract syntax tree Parse tree Decision tree Alternating decision tree Minimax tree Expectiminimax tree Finger...

Word Count : 911

Template Haskell

Last Update:

programming by means of manipulating abstract syntax trees and 'splicing' results back into a program. The abstract syntax is represented using ordinary Haskell...

Word Count : 232

Simple API for XML

Last Update:

Where the DOM operates on the document as a whole—building the full abstract syntax tree of an XML document for convenience of the user—SAX parsers operate...

Word Count : 1574

Code as data

Last Update:

can be manipulated as data, such as a sequence of characters or an abstract syntax tree (AST), and it has an execution semantics only in the context of a...

Word Count : 716

PDF Search Engine © AllGlobal.net