X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fcqlstd.y;h=cd2238d1aee4c7195da4a58289644620ecfe37f0;hp=0d81a5a9dfccb9c39652b3cee837723b76123e9e;hb=2979c8fc3b5c53c06facad850dcae09645b43044;hpb=5451196efde939261211e1c15e0bc373b527d33c diff --git a/src/cqlstd.y b/src/cqlstd.y index 0d81a5a..cd2238d 100644 --- a/src/cqlstd.y +++ b/src/cqlstd.y @@ -1,10 +1,17 @@ -/* $Id: cqlstd.y,v 1.1 2005-11-15 12:23:32 adam Exp $ +/* $Id: cqlstd.y,v 1.3 2006-03-02 09:38:41 adam Exp $ YACC CQL grammar taken verbatim from the official spec. We don't use that in YAZ but I don't know of a better place to put it. */ -%term GE LE NE AND OR NOT PROX CHARSTRING1 CHARSTRING2 +%term GE LE NE AND OR NOT PROX CHARSTRING1 CHARSTRING2 SORTBY %% +sortedQuery : prefixAssignment sortedQuery + | scopedClause + | scopedClause SORTBY sortSpec; + +sortSpec : sortSpec singleSpec | singleSpec; +singleSpec : index modifierList | index ; + cqlQuery : prefixAssignment cqlQuery | scopedClause; prefixAssignment : '>' prefix '=' uri | '>' uri; @@ -16,7 +23,7 @@ booleanGroup: boolean | boolean modifierList; boolean : AND | OR | NOT | PROX ; searchClause : '(' cqlQuery ')' - | index relation searchTerm + | index relation searchClause | searchTerm ; @@ -42,7 +49,7 @@ modifierValue: term; searchTerm: term; index: term; -term: identifier | AND | OR | NOT | PROX ; +term: identifier | AND | OR | NOT | PROX | SORTBY ; identifier: CHARSTRING1 | CHARSTRING2;