On Mon, 14 Nov 2005, Ross Singer wrote:
>Mike Taylor wrote:
>> Well, yeah. It is true that people who have never learned how to
>>implement recursive-descent parsers from BNF grammars are going to
>>struggle to implement a recursive-descent CQL parser from its BNF
>>grammar. That is not a property of the CQL grammar, though, which is
>>about as straightforward as a non-toy grammar gets.
> This sort of negates any claim that "SRU is simple", though, doesn't it?
A couple of responses:
It's quite possible to write an SRU server that fulfils all of the base
profile without being able to parse (let alone respond to) all valid CQL
queries. Tom Habing, for example, wrote a regular expression based CQL
parser, as opposed to a recursive descent parser like Adam's, Mike's and
mine, which answers all sane CQL queries that I've thrown at it.
Secondly, CQL doesn't change per SRU implementation, whereas the
database interaction does. If I was implementing SRU tomorrow against
an arbitrary database, I wouldn't re-implement a CQL parser just for
that database, I'd use one of the existing ones. Just the same as most
people wouldn't write their own SOAP library to implement SRW or their
own XML parser, most people won't write their own CQL parser ... and
don't have to, as there are existing open source implementations for the