82 #define CCL_ERR_TERM_EXPECTED 1
83 #define CCL_ERR_RP_EXPECTED 2
84 #define CCL_ERR_SETNAME_EXPECTED 3
85 #define CCL_ERR_OP_EXPECTED 4
86 #define CCL_ERR_BAD_RP 5
87 #define CCL_ERR_UNKNOWN_QUAL 6
88 #define CCL_ERR_DOUBLE_QUAL 7
89 #define CCL_ERR_EQ_EXPECTED 8
90 #define CCL_ERR_BAD_RELATION 9
91 #define CCL_ERR_TRUNC_NOT_LEFT 10
92 #define CCL_ERR_TRUNC_NOT_BOTH 11
93 #define CCL_ERR_TRUNC_NOT_RIGHT 12
94 #define CCL_ERR_TRUNC_NOT_EMBED 13
95 #define CCL_ERR_TRUNC_NOT_SINGLE 14
107 #define CCL_RPN_ATTR_NUMERIC 1
108 #define CCL_RPN_ATTR_STRING 2
160 const char *str,
int *error,
int *pos);
196 int *
type,
int *value,
char **svalue,
char **attsets);
225 const char *qual_name);
228 const char *qual_name,
const char **addinfo);
251 int ccl_memicmp(
const char *s1,
const char *s2,
size_t n);
276 int type,
int value);
280 int type,
char *value);
284 const char *src_str,
size_t src_len);
306 const char **qualname,
const char **term);
314 #define ccl_assert(x) ;
348 #define CCL_BIB1_USE 1
349 #define CCL_BIB1_REL 2
350 #define CCL_BIB1_POS 3
351 #define CCL_BIB1_STR 4
352 #define CCL_BIB1_TRU 5
353 #define CCL_BIB1_COM 6
355 #define CCL_BIB1_STR_WP (-1)
356 #define CCL_BIB1_STR_AND_LIST (-2)
357 #define CCL_BIB1_STR_OR_LIST (-3)
358 #define CCL_BIB1_STR_AUTO_GROUP (-4)
359 #define CCL_BIB1_STR_SPLIT_LIST (-5)
360 #define CCL_BIB1_REL_ORDER (-1)
361 #define CCL_BIB1_REL_PORDER (-2)
362 #define CCL_BIB1_REL_OMIT_EQUALS (-3)
364 #define CCL_BIB1_TRU_CAN_LEFT (-1)
365 #define CCL_BIB1_TRU_CAN_RIGHT (-2)
366 #define CCL_BIB1_TRU_CAN_BOTH (-3)
367 #define CCL_BIB1_TRU_CAN_NONE (-4)
368 #define CCL_BIB1_TRU_CAN_REGEX (-5)
369 #define CCL_BIB1_TRU_CAN_Z3958 (-6)
struct ccl_rpn_attr * ccl_parser_qual_search(CCL_parser cclp, const char *name, size_t name_len)
int ccl_qual_fname(CCL_bibset bibset, const char *fname)
CCL_bibset ccl_qual_mk(void)
creates Bibset
int ccl_stop_words_tree(ccl_stop_words_t csw, CCL_bibset bibset, struct ccl_rpn_node **t)
removes stop words from RPN tree
void ccl_pquery(WRBUF w, struct ccl_rpn_node *p)
void ccl_qual_file(CCL_bibset bibset, FILE *inf)
const char * ccl_err_msg(int ccl_errno)
struct ccl_rpn_node * ccl_find_str(CCL_bibset bibset, const char *str, int *error, int *pos)
parse CCL find string using CCL profile return RPN tree
int ccl_qual_fitem2(CCL_bibset bibset, const char *value, const char *qual_name, const char **addinfo)
struct ccl_rpn_node * ccl_parser_find_str(CCL_parser cclp, const char *str)
parse CCL find string with parser and return RPN tree
void ccl_qual_add_set(CCL_bibset b, const char *name, int no, int *type, int *value, char **svalue, char **attsets)
adds specifies attributes for qualifier
struct ccl_stop_words * ccl_stop_words_t
stop words handle (pimpl)
void ccl_rpn_delete(struct ccl_rpn_node *rpn)
void ccl_stop_words_destroy(ccl_stop_words_t csw)
destroys stop words handle
void ccl_qual_add_combi(CCL_bibset b, const char *n, const char **names)
adds specifies qualifier aliases
int ccl_stricmp(const char *s1, const char *s2)
void ccl_parser_set_case(CCL_parser p, int case_sensitivity_flag)
void ccl_qual_rm(CCL_bibset *b)
destroys Bibset
void ccl_qual_add(CCL_bibset b, const char *name, int no, int *attr)
int(* ccl_toupper)(int c)
int ccl_search_stop(CCL_bibset bibset, const char *qname, const char *src_str, size_t src_len)
int ccl_parser_get_error(CCL_parser cclp, int *pos)
void ccl_add_attr_numeric(struct ccl_rpn_node *p, const char *set, int type, int value)
void ccl_add_attr_string(struct ccl_rpn_node *p, const char *set, int type, char *value)
struct ccl_parser * CCL_parser
CCL parser.
void ccl_pr_tree(struct ccl_rpn_node *rpn, FILE *fd_out)
void ccl_qual_fitem(CCL_bibset bibset, const char *value, const char *qual_name)
ccl_rpn_kind
node type or RPN tree generated by the CCL parser
struct ccl_qualifiers * CCL_bibset
CCL bibset, AKA profile.
const char ** ccl_qual_search_special(CCL_bibset b, const char *name)
int ccl_memicmp(const char *s1, const char *s2, size_t n)
ccl_stop_words_t ccl_stop_words_create(void)
creates stop words handle
struct ccl_rpn_node * ccl_rpn_node_create(enum ccl_rpn_kind kind)
CCL_parser ccl_parser_create(CCL_bibset bibset)
void ccl_qual_line(CCL_bibset bibset, char *line)
CCL_bibset ccl_qual_dup(CCL_bibset b)
void ccl_qual_add_special(CCL_bibset bibset, const char *n, const char *cp)
int ccl_stop_words_info(ccl_stop_words_t csw, int idx, const char **qualname, const char **term)
returns information about removed "stop" words
void ccl_qual_buf(CCL_bibset bibset, const char *buf)
void ccl_parser_destroy(CCL_parser p)
attribute node (type, value) pair as used in RPN
char * str
string attribute value
int kind
attribute value type (numeric or string)
int numeric
numeric attribute value
int type
attribute type, Bib-1: 1=use, 2=relation, 3=position, etc
union ccl_rpn_attr::@7 value
struct ccl_rpn_attr * next
next attribute
struct ccl_rpn_node * p[3]
Boolean including proximity 0=left, 1=right, 2=prox parms.
struct ccl_rpn_node::@8::@9 t
Attributes + Term.
struct ccl_rpn_attr * attr_list
enum ccl_rpn_kind kind
node type, one of CCL_RPN_AND, CCL_RPN_OR, etc
Header for WRBUF (growing buffer)
Header for memory handling functions.
Header with fundamental macros.