net.sourceforge.nrl.parser.ast
Class ActionVisitorDispatcher

java.lang.Object
  extended by net.sourceforge.nrl.parser.ast.ConstraintVisitorDispatcher
      extended by net.sourceforge.nrl.parser.ast.ActionVisitorDispatcher
All Implemented Interfaces:
INRLAstVisitor

public class ActionVisitorDispatcher
extends ConstraintVisitorDispatcher

An extension of the basic dispatching AST visitor class that adds action language support.

Implementors of mappings of the full action language, including the base constraint language, should implement this visitor class. For every node in the AST, which is visited in a pre-order traversal, they will get a call to a before method before a node is visited and a call to an after method once its children have been visited.

To use the class, extend and implement all abstract methods.


Constructor Summary
ActionVisitorDispatcher(INRLActionDetailVisitor visitor)
          Initialise the dispatcher with a actionVisitor.
 
Method Summary
 void visitAfter(INRLAstNode node)
          Dispatching method.
 boolean visitBefore(INRLAstNode node)
          Dispatching method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionVisitorDispatcher

public ActionVisitorDispatcher(INRLActionDetailVisitor visitor)
Initialise the dispatcher with a actionVisitor.

Parameters:
visitor - the visitor
Method Detail

visitAfter

public void visitAfter(INRLAstNode node)
Dispatching method. No need to change.

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

visitBefore

public boolean visitBefore(INRLAstNode node)
Dispatching method. No need to change.

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


Copyright © 2006-2010 Christian Nentwich and others