In [[computer science]], an '''abstract syntax tree''' (AST) is a [[datafinite]], structurelabeled, [[directed tree]], representingwhere somethingthe whichnodes hasare labeled by operators, and the edges represent the operands of the node operators. Thus, the leaves have nullary operators, i.e., variables or constants. In computing, it is used in a been [[parser|parsed]] as an intermediate between a [[parse tree]] and a [[data structure]], the latter which is often used as a [[compiler (computing)|compiler]] or [[interpreter (computing)|interpreter]]'s internal [[intermediate representation|representation]] of a [[computer program]] while it is being [[compiler optimization|optimized]] and from which code generation is performed. The range of all possible such structures is described by the [[abstract syntax]].
Sometimes the code behind abstract syntax trees (classes, for example) is generated by a parser generator, but many language engineers prefer to design and implement the tree themselves, as it expresses the fundamental structure of the language.