1 /* $Id: cqlstd.y,v 1.3 2006-03-02 09:38:41 adam Exp $
2 YACC CQL grammar taken verbatim from the official spec. We don't
3 use that in YAZ but I don't know of a better place to put it.
5 %term GE LE NE AND OR NOT PROX CHARSTRING1 CHARSTRING2 SORTBY
8 sortedQuery : prefixAssignment sortedQuery
10 | scopedClause SORTBY sortSpec;
12 sortSpec : sortSpec singleSpec | singleSpec;
13 singleSpec : index modifierList | index ;
15 cqlQuery : prefixAssignment cqlQuery | scopedClause;
17 prefixAssignment : '>' prefix '=' uri | '>' uri;
19 scopedClause : scopedClause booleanGroup searchClause | searchClause ;
21 booleanGroup: boolean | boolean modifierList;
23 boolean : AND | OR | NOT | PROX ;
25 searchClause : '(' cqlQuery ')'
26 | index relation searchClause
30 relation : comparitor | comparitor modifierList;
32 comparitor : comparitorSymbol | namedComparitor ;
34 comparitorSymbol : '=' | '>' | '<' | GE | LE | NE;
36 namedComparitor : identifier;
38 modifierList : modifierList modifier | modifier;
40 modifier : '/' modifierName
41 | '/' modifierName comparitorSymbol modifierValue
52 term: identifier | AND | OR | NOT | PROX | SORTBY ;
54 identifier: CHARSTRING1 | CHARSTRING2;