Esempio n. 1
0
File: parser.c Progetto: edma2/skm
/* return the number of words or sub-expressions in the expression */
int expr_len(Expr *expr) {
	if (expr == NULL)
		return -1;
        if (expr_is_word(expr))
                return -1;
	return tree_count_children(expr);
}
Esempio n. 2
0
/*
 *	Return the number of children a binary tree has.
 */
int pdb_count_children_tree_cb(struct pdb_node_t* nptr) {
	return tree_count_children(nptr->data);
}