+
+ /* processing last element of expression */
+ g_assert(tree_stack->len==1); /* only root tree should remain */
+ t1 = g_ptr_array_index(tree_stack,tree_stack->len-1);
+ while(t1->right != LTTV_TREE_UNDEFINED) t1 = t1->r_child.t;
+ if(subtree != NULL) { /* add the subtree */
+ t1->right = LTTV_TREE_NODE;
+ t1->l_child.t = subtree;
+ subtree = NULL;
+ } else { /* add a leaf */
+ a_simple_expression.value = a_field_component->str;
+ a_field_component = g_string_new("");
+ t1->right = LTTV_TREE_LEAF;
+ t1->r_child.leaf = g_new(lttv_simple_expression,1);
+ }
+
+ g_assert(tree != NULL);
+ g_assert(subtree == NULL);