Link SSL with libyaz.la and yaz-client only.
[yaz-moved-to-github.git] / src / cqlstd.y
1 /* This file is part of the YAZ toolkit.
2  * Copyright (C) 1995-2008 Index Data
3  * See the file LICENSE for details.
4  */
5 /*
6   YACC CQL grammar taken verbatim from the official spec. We don't
7   use that in YAZ but I don't know of a better place to put it.
8  */
9 %term GE LE NE AND OR NOT PROX CHARSTRING1 CHARSTRING2 SORTBY
10
11 %%
12 sortedQuery : prefixAssignment sortedQuery 
13             | scopedClause
14             | scopedClause SORTBY sortSpec;
15
16 sortSpec : sortSpec singleSpec | singleSpec;
17 singleSpec : index modifierList | index ;
18
19 cqlQuery : prefixAssignment cqlQuery | scopedClause;
20
21 prefixAssignment : '>' prefix '=' uri | '>' uri;
22
23 scopedClause : scopedClause booleanGroup searchClause | searchClause ;
24
25 booleanGroup: boolean | boolean modifierList;
26
27 boolean : AND | OR | NOT | PROX ;
28
29 searchClause : '(' cqlQuery ')'
30              | index relation searchClause
31              | searchTerm
32              ;
33
34 relation : comparitor | comparitor modifierList;
35
36 comparitor : comparitorSymbol | namedComparitor ;
37
38 comparitorSymbol : '=' | '>' | '<' | GE | LE | NE;
39
40 namedComparitor : identifier;
41
42 modifierList : modifierList modifier  | modifier;
43
44 modifier : '/' modifierName 
45          | '/' modifierName comparitorSymbol modifierValue
46          ;
47      
48
49 prefix : term;
50 uri : term;
51 modifierName: term;
52 modifierValue: term;
53 searchTerm: term;
54 index: term;
55
56 term: identifier | AND | OR | NOT | PROX | SORTBY ;
57
58 identifier: CHARSTRING1 | CHARSTRING2;
59
60 %%