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
Name Description
adaptor org.antlr.runtime.tree.CommonTreeAdaptor

Methods

parse(String expression)

public CommonTree parse(String expression)

Parses the user expression and returns a CommonTree.

Parameter
Name Description
expression String

the expression to parse

Returns
Type Description
org.antlr.runtime.tree.CommonTree

a CommonTree constructed from the expression

Exceptions
Type Description
org.antlr.runtime.RecognitionException

if the user expression is invalid