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).
public class X {
public X() {
int y = 1;
}
}
has the tree
CompilationUnit
TypeDeclaration
ClassDeclaration
UnmodifiedClassDeclaration
ClassBody
ClassBodyDeclaration
ConstructorDeclaration
FormalParameters
BlockStatement
LocalVariableDeclaration
Type
PrimitiveType
VariableDeclarator
VariableDeclaratorId
VariableInitializer
Expression
ConditionalExpression
ConditionalOrExpression
ConditionalAndExpression
InclusiveOrExpression
ExclusiveOrExpression
EqualityExpression
InstanceOfExpression
RelationalExpression
ShiftExpression
AdditiveExpression
MultiplicativeExpression
UnaryExpression
UnaryExpressionNotPlusMinus
PostfixExpression
PrimaryExpression
PrimaryPrefix
Literal
performing the XPath query
//Literal
give the result
ASTLiteral at line 3
|