Class QueryTreeBuilder


  • public class QueryTreeBuilder
    extends Object
    A generator of AST representation of a query. This class uses the given factory to produce a query parser which parses user specified query. If successful it returns the root of an AST representing the parsed query.
    • Constructor Detail

      • QueryTreeBuilder

        public QueryTreeBuilder()
    • Method Detail

      • parse

        public org.antlr.runtime.tree.CommonTree parse​(String query)
                                                throws org.antlr.runtime.RecognitionException
        Parses the user query and returns its AST.
        Parameters:
        query - the user query to be parsed
        Returns:
        a CommonTree constructed from the query
        Throws:
        org.antlr.runtime.RecognitionException - if the user query is invalid
        NullPointerException - if query is null