From: Adam Dickmeiss Date: Thu, 14 Dec 2006 09:05:18 +0000 (+0000) Subject: For the CQL parser, make boolean node names lowercase.. but this time at X-Git-Tag: YAZ.2.1.42~6 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=85a1ec4eb983744107e98378be5f3a1d0c33ef52 For the CQL parser, make boolean node names lowercase.. but this time at the lexical level rather than at the parser level. --- diff --git a/src/cql.y b/src/cql.y index d01405d..187cba1 100644 --- a/src/cql.y +++ b/src/cql.y @@ -1,4 +1,4 @@ -/* $Id: cql.y,v 1.12 2006-12-14 08:55:52 adam Exp $ +/* $Id: cql.y,v 1.13 2006-12-14 09:05:18 adam Exp $ Copyright (C) 2002-2006 Index Data ApS @@ -135,11 +135,7 @@ searchClause: /* unary NOT search TERM here .. */ boolean: - AND { $$.buf = "and"; } -| OR { $$.buf = "or"; } -| NOT { $$.buf = "not"; } -| PROX { $$.buf = "prox"; } - ; + AND | OR | NOT | PROX ; modifiers: modifiers '/' searchTerm { @@ -302,13 +298,25 @@ int yylex(YYSTYPE *lval, void *vp) if (c != 0) cp->ungetbyte(c, cp->client_data); if (!cql_strcmp(lval->buf, "and")) + { + lval->buf = "and"; return AND; + } if (!cql_strcmp(lval->buf, "or")) + { + lval->buf = "or"; return OR; + } if (!cql_strcmp(lval->buf, "not")) + { + lval->buf = "not"; return NOT; + } if (!cql_strcmp(lval->buf, "prox")) + { + lval->buf = "prox"; return PROX; + } } return TERM; }