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