/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) 1995-2013 Index Data
* See the file LICENSE for details.
*/
-/**
+/**
* \file ccltoken.c
* \brief Implements CCL lexical analyzer (scanner)
*/
default:
--cp;
--last->len;
-
+
last->kind = CCL_TOK_TERM;
last->name = (const char *) cp;
while (*cp && !strchr("(),%!><= \t\n\r", *cp))
else if (*cp == '"')
break;
}
- }
+ }
if (!*cp)
break;
cp++;
aliases = cclp->ccl_token_and;
if (token_cmp(cclp, aliases, last))
last->kind = CCL_TOK_AND;
-
+
aliases = ccl_qual_search_special(cclp->bibset, "or");
if (!aliases)
aliases = cclp->ccl_token_or;
if (token_cmp(cclp, aliases, last))
last->kind = CCL_TOK_OR;
-
+
aliases = ccl_qual_search_special(cclp->bibset, "not");
if (!aliases)
aliases = cclp->ccl_token_not;
if (token_cmp(cclp, aliases, last))
last->kind = CCL_TOK_NOT;
-
+
aliases = ccl_qual_search_special(cclp->bibset, "set");
if (!aliases)
aliases = cclp->ccl_token_set;
-
+
if (token_cmp(cclp, aliases, last))
last->kind = CCL_TOK_SET;
}
n->ws_prefix_len = 0;
return n;
}
-
+
/*
* ccl_token_del: delete CCL tokens
*/
{
struct ccl_token *list1;
- while (list)
+ while (list)
{
list1 = list->next;
xfree(list);