[Wasabi Proposal] End user search language
Jean-Francois Dockes
jean-francois.dockes at wanadoo.fr
Mon Jan 29 04:33:01 PST 2007
Mikkel Kamstrup Erlandsen writes:
> 2007/1/29, Jean-Francois Dockes <jean-francois.dockes at wanadoo.fr>:
> >
> > Mikkel Kamstrup Erlandsen writes:
> > > Hi All,
> > >
> > > I put together a first take on formalizing an end user search language.
> > >
> > > http://wiki.freedesktop.org/wiki/WasabiUserSearchLanguage
> >
> > - Which of OR and AND has priority ? (does (A AND B OR C) mean
> > ((A AND B) OR C) or (A AND (B OR C)) ?
>
>
> I guess it is standard that AND takes precedence over OR, but maybe it makes
> sense to reverse that in our case. Think of the case
> type:audio hendrix OR beatles
>
> In this case I would assume the user wants "audio files matching hendrix or
> beatles", and not "audio files matching hendrix, or anything that matches
> beatles"... I think it is non-standard however...
Yes, after checking, in C/C++, AND has higger precedence. I could have
sworn that they had equal... And I would'nt dare writing this kind of
expression without parentheses anyway.
In our case, I think that you are right and that it makes more sense to
have OR take precedence, this has my vote.
jf
More information about the xdg
mailing list