Adapted from ezcSearchQueryBuilder and ezcSearchQueryToken
http://svn.ezcomponents.org/viewvc.cgi/trunk/Search/src
License: New BSD License
http://ez.no/licenses/new_bsd
The main difference is that this set of classes
* only addresses parsing and query generation, it does not handle communication with a Solr server like ezcSearch does
* makes it possible to hook in totally different serialization formats for the generated queries.
* the parser has been expanded to also support
* backslash escape chars
* makes brace support optional
* properly implements fielded terms
* make the parser itself is extensible.
This all might be merged back into ezcSearch eventually and needs unit testing etc.
I developed this to parse solr queries for resolutionfinder.org and construct queries against apache solr