* Europagate, 1995
*
* $Log: cclfind.c,v $
- * Revision 1.4 1995/02/14 13:16:29 adam
+ * Revision 1.5 1995/02/14 14:12:41 adam
+ * Ranges for ordered qualfiers implemented (e.g. pd=1980-1990).
+ *
+ * Revision 1.4 1995/02/14 13:16:29 adam
* Left and/or right truncation implemented.
*
* Revision 1.3 1995/02/14 10:25:56 adam
{
struct ccl_rpn_node *p;
- ADVANCE;
- p = search_term (ap);
- add_attr (p, CCL_BIB1_REL, rel);
- free (ap);
- return p;
+ ADVANCE; /* skip relation */
+ if (KIND == CCL_TOK_TERM)
+ {
+ struct ccl_rpn_node *p1;
+ p1 = search_term (ap);
+ if (KIND == CCL_TOK_MINUS)
+ {
+ ADVANCE; /* skip '-' */
+ if (KIND == CCL_TOK_TERM) /* = term - term ? */
+ {
+ struct ccl_rpn_node *p2;
+
+ p2 = search_term (ap);
+ p = mk_node (AND);
+ p->u.p[0] = p1;
+ add_attr (p1, CCL_BIB1_REL, 4);
+ p->u.p[1] = p2;
+ add_attr (p2, CCL_BIB1_REL, 2);
+ free (ap);
+ return p;
+ }
+ else /* = term - */
+ {
+ add_attr (p1, CCL_BIB1_REL, 4);
+ free (ap);
+ return p1;
+ }
+ }
+ else
+ {
+ add_attr (p1, CCL_BIB1_REL, rel);
+ free (ap);
+ return p1;
+ }
+ }
+ else if (KIND == CCL_TOK_MINUS) /* = - term ? */
+ {
+ ADVANCE;
+ p = search_term (ap);
+ add_attr (p, CCL_BIB1_REL, 2);
+ free (ap);
+ return p;
+ }
+ ccl_error = CCL_ERR_TERM_EXPECTED;
}
free (ap);
return NULL;
* Europagate 1995
*
* $Log: cclsh.c,v $
- * Revision 1.3 1995/02/14 10:25:57 adam
+ * Revision 1.4 1995/02/14 14:12:42 adam
+ * Ranges for ordered qualfiers implemented (e.g. pd=1980-1990).
+ *
+ * Revision 1.3 1995/02/14 10:25:57 adam
* The constructions 'qualifier rel term ...' implemented.
*
* Revision 1.2 1995/02/13 15:15:07 adam
static char *prog;
static int ti_attr[] = {
- CCL_BIB1_USE, 5,
+ CCL_BIB1_USE, 4,
CCL_BIB1_STR, CCL_BIB1_STR_WP
};