projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into yaz4
[yaz-moved-to-github.git]
/
src
/
cqlstd.y
diff --git
a/src/cqlstd.y
b/src/cqlstd.y
index
0d81a5a
..
2daec40
100644
(file)
--- a/
src/cqlstd.y
+++ b/
src/cqlstd.y
@@
-1,10
+1,21
@@
-/* $Id: cqlstd.y,v 1.1 2005-11-15 12:23:32 adam Exp $
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data
+ * See the file LICENSE for details.
+ */
+/*
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.
*/
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;
cqlQuery : prefixAssignment cqlQuery | scopedClause;
prefixAssignment : '>' prefix '=' uri | '>' uri;
@@
-16,7
+27,7
@@
booleanGroup: boolean | boolean modifierList;
boolean : AND | OR | NOT | PROX ;
searchClause : '(' cqlQuery ')'
boolean : AND | OR | NOT | PROX ;
searchClause : '(' cqlQuery ')'
- | index relation searchTerm
+ | index relation searchClause
| searchTerm
;
| searchTerm
;
@@
-42,7
+53,7
@@
modifierValue: term;
searchTerm: term;
index: term;
searchTerm: term;
index: term;
-term: identifier | AND | OR | NOT | PROX ;
+term: identifier | AND | OR | NOT | PROX | SORTBY ;
identifier: CHARSTRING1 | CHARSTRING2;
identifier: CHARSTRING1 | CHARSTRING2;