1 /* CCL - public header file
5 * Revision 1.4 1995/02/14 16:20:53 adam
6 * Qualifiers are read from a file now.
8 * Revision 1.3 1995/02/14 10:25:55 adam
9 * The constructions 'qualifier rel term ...' implemented.
11 * Revision 1.2 1995/02/13 15:15:06 adam
12 * Added handling of qualifiers. Not finished yet.
14 * Revision 1.1 1995/02/13 12:35:20 adam
15 * First version of CCL. Qualifiers aren't handled yet.
20 #define CCL_ERR_TERM_EXPECTED 1
21 #define CCL_ERR_RP_EXPECTED 2
22 #define CCL_ERR_SETNAME_EXPECTED 3
23 #define CCL_ERR_OP_EXPECTED 4
24 #define CCL_ERR_BAD_RP 5
25 #define CCL_ERR_UNKNOWN_QUAL 6
26 #define CCL_ERR_DOBBLE_QUAL 7
27 #define CCL_ERR_EQ_EXPECTED 8
28 #define CCL_ERR_BAD_RELATION 9
29 #define CCL_ERR_TRUNC_NOT_LEFT 10
30 #define CCL_ERR_TRUNC_NOT_BOTH 11
31 #define CCL_ERR_TRUNC_NOT_RIGHT 12
34 struct ccl_rpn_attr *next;
40 enum rpn_node_kind { AND, OR, NOT, TERM, SET, PROX } kind;
42 struct ccl_rpn_node *p[2];
45 struct ccl_rpn_attr *attr_list;
51 typedef struct ccl_qualifiers *CCL_bibset;
54 struct ccl_rpn_node *ccl_find_str (CCL_bibset bibset,
55 const char *str, int *error, int *pos);
56 char *ccl_err_msg (int ccl_errno);
57 void ccl_rpn_delete (struct ccl_rpn_node *rpn);
58 void ccl_pr_tree (struct ccl_rpn_node *rpn);
60 void ccl_qual_add (CCL_bibset b, const char *name, int no, int *attr);
61 void ccl_qual_file (CCL_bibset bibset, FILE *inf);
62 CCL_bibset ccl_qual_mk (void);
63 void ccl_qual_rm (CCL_bibset *b);
64 struct ccl_rpn_attr *ccl_qual_search (CCL_bibset b, const char *name, int len);
73 1-6 relation (<, <=, =, >=, >, <>)
79 3 any position in field
82 0 word/phrase auto select
89 100 date (un-normalized)
91 102 name (un-normalized)
96 #define CCL_BIB1_USE 1
97 #define CCL_BIB1_REL 2
98 #define CCL_BIB1_POS 3
99 #define CCL_BIB1_STR 4
100 #define CCL_BIB1_TRU 5
101 #define CCL_BIB1_COM 6
103 #define CCL_BIB1_STR_WP (-1)
104 #define CCL_BIB1_REL_ORDER (-1)
106 #define CCL_BIB1_TRU_CAN_LEFT (-1)
107 #define CCL_BIB1_TRU_CAN_RIGHT (-2)
108 #define CCL_BIB1_TRU_CAN_BOTH (-3)
109 #define CCL_BIB1_TRU_CAN_NONE (-4)