net.sourceforge.nrl.parser.ast
Interface INRLAstVisitor

All Known Implementing Classes:
ActionVisitorDispatcher, ConstraintVisitorDispatcher

public interface INRLAstVisitor

A very simple visitor interface for straight-forward recursive descent traversals of the AST. This is not really suitable for complicated mapping, but it is useful for gathering rule IDs and so on.

There are more detailed visitor classes available, with a call-back for every single AST constructs:


Method Summary
 void visitAfter(INRLAstNode node)
          Visit an AST node after its children have been processed.
 boolean visitBefore(INRLAstNode node)
          Visit an AST node and, if this method returns true, visit its children in order.
 

Method Detail

visitBefore

boolean visitBefore(INRLAstNode node)
Visit an AST node and, if this method returns true, visit its children in order.

Parameters:
node - the AST node
Returns:
true if the children should be visited

visitAfter

void visitAfter(INRLAstNode node)
Visit an AST node after its children have been processed. This is always called after visitBefore(INRLAstNode) by the AST.

Parameters:
node - the node to visit


Copyright © 2006-2010 Christian Nentwich and others