+ case ']':
+ case '}':
+ p_nesting--; /* decrementing parenthesis nesting value */
+ if(p_nesting<0 || tree_stack->len<2) {
+ g_warning("Wrong filtering options, the string\n\"%s\"\n\
+ is not valid due to parenthesis incorrect use",expression);
+ return NULL;
+ }
+
+ g_assert(tree_stack->len>0);
+ if(subtree != NULL) {
+ t1 = g_ptr_array_index(tree_stack,tree_stack->len-1);
+ while(t1->right != LTTV_TREE_IDLE && t1->right != LTTV_TREE_LEAF) {
+ g_assert(t1!=NULL && t1->r_child.t != NULL);
+ t1 = t1->r_child.t;
+ }
+ t1->right = LTTV_TREE_NODE;
+ t1->r_child.t = subtree;
+ subtree = g_ptr_array_index(tree_stack,tree_stack->len-1);
+ g_ptr_array_remove_index(tree_stack,tree_stack->len-1);
+ } else {
+ a_simple_expression.value = a_field_component->str;
+ a_field_component = g_string_new("");
+ t1 = g_ptr_array_index(tree_stack,tree_stack->len-1);
+ while(t1->right != LTTV_TREE_IDLE) t1 = t1->r_child.t;
+ t1->right = LTTV_TREE_LEAF;
+ t1->r_child.leaf = g_new(lttv_simple_expression,1);
+ subtree = g_ptr_array_index(tree_stack,tree_stack->len-1);
+ g_assert(subtree != NULL);
+ g_ptr_array_remove_index(tree_stack,tree_stack->len-1);
+ }