abstract syntax tree

Parser output diagram

An abstract syntax tree is a data structure representing the grammatical structure of source code.

Compilers and interpreters parse code into these tree forms, where each node represents a construct—a function call, an operator, a variable.

The "abstract" distinguishes it from concrete parse trees by omitting syntactic details like parentheses or semicolons.

Often abbreviated AST.

Related
  • parserSyntax-interpreting program
  • compilerSource-to-machine-code translator
  • nodeConnection point in networks
  • treeWoody perennial plant
  • traversalAct of moving through

visitor · leaf · branch · root · token · expression · statement · code · code generation · semantic · grammar · parse · child · parent · subtree · recursive · descent · transpiler

Categories
Opposites
abstraction level in code representation

abstract syntax treesource code

Programming instructions before compilation

source text · plain text · raw text · source file · machine code

concrete vs. abstract representation

abstract syntax treeCST

Middle America zone

tree vs. linear structure

abstract syntax treebytecode

Compiled platform-neutral instructions

Family

abstract, syntax, abstraction, abstracts, abstracted, abstracting, abstractly, abstractness, syntactic

Familiarity
Top 1,000,000
Profile
Used worldwide · Timeless · Abstract · Rated G