> Date: Thu, 4 Nov 2004 20:27:43 -0600
> From: "Thomas G. Habing" <[log in to unmask]>
>
> > In the past I have found that this query is legal and very ugly:
> > prox and/or <dc:title>and or</dc:title> and or
> >
> > prox and / or < dc:title > and or < /dc:title > and or
> > term bool/boolmodclause prefix index rel/relmodclause term
> >
> > HTH :)
>
> Not really :-) Reading the 1.1 BNF, I can't see how this is legal.
> My interpretation of the BNF is that prefix-assignments are only
> valid at the beginning of a cql-query.
Yes. This is another example of additional complexity added into the
official grammar in order to _reduce_ the power of the language. Very
silly. Once more, you will find that most of the parsers out there
just go ahead and do The Right Thing using the simpler and more
powerful grammar:
query = term [ boolean term ]*
term = '(' query ')'
| '>' prefix '=' uri term
| ...
etc.
The committee got bogged down in trying to prohibit certain semantics
by proscribing the syntax: a bit like if the grammar of C were defined
so that "1/0" was a syntax error. I am not going to waste everyone's
time (mine included) by going again into all the reason why this is a
bad idea; writing parsers that do The Right Thing is much more
effective response.
_/|_ _______________________________________________________________
/o ) \/ Mike Taylor <[log in to unmask]> http://www.miketaylor.org.uk
)_v__/\ "I *spit* on people who have their Z39.50 servers return
HTML-formatted records. I humiliate them publicly and curse
their ancestors" -- Sebastian Hammer.
--
Listen to free demos of soundtrack music for film, TV and radio
http://www.pipedreaming.org.uk/soundtrack/
|