Class ExpressionTreeBuilder (2.0.0)

public class ExpressionTreeBuilder

A generator of AST representation of an expression. This class can use an optionally supplied CommonTreeAdaptor to process the tree further. If successful it returns the root of an AST representing the parsed query.

Inheritance

java.lang.Object > ExpressionTreeBuilder

Constructors

ExpressionTreeBuilder()

public ExpressionTreeBuilder()

ExpressionTreeBuilder(CommonTreeAdaptor adaptor)

public ExpressionTreeBuilder(CommonTreeAdaptor adaptor)
Parameter
NameDescription
adaptororg.antlr.runtime.tree.CommonTreeAdaptor

Methods

parse(String expression)

public CommonTree parse(String expression)

Parses the user expression and returns a CommonTree.

Parameter
NameDescription
expressionString

the expression to parse

Returns
TypeDescription
org.antlr.runtime.tree.CommonTree

a CommonTree constructed from the expression

Exceptions
TypeDescription
org.antlr.runtime.RecognitionException

if the user expression is invalid