net.sf.joost.grammar.tree
Class FunctionTree

java.lang.Object
  extended bynet.sf.joost.grammar.Tree
      extended bynet.sf.joost.grammar.tree.FunctionTree

public final class FunctionTree
extends Tree

Objects of FunctionTree represent function calls in the syntax tree of a pattern or an STXPath expression.

Version:
$Revision: 1.2 $ $Date: 2004/12/17 18:25:50 $
Author:
Oliver Becker

Field Summary
private  FunctionTable.Instance func
          the function instance
 
Fields inherited from class net.sf.joost.grammar.Tree
ADD, AND, ATTR, ATTR_LOCAL_WILDCARD, ATTR_URI_WILDCARD, ATTR_WILDCARD, AVT, CDATA_TEST, CHILD, COMMENT_TEST, DDOT, DESC, DIV, DOT, EQ, FUNCTION, GE, GT, LE, left, LIST, lName, LOCAL_WILDCARD, LT, MOD, MULT, NAME_TEST, NE, NODE_TEST, NUMBER, OR, PI_TEST, PREDICATE, right, ROOT, SEQ, STRING, SUB, TEXT_TEST, type, UNION, uri, URI_WILDCARD, value, VALUE, VAR, WILDCARD
 
Constructor Summary
FunctionTree(String qName, Tree left, ParseContext context)
          Constructs a FunctionTree object.
 
Method Summary
 Value evaluate(Context context, int top)
          Evaluates the current Tree if it represents an expression.
 
Methods inherited from class net.sf.joost.grammar.Tree
evaluate, getPriority, matches, reverseAssociativity, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

func

private FunctionTable.Instance func
the function instance

Constructor Detail

FunctionTree

public FunctionTree(String qName,
                    Tree left,
                    ParseContext context)
             throws SAXParseException
Constructs a FunctionTree object.

Parameters:
qName - the qualified function name
left - the parameters
context - the parse context
Method Detail

evaluate

public Value evaluate(Context context,
                      int top)
               throws SAXException
Description copied from class: Tree
Evaluates the current Tree if it represents an expression.

Overrides:
evaluate in class Tree
Parameters:
context - the current Context
top - the part of the stack to be considered for the evaluation (the upper most element is at position top-1)
Returns:
a new computed Value object containing the result
Throws:
SAXException