Abstract syntax tree

The concept of Abstract Syntax Tree (English abstract syntax tree, AST ) denotes a representation of the syntax of a construct in the source code of a computer program in the form of a tree.

Benefit

Since complex information is usually stored linearly in a file with a defined syntax, it is not always easy for programs to understand the content or modify without much effort. To find the information you need faster or easier to make changes in content, the content is converted into an abstract syntax tree, which is often called parsing.

Application

Compiler, debugger and validators often work internally with an abstract syntax tree; the most prominent example of an abstract syntax tree is likely the Document Object Model (DOM) be the internal representation of an HTML page in the browser. In many applications, a syntax tree is used instead of a pure abstract syntax tree.

  • Compiler
  • Theory of formal languages
25446
de