2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: cclp.h,v 1.1 2007-04-25 20:52:19 adam Exp $
11 #define CCL_TOK_TERM 1
14 #define CCL_TOK_PROX 4
17 #define CCL_TOK_COMMA 7
20 #define CCL_TOK_NOT 10
21 #define CCL_TOK_SET 11
27 size_t len; /* length of name below */
28 const char *name; /* string / name of token */
29 struct ccl_token *next;
30 struct ccl_token *prev;
31 const char *ws_prefix_buf; /* leading white space buf */
32 size_t ws_prefix_len; /* leading white space len */
35 /** CCL parser structure */
37 /** current lookahead token */
38 struct ccl_token *look_token;
40 /** holds error code if error occur */
42 /** start of CCL string buffer */
43 const char *start_pos;
44 /** if error occurs, this holds position (starting from 0). */
45 const char *error_pos;
50 /** names of and operator */
52 /** names of or operator */
54 /** names of not operator */
56 /** names of set operator */
58 /** 1=CCL parser is case sensitive, 0=case insensitive */
59 int ccl_case_sensitive;
63 * Splits CCL command string into individual tokens using
67 struct ccl_token *ccl_parser_tokenize (CCL_parser cclp, const char *command);
73 void ccl_token_del (struct ccl_token *list);
76 * Add single token after a given onde.
79 struct ccl_token *ccl_token_add (struct ccl_token *at);
83 struct ccl_rpn_node *ccl_parser_find_token(CCL_parser cclp,
84 struct ccl_token *list);
91 * indent-tabs-mode: nil
93 * vim: shiftwidth=4 tabstop=8 expandtab