1 /* @author rich 2 * Created on 18-Nov-2003 3 * 4 * This code is covered by a Creative Commons 5 * Attribution, Non Commercial, Share Alike license 6 * <a HREF="http://creativecommons.org/licenses/by-nc-sa/1.0">License</a> 7 */ 8 package org.nfunk.jep.function; 9 import org.nfunk.jep.*; 10 import java.util.Stack; 11 /** 12 * Functions which require greater control over their evaluation should implement this interface. 13 * 14 * @author Rich Morris 15 * Created on 18-Nov-2003 16 */ 17 public interface SpecialEvaluationI { 18 19 /** 20 * Performs some special evaluation on the node. 21 * This method has the responsability for evaluating the children of the node 22 * and it should generally call 23 * <pre> 24 * node.jjtGetChild(i).jjtAccept(pv,data); 25 * </pre> 26 * for each child. 27 * 28 * @param node The current node 29 * @param data The data passed to visitor, typically not used 30 * @param pv The visitor, can be used evaluate the children 31 * @param stack The stack of the evaluator 32 * @param symTab The symbol table 33 * @return the value after evaluation 34 * @throws ParseException 35 */ 36 public Object evaluate(Node node,Object data,ParserVisitor pv,Stack stack/*,SymbolTable symTab*/) throws ParseException; 37 } 38