Class ExpressionTreeBuilder


  • public class ExpressionTreeBuilder
    extends Object
    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.
    • Constructor Detail

      • ExpressionTreeBuilder

        public ExpressionTreeBuilder()
      • ExpressionTreeBuilder

        public ExpressionTreeBuilder​(org.antlr.runtime.tree.CommonTreeAdaptor adaptor)
    • Method Detail

      • parse

        public org.antlr.runtime.tree.CommonTree parse​(String expression)
                                                throws org.antlr.runtime.RecognitionException
        Parses the user expression and returns a CommonTree.
        Parameters:
        expression - the expression to parse
        Returns:
        a CommonTree constructed from the expression
        Throws:
        org.antlr.runtime.RecognitionException - if the user expression is invalid