- Abstract syntax tree
computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the syntaxof some source code(that has been written in a programming language). Each node of the tree denotes a construct occurring in the source code. The tree is "abstract" in the sense that it may not represent some constructs that appear in the original source. For instance, the classic example of such an omission is grouping parentheses, since in an AST the grouping of operandsis implicit in the tree structure.
An AST is often built by a
parseras part of the processing of compiling source code. Once built additional information is added to the AST by subsequent processing, eg semantic analysis.
Abstract semantic graph(ASG)
Concrete syntax tree
Document Object Model(DOM)
Semantic resolution tree(RST)
Shunting yard algorithm
* [http://www.eclipse.org/jdt/ui/astview/index.php AST View] , an Eclipse plugin to visualize a Java abstract syntax tree
* [http://www.eclipse.org/articles/Article-JavaCodeManipulation_AST/index.html Good information about the Eclipse AST and Java Code Manipulation]
*Paper " [http://jerry.cs.uiuc.edu/~plop/plop2003/Papers/Jones-ImplementingASTs.pdf Abstract Syntax Tree Implementation Idioms] " by Joel Jones (overview of AST implementation in various language families)
*Paper " [http://www.ansa.co.uk/ANSATech/95/Primary/155101.pdf Abstract Syntax Tree Design] " by
Nicola Howarth(note that this merely presents the design of *one particular* project's AST, and is not generally informative)
*Paper " [http://doi.acm.org/10.1145/1083142.1083143 Understanding source code evolution using abstract syntax tree matching] " by
Iulian Neamtiu, Jeffrey S. Fosterand Michael Hicks
*Paper " [http://seal.ifi.uzh.ch/fileadmin/User_Filemount/Publications/fluri-changedistilling.pdf Change Distilling: Tree Differencing for Fine-Grained Source Code Change Extraction] " by
Beat Fluri, Michael Würsch, Martin Pinzger, and Harald C. Gall.
*Diploma thesis " [http://seal.ifi.unizh.ch/137/ Improving Abstract Syntax Tree based Source Code Change Detection] " by
*Article " [http://blogs.msdn.com/vcblog/archive/2006/08/16/702823.aspx Thoughts on the Visual C++ Abstract Syntax Tree (AST)] " by
*Tutorial " [http://www.omg.org/news/meetings/workshops/ADM_2005_Proceedings_FINAL/T-3_Newcomb.pdf Abstract Syntax Tree Metamodel Standard] "
* [http://pmd.sourceforge.net PMD] uses AST representation to control code source quality
* [http://www.cs.utah.edu/flux/flick/current/doc/guts/gutsch6.html CAST representation]
* [http://eli-project.sourceforge.net/elionline/idem_3.html Abstract Syntax Tree Unparsing]
Wikimedia Foundation. 2010.