This is a draft of a basic query language for Gerrit, using a syntax
that is very similar to Apache Lucene, Google web search, or Gmail.
The current parser simply delimits expressions like "foo:bar that"
into basic boolean tree, using a simple FieldPredicate for any of
the operators present in the query. Invalid operators are caught
and thrown back at the caller, so that they may be reported.
The abstract QueryBuilder class can be used to create a custom
query language which relies on the basic language parser for the
syntax analysis, and conversion from ANTLR trees to the predicate
format we will use elsewhere. The current rules supported by the
ChangeListServiceImpl.searchQuery are codified in the new subclass
ChangeQueryBuilder, but we really want to support a much richer
set of operators in the near future.
JUnit tests for most of the predicate logic are also defined.
Signed-off-by: Shawn O. Pearce <sop@google.com>