org.tromer.jie.visitor
Class PiggybackDepthFirst

java.lang.Object
  |
  +--org.tromer.jie.visitor.PiggybackDepthFirst
Direct Known Subclasses:
PiggybackTreeDumper

public class PiggybackDepthFirst
extends java.lang.Object
implements Visitor

The PiggybackDepthFirst class is similar to DepthFirstVisitor but adds hooks for handling of piggyback data (the 'prepiggy' and 'postpiggy' fields). A call to processPrepiggy(n) is added at the beginning of every visit() method, and a call to processPostpiggy() is added before every 'return' statement. Both calls occur only if the corresponding field is not null.

Autogenerated from DepthFirstVisitor.java by makeVisitors.pl. Original description:

Provides default methods which visit each node in the tree in depth-first order. Your visitors may extend this class.


Constructor Summary
PiggybackDepthFirst()
           
 
Method Summary
protected  void processPostpiggy(Node n)
           
protected  void processPrepiggy(Node n)
           
 void visit(AdditiveExpression n)
           multiplicativeExpression -> MultiplicativeExpression() nodeListOptional -> ( ( "+" | "-" ) MultiplicativeExpression() )*
 void visit(AllocationExpression n)
           nodeChoice -> "new" PrimitiveType() ArrayDimsAndInits() | "new" Name() ( ArrayDimsAndInits() | Arguments() [ ClassBody() ] )
 void visit(AndExpression n)
           equalityExpression -> EqualityExpression() nodeListOptional -> ( "&" EqualityExpression() )*
 void visit(ArgumentList n)
           expression -> Expression() nodeListOptional -> ( "," Expression() )*
 void visit(Arguments n)
           nodeToken -> "(" nodeOptional -> [ ArgumentList() ] nodeToken1 -> ")"
 void visit(ArrayDimsAndInits n)
           nodeChoice -> ( "[" Expression() "]" )+ ( "[" "]" )* | ( "[" "]" )+ ArrayInitializer()
 void visit(ArrayInitializer n)
           nodeToken -> "{" nodeOptional -> [ VariableInitializer() ( "," VariableInitializer() )* ] nodeOptional1 -> [ "," ] nodeToken1 -> "}"
 void visit(AssignmentOperator n)
           nodeChoice -> "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "<<=" | ">>=" | ">>>=" | "&=" | "^=" | "|="
 void visit(Block n)
           nodeToken -> "{" nodeListOptional -> ( BlockStatement() )* nodeToken1 -> "}"
 void visit(BlockStatement n)
           nodeChoice -> LocalVariableDeclaration() ";" | Statement() | UnmodifiedClassDeclaration() | UnmodifiedInterfaceDeclaration()
 void visit(BooleanLiteral n)
           nodeChoice -> "true" | "false"
 void visit(BreakStatement n)
           nodeToken -> "break" nodeOptional -> [ <IDENTIFIER> ] nodeToken1 -> ";"
 void visit(CastExpression n)
           nodeChoice -> "(" Type() ")" UnaryExpression() | "(" Type() ")" UnaryExpressionNotPlusMinus()
 void visit(CastLookahead n)
           nodeChoice -> "(" PrimitiveType() | "(" Name() "[" "]" | "(" Name() ")" ( "~" | "!" | "(" | <IDENTIFIER> | "this" | "super" | "new" | Literal() )
 void visit(ClassBody n)
           nodeToken -> "{" nodeListOptional -> ( ClassBodyDeclaration() )* nodeToken1 -> "}"
 void visit(ClassBodyDeclaration n)
           nodeChoice -> Initializer() | NestedClassDeclaration() | NestedInterfaceDeclaration() | ConstructorDeclaration() | MethodDeclaration() | FieldDeclaration() | ";"
 void visit(ClassDeclaration n)
           nodeListOptional -> ( "abstract" | "final" | "public" | "strictfp" )* unmodifiedClassDeclaration -> UnmodifiedClassDeclaration()
 void visit(CompilationUnit n)
           nodeOptional -> [ PackageDeclaration() ] nodeListOptional -> ( ImportDeclaration() )* nodeListOptional1 -> ( TypeDeclaration() )* nodeToken -> <EOF>
 void visit(ConditionalAndExpression n)
           inclusiveOrExpression -> InclusiveOrExpression() nodeListOptional -> ( "&&" InclusiveOrExpression() )*
 void visit(ConditionalExpression n)
           conditionalOrExpression -> ConditionalOrExpression() nodeOptional -> [ "?" Expression() ":" ConditionalExpression() ]
 void visit(ConditionalOrExpression n)
           conditionalAndExpression -> ConditionalAndExpression() nodeListOptional -> ( "||" ConditionalAndExpression() )*
 void visit(ConstructorDeclaration n)
           nodeOptional -> [ "public" | "protected" | "private" ] nodeToken -> <IDENTIFIER> formalParameters -> FormalParameters() nodeOptional1 -> [ "throws" NameList() ] nodeToken1 -> "{" nodeOptional2 -> [ ExplicitConstructorInvocation() ] topBlockStatements -> TopBlockStatements() nodeToken2 -> "}"
 void visit(ContinueStatement n)
           nodeToken -> "continue" nodeOptional -> [ <IDENTIFIER> ] nodeToken1 -> ";"
 void visit(DoStatement n)
           nodeToken -> "do" statement -> Statement() nodeToken1 -> "while" nodeToken2 -> "(" expression -> Expression() nodeToken3 -> ")" nodeToken4 -> ";"
 void visit(EmptyStatement n)
           nodeToken -> ";"
 void visit(EqualityExpression n)
           instanceOfExpression -> InstanceOfExpression() nodeListOptional -> ( ( "==" | "!=" ) InstanceOfExpression() )*
 void visit(ExclusiveOrExpression n)
           andExpression -> AndExpression() nodeListOptional -> ( "^" AndExpression() )*
 void visit(ExplicitConstructorInvocation n)
           nodeChoice -> "this" Arguments() ";" | [ PrimaryExpression() "." ] "super" Arguments() ";"
 void visit(Expression n)
           conditionalExpression -> ConditionalExpression() nodeOptional -> [ AssignmentOperator() Expression() ]
 void visit(FieldDeclaration n)
           nodeListOptional -> ( "public" | "protected" | "private" | "static" | "final" | "transient" | "volatile" )* type -> Type() variableDeclarator -> VariableDeclarator() nodeListOptional1 -> ( "," VariableDeclarator() )* nodeToken -> ";"
 void visit(ForInit n)
           nodeChoice -> LocalVariableDeclaration() | StatementExpressionList()
 void visit(FormalParameter n)
           nodeOptional -> [ "final" ] type -> Type() variableDeclaratorId -> VariableDeclaratorId()
 void visit(FormalParameters n)
           nodeToken -> "(" nodeOptional -> [ FormalParameter() ( "," FormalParameter() )* ] nodeToken1 -> ")"
 void visit(ForStatement n)
           nodeToken -> "for" nodeToken1 -> "(" nodeOptional -> [ ForInit() ] nodeToken2 -> ";" nodeOptional1 -> [ Expression() ] nodeToken3 -> ";" nodeOptional2 -> [ ForUpdate() ] nodeToken4 -> ")" statement -> Statement()
 void visit(ForUpdate n)
           statementExpressionList -> StatementExpressionList()
 void visit(IfStatement n)
           nodeToken -> "if" nodeToken1 -> "(" expression -> Expression() nodeToken2 -> ")" statement -> Statement() nodeOptional -> [ "else" Statement() ]
 void visit(ImportDeclaration n)
           nodeToken -> "import" name -> Name() nodeOptional -> [ "." "*" ] nodeToken1 -> ";"
 void visit(InclusiveOrExpression n)
           exclusiveOrExpression -> ExclusiveOrExpression() nodeListOptional -> ( "|" ExclusiveOrExpression() )*
 void visit(Initializer n)
           nodeOptional -> [ "static" ] topBlock -> TopBlock()
 void visit(InstanceOfExpression n)
           relationalExpression -> RelationalExpression() nodeOptional -> [ "instanceof" Type() ]
 void visit(InterfaceDeclaration n)
           nodeListOptional -> ( "abstract" | "public" | "strictfp" )* unmodifiedInterfaceDeclaration -> UnmodifiedInterfaceDeclaration()
 void visit(InterfaceMemberDeclaration n)
           nodeChoice -> NestedClassDeclaration() | NestedInterfaceDeclaration() | MethodDeclaration() | FieldDeclaration() | ";"
 void visit(LabeledStatement n)
           nodeToken -> <IDENTIFIER> nodeToken1 -> ":" statement -> Statement()
 void visit(Literal n)
           nodeChoice -> <INTEGER_LITERAL> | <FLOATING_POINT_LITERAL> | <CHARACTER_LITERAL> | <STRING_LITERAL> | BooleanLiteral() | NullLiteral()
 void visit(LocalVariableDeclaration n)
           nodeOptional -> [ "final" ] type -> Type() variableDeclarator -> VariableDeclarator() nodeListOptional -> ( "," VariableDeclarator() )*
 void visit(MethodDeclaration n)
           nodeListOptional -> ( "public" | "protected" | "private" | "static" | "abstract" | "final" | "native" | "synchronized" | "strictfp" )* resultType -> ResultType() methodDeclarator -> MethodDeclarator() nodeOptional -> [ "throws" NameList() ] nodeChoice -> ( TopBlock() | ";" )
 void visit(MethodDeclarationLookahead n)
           nodeListOptional -> ( "public" | "protected" | "private" | "static" | "abstract" | "final" | "native" | "synchronized" | "strictfp" )* resultType -> ResultType() nodeToken -> <IDENTIFIER> nodeToken1 -> "("
 void visit(MethodDeclarator n)
           nodeToken -> <IDENTIFIER> formalParameters -> FormalParameters() nodeListOptional -> ( "[" "]" )*
 void visit(MultiplicativeExpression n)
           unaryExpression -> UnaryExpression() nodeListOptional -> ( ( "*" | "/" | "%" ) UnaryExpression() )*
 void visit(Name n)
           nodeToken -> <IDENTIFIER> nodeListOptional -> ( "." <IDENTIFIER> )*
 void visit(NameList n)
           name -> Name() nodeListOptional -> ( "," Name() )*
 void visit(NestedClassDeclaration n)
           nodeListOptional -> ( "static" | "abstract" | "final" | "public" | "protected" | "private" | "strictfp" )* unmodifiedClassDeclaration -> UnmodifiedClassDeclaration()
 void visit(NestedInterfaceDeclaration n)
           nodeListOptional -> ( "static" | "abstract" | "final" | "public" | "protected" | "private" | "strictfp" )* unmodifiedInterfaceDeclaration -> UnmodifiedInterfaceDeclaration()
 void visit(NodeList n)
           
 void visit(NodeListOptional n)
           
 void visit(NodeOptional n)
           
 void visit(NodeSequence n)
           
 void visit(NodeToken n)
           
 void visit(NullLiteral n)
           nodeToken -> "null"
 void visit(PackageDeclaration n)
           nodeToken -> "package" name -> Name() nodeToken1 -> ";"
 void visit(PostfixExpression n)
           primaryExpression -> PrimaryExpression() nodeOptional -> [ "++" | "--" ]
 void visit(PreDecrementExpression n)
           nodeToken -> "--" primaryExpression -> PrimaryExpression()
 void visit(PreIncrementExpression n)
           nodeToken -> "++" primaryExpression -> PrimaryExpression()
 void visit(PrimaryExpression n)
           primaryPrefix -> PrimaryPrefix() nodeListOptional -> ( PrimarySuffix() )*
 void visit(PrimaryPrefix n)
           nodeChoice -> Literal() | "this" | "super" "." <IDENTIFIER> | "(" Expression() ")" | AllocationExpression() | ResultType() "." "class" | Name()
 void visit(PrimarySuffix n)
           nodeChoice -> "." "this" | "." AllocationExpression() | "[" Expression() "]" | "." <IDENTIFIER> | Arguments()
 void visit(PrimitiveType n)
           nodeChoice -> "boolean" | "char" | "byte" | "short" | "int" | "long" | "float" | "double"
 void visit(RelationalExpression n)
           shiftExpression -> ShiftExpression() nodeListOptional -> ( ( "<" | ">" | "<=" | ">=" ) ShiftExpression() )*
 void visit(ResultType n)
           nodeChoice -> "void" | Type()
 void visit(ReturnStatement n)
           nodeToken -> "return" nodeOptional -> [ Expression() ] nodeToken1 -> ";"
 void visit(ShiftExpression n)
           additiveExpression -> AdditiveExpression() nodeListOptional -> ( ( "<<" | ">>" | ">>>" ) AdditiveExpression() )*
 void visit(Statement n)
           nodeChoice -> LabeledStatement() | Block() | EmptyStatement() | StatementExpression() ";" | SwitchStatement() | IfStatement() | WhileStatement() | DoStatement() | ForStatement() | BreakStatement() | ContinueStatement() | ReturnStatement() | ThrowStatement() | SynchronizedStatement() | TryStatement()
 void visit(StatementExpression n)
           nodeChoice -> PreIncrementExpression() | PreDecrementExpression() | PrimaryExpression() [ "++" | "--" | AssignmentOperator() Expression() ]
 void visit(StatementExpressionList n)
           statementExpression -> StatementExpression() nodeListOptional -> ( "," StatementExpression() )*
 void visit(SwitchLabel n)
           nodeChoice -> "case" Expression() ":" | "default" ":"
 void visit(SwitchStatement n)
           nodeToken -> "switch" nodeToken1 -> "(" expression -> Expression() nodeToken2 -> ")" nodeToken3 -> "{" nodeListOptional -> ( SwitchLabel() ( BlockStatement() )* )* nodeToken4 -> "}"
 void visit(SynchronizedStatement n)
           nodeToken -> "synchronized" nodeToken1 -> "(" expression -> Expression() nodeToken2 -> ")" block -> Block()
 void visit(ThrowStatement n)
           nodeToken -> "throw" expression -> Expression() nodeToken1 -> ";"
 void visit(TopBlock n)
           nodeToken -> "{" topBlockStatements -> TopBlockStatements() nodeToken1 -> "}"
 void visit(TopBlockStatements n)
           nodeListOptional -> ( BlockStatement() )*
 void visit(TryStatement n)
           nodeToken -> "try" block -> Block() nodeListOptional -> ( "catch" "(" FormalParameter() ")" Block() )* nodeOptional -> [ "finally" Block() ]
 void visit(Type n)
           nodeChoice -> ( PrimitiveType() | Name() ) nodeListOptional -> ( "[" "]" )*
 void visit(TypeDeclaration n)
           nodeChoice -> ClassDeclaration() | InterfaceDeclaration() | ";"
 void visit(UnaryExpression n)
           nodeChoice -> ( "+" | "-" ) UnaryExpression() | PreIncrementExpression() | PreDecrementExpression() | UnaryExpressionNotPlusMinus()
 void visit(UnaryExpressionNotPlusMinus n)
           nodeChoice -> ( "~" | "!" ) UnaryExpression() | CastExpression() | PostfixExpression()
 void visit(UnmodifiedClassDeclaration n)
           nodeToken -> "class" nodeToken1 -> <IDENTIFIER> nodeOptional -> [ "extends" Name() ] nodeOptional1 -> [ "implements" NameList() ] classBody -> ClassBody()
 void visit(UnmodifiedInterfaceDeclaration n)
           nodeToken -> "interface" nodeToken1 -> <IDENTIFIER> nodeOptional -> [ "extends" NameList() ] nodeToken2 -> "{" nodeListOptional -> ( InterfaceMemberDeclaration() )* nodeToken3 -> "}"
 void visit(VariableDeclarator n)
           variableDeclaratorId -> VariableDeclaratorId() nodeOptional -> [ "=" VariableInitializer() ]
 void visit(VariableDeclaratorId n)
           nodeToken -> <IDENTIFIER> nodeListOptional -> ( "[" "]" )*
 void visit(VariableInitializer n)
           nodeChoice -> ArrayInitializer() | Expression()
 void visit(WhileStatement n)
           nodeToken -> "while" nodeToken1 -> "(" expression -> Expression() nodeToken2 -> ")" statement -> Statement()
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PiggybackDepthFirst

public PiggybackDepthFirst()
Method Detail

processPrepiggy

protected void processPrepiggy(Node n)

processPostpiggy

protected void processPostpiggy(Node n)

visit

public void visit(NodeList n)
Specified by:
visit in interface Visitor

visit

public void visit(NodeListOptional n)
Specified by:
visit in interface Visitor

visit

public void visit(NodeOptional n)
Specified by:
visit in interface Visitor

visit

public void visit(NodeSequence n)
Specified by:
visit in interface Visitor

visit

public void visit(NodeToken n)
Specified by:
visit in interface Visitor

visit

public void visit(CompilationUnit n)
 nodeOptional -> [ PackageDeclaration() ]
 nodeListOptional -> ( ImportDeclaration() )*
 nodeListOptional1 -> ( TypeDeclaration() )*
 nodeToken -> <EOF>
 
Specified by:
visit in interface Visitor

visit

public void visit(PackageDeclaration n)
 nodeToken -> "package"
 name -> Name()
 nodeToken1 -> ";"
 
Specified by:
visit in interface Visitor

visit

public void visit(ImportDeclaration n)
 nodeToken -> "import"
 name -> Name()
 nodeOptional -> [ "." "*" ]
 nodeToken1 -> ";"
 
Specified by:
visit in interface Visitor

visit

public void visit(TypeDeclaration n)
 nodeChoice -> ClassDeclaration()
       | InterfaceDeclaration()
       | ";"
 
Specified by:
visit in interface Visitor

visit

public void visit(ClassDeclaration n)
 nodeListOptional -> ( "abstract" | "final" | "public" | "strictfp" )*
 unmodifiedClassDeclaration -> UnmodifiedClassDeclaration()
 
Specified by:
visit in interface Visitor

visit

public void visit(UnmodifiedClassDeclaration n)
 nodeToken -> "class"
 nodeToken1 -> <IDENTIFIER>
 nodeOptional -> [ "extends" Name() ]
 nodeOptional1 -> [ "implements" NameList() ]
 classBody -> ClassBody()
 
Specified by:
visit in interface Visitor

visit

public void visit(ClassBody n)
 nodeToken -> "{"
 nodeListOptional -> ( ClassBodyDeclaration() )*
 nodeToken1 -> "}"
 
Specified by:
visit in interface Visitor

visit

public void visit(NestedClassDeclaration n)
 nodeListOptional -> ( "static" | "abstract" | "final" | "public" | "protected" | "private" | "strictfp" )*
 unmodifiedClassDeclaration -> UnmodifiedClassDeclaration()
 
Specified by:
visit in interface Visitor

visit

public void visit(ClassBodyDeclaration n)
 nodeChoice -> Initializer()
       | NestedClassDeclaration()
       | NestedInterfaceDeclaration()
       | ConstructorDeclaration()
       | MethodDeclaration()
       | FieldDeclaration()
       | ";"
 
Specified by:
visit in interface Visitor

visit

public void visit(MethodDeclarationLookahead n)
 nodeListOptional -> ( "public" | "protected" | "private" | "static" | "abstract" | "final" | "native" | "synchronized" | "strictfp" )*
 resultType -> ResultType()
 nodeToken -> <IDENTIFIER>
 nodeToken1 -> "("
 
Specified by:
visit in interface Visitor

visit

public void visit(InterfaceDeclaration n)
 nodeListOptional -> ( "abstract" | "public" | "strictfp" )*
 unmodifiedInterfaceDeclaration -> UnmodifiedInterfaceDeclaration()
 
Specified by:
visit in interface Visitor

visit

public void visit(NestedInterfaceDeclaration n)
 nodeListOptional -> ( "static" | "abstract" | "final" | "public" | "protected" | "private" | "strictfp" )*
 unmodifiedInterfaceDeclaration -> UnmodifiedInterfaceDeclaration()
 
Specified by:
visit in interface Visitor

visit

public void visit(UnmodifiedInterfaceDeclaration n)
 nodeToken -> "interface"
 nodeToken1 -> <IDENTIFIER>
 nodeOptional -> [ "extends" NameList() ]
 nodeToken2 -> "{"
 nodeListOptional -> ( InterfaceMemberDeclaration() )*
 nodeToken3 -> "}"
 
Specified by:
visit in interface Visitor

visit

public void visit(InterfaceMemberDeclaration n)
 nodeChoice -> NestedClassDeclaration()
       | NestedInterfaceDeclaration()
       | MethodDeclaration()
       | FieldDeclaration()
       | ";"
 
Specified by:
visit in interface Visitor

visit

public void visit(FieldDeclaration n)
 nodeListOptional -> ( "public" | "protected" | "private" | "static" | "final" | "transient" | "volatile" )*
 type -> Type()
 variableDeclarator -> VariableDeclarator()
 nodeListOptional1 -> ( "," VariableDeclarator() )*
 nodeToken -> ";"
 
Specified by:
visit in interface Visitor

visit

public void visit(VariableDeclarator n)
 variableDeclaratorId -> VariableDeclaratorId()
 nodeOptional -> [ "=" VariableInitializer() ]
 
Specified by:
visit in interface Visitor

visit

public void visit(VariableDeclaratorId n)
 nodeToken -> <IDENTIFIER>
 nodeListOptional -> ( "[" "]" )*
 
Specified by:
visit in interface Visitor

visit

public void visit(VariableInitializer n)
 nodeChoice -> ArrayInitializer()
       | Expression()
 
Specified by:
visit in interface Visitor

visit

public void visit(ArrayInitializer n)
 nodeToken -> "{"
 nodeOptional -> [ VariableInitializer() ( "," VariableInitializer() )* ]
 nodeOptional1 -> [ "," ]
 nodeToken1 -> "}"
 
Specified by:
visit in interface Visitor

visit

public void visit(MethodDeclaration n)
 nodeListOptional -> ( "public" | "protected" | "private" | "static" | "abstract" | "final" | "native" | "synchronized" | "strictfp" )*
 resultType -> ResultType()
 methodDeclarator -> MethodDeclarator()
 nodeOptional -> [ "throws" NameList() ]
 nodeChoice -> ( TopBlock() | ";" )
 
Specified by:
visit in interface Visitor

visit

public void visit(MethodDeclarator n)
 nodeToken -> <IDENTIFIER>
 formalParameters -> FormalParameters()
 nodeListOptional -> ( "[" "]" )*
 
Specified by:
visit in interface Visitor

visit

public void visit(FormalParameters n)
 nodeToken -> "("
 nodeOptional -> [ FormalParameter() ( "," FormalParameter() )* ]
 nodeToken1 -> ")"
 
Specified by:
visit in interface Visitor

visit

public void visit(FormalParameter n)
 nodeOptional -> [ "final" ]
 type -> Type()
 variableDeclaratorId -> VariableDeclaratorId()
 
Specified by:
visit in interface Visitor

visit

public void visit(ConstructorDeclaration n)
 nodeOptional -> [ "public" | "protected" | "private" ]
 nodeToken -> <IDENTIFIER>
 formalParameters -> FormalParameters()
 nodeOptional1 -> [ "throws" NameList() ]
 nodeToken1 -> "{"
 nodeOptional2 -> [ ExplicitConstructorInvocation() ]
 topBlockStatements -> TopBlockStatements()
 nodeToken2 -> "}"
 
Specified by:
visit in interface Visitor

visit

public void visit(ExplicitConstructorInvocation n)
 nodeChoice -> "this" Arguments() ";"
       | [ PrimaryExpression() "." ] "super" Arguments() ";"
 
Specified by:
visit in interface Visitor

visit

public void visit(Initializer n)
 nodeOptional -> [ "static" ]
 topBlock -> TopBlock()
 
Specified by:
visit in interface Visitor

visit

public void visit(Type n)
 nodeChoice -> ( PrimitiveType() | Name() )
 nodeListOptional -> ( "[" "]" )*
 
Specified by:
visit in interface Visitor

visit

public void visit(PrimitiveType n)
 nodeChoice -> "boolean"
       | "char"
       | "byte"
       | "short"
       | "int"
       | "long"
       | "float"
       | "double"
 
Specified by:
visit in interface Visitor

visit

public void visit(ResultType n)
 nodeChoice -> "void"
       | Type()
 
Specified by:
visit in interface Visitor

visit

public void visit(Name n)
 nodeToken -> <IDENTIFIER>
 nodeListOptional -> ( "." <IDENTIFIER> )*
 
Specified by:
visit in interface Visitor

visit

public void visit(NameList n)
 name -> Name()
 nodeListOptional -> ( "," Name() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(Expression n)
 conditionalExpression -> ConditionalExpression()
 nodeOptional -> [ AssignmentOperator() Expression() ]
 
Specified by:
visit in interface Visitor

visit

public void visit(AssignmentOperator n)
 nodeChoice -> "="
       | "*="
       | "/="
       | "%="
       | "+="
       | "-="
       | "<<="
       | ">>="
       | ">>>="
       | "&="
       | "^="
       | "|="
 
Specified by:
visit in interface Visitor

visit

public void visit(ConditionalExpression n)
 conditionalOrExpression -> ConditionalOrExpression()
 nodeOptional -> [ "?" Expression() ":" ConditionalExpression() ]
 
Specified by:
visit in interface Visitor

visit

public void visit(ConditionalOrExpression n)
 conditionalAndExpression -> ConditionalAndExpression()
 nodeListOptional -> ( "||" ConditionalAndExpression() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(ConditionalAndExpression n)
 inclusiveOrExpression -> InclusiveOrExpression()
 nodeListOptional -> ( "&&" InclusiveOrExpression() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(InclusiveOrExpression n)
 exclusiveOrExpression -> ExclusiveOrExpression()
 nodeListOptional -> ( "|" ExclusiveOrExpression() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(ExclusiveOrExpression n)
 andExpression -> AndExpression()
 nodeListOptional -> ( "^" AndExpression() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(AndExpression n)
 equalityExpression -> EqualityExpression()
 nodeListOptional -> ( "&" EqualityExpression() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(EqualityExpression n)
 instanceOfExpression -> InstanceOfExpression()
 nodeListOptional -> ( ( "==" | "!=" ) InstanceOfExpression() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(InstanceOfExpression n)
 relationalExpression -> RelationalExpression()
 nodeOptional -> [ "instanceof" Type() ]
 
Specified by:
visit in interface Visitor

visit

public void visit(RelationalExpression n)
 shiftExpression -> ShiftExpression()
 nodeListOptional -> ( ( "<" | ">" | "<=" | ">=" ) ShiftExpression() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(ShiftExpression n)
 additiveExpression -> AdditiveExpression()
 nodeListOptional -> ( ( "<<" | ">>" | ">>>" ) AdditiveExpression() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(AdditiveExpression n)
 multiplicativeExpression -> MultiplicativeExpression()
 nodeListOptional -> ( ( "+" | "-" ) MultiplicativeExpression() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(MultiplicativeExpression n)
 unaryExpression -> UnaryExpression()
 nodeListOptional -> ( ( "*" | "/" | "%" ) UnaryExpression() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(UnaryExpression n)
 nodeChoice -> ( "+" | "-" ) UnaryExpression()
       | PreIncrementExpression()
       | PreDecrementExpression()
       | UnaryExpressionNotPlusMinus()
 
Specified by:
visit in interface Visitor

visit

public void visit(PreIncrementExpression n)
 nodeToken -> "++"
 primaryExpression -> PrimaryExpression()
 
Specified by:
visit in interface Visitor

visit

public void visit(PreDecrementExpression n)
 nodeToken -> "--"
 primaryExpression -> PrimaryExpression()
 
Specified by:
visit in interface Visitor

visit

public void visit(UnaryExpressionNotPlusMinus n)
 nodeChoice -> ( "~" | "!" ) UnaryExpression()
       | CastExpression()
       | PostfixExpression()
 
Specified by:
visit in interface Visitor

visit

public void visit(CastLookahead n)
 nodeChoice -> "(" PrimitiveType()
       | "(" Name() "[" "]"
       | "(" Name() ")" ( "~" | "!" | "(" | <IDENTIFIER> | "this" | "super" | "new" | Literal() )
 
Specified by:
visit in interface Visitor

visit

public void visit(PostfixExpression n)
 primaryExpression -> PrimaryExpression()
 nodeOptional -> [ "++" | "--" ]
 
Specified by:
visit in interface Visitor

visit

public void visit(CastExpression n)
 nodeChoice -> "(" Type() ")" UnaryExpression()
       | "(" Type() ")" UnaryExpressionNotPlusMinus()
 
Specified by:
visit in interface Visitor

visit

public void visit(PrimaryExpression n)
 primaryPrefix -> PrimaryPrefix()
 nodeListOptional -> ( PrimarySuffix() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(PrimaryPrefix n)
 nodeChoice -> Literal()
       | "this"
       | "super" "." <IDENTIFIER>
       | "(" Expression() ")"
       | AllocationExpression()
       | ResultType() "." "class"
       | Name()
 
Specified by:
visit in interface Visitor

visit

public void visit(PrimarySuffix n)
 nodeChoice -> "." "this"
       | "." AllocationExpression()
       | "[" Expression() "]"
       | "." <IDENTIFIER>
       | Arguments()
 
Specified by:
visit in interface Visitor

visit

public void visit(Literal n)
 nodeChoice -> <INTEGER_LITERAL>
       | <FLOATING_POINT_LITERAL>
       | <CHARACTER_LITERAL>
       | <STRING_LITERAL>
       | BooleanLiteral()
       | NullLiteral()
 
Specified by:
visit in interface Visitor

visit

public void visit(BooleanLiteral n)
 nodeChoice -> "true"
       | "false"
 
Specified by:
visit in interface Visitor

visit

public void visit(NullLiteral n)
 nodeToken -> "null"
 
Specified by:
visit in interface Visitor

visit

public void visit(Arguments n)
 nodeToken -> "("
 nodeOptional -> [ ArgumentList() ]
 nodeToken1 -> ")"
 
Specified by:
visit in interface Visitor

visit

public void visit(ArgumentList n)
 expression -> Expression()
 nodeListOptional -> ( "," Expression() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(AllocationExpression n)
 nodeChoice -> "new" PrimitiveType() ArrayDimsAndInits()
       | "new" Name() ( ArrayDimsAndInits() | Arguments() [ ClassBody() ] )
 
Specified by:
visit in interface Visitor

visit

public void visit(ArrayDimsAndInits n)
 nodeChoice -> ( "[" Expression() "]" )+ ( "[" "]" )*
       | ( "[" "]" )+ ArrayInitializer()
 
Specified by:
visit in interface Visitor

visit

public void visit(Statement n)
 nodeChoice -> LabeledStatement()
       | Block()
       | EmptyStatement()
       | StatementExpression() ";"
       | SwitchStatement()
       | IfStatement()
       | WhileStatement()
       | DoStatement()
       | ForStatement()
       | BreakStatement()
       | ContinueStatement()
       | ReturnStatement()
       | ThrowStatement()
       | SynchronizedStatement()
       | TryStatement()
 
Specified by:
visit in interface Visitor

visit

public void visit(LabeledStatement n)
 nodeToken -> <IDENTIFIER>
 nodeToken1 -> ":"
 statement -> Statement()
 
Specified by:
visit in interface Visitor

visit

public void visit(Block n)
 nodeToken -> "{"
 nodeListOptional -> ( BlockStatement() )*
 nodeToken1 -> "}"
 
Specified by:
visit in interface Visitor

visit

public void visit(BlockStatement n)
 nodeChoice -> LocalVariableDeclaration() ";"
       | Statement()
       | UnmodifiedClassDeclaration()
       | UnmodifiedInterfaceDeclaration()
 
Specified by:
visit in interface Visitor

visit

public void visit(LocalVariableDeclaration n)
 nodeOptional -> [ "final" ]
 type -> Type()
 variableDeclarator -> VariableDeclarator()
 nodeListOptional -> ( "," VariableDeclarator() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(EmptyStatement n)
 nodeToken -> ";"
 
Specified by:
visit in interface Visitor

visit

public void visit(StatementExpression n)
 nodeChoice -> PreIncrementExpression()
       | PreDecrementExpression()
       | PrimaryExpression() [ "++" | "--" | AssignmentOperator() Expression() ]
 
Specified by:
visit in interface Visitor

visit

public void visit(SwitchStatement n)
 nodeToken -> "switch"
 nodeToken1 -> "("
 expression -> Expression()
 nodeToken2 -> ")"
 nodeToken3 -> "{"
 nodeListOptional -> ( SwitchLabel() ( BlockStatement() )* )*
 nodeToken4 -> "}"
 
Specified by:
visit in interface Visitor

visit

public void visit(SwitchLabel n)
 nodeChoice -> "case" Expression() ":"
       | "default" ":"
 
Specified by:
visit in interface Visitor

visit

public void visit(IfStatement n)
 nodeToken -> "if"
 nodeToken1 -> "("
 expression -> Expression()
 nodeToken2 -> ")"
 statement -> Statement()
 nodeOptional -> [ "else" Statement() ]
 
Specified by:
visit in interface Visitor

visit

public void visit(WhileStatement n)
 nodeToken -> "while"
 nodeToken1 -> "("
 expression -> Expression()
 nodeToken2 -> ")"
 statement -> Statement()
 
Specified by:
visit in interface Visitor

visit

public void visit(DoStatement n)
 nodeToken -> "do"
 statement -> Statement()
 nodeToken1 -> "while"
 nodeToken2 -> "("
 expression -> Expression()
 nodeToken3 -> ")"
 nodeToken4 -> ";"
 
Specified by:
visit in interface Visitor

visit

public void visit(ForStatement n)
 nodeToken -> "for"
 nodeToken1 -> "("
 nodeOptional -> [ ForInit() ]
 nodeToken2 -> ";"
 nodeOptional1 -> [ Expression() ]
 nodeToken3 -> ";"
 nodeOptional2 -> [ ForUpdate() ]
 nodeToken4 -> ")"
 statement -> Statement()
 
Specified by:
visit in interface Visitor

visit

public void visit(ForInit n)
 nodeChoice -> LocalVariableDeclaration()
       | StatementExpressionList()
 
Specified by:
visit in interface Visitor

visit

public void visit(StatementExpressionList n)
 statementExpression -> StatementExpression()
 nodeListOptional -> ( "," StatementExpression() )*
 
Specified by:
visit in interface Visitor

visit

public void visit(ForUpdate n)
 statementExpressionList -> StatementExpressionList()
 
Specified by:
visit in interface Visitor

visit

public void visit(BreakStatement n)
 nodeToken -> "break"
 nodeOptional -> [ <IDENTIFIER> ]
 nodeToken1 -> ";"
 
Specified by:
visit in interface Visitor

visit

public void visit(ContinueStatement n)
 nodeToken -> "continue"
 nodeOptional -> [ <IDENTIFIER> ]
 nodeToken1 -> ";"
 
Specified by:
visit in interface Visitor

visit

public void visit(ReturnStatement n)
 nodeToken -> "return"
 nodeOptional -> [ Expression() ]
 nodeToken1 -> ";"
 
Specified by:
visit in interface Visitor

visit

public void visit(ThrowStatement n)
 nodeToken -> "throw"
 expression -> Expression()
 nodeToken1 -> ";"
 
Specified by:
visit in interface Visitor

visit

public void visit(SynchronizedStatement n)
 nodeToken -> "synchronized"
 nodeToken1 -> "("
 expression -> Expression()
 nodeToken2 -> ")"
 block -> Block()
 
Specified by:
visit in interface Visitor

visit

public void visit(TryStatement n)
 nodeToken -> "try"
 block -> Block()
 nodeListOptional -> ( "catch" "(" FormalParameter() ")" Block() )*
 nodeOptional -> [ "finally" Block() ]
 
Specified by:
visit in interface Visitor

visit

public void visit(TopBlock n)
 nodeToken -> "{"
 topBlockStatements -> TopBlockStatements()
 nodeToken1 -> "}"
 
Specified by:
visit in interface Visitor

visit

public void visit(TopBlockStatements n)
 nodeListOptional -> ( BlockStatement() )*
 
Specified by:
visit in interface Visitor