On Thu, May 23, 2002 at 12:21:50PM -0400, Ray Denenberg wrote:
> CqlString ::= Term | Term Boolean CqlString
>
> Term ::= QualifiedTerm | "(" QualifiedTerm ")"
>
> QualifiedTerm ::= [IndexQualifier Relationship] SearchTerm
>
> IndexQualifier ::= [IndexSet.] IndexId
>
> IndexSet ::= SimpleString
> Relationship ::= "=" | "<" | ">" (etc)
> IndexId ::= SimpleString
> SearchTerm::= FunnyString
> Boolean::= 'AND', 'OR' (etc)
>
> Note: FunnyString yet to be defined. It will
> include spaces and special characters.
Some issues that come to mind immediately:
* Instead of 'etc', are the following complete?
Relationship ::= "=" | "<" | ">" | "<=" | ">=" | "<>"
Boolean::= "AND" | "OR" | "NOT"
* I prefer the grammar to define precedence if possible. For example,
if the binding of operators is OR, AND, NOT (ie: NOT is tightest) then
get rid of the "Boolean" rule and use:
CqlString ::= OrTerm *( "OR" OrTerm )
OrTerm ::= AndTerm *( "AND" AndTerm )
AndTerm ::= Term *( "NOT" Term )
Term ::= QualifiedTerm | "(" CqlString ")"
Note that I have changed the use of "()" to allow precendence changing
of AND and OR boolean connectors.
* Are "AND" and "OR" case sensitive or not? (Same for all reserved words).
* Do we need to refer to previous result sets? If so, I think someone
proposed:
Term ::= QualifiedTerm | "(" CqlString ")" | "set" "=" SimpleString
* I will raise (not propose) that CCL allows multiple IndexQualifiers
in front of a single term (so you can say Author,Title="smith").
QualifiedTerm ::=
[ IndexQualifier *( "," IndexQualifier ) Relationship ] SearchTerm
I think you want to finalize the above less contraversial issues before
working on the syntax for SearchTerm and contraversial ones, so I will
not propose grammar yet for the following points:
* How many of the Z39.50 PROX operators do we want to support?
(within n words, sentences, paragraphs? same sentence, paragraph, element?)
* What syntax for patterns? How to release special chars in patterns?
* I would like to introduce and extensible mechanism for named operators
to support GEO concepts such as "overlaps".
Alan
--
Alan Kent (mailto:[log in to unmask], http://www.mds.rmit.edu.au/~ajk/)
Project: TeraText Technical Director, InQuirion Pty Ltd (www.inquirion.com)
Postal: Multimedia Database Systems, RMIT, GPO Box 2476V, Melbourne 3001.
Where: RMIT MDS, Bld 91, Level 3, 110 Victoria St, Carlton 3053, VIC Australia.
Phone: +61 3 9925 4114 Reception: +61 3 9925 4099 Fax: +61 3 9925 4098
|