1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2008 Index Data
3 * See the file LICENSE for details.
7 * \brief Implements parsing of a CCL FIND query.
9 * This source file implements parsing of a CCL Query (ISO8777).
10 * The parser uses predictive parsing, but it does several tokens
11 * of lookahead in the handling of relational operations.. So
12 * it's not really pure.
20 /* returns type of current lookahead */
21 #define KIND (cclp->look_token->kind)
23 /* move one token forward */
24 #define ADVANCE cclp->look_token = cclp->look_token->next
27 * qual_val_type: test for existance of attribute type/value pair.
29 * type: Type of attribute to search for
30 * value: Value of attribute to seach for
31 * return: 1 if found; 0 otherwise.
33 static int qual_val_type(ccl_qualifier_t *qa, int type, int value,
40 for (i = 0; qa[i]; i++)
42 struct ccl_rpn_attr *q = ccl_qual_get_attr(qa[i]);
45 if (q->type == type && q->kind == CCL_RPN_ATTR_NUMERIC &&
46 q->value.numeric == value)
59 * strxcat: concatenate strings.
60 * n: Null-terminated Destination string
61 * src: Source string to be appended (not null-terminated)
62 * len: Length of source string.
64 static void strxcat(char *n, const char *src, int len)
74 * copy_token_name: Return copy of CCL token name
75 * tp: Pointer to token info.
76 * return: malloc(3) allocated copy of token name.
78 static char *copy_token_name(struct ccl_token *tp)
80 char *str = (char *)xmalloc(tp->len + 1);
82 memcpy(str, tp->name, tp->len);
88 * mk_node: Create RPN node.
90 * return: pointer to allocated node.
92 struct ccl_rpn_node *ccl_rpn_node_create(enum ccl_rpn_kind kind)
94 struct ccl_rpn_node *p;
95 p = (struct ccl_rpn_node *)xmalloc(sizeof(*p));
102 p->u.t.attr_list = 0;
113 * ccl_rpn_delete: Delete RPN tree.
114 * rpn: Pointer to tree.
116 void ccl_rpn_delete(struct ccl_rpn_node *rpn)
118 struct ccl_rpn_attr *attr, *attr1;
126 ccl_rpn_delete(rpn->u.p[0]);
127 ccl_rpn_delete(rpn->u.p[1]);
130 xfree(rpn->u.t.term);
131 xfree(rpn->u.t.qual);
132 for (attr = rpn->u.t.attr_list; attr; attr = attr1)
135 if (attr->kind == CCL_RPN_ATTR_STRING)
136 xfree(attr->value.str);
143 xfree(rpn->u.setname);
146 ccl_rpn_delete(rpn->u.p[0]);
147 ccl_rpn_delete(rpn->u.p[1]);
148 ccl_rpn_delete(rpn->u.p[2]);
154 static struct ccl_rpn_node *find_spec(CCL_parser cclp, ccl_qualifier_t *qa);
156 static int is_term_ok(int look, int *list)
158 for (;*list >= 0; list++)
164 static struct ccl_rpn_node *search_terms(CCL_parser cclp, ccl_qualifier_t *qa);
166 static struct ccl_rpn_attr *add_attr_node(struct ccl_rpn_node *p,
167 const char *set, int type)
169 struct ccl_rpn_attr *n;
171 n = (struct ccl_rpn_attr *)xmalloc(sizeof(*n));
174 n->set = xstrdup(set);
178 n->next = p->u.t.attr_list;
179 p->u.t.attr_list = n;
185 * add_attr_numeric: Add attribute (type/value) to RPN term node.
186 * p: RPN node of type term.
187 * type: Type of attribute
188 * value: Value of attribute
189 * set: Attribute set name
191 void ccl_add_attr_numeric(struct ccl_rpn_node *p, const char *set,
194 struct ccl_rpn_attr *n;
196 n = add_attr_node(p, set, type);
197 n->kind = CCL_RPN_ATTR_NUMERIC;
198 n->value.numeric = value;
201 void ccl_add_attr_string(struct ccl_rpn_node *p, const char *set,
202 int type, char *value)
204 struct ccl_rpn_attr *n;
206 n = add_attr_node(p, set, type);
207 n->kind = CCL_RPN_ATTR_STRING;
208 n->value.str = xstrdup(value);
213 * search_term: Parse CCL search term.
215 * qa: Qualifier attributes already applied.
216 * term_list: tokens we accept as terms in context
217 * multi: whether we accept "multiple" tokens
218 * return: pointer to node(s); NULL on error.
220 static struct ccl_rpn_node *search_term_x(CCL_parser cclp,
222 int *term_list, int multi)
224 struct ccl_rpn_node *p_top = 0;
225 struct ccl_token *lookahead = cclp->look_token;
229 const char **truncation_aliases;
230 const char *t_default[2];
233 ccl_qual_search_special(cclp->bibset, "truncation");
234 if (!truncation_aliases)
236 truncation_aliases = t_default;
241 if (qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_AND_LIST, 0))
243 if (qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_OR_LIST, 0))
247 struct ccl_rpn_node *p;
253 int relation_value = -1;
254 int position_value = -1;
255 int structure_value = -1;
256 int truncation_value = -1;
257 int completeness_value = -1;
260 if (and_list || or_list || !multi)
263 /* ignore commas when dealing with and-lists .. */
264 if (and_list && lookahead && lookahead->kind == CCL_TOK_COMMA)
266 lookahead = lookahead->next;
270 /* go through each TERM token. If no truncation attribute is yet
271 met, then look for left/right truncation markers (?) and
272 set left_trunc/right_trunc/mid_trunc accordingly */
273 for (no = 0; no < max && is_term_ok(lookahead->kind, term_list); no++)
275 for (i = 0; i<lookahead->len; i++)
276 if (lookahead->name[i] == ' ')
278 else if (strchr(truncation_aliases[0], lookahead->name[i]))
280 if (no == 0 && i == 0 && lookahead->len >= 1)
282 else if (!is_term_ok(lookahead->next->kind, term_list) &&
283 i == lookahead->len-1 && i >= 1)
288 len += 1+lookahead->len+lookahead->ws_prefix_len;
289 lookahead = lookahead->next;
293 break; /* no more terms . stop . */
295 /* create the term node, but wait a moment before adding the term */
296 p = ccl_rpn_node_create(CCL_RPN_TERM);
297 p->u.t.attr_list = NULL;
301 const char *n = ccl_qual_get_name(qa[0]);
303 p->u.t.qual = xstrdup(n);
306 /* go through all attributes and add them to the attribute list */
307 for (i=0; qa && qa[i]; i++)
309 struct ccl_rpn_attr *attr;
311 for (attr = ccl_qual_get_attr(qa[i]); attr; attr = attr->next)
314 case CCL_RPN_ATTR_STRING:
315 ccl_add_attr_string(p, attr->set, attr->type,
318 case CCL_RPN_ATTR_NUMERIC:
319 if (attr->value.numeric > 0)
320 { /* deal only with REAL attributes (positive) */
324 if (relation_value != -1)
326 relation_value = attr->value.numeric;
329 if (position_value != -1)
331 position_value = attr->value.numeric;
334 if (structure_value != -1)
336 structure_value = attr->value.numeric;
339 if (truncation_value != -1)
341 truncation_value = attr->value.numeric;
342 left_trunc = right_trunc = mid_trunc = 0;
345 if (completeness_value != -1)
347 completeness_value = attr->value.numeric;
350 ccl_add_attr_numeric(p, attr->set, attr->type,
351 attr->value.numeric);
355 /* len now holds the number of characters in the RPN term */
356 /* no holds the number of CCL tokens (1 or more) */
358 if (structure_value == -1 &&
359 qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_WP, &attset))
360 { /* no structure attribute met. Apply either structure attribute
361 WORD or PHRASE depending on number of CCL tokens */
362 if (no == 1 && no_spaces == 0)
363 ccl_add_attr_numeric(p, attset, CCL_BIB1_STR, 2);
365 ccl_add_attr_numeric(p, attset, CCL_BIB1_STR, 1);
368 /* make the RPN token */
369 p->u.t.term = (char *)xmalloc(len);
370 ccl_assert(p->u.t.term);
371 p->u.t.term[0] = '\0';
372 for (i = 0; i<no; i++)
374 const char *src_str = cclp->look_token->name;
375 size_t src_len = cclp->look_token->len;
377 if (i == 0 && left_trunc)
382 if (i == no-1 && right_trunc)
384 if (p->u.t.term[0] && cclp->look_token->ws_prefix_len)
386 size_t len = strlen(p->u.t.term);
387 memcpy(p->u.t.term + len, cclp->look_token->ws_prefix_buf,
388 cclp->look_token->ws_prefix_len);
389 p->u.t.term[len + cclp->look_token->ws_prefix_len] = '\0';
391 strxcat(p->u.t.term, src_str, src_len);
395 /* make the top node point to us.. */
398 struct ccl_rpn_node *tmp;
401 tmp = ccl_rpn_node_create(CCL_RPN_OR);
403 tmp = ccl_rpn_node_create(CCL_RPN_AND);
405 tmp = ccl_rpn_node_create(CCL_RPN_AND);
415 if (left_trunc && right_trunc)
417 if (!qual_val_type(qa, CCL_BIB1_TRU, CCL_BIB1_TRU_CAN_BOTH,
420 cclp->error_code = CCL_ERR_TRUNC_NOT_BOTH;
424 ccl_add_attr_numeric(p, attset, CCL_BIB1_TRU, 3);
426 else if (right_trunc)
428 if (!qual_val_type(qa, CCL_BIB1_TRU, CCL_BIB1_TRU_CAN_RIGHT,
431 cclp->error_code = CCL_ERR_TRUNC_NOT_RIGHT;
435 ccl_add_attr_numeric(p, attset, CCL_BIB1_TRU, 1);
439 if (!qual_val_type(qa, CCL_BIB1_TRU, CCL_BIB1_TRU_CAN_LEFT,
442 cclp->error_code = CCL_ERR_TRUNC_NOT_LEFT;
446 ccl_add_attr_numeric(p, attset, CCL_BIB1_TRU, 2);
450 if (qual_val_type(qa, CCL_BIB1_TRU, CCL_BIB1_TRU_CAN_NONE,
452 ccl_add_attr_numeric(p, attset, CCL_BIB1_TRU, 100);
458 cclp->error_code = CCL_ERR_TERM_EXPECTED;
462 static struct ccl_rpn_node *search_term(CCL_parser cclp, ccl_qualifier_t *qa)
464 static int list[] = {CCL_TOK_TERM, CCL_TOK_COMMA, -1};
465 return search_term_x(cclp, qa, list, 0);
469 struct ccl_rpn_node *qualifiers_order(CCL_parser cclp,
470 ccl_qualifier_t *ap, char *attset)
473 struct ccl_rpn_node *p;
475 if (cclp->look_token->len == 1)
477 if (cclp->look_token->name[0] == '<')
479 else if (cclp->look_token->name[0] == '=')
481 else if (cclp->look_token->name[0] == '>')
484 else if (cclp->look_token->len == 2)
486 if (!memcmp(cclp->look_token->name, "<=", 2))
488 else if (!memcmp(cclp->look_token->name, ">=", 2))
490 else if (!memcmp(cclp->look_token->name, "<>", 2))
495 cclp->error_code = CCL_ERR_BAD_RELATION;
498 ADVANCE; /* skip relation */
500 qual_val_type(ap, CCL_BIB1_REL, CCL_BIB1_REL_PORDER, 0))
502 /* allow - inside term and treat it as range _always_ */
503 /* relation is =. Extract "embedded" - to separate terms */
504 if (KIND == CCL_TOK_TERM)
507 for (i = 0; i<cclp->look_token->len; i++)
509 if (cclp->look_token->name[i] == '-')
513 if (cclp->look_token->len > 1 && i == 0)
515 struct ccl_token *ntoken = ccl_token_add(cclp->look_token);
517 ntoken->kind = CCL_TOK_TERM;
518 ntoken->name = cclp->look_token->name + 1;
519 ntoken->len = cclp->look_token->len - 1;
521 cclp->look_token->len = 1;
522 cclp->look_token->name = "-";
524 else if (cclp->look_token->len > 1 && i == cclp->look_token->len-1)
526 struct ccl_token *ntoken = ccl_token_add(cclp->look_token);
528 ntoken->kind = CCL_TOK_TERM;
532 (cclp->look_token->len)--;
534 else if (cclp->look_token->len > 2 && i < cclp->look_token->len)
536 struct ccl_token *ntoken1 = ccl_token_add(cclp->look_token);
537 struct ccl_token *ntoken2 = ccl_token_add(ntoken1);
539 ntoken1->kind = CCL_TOK_TERM; /* generate - */
543 ntoken2->kind = CCL_TOK_TERM; /* generate yy */
544 ntoken2->name = cclp->look_token->name + (i+1);
545 ntoken2->len = cclp->look_token->len - (i+1);
547 cclp->look_token->len = i; /* adjust xx */
549 else if (i == cclp->look_token->len &&
550 cclp->look_token->next &&
551 cclp->look_token->next->kind == CCL_TOK_TERM &&
552 cclp->look_token->next->len > 1 &&
553 cclp->look_token->next->name[0] == '-')
556 /* we _know_ that xx does not have - in it */
557 struct ccl_token *ntoken = ccl_token_add(cclp->look_token);
559 ntoken->kind = CCL_TOK_TERM; /* generate - */
563 (ntoken->next->name)++; /* adjust yy */
564 (ntoken->next->len)--;
570 KIND == CCL_TOK_TERM &&
571 cclp->look_token->next && cclp->look_token->next->len == 1 &&
572 cclp->look_token->next->name[0] == '-')
574 struct ccl_rpn_node *p1;
575 if (!(p1 = search_term(cclp, ap)))
577 ADVANCE; /* skip '-' */
578 if (KIND == CCL_TOK_TERM) /* = term - term ? */
580 struct ccl_rpn_node *p2;
582 if (!(p2 = search_term(cclp, ap)))
587 p = ccl_rpn_node_create(CCL_RPN_AND);
589 ccl_add_attr_numeric(p1, attset, CCL_BIB1_REL, 4);
591 ccl_add_attr_numeric(p2, attset, CCL_BIB1_REL, 2);
596 ccl_add_attr_numeric(p1, attset, CCL_BIB1_REL, 4);
601 cclp->look_token->len == 1 &&
602 cclp->look_token->name[0] == '-') /* = - term ? */
605 if (!(p = search_term(cclp, ap)))
607 ccl_add_attr_numeric(p, attset, CCL_BIB1_REL, 2);
610 else if (KIND == CCL_TOK_LP)
613 if (!(p = find_spec(cclp, ap)))
615 if (KIND != CCL_TOK_RP)
617 cclp->error_code = CCL_ERR_RP_EXPECTED;
626 if (!(p = search_terms(cclp, ap)))
628 ccl_add_attr_numeric(p, attset, CCL_BIB1_REL, rel);
631 cclp->error_code = CCL_ERR_TERM_EXPECTED;
636 struct ccl_rpn_node *qualifier_relation(CCL_parser cclp, ccl_qualifier_t *ap)
639 struct ccl_rpn_node *p;
641 if (qual_val_type(ap, CCL_BIB1_REL, CCL_BIB1_REL_ORDER, &attset)
642 || qual_val_type(ap, CCL_BIB1_REL, CCL_BIB1_REL_PORDER, &attset))
643 return qualifiers_order(cclp, ap, attset);
645 /* unordered relation */
646 if (KIND != CCL_TOK_EQ)
648 cclp->error_code = CCL_ERR_EQ_EXPECTED;
652 if (KIND == CCL_TOK_LP)
655 if (!(p = find_spec(cclp, ap)))
659 if (KIND != CCL_TOK_RP)
661 cclp->error_code = CCL_ERR_RP_EXPECTED;
668 p = search_terms(cclp, ap);
673 * qualifier_list: Parse CCL qualifiers and search terms.
675 * la: Token pointer to RELATION token.
676 * qa: Qualifier attributes already applied.
677 * return: pointer to node(s); NULL on error.
679 static struct ccl_rpn_node *qualifier_list(CCL_parser cclp,
680 struct ccl_token *la,
683 struct ccl_token *lookahead = cclp->look_token;
684 struct ccl_token *look_start = cclp->look_token;
686 struct ccl_rpn_node *node = 0;
687 const char **field_str;
695 cclp->error_code = CCL_ERR_DOUBLE_QUAL;
699 for (lookahead = cclp->look_token; lookahead != la;
700 lookahead=lookahead->next)
703 for (i=0; qa[i]; i++)
705 ap = (ccl_qualifier_t *)xmalloc((no ? (no+1) : 2) * sizeof(*ap));
708 field_str = ccl_qual_search_special(cclp->bibset, "field");
711 if (!strcmp(field_str[0], "or"))
713 else if (!strcmp(field_str[0], "merge"))
718 /* consider each field separately and OR */
719 lookahead = look_start;
720 while (lookahead != la)
724 while ((ap[0] = ccl_qual_search(cclp, lookahead->name,
725 lookahead->len, seq)) != 0)
727 struct ccl_rpn_node *node_sub;
728 cclp->look_token = la;
730 node_sub = qualifier_relation(cclp, ap);
733 ccl_rpn_delete(node);
739 struct ccl_rpn_node *node_this =
740 ccl_rpn_node_create(CCL_RPN_OR);
741 node_this->u.p[0] = node;
742 node_this->u.p[1] = node_sub;
751 cclp->look_token = lookahead;
752 cclp->error_code = CCL_ERR_UNKNOWN_QUAL;
756 lookahead = lookahead->next;
757 if (lookahead->kind == CCL_TOK_COMMA)
758 lookahead = lookahead->next;
763 /* merge attributes from ALL fields - including inherited ones */
766 struct ccl_rpn_node *node_sub;
768 lookahead = look_start;
769 for (i = 0; lookahead != la; i++)
771 ap[i] = ccl_qual_search(cclp, lookahead->name,
772 lookahead->len, seq);
775 if (!ap[i] && seq > 0)
776 ap[i] = ccl_qual_search(cclp, lookahead->name,
780 cclp->look_token = lookahead;
781 cclp->error_code = CCL_ERR_UNKNOWN_QUAL;
785 lookahead = lookahead->next;
786 if (lookahead->kind == CCL_TOK_COMMA)
787 lookahead = lookahead->next;
791 ccl_qualifier_t *qa0 = qa;
801 cclp->look_token = lookahead;
803 node_sub = qualifier_relation(cclp, ap);
806 ccl_rpn_delete(node);
811 struct ccl_rpn_node *node_this =
812 ccl_rpn_node_create(CCL_RPN_OR);
813 node_this->u.p[0] = node;
814 node_this->u.p[1] = node_sub;
828 * search_terms: Parse CCL search terms - including proximity.
830 * qa: Qualifier attributes already applied.
831 * return: pointer to node(s); NULL on error.
833 static struct ccl_rpn_node *search_terms(CCL_parser cclp, ccl_qualifier_t *qa)
835 static int list[] = {
836 CCL_TOK_TERM, CCL_TOK_COMMA,CCL_TOK_EQ, CCL_TOK_REL, CCL_TOK_SET, -1};
837 struct ccl_rpn_node *p1, *p2, *pn;
838 p1 = search_term_x(cclp, qa, list, 1);
843 if (KIND == CCL_TOK_PROX)
845 struct ccl_rpn_node *p_prox = 0;
846 /* ! word order specified */
847 /* % word order not specified */
848 p_prox = ccl_rpn_node_create(CCL_RPN_TERM);
849 p_prox->u.t.term = (char *) xmalloc(1 + cclp->look_token->len);
850 memcpy(p_prox->u.t.term, cclp->look_token->name,
851 cclp->look_token->len);
852 p_prox->u.t.term[cclp->look_token->len] = 0;
853 p_prox->u.t.attr_list = 0;
856 p2 = search_term_x(cclp, qa, list, 1);
862 pn = ccl_rpn_node_create(CCL_RPN_PROX);
868 else if (is_term_ok(KIND, list))
870 p2 = search_term_x(cclp, qa, list, 1);
876 pn = ccl_rpn_node_create(CCL_RPN_PROX);
889 * search_elements: Parse CCL search elements
891 * qa: Qualifier attributes already applied.
892 * return: pointer to node(s); NULL on error.
894 static struct ccl_rpn_node *search_elements(CCL_parser cclp,
897 struct ccl_rpn_node *p1;
898 struct ccl_token *lookahead;
899 if (KIND == CCL_TOK_LP)
902 p1 = find_spec(cclp, qa);
905 if (KIND != CCL_TOK_RP)
907 cclp->error_code = CCL_ERR_RP_EXPECTED;
914 else if (KIND == CCL_TOK_SET)
917 if (KIND == CCL_TOK_EQ)
919 if (KIND != CCL_TOK_TERM)
921 cclp->error_code = CCL_ERR_SETNAME_EXPECTED;
924 p1 = ccl_rpn_node_create(CCL_RPN_SET);
925 p1->u.setname = copy_token_name(cclp->look_token);
929 lookahead = cclp->look_token;
931 while (lookahead->kind==CCL_TOK_TERM)
933 lookahead = lookahead->next;
934 if (lookahead->kind == CCL_TOK_REL || lookahead->kind == CCL_TOK_EQ)
935 return qualifier_list(cclp, lookahead, qa);
936 if (lookahead->kind != CCL_TOK_COMMA)
938 lookahead = lookahead->next;
941 return search_terms(cclp, qa);
944 ccl_qualifier_t qa[2];
945 struct ccl_rpn_node *node = 0;
947 lookahead = cclp->look_token;
952 struct ccl_rpn_node *node_sub;
953 qa[0] = ccl_qual_search(cclp, "term", 4, seq);
957 cclp->look_token = lookahead;
959 node_sub = search_terms(cclp, qa);
962 ccl_rpn_delete(node);
967 struct ccl_rpn_node *node_this =
968 ccl_rpn_node_create(CCL_RPN_OR);
969 node_this->u.p[0] = node;
970 node_this->u.p[1] = node_sub;
971 node_this->u.p[2] = 0;
978 node = search_terms(cclp, 0);
984 * find_spec: Parse CCL find specification
986 * qa: Qualifier attributes already applied.
987 * return: pointer to node(s); NULL on error.
989 static struct ccl_rpn_node *find_spec(CCL_parser cclp, ccl_qualifier_t *qa)
991 struct ccl_rpn_node *p1, *p2, *pn;
992 if (!(p1 = search_elements(cclp, qa)))
1000 p2 = search_elements(cclp, qa);
1006 pn = ccl_rpn_node_create(CCL_RPN_AND);
1014 p2 = search_elements(cclp, qa);
1020 pn = ccl_rpn_node_create(CCL_RPN_OR);
1028 p2 = search_elements(cclp, qa);
1034 pn = ccl_rpn_node_create(CCL_RPN_NOT);
1046 struct ccl_rpn_node *ccl_parser_find_str(CCL_parser cclp, const char *str)
1048 struct ccl_rpn_node *p;
1049 struct ccl_token *list = ccl_parser_tokenize(cclp, str);
1050 p = ccl_parser_find_token(cclp, list);
1051 ccl_token_del(list);
1055 struct ccl_rpn_node *ccl_parser_find_token(CCL_parser cclp,
1056 struct ccl_token *list)
1058 struct ccl_rpn_node *p;
1060 cclp->look_token = list;
1061 p = find_spec(cclp, NULL);
1062 if (p && KIND != CCL_TOK_EOL)
1064 if (KIND == CCL_TOK_RP)
1065 cclp->error_code = CCL_ERR_BAD_RP;
1067 cclp->error_code = CCL_ERR_OP_EXPECTED;
1071 cclp->error_pos = cclp->look_token->name;
1073 cclp->error_code = CCL_ERR_OK;
1075 cclp->error_code = cclp->error_code;
1080 * ccl_find_str: Parse CCL find - string representation
1081 * bibset: Bibset to be used for the parsing
1082 * str: String to be parsed
1083 * error: Pointer to integer. Holds error no. on completion.
1084 * pos: Pointer to char position. Holds approximate error position.
1085 * return: RPN tree on successful completion; NULL otherwise.
1087 struct ccl_rpn_node *ccl_find_str(CCL_bibset bibset, const char *str,
1088 int *error, int *pos)
1090 CCL_parser cclp = ccl_parser_create(bibset);
1091 struct ccl_token *list;
1092 struct ccl_rpn_node *p;
1094 list = ccl_parser_tokenize(cclp, str);
1095 p = ccl_parser_find_token(cclp, list);
1097 *error = cclp->error_code;
1099 *pos = cclp->error_pos - str;
1100 ccl_parser_destroy(cclp);
1101 ccl_token_del(list);
1108 * indent-tabs-mode: nil
1110 * vim: shiftwidth=4 tabstop=8 expandtab