It's like s=al except that terms wo whitespace are combined in one
leaf node.
#define CCL_BIB1_STR_WP (-1)
#define CCL_BIB1_STR_AND_LIST (-2)
#define CCL_BIB1_STR_OR_LIST (-3)
#define CCL_BIB1_STR_WP (-1)
#define CCL_BIB1_STR_AND_LIST (-2)
#define CCL_BIB1_STR_OR_LIST (-3)
+#define CCL_BIB1_STR_AUTO_GROUP (-4)
#define CCL_BIB1_REL_ORDER (-1)
#define CCL_BIB1_REL_PORDER (-2)
#define CCL_BIB1_REL_ORDER (-1)
#define CCL_BIB1_REL_PORDER (-2)
struct ccl_rpn_node *p_top = 0;
struct ccl_token *lookahead = cclp->look_token;
int and_list = 0;
struct ccl_rpn_node *p_top = 0;
struct ccl_token *lookahead = cclp->look_token;
int and_list = 0;
int or_list = 0;
char *attset;
const char **truncation_aliases;
int or_list = 0;
char *attset;
const char **truncation_aliases;
if (qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_AND_LIST, 0))
and_list = 1;
if (qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_AND_LIST, 0))
and_list = 1;
+ if (qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_AUTO_GROUP, 0))
+ auto_group = 1;
if (qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_OR_LIST, 0))
or_list = 1;
while (1)
{
struct ccl_rpn_node *p;
size_t no, i;
if (qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_OR_LIST, 0))
or_list = 1;
while (1)
{
struct ccl_rpn_node *p;
size_t no, i;
int relation_value = -1;
int position_value = -1;
int structure_value = -1;
int relation_value = -1;
int position_value = -1;
int structure_value = -1;
- /* go through each TERM token. If no truncation attribute is yet
- met, then look for left/right truncation markers (?) and
- set left_trunc/right_trunc/mid_trunc accordingly */
for (no = 0; no < max && is_term_ok(lookahead->kind, term_list); no++)
{
for (no = 0; no < max && is_term_ok(lookahead->kind, term_list); no++)
{
+ int this_is_phrase = 0;
for (i = 0; i<lookahead->len; i++)
if (lookahead->name[i] == ' ')
for (i = 0; i<lookahead->len; i++)
if (lookahead->name[i] == ' ')
+ this_is_phrase = 1;
+
+ if (auto_group)
+ {
+ if (no > 0 && (is_phrase || is_phrase != this_is_phrase))
+ break;
+ is_phrase = this_is_phrase;
+ }
+ else if (this_is_phrase || no > 0)
+ is_phrase = 1;
len += 1+lookahead->len+lookahead->ws_prefix_len;
lookahead = lookahead->next;
}
len += 1+lookahead->len+lookahead->ws_prefix_len;
lookahead = lookahead->next;
}
qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_WP, &attset))
{ /* no structure attribute met. Apply either structure attribute
WORD or PHRASE depending on number of CCL tokens */
qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_WP, &attset))
{ /* no structure attribute met. Apply either structure attribute
WORD or PHRASE depending on number of CCL tokens */
- if (no == 1 && no_spaces == 0)
ccl_add_attr_numeric(p, attset, CCL_BIB1_STR, 2);
else
ccl_add_attr_numeric(p, attset, CCL_BIB1_STR, 1);
ccl_add_attr_numeric(p, attset, CCL_BIB1_STR, 2);
else
ccl_add_attr_numeric(p, attset, CCL_BIB1_STR, 1);
value = CCL_BIB1_STR_AND_LIST;
if (!ccl_stricmp (value_str, "ol"))
value = CCL_BIB1_STR_OR_LIST;
value = CCL_BIB1_STR_AND_LIST;
if (!ccl_stricmp (value_str, "ol"))
value = CCL_BIB1_STR_OR_LIST;
+ if (!ccl_stricmp (value_str, "ag"))
+ value = CCL_BIB1_STR_AUTO_GROUP;
break;
case 't':
case 'T':
break;
case 't':
case 'T':