2 * Copyright (C) 1995-2008, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: cclfind.c,v 1.15 2008-01-09 21:32:27 adam Exp $
9 * \brief Implements parsing of a CCL FIND query.
11 * This source file implements parsing of a CCL Query (ISO8777).
12 * The parser uses predictive parsing, but it does several tokens
13 * of lookahead in the handling of relational operations.. So
14 * it's not really pure.
22 /* returns type of current lookahead */
23 #define KIND (cclp->look_token->kind)
25 /* move one token forward */
26 #define ADVANCE cclp->look_token = cclp->look_token->next
29 * qual_val_type: test for existance of attribute type/value pair.
31 * type: Type of attribute to search for
32 * value: Value of attribute to seach for
33 * return: 1 if found; 0 otherwise.
35 static int qual_val_type(ccl_qualifier_t *qa, int type, int value,
42 for (i = 0; qa[i]; i++)
44 struct ccl_rpn_attr *q = ccl_qual_get_attr(qa[i]);
47 if (q->type == type && q->kind == CCL_RPN_ATTR_NUMERIC &&
48 q->value.numeric == value)
61 * strxcat: concatenate strings.
62 * n: Null-terminated Destination string
63 * src: Source string to be appended (not null-terminated)
64 * len: Length of source string.
66 static void strxcat(char *n, const char *src, int len)
76 * copy_token_name: Return copy of CCL token name
77 * tp: Pointer to token info.
78 * return: malloc(3) allocated copy of token name.
80 static char *copy_token_name(struct ccl_token *tp)
82 char *str = (char *)xmalloc(tp->len + 1);
84 memcpy(str, tp->name, tp->len);
90 * mk_node: Create RPN node.
92 * return: pointer to allocated node.
94 struct ccl_rpn_node *ccl_rpn_node_create(enum ccl_rpn_kind kind)
96 struct ccl_rpn_node *p;
97 p = (struct ccl_rpn_node *)xmalloc(sizeof(*p));
104 p->u.t.attr_list = 0;
115 * ccl_rpn_delete: Delete RPN tree.
116 * rpn: Pointer to tree.
118 void ccl_rpn_delete(struct ccl_rpn_node *rpn)
120 struct ccl_rpn_attr *attr, *attr1;
128 ccl_rpn_delete(rpn->u.p[0]);
129 ccl_rpn_delete(rpn->u.p[1]);
132 xfree(rpn->u.t.term);
133 xfree(rpn->u.t.qual);
134 for (attr = rpn->u.t.attr_list; attr; attr = attr1)
137 if (attr->kind == CCL_RPN_ATTR_STRING)
138 xfree(attr->value.str);
145 xfree(rpn->u.setname);
148 ccl_rpn_delete(rpn->u.p[0]);
149 ccl_rpn_delete(rpn->u.p[1]);
150 ccl_rpn_delete(rpn->u.p[2]);
156 static struct ccl_rpn_node *find_spec(CCL_parser cclp, ccl_qualifier_t *qa);
158 static int is_term_ok(int look, int *list)
160 for (;*list >= 0; list++)
166 static struct ccl_rpn_node *search_terms(CCL_parser cclp, ccl_qualifier_t *qa);
168 static struct ccl_rpn_attr *add_attr_node(struct ccl_rpn_node *p,
169 const char *set, int type)
171 struct ccl_rpn_attr *n;
173 n = (struct ccl_rpn_attr *)xmalloc(sizeof(*n));
176 n->set = xstrdup(set);
180 n->next = p->u.t.attr_list;
181 p->u.t.attr_list = n;
187 * add_attr_numeric: Add attribute (type/value) to RPN term node.
188 * p: RPN node of type term.
189 * type: Type of attribute
190 * value: Value of attribute
191 * set: Attribute set name
193 void ccl_add_attr_numeric(struct ccl_rpn_node *p, const char *set,
196 struct ccl_rpn_attr *n;
198 n = add_attr_node(p, set, type);
199 n->kind = CCL_RPN_ATTR_NUMERIC;
200 n->value.numeric = value;
203 void ccl_add_attr_string(struct ccl_rpn_node *p, const char *set,
204 int type, char *value)
206 struct ccl_rpn_attr *n;
208 n = add_attr_node(p, set, type);
209 n->kind = CCL_RPN_ATTR_STRING;
210 n->value.str = xstrdup(value);
215 * search_term: Parse CCL search term.
217 * qa: Qualifier attributes already applied.
218 * term_list: tokens we accept as terms in context
219 * multi: whether we accept "multiple" tokens
220 * return: pointer to node(s); NULL on error.
222 static struct ccl_rpn_node *search_term_x(CCL_parser cclp,
224 int *term_list, int multi)
226 struct ccl_rpn_node *p_top = 0;
227 struct ccl_token *lookahead = cclp->look_token;
231 const char **truncation_aliases;
232 const char *t_default[2];
235 ccl_qual_search_special(cclp->bibset, "truncation");
236 if (!truncation_aliases)
238 truncation_aliases = t_default;
243 if (qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_AND_LIST, 0))
245 if (qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_OR_LIST, 0))
249 struct ccl_rpn_node *p;
255 int relation_value = -1;
256 int position_value = -1;
257 int structure_value = -1;
258 int truncation_value = -1;
259 int completeness_value = -1;
262 if (and_list || or_list || !multi)
265 /* ignore commas when dealing with and-lists .. */
266 if (and_list && lookahead && lookahead->kind == CCL_TOK_COMMA)
268 lookahead = lookahead->next;
272 /* go through each TERM token. If no truncation attribute is yet
273 met, then look for left/right truncation markers (?) and
274 set left_trunc/right_trunc/mid_trunc accordingly */
275 for (no = 0; no < max && is_term_ok(lookahead->kind, term_list); no++)
277 for (i = 0; i<lookahead->len; i++)
278 if (lookahead->name[i] == ' ')
280 else if (strchr(truncation_aliases[0], lookahead->name[i]))
282 if (no == 0 && i == 0 && lookahead->len >= 1)
284 else if (!is_term_ok(lookahead->next->kind, term_list) &&
285 i == lookahead->len-1 && i >= 1)
290 len += 1+lookahead->len+lookahead->ws_prefix_len;
291 lookahead = lookahead->next;
295 break; /* no more terms . stop . */
297 /* create the term node, but wait a moment before adding the term */
298 p = ccl_rpn_node_create(CCL_RPN_TERM);
299 p->u.t.attr_list = NULL;
303 const char *n = ccl_qual_get_name(qa[0]);
305 p->u.t.qual = xstrdup(n);
308 /* go through all attributes and add them to the attribute list */
309 for (i=0; qa && qa[i]; i++)
311 struct ccl_rpn_attr *attr;
313 for (attr = ccl_qual_get_attr(qa[i]); attr; attr = attr->next)
316 case CCL_RPN_ATTR_STRING:
317 ccl_add_attr_string(p, attr->set, attr->type,
320 case CCL_RPN_ATTR_NUMERIC:
321 if (attr->value.numeric > 0)
322 { /* deal only with REAL attributes (positive) */
326 if (relation_value != -1)
328 relation_value = attr->value.numeric;
331 if (position_value != -1)
333 position_value = attr->value.numeric;
336 if (structure_value != -1)
338 structure_value = attr->value.numeric;
341 if (truncation_value != -1)
343 truncation_value = attr->value.numeric;
344 left_trunc = right_trunc = mid_trunc = 0;
347 if (completeness_value != -1)
349 completeness_value = attr->value.numeric;
352 ccl_add_attr_numeric(p, attr->set, attr->type,
353 attr->value.numeric);
357 /* len now holds the number of characters in the RPN term */
358 /* no holds the number of CCL tokens (1 or more) */
360 if (structure_value == -1 &&
361 qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_WP, &attset))
362 { /* no structure attribute met. Apply either structure attribute
363 WORD or PHRASE depending on number of CCL tokens */
364 if (no == 1 && no_spaces == 0)
365 ccl_add_attr_numeric(p, attset, CCL_BIB1_STR, 2);
367 ccl_add_attr_numeric(p, attset, CCL_BIB1_STR, 1);
370 /* make the RPN token */
371 p->u.t.term = (char *)xmalloc(len);
372 ccl_assert(p->u.t.term);
373 p->u.t.term[0] = '\0';
374 for (i = 0; i<no; i++)
376 const char *src_str = cclp->look_token->name;
377 size_t src_len = cclp->look_token->len;
379 if (i == 0 && left_trunc)
384 if (i == no-1 && right_trunc)
386 if (p->u.t.term[0] && cclp->look_token->ws_prefix_len)
388 size_t len = strlen(p->u.t.term);
389 memcpy(p->u.t.term + len, cclp->look_token->ws_prefix_buf,
390 cclp->look_token->ws_prefix_len);
391 p->u.t.term[len + cclp->look_token->ws_prefix_len] = '\0';
393 strxcat(p->u.t.term, src_str, src_len);
397 /* make the top node point to us.. */
400 struct ccl_rpn_node *tmp;
403 tmp = ccl_rpn_node_create(CCL_RPN_OR);
405 tmp = ccl_rpn_node_create(CCL_RPN_AND);
407 tmp = ccl_rpn_node_create(CCL_RPN_AND);
417 if (left_trunc && right_trunc)
419 if (!qual_val_type(qa, CCL_BIB1_TRU, CCL_BIB1_TRU_CAN_BOTH,
422 cclp->error_code = CCL_ERR_TRUNC_NOT_BOTH;
426 ccl_add_attr_numeric(p, attset, CCL_BIB1_TRU, 3);
428 else if (right_trunc)
430 if (!qual_val_type(qa, CCL_BIB1_TRU, CCL_BIB1_TRU_CAN_RIGHT,
433 cclp->error_code = CCL_ERR_TRUNC_NOT_RIGHT;
437 ccl_add_attr_numeric(p, attset, CCL_BIB1_TRU, 1);
441 if (!qual_val_type(qa, CCL_BIB1_TRU, CCL_BIB1_TRU_CAN_LEFT,
444 cclp->error_code = CCL_ERR_TRUNC_NOT_LEFT;
448 ccl_add_attr_numeric(p, attset, CCL_BIB1_TRU, 2);
452 if (qual_val_type(qa, CCL_BIB1_TRU, CCL_BIB1_TRU_CAN_NONE,
454 ccl_add_attr_numeric(p, attset, CCL_BIB1_TRU, 100);
460 cclp->error_code = CCL_ERR_TERM_EXPECTED;
464 static struct ccl_rpn_node *search_term(CCL_parser cclp, ccl_qualifier_t *qa)
466 static int list[] = {CCL_TOK_TERM, CCL_TOK_COMMA, -1};
467 return search_term_x(cclp, qa, list, 0);
471 struct ccl_rpn_node *qualifiers_order(CCL_parser cclp,
472 ccl_qualifier_t *ap, char *attset)
475 struct ccl_rpn_node *p;
477 if (cclp->look_token->len == 1)
479 if (cclp->look_token->name[0] == '<')
481 else if (cclp->look_token->name[0] == '=')
483 else if (cclp->look_token->name[0] == '>')
486 else if (cclp->look_token->len == 2)
488 if (!memcmp(cclp->look_token->name, "<=", 2))
490 else if (!memcmp(cclp->look_token->name, ">=", 2))
492 else if (!memcmp(cclp->look_token->name, "<>", 2))
497 cclp->error_code = CCL_ERR_BAD_RELATION;
500 ADVANCE; /* skip relation */
502 qual_val_type(ap, CCL_BIB1_REL, CCL_BIB1_REL_PORDER, 0))
504 /* allow - inside term and treat it as range _always_ */
505 /* relation is =. Extract "embedded" - to separate terms */
506 if (KIND == CCL_TOK_TERM)
509 for (i = 0; i<cclp->look_token->len; i++)
511 if (cclp->look_token->name[i] == '-')
515 if (cclp->look_token->len > 1 && i == 0)
517 struct ccl_token *ntoken = ccl_token_add(cclp->look_token);
519 ntoken->kind = CCL_TOK_TERM;
520 ntoken->name = cclp->look_token->name + 1;
521 ntoken->len = cclp->look_token->len - 1;
523 cclp->look_token->len = 1;
524 cclp->look_token->name = "-";
526 else if (cclp->look_token->len > 1 && i == cclp->look_token->len-1)
528 struct ccl_token *ntoken = ccl_token_add(cclp->look_token);
530 ntoken->kind = CCL_TOK_TERM;
534 (cclp->look_token->len)--;
536 else if (cclp->look_token->len > 2 && i < cclp->look_token->len)
538 struct ccl_token *ntoken1 = ccl_token_add(cclp->look_token);
539 struct ccl_token *ntoken2 = ccl_token_add(ntoken1);
541 ntoken1->kind = CCL_TOK_TERM; /* generate - */
545 ntoken2->kind = CCL_TOK_TERM; /* generate yy */
546 ntoken2->name = cclp->look_token->name + (i+1);
547 ntoken2->len = cclp->look_token->len - (i+1);
549 cclp->look_token->len = i; /* adjust xx */
551 else if (i == cclp->look_token->len &&
552 cclp->look_token->next &&
553 cclp->look_token->next->kind == CCL_TOK_TERM &&
554 cclp->look_token->next->len > 1 &&
555 cclp->look_token->next->name[0] == '-')
558 /* we _know_ that xx does not have - in it */
559 struct ccl_token *ntoken = ccl_token_add(cclp->look_token);
561 ntoken->kind = CCL_TOK_TERM; /* generate - */
565 (ntoken->next->name)++; /* adjust yy */
566 (ntoken->next->len)--;
572 KIND == CCL_TOK_TERM &&
573 cclp->look_token->next && cclp->look_token->next->len == 1 &&
574 cclp->look_token->next->name[0] == '-')
576 struct ccl_rpn_node *p1;
577 if (!(p1 = search_term(cclp, ap)))
579 ADVANCE; /* skip '-' */
580 if (KIND == CCL_TOK_TERM) /* = term - term ? */
582 struct ccl_rpn_node *p2;
584 if (!(p2 = search_term(cclp, ap)))
589 p = ccl_rpn_node_create(CCL_RPN_AND);
591 ccl_add_attr_numeric(p1, attset, CCL_BIB1_REL, 4);
593 ccl_add_attr_numeric(p2, attset, CCL_BIB1_REL, 2);
598 ccl_add_attr_numeric(p1, attset, CCL_BIB1_REL, 4);
603 cclp->look_token->len == 1 &&
604 cclp->look_token->name[0] == '-') /* = - term ? */
607 if (!(p = search_term(cclp, ap)))
609 ccl_add_attr_numeric(p, attset, CCL_BIB1_REL, 2);
612 else if (KIND == CCL_TOK_LP)
615 if (!(p = find_spec(cclp, ap)))
617 if (KIND != CCL_TOK_RP)
619 cclp->error_code = CCL_ERR_RP_EXPECTED;
628 if (!(p = search_terms(cclp, ap)))
630 ccl_add_attr_numeric(p, attset, CCL_BIB1_REL, rel);
633 cclp->error_code = CCL_ERR_TERM_EXPECTED;
638 struct ccl_rpn_node *qualifier_relation(CCL_parser cclp, ccl_qualifier_t *ap)
641 struct ccl_rpn_node *p;
643 if (qual_val_type(ap, CCL_BIB1_REL, CCL_BIB1_REL_ORDER, &attset)
644 || qual_val_type(ap, CCL_BIB1_REL, CCL_BIB1_REL_PORDER, &attset))
645 return qualifiers_order(cclp, ap, attset);
647 /* unordered relation */
648 if (KIND != CCL_TOK_EQ)
650 cclp->error_code = CCL_ERR_EQ_EXPECTED;
654 if (KIND == CCL_TOK_LP)
657 if (!(p = find_spec(cclp, ap)))
661 if (KIND != CCL_TOK_RP)
663 cclp->error_code = CCL_ERR_RP_EXPECTED;
670 p = search_terms(cclp, ap);
675 * qualifier_list: Parse CCL qualifiers and search terms.
677 * la: Token pointer to RELATION token.
678 * qa: Qualifier attributes already applied.
679 * return: pointer to node(s); NULL on error.
681 static struct ccl_rpn_node *qualifier_list(CCL_parser cclp,
682 struct ccl_token *la,
685 struct ccl_token *lookahead = cclp->look_token;
686 struct ccl_token *look_start = cclp->look_token;
688 struct ccl_rpn_node *node = 0;
689 const char **field_str;
697 cclp->error_code = CCL_ERR_DOUBLE_QUAL;
701 for (lookahead = cclp->look_token; lookahead != la;
702 lookahead=lookahead->next)
705 for (i=0; qa[i]; i++)
707 ap = (ccl_qualifier_t *)xmalloc((no ? (no+1) : 2) * sizeof(*ap));
710 field_str = ccl_qual_search_special(cclp->bibset, "field");
713 if (!strcmp(field_str[0], "or"))
715 else if (!strcmp(field_str[0], "merge"))
720 /* consider each field separately and OR */
721 lookahead = look_start;
722 while (lookahead != la)
726 while ((ap[0] = ccl_qual_search(cclp, lookahead->name,
727 lookahead->len, seq)) != 0)
729 struct ccl_rpn_node *node_sub;
730 cclp->look_token = la;
732 node_sub = qualifier_relation(cclp, ap);
735 ccl_rpn_delete(node);
741 struct ccl_rpn_node *node_this =
742 ccl_rpn_node_create(CCL_RPN_OR);
743 node_this->u.p[0] = node;
744 node_this->u.p[1] = node_sub;
753 cclp->look_token = lookahead;
754 cclp->error_code = CCL_ERR_UNKNOWN_QUAL;
758 lookahead = lookahead->next;
759 if (lookahead->kind == CCL_TOK_COMMA)
760 lookahead = lookahead->next;
765 /* merge attributes from ALL fields - including inherited ones */
768 struct ccl_rpn_node *node_sub;
770 lookahead = look_start;
771 for (i = 0; lookahead != la; i++)
773 ap[i] = ccl_qual_search(cclp, lookahead->name,
774 lookahead->len, seq);
777 if (!ap[i] && seq > 0)
778 ap[i] = ccl_qual_search(cclp, lookahead->name,
782 cclp->look_token = lookahead;
783 cclp->error_code = CCL_ERR_UNKNOWN_QUAL;
787 lookahead = lookahead->next;
788 if (lookahead->kind == CCL_TOK_COMMA)
789 lookahead = lookahead->next;
793 ccl_qualifier_t *qa0 = qa;
803 cclp->look_token = lookahead;
805 node_sub = qualifier_relation(cclp, ap);
808 ccl_rpn_delete(node);
813 struct ccl_rpn_node *node_this =
814 ccl_rpn_node_create(CCL_RPN_OR);
815 node_this->u.p[0] = node;
816 node_this->u.p[1] = node_sub;
830 * search_terms: Parse CCL search terms - including proximity.
832 * qa: Qualifier attributes already applied.
833 * return: pointer to node(s); NULL on error.
835 static struct ccl_rpn_node *search_terms(CCL_parser cclp, ccl_qualifier_t *qa)
837 static int list[] = {
838 CCL_TOK_TERM, CCL_TOK_COMMA,CCL_TOK_EQ, CCL_TOK_REL, CCL_TOK_SET, -1};
839 struct ccl_rpn_node *p1, *p2, *pn;
840 p1 = search_term_x(cclp, qa, list, 1);
845 if (KIND == CCL_TOK_PROX)
847 struct ccl_rpn_node *p_prox = 0;
848 /* ! word order specified */
849 /* % word order not specified */
850 p_prox = ccl_rpn_node_create(CCL_RPN_TERM);
851 p_prox->u.t.term = (char *) xmalloc(1 + cclp->look_token->len);
852 memcpy(p_prox->u.t.term, cclp->look_token->name,
853 cclp->look_token->len);
854 p_prox->u.t.term[cclp->look_token->len] = 0;
855 p_prox->u.t.attr_list = 0;
858 p2 = search_term_x(cclp, qa, list, 1);
864 pn = ccl_rpn_node_create(CCL_RPN_PROX);
870 else if (is_term_ok(KIND, list))
872 p2 = search_term_x(cclp, qa, list, 1);
878 pn = ccl_rpn_node_create(CCL_RPN_PROX);
891 * search_elements: Parse CCL search elements
893 * qa: Qualifier attributes already applied.
894 * return: pointer to node(s); NULL on error.
896 static struct ccl_rpn_node *search_elements(CCL_parser cclp,
899 struct ccl_rpn_node *p1;
900 struct ccl_token *lookahead;
901 if (KIND == CCL_TOK_LP)
904 p1 = find_spec(cclp, qa);
907 if (KIND != CCL_TOK_RP)
909 cclp->error_code = CCL_ERR_RP_EXPECTED;
916 else if (KIND == CCL_TOK_SET)
919 if (KIND == CCL_TOK_EQ)
921 if (KIND != CCL_TOK_TERM)
923 cclp->error_code = CCL_ERR_SETNAME_EXPECTED;
926 p1 = ccl_rpn_node_create(CCL_RPN_SET);
927 p1->u.setname = copy_token_name(cclp->look_token);
931 lookahead = cclp->look_token;
933 while (lookahead->kind==CCL_TOK_TERM)
935 lookahead = lookahead->next;
936 if (lookahead->kind == CCL_TOK_REL || lookahead->kind == CCL_TOK_EQ)
937 return qualifier_list(cclp, lookahead, qa);
938 if (lookahead->kind != CCL_TOK_COMMA)
940 lookahead = lookahead->next;
943 return search_terms(cclp, qa);
946 ccl_qualifier_t qa[2];
947 struct ccl_rpn_node *node = 0;
949 lookahead = cclp->look_token;
954 struct ccl_rpn_node *node_sub;
955 qa[0] = ccl_qual_search(cclp, "term", 4, seq);
959 cclp->look_token = lookahead;
961 node_sub = search_terms(cclp, qa);
964 ccl_rpn_delete(node);
969 struct ccl_rpn_node *node_this =
970 ccl_rpn_node_create(CCL_RPN_OR);
971 node_this->u.p[0] = node;
972 node_this->u.p[1] = node_sub;
973 node_this->u.p[2] = 0;
980 node = search_terms(cclp, 0);
986 * find_spec: Parse CCL find specification
988 * qa: Qualifier attributes already applied.
989 * return: pointer to node(s); NULL on error.
991 static struct ccl_rpn_node *find_spec(CCL_parser cclp, ccl_qualifier_t *qa)
993 struct ccl_rpn_node *p1, *p2, *pn;
994 if (!(p1 = search_elements(cclp, qa)))
1002 p2 = search_elements(cclp, qa);
1008 pn = ccl_rpn_node_create(CCL_RPN_AND);
1016 p2 = search_elements(cclp, qa);
1022 pn = ccl_rpn_node_create(CCL_RPN_OR);
1030 p2 = search_elements(cclp, qa);
1036 pn = ccl_rpn_node_create(CCL_RPN_NOT);
1048 struct ccl_rpn_node *ccl_parser_find_str(CCL_parser cclp, const char *str)
1050 struct ccl_rpn_node *p;
1051 struct ccl_token *list = ccl_parser_tokenize(cclp, str);
1052 p = ccl_parser_find_token(cclp, list);
1053 ccl_token_del(list);
1057 struct ccl_rpn_node *ccl_parser_find_token(CCL_parser cclp,
1058 struct ccl_token *list)
1060 struct ccl_rpn_node *p;
1062 cclp->look_token = list;
1063 p = find_spec(cclp, NULL);
1064 if (p && KIND != CCL_TOK_EOL)
1066 if (KIND == CCL_TOK_RP)
1067 cclp->error_code = CCL_ERR_BAD_RP;
1069 cclp->error_code = CCL_ERR_OP_EXPECTED;
1073 cclp->error_pos = cclp->look_token->name;
1075 cclp->error_code = CCL_ERR_OK;
1077 cclp->error_code = cclp->error_code;
1082 * ccl_find_str: Parse CCL find - string representation
1083 * bibset: Bibset to be used for the parsing
1084 * str: String to be parsed
1085 * error: Pointer to integer. Holds error no. on completion.
1086 * pos: Pointer to char position. Holds approximate error position.
1087 * return: RPN tree on successful completion; NULL otherwise.
1089 struct ccl_rpn_node *ccl_find_str(CCL_bibset bibset, const char *str,
1090 int *error, int *pos)
1092 CCL_parser cclp = ccl_parser_create(bibset);
1093 struct ccl_token *list;
1094 struct ccl_rpn_node *p;
1096 list = ccl_parser_tokenize(cclp, str);
1097 p = ccl_parser_find_token(cclp, list);
1099 *error = cclp->error_code;
1101 *pos = cclp->error_pos - str;
1102 ccl_parser_destroy(cclp);
1103 ccl_token_del(list);
1110 * indent-tabs-mode: nil
1112 * vim: shiftwidth=4 tabstop=8 expandtab