net.sourceforge.nrl.parser.ast.impl
Class AntlrAstVisitor

java.lang.Object
  extended by net.sourceforge.nrl.parser.ast.impl.AntlrAstVisitor
All Implemented Interfaces:
INRLAstVisitor
Direct Known Subclasses:
AntlrModelResolverVisitor

public abstract class AntlrAstVisitor
extends Object
implements INRLAstVisitor

An abstract class that narrows the AST visitor interface a bit, to pass it an Antlr3NRLBaseAst.

Subclasses need to implement visitBefore(Antlr3NRLBaseAst), and visitAfter(Antlr3NRLBaseAst) only if necessary.

Author:
Christian Nentwich

Constructor Summary
AntlrAstVisitor()
           
 
Method Summary
protected  void visitAfter(Antlr3NRLBaseAst node)
           
 void visitAfter(INRLAstNode node)
          Visit an AST node after its children have been processed.
protected abstract  boolean visitBefore(Antlr3NRLBaseAst node)
           
 boolean visitBefore(INRLAstNode node)
          Visit an AST node and, if this method returns true, visit its children in order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntlrAstVisitor

public AntlrAstVisitor()
Method Detail

visitBefore

public final boolean visitBefore(INRLAstNode node)
Description copied from interface: INRLAstVisitor
Visit an AST node and, if this method returns true, visit its children in order.

Specified by:
visitBefore in interface INRLAstVisitor
Parameters:
node - the AST node
Returns:
true if the children should be visited

visitAfter

public final void visitAfter(INRLAstNode node)
Description copied from interface: INRLAstVisitor
Visit an AST node after its children have been processed. This is always called after INRLAstVisitor.visitBefore(INRLAstNode) by the AST.

Specified by:
visitAfter in interface INRLAstVisitor
Parameters:
node - the node to visit

visitBefore

protected abstract boolean visitBefore(Antlr3NRLBaseAst node)

visitAfter

protected void visitAfter(Antlr3NRLBaseAst node)


Copyright © 2006-2013. All Rights Reserved.