link-grammar-5.8.0/link-grammar/dict-file/read-dict.c
/* ======================================================================== */
/**
 * Add an optional macro/word tag, for expression debugging.
 * Enabled by !test="macro-tag". This tag is used only in expression printing.
 */
Add an optional macro/word tag, for expression debugging.
Enabled by !test="macro-tag". This tag is used only in expression printing.
Add an optional macro / word tag for expression debugging . Enabled by !test = " macro - tag " . This tag is used only in expression printing .
static unsigned int exptag_macro_add(Dictionary dict, const char *tag)
{
	expression_tag *mt = dict->macro_tag;
	if (mt == NULL) return 0;
	if (mt->num == mt->size)
	{
		if (mt->num == 0)
			mt->size = 128;
		else
			mt->size *= 2;
		mt->name = realloc(mt->name, mt->size * sizeof(*mt->name));
	}
	mt->name[mt->num] = tag;
	return mt->num++;
}
static unsigned int exptag_macro_add ( Dictionary dict , const char * tag ) { expression_tag * mt = dict -> macro_tag ; if ( mt == NULL ) return 0 ; if ( mt -> num == mt -> size ) { if ( mt -> num == 0 ) mt -> size = 128 ; else mt -> size *= 2 ; mt -> name = realloc ( mt -> name , mt -> size * sizeof ( * mt -> name ) ) ; } mt -> name [ mt -> num ] = tag ; return mt -> num ++ ; }
Add an optional macro/word tag, for expression debugging.
Add an optional macro / word tag for expression debugging .