public class QueryTreeBuilder
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.
Inherited Members
Constructors
QueryTreeBuilder()
public QueryTreeBuilder()
QueryTreeBuilder(QueryParserFactory parserFactory)
public QueryTreeBuilder(QueryParserFactory parserFactory)
Parameter | |
---|---|
Name | Description |
parserFactory |
QueryParserFactory |
Methods
parse(String query)
public CommonTree parse(String query)
Parses the user query and returns its AST.
Parameter | |
---|---|
Name | Description |
query |
String the user query to be parsed |
Returns | |
---|---|
Type | Description |
org.antlr.runtime.tree.CommonTree |
a CommonTree constructed from the query |
Exceptions | |
---|---|
Type | Description |
org.antlr.runtime.RecognitionException |
if the user query is invalid |