Classes
ExpressionLexer
ExpressionLexer.DFA16
ExpressionLexer.DFA9
ExpressionParser
ExpressionParser.DFA10
ExpressionParser.addExpr_return
ExpressionParser.addOp_return
ExpressionParser.atom_return
ExpressionParser.cmpExpr_return
ExpressionParser.cmpOp_return
ExpressionParser.condExpr_return
ExpressionParser.conjunction_return
ExpressionParser.disjunction_return
ExpressionParser.expression_return
ExpressionParser.fnName_return
ExpressionParser.fn_return
ExpressionParser.index_return
ExpressionParser.multExpr_return
ExpressionParser.multOp_return
ExpressionParser.name_return
ExpressionParser.negation_return
ExpressionParser.num_return
ExpressionParser.str_return
ExpressionParser.unary_return
ExpressionParser.var_return
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.
ParserUtils
A helper class that holds various, state-less utility functions used by the query parser.
QueryLexer
QueryParser
QueryParser.DFA10
QueryParser.DFA11
QueryParser.DFA14
QueryParser.DFA4
QueryParser.DFA5
QueryParser.DFA6
QueryParser.DFA8
QueryParser.DFA9
QueryParser.andOp_return
QueryParser.arg_return
QueryParser.arglist_return
QueryParser.comparable_return
QueryParser.comparator_return
QueryParser.composite_return
QueryParser.expression_return
QueryParser.factor_return
QueryParser.function_return
QueryParser.item_return
QueryParser.member_return
QueryParser.notOp_return
QueryParser.orOp_return
QueryParser.phrase_return
QueryParser.primitive_return
QueryParser.query_return
QueryParser.restriction_return
QueryParser.sep_return
QueryParser.sequence_return
QueryParser.term_return
QueryParser.text_return
QueryParser.value_return
QueryParserFactory
A factory which produces QueryParsers for a given token rewrite stream.
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.
QueryTreeContext<T>
The base class for specific query tree context used by the walker. This class is used to maintain additional information gathered while walking the tree. On this level it is used to collect return type information.
QueryTreeWalker<T>
The walking of the query tree. This class takes care of visiting a tree resulting from parsing a query. As it traverses the tree it calls appropriate methods of the visitor, set at the construction time. The class uses a depth-first search, visiting all children of a node, before visiting the node. The visit is done by calling an appropriate method of the visitor. Typical code should match the following pattern:
class MyVisitor implements QueryTreeVisitor {
...
}
class MyContext extends QueryTreeContext<MyContext> {
...
@Override
protected MyContext newChildContext() {
return new MyContext();
}
}
MyContext context = new MyContext();
QueryTreeWalker<MyContext> walker = new QueryTreeWalker<MyContext>(new MyVisitor());
Tree root = parser.query(queryStr);
walker.walk(root, context);
// retrieve whatever information you need from context
Interfaces
QueryTreeVisitor<T>
Defines an interface of the visitor invoked by the walker.
Enums
QueryTreeContext.Kind
Enumeration of the kind of the term that has a given return type. This enum makes more precise the return type. For example, if the return type is TEXT, and the Kind is PHRASE, this means that the caller supplied "..." as the query term.
QueryTreeContext.RewriteMode
Enumeration of text terms rewrite mode.
QueryTreeContext.Type
Enumeration of supported return types.
Exceptions
QueryTreeException
A parsing exception thrown when the tree resulting from parsing a query is in some sense invalid.