Package org.esa.snap.core.jexp
Interface Parser
public interface Parser
Instances of the
Parser
interface are used to convert a code
string representing an arithmetic expression in a tree of terms
which can then be executed by using one of the evaluation methods of
the Term
class.- Version:
- $Revision$ $Date$
-
Method Summary
-
Method Details
-
getDefaultNamespace
Namespace getDefaultNamespace()Gets this parser's default namespace.- Returns:
- the default environment used to resolve names.
-
parse
Parses the expression given in the code string. Names in the code string are resolved using the default namespace.- Parameters:
code
- the code string, for the syntax of valid expressions refer to the class description- Returns:
- the the parsed code as
Term
- Throws:
ParseException
- if a parse reportError occurs
-
parse
Parses the expression given in the code string. Names in the code string are resolved using the given namespace.- Parameters:
code
- the code string, for the syntax of valid expressions refer to the class descriptionnamespace
- the environment which is used to resolve names- Returns:
- the the parsed code as
Term
- Throws:
ParseException
- if a parse error occurs
-