public class ExprParser
extends java.lang.Object
Node root = ExprParser.parse("fielda * 12 + fieldb");Once you have root Node, you can the iterator over the nodes, or create a "Visitor" and have a visitor visit each node in the expression.
Modifier and Type | Class and Description |
---|---|
static interface |
ExprParser.ParserHelper |
static class |
ExprParser.State |
Constructor and Description |
---|
ExprParser() |
Modifier and Type | Method and Description |
---|---|
void |
addChild(Node parent,
Node child) |
static Node |
parse(java.lang.String expression)
Given an expression, return a parse tree of the expression.
|
static Node |
parse(java.lang.String expression,
ExprParser.ParserHelper parserHelper)
Given an expression, return a parse tree of the expression.
|
static Node |
parse(java.lang.String expression,
com.ibm.icu.util.ULocale locale)
Given an expression, return a parse tree of the expression.
|
static Node |
parse(java.lang.String expression,
com.ibm.icu.util.ULocale locale,
ExprParser.ParserHelper parserHelper)
Given an expression, return a parse tree of the expression.
|
Node |
parseExpression(java.lang.String str,
com.ibm.icu.util.ULocale locale,
ExprParser.ParserHelper helper)
Parses an expression using a given decimal separator.
|
public Node parseExpression(java.lang.String str, com.ibm.icu.util.ULocale locale, ExprParser.ParserHelper helper) throws MXException
str
- decimalSeparator
- MXException
public static Node parse(java.lang.String expression) throws MXException
expression
- MXException
public static Node parse(java.lang.String expression, com.ibm.icu.util.ULocale locale) throws MXException
expression
- MXException
public static Node parse(java.lang.String expression, com.ibm.icu.util.ULocale locale, ExprParser.ParserHelper parserHelper) throws MXException
expression
- MXException
public static Node parse(java.lang.String expression, ExprParser.ParserHelper parserHelper) throws MXException
expression
- MXException