http://www.eteks.com

com.eteks.jeks
Class JeksFunctionParser

java.lang.Object
  |
  +--com.eteks.parser.Parser
        |
        +--com.eteks.parser.FunctionParser
              |
              +--com.eteks.jeks.JeksFunctionParser

public class JeksFunctionParser
extends FunctionParser

Parser for functions entered by user.

Since:
Jeks 1.0
Version:
1.0
Author:
Emmanuel Puybaret

Constructor Summary
JeksFunctionParser()
          Creates a function parser using an instance JeksFunctionSyntax as syntax.
JeksFunctionParser(JeksFunctionSyntax syntax)
          Creates a function parser that uses the function syntax syntax.
 
Method Summary
 CompiledFunction compileFunction(java.lang.String functionDefinition)
          Compiles the definition of a function functionDefinition and returns the instance of CompiledFunction matching the definition.
 
Methods inherited from class com.eteks.parser.FunctionParser
getSyntax
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JeksFunctionParser

public JeksFunctionParser()
Creates a function parser using an instance JeksFunctionSyntax as syntax.

JeksFunctionParser

public JeksFunctionParser(JeksFunctionSyntax syntax)
Creates a function parser that uses the function syntax syntax.
Method Detail

compileFunction

public CompiledFunction compileFunction(java.lang.String functionDefinition)
                                 throws CompilationException
Description copied from class: FunctionParser
Compiles the definition of a function functionDefinition and returns the instance of CompiledFunction matching the definition. This method builds a tree of type ExpressionNode matching the expression of the function. This tree is used to compute the value of a function at interpretation time.
Overrides:
compileFunction in class FunctionParser
Following copied from class: com.eteks.parser.FunctionParser
Parameters:
functionDefinition - the definition of the function.
Returns:
an instance of CompiledFunction, with which values can be computed.
Throws:
CompilationException - if the syntax of the function is incorrect or if some elements (literals, constants, operators, functions,...) of its expression are not accepted by the syntax of the parser.

&cp; 1998-2003 eTeks - All rights reserved