Abstract Syntax Tree viewer

This is a tool that shows the abstract syntax tree as found by the JavaStyle parser. (this might be slightly different from that which you would expect from the Java Language Specification).

AST Viewer

public class X {
   public X() {
     int y = 1;

has the tree

 ClassDeclaration (public )
  UnmodifiedClassDeclaration X
     ConstructorDeclaration X (public )
         PrimitiveType int
         VariableDeclaratorId y
                            Literal 1

performing the XPath query


gives the result

ASTLiteral at line 3

Last Modified: 30 October 2003