-/* $Id: cql.y,v 1.16 2008-01-06 13:08:09 adam Exp $
- Copyright (C) 2002-2006
- Index Data ApS
-
-This file is part of the YAZ toolkit.
-
-See the file LICENSE.
-
- bison parser for CQL grammar.
-*/
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data
+ * See the file LICENSE for details.
+ */
+/* bison parser for CQL grammar. */
%{
/**
* \file cql.c
$$.cql = $3.cql;
}
|
- searchTerm {
- struct cql_node *st = cql_node_dup (((CQL_parser) parm)->nmem, $0.rel);
+searchTerm extraTerms {
+ struct cql_node *st = cql_node_dup(((CQL_parser) parm)->nmem, $0.rel);
+ st->u.st.extra_terms = $2.cql;
st->u.st.term = nmem_strdup(((CQL_parser)parm)->nmem, $1.buf);
$$.cql = st;
}
}
;
+extraTerms:
+extraTerms TERM {
+ struct cql_node *st = cql_node_mk_sc(((CQL_parser) parm)->nmem,
+ /* index */ 0, /* rel */ 0, $2.buf);
+ st->u.st.extra_terms = $1.cql;
+ $$.cql = st;
+}
+|
+{ $$.cql = 0; }
+;
+
+
/* unary NOT search TERM here .. */
boolean:
}
;
-/*
-extraTerms:
- extraTerms TERM | ;
-*/
-
mrelation:
'='
| '>'