anchor.diff:  #if DEBUG
       //Log.print_climb_3 new_states;    
   #endif             
  +    let text = mgetText(get_next_ch i)
  +    let rec kill_label lst = (function Label::tl -> tl| x -> x) lst
  +    let rec mkill_label lst = (function Label::tl -> mkill_label tl| x -> x) lst      
  +    let tree1 item tree =         
  +        let rec to_Label lst buf = 
  +            match lst with
  +              hd::tl -> match hd with
  +                          Label -> buf,(tl)
  +                        | x     -> to_Label tl (x::buf)
  +              | [] -> buf,[]
  +        let (red,n_tree) = to_Label (if tree<>[] then kill_label tree else tree)  []     
  +        Label::(Node(red,item.prod_name,[]))::n_tree
  +    let tree2 item tree = ((Leaf(text,[text]))::(*function (Label::tree)-> tree| x-> x*) tree)
       if Set.exists (fun ((x,tree),x2)-> x.prod_name="S"&&x.next_num=None&&x2=1) new_states     
       then new_states
       else    
  
positive.code: #endif
      let text = mgetText(get_next_ch i)
      let rec kill_label lst = (function Label::tl -> tl| x -> x) lst      
      let tree1 item tree = 
          //let subnodes =  
          //if tree<> [] then match (List.hd tree) with Node (_,_,c)|Leaf(_,c) -> print_any c;
          
          let rec to_Label lst buf = 
              match lst with
                hd::tl -> match hd with
                            Label -> buf,(tl)
                          | x     -> to_Label tl (x::buf)
                | [] -> buf,[]
          let (red,n_tree) = to_Label (if tree<>[] then kill_label tree else tree)  []     
          Label::(Node(red,item.prod_name,[item.prod_name]))::n_tree
      let tree2 item tree = ((Leaf(text,[text]))::(*function (Label::tree)-> tree| x-> x*) tree)
      let new_states = Set.filter (fun (item,tree) -> (item.next_num=None))states
      let result_states states _tree = Set.map (fun (item,tree) -> (item,(_tree item tree))) states
      union_all
  
negative.code:                            (item.prod_name<>"S")
                              &&
                             (exists (fun itm -> itm.item_num=item.s)(PreCalculation.prevItem item))
                          then ((*print_any "Tree: "; print_any tree;*) Some(climb (Set.map (fun (state,_tree) -> (state,(if symbol <> "E" && symbol <> "S" then Leaf(symbol,[])::Label::tree else tree1 item (tree)))) states,item.prod_name,i)))
                          else None])
      ])                
  and flg = ref true
  