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:                       
  do start_time := System.DateTime.Now;
     printfn "Closure and goto calculation.\nStart time: %A" System.DateTime.Now
      
  let items = PreCalculation.items
  let rec kill_label lst = (function Label::tl -> kill_label tl| x -> x) lst 
  //С_С'Р_ РїС_РчР_РїС_Р_С_С+С'С' goto. С_Р°Р_ Р°Р_Р°Р>РёР·Р°С'Р_С_ С'Р_Р_Р_Р° С_Р°Р+Р_С'Р°РчС' Р+С<С_С'С_РчРч. (closure - Р_С+РчР_С_ Р_Р_С_Р_Р_Р°С_ Р_РїРчС_Р°С+РёС_)           
  let goto (states,symbol) =  Set.union_all (Set.map (fun (y,tree) -> Set.map(print_any tree;System.Console.WriteLine();
                                                      fun z -> (z, if exists (fun item -> 
                                                                                  ((*List.hd tree <> Label &&*)(item.item_num = z.s)(* && PreCalculation.getText item.symb = symbol*))) 
                                                                                  (PreCalculation.prevItem z)
                                                                   then ((function (*(Leaf(_) as x)::Label::tree)->x::Label::tree|*)((Leaf(_) as x)::tree)->x::Label::tree|x->x)tree) 
                                                                   else ((function ((Leaf(_) as x)::Label::tree)-> Label::x::tree| (Leaf(_) as y)::x-> Label::y::x|x->x) tree)))(PreCalculation.goto_set.[(y,symbol)]))states )                         
     
  let union_from_Some set = set |> List.filter Option.is_some |> List.map Option.get |> Set.of_list                              
     
  
negative.code:                                    (*print_any "NEXT!!!";iter print_any (PreCalculation.nextItem item));*)
                                     (exists ((=) (fst items))(PreCalculation.nextItem item) )&&(item.item_num <> item.s)
                                 )states)new_states
       |>(Set.map (fun (items,i)->(map (fun itm -> ((itm,(if symbol <> "E" && symbol <> "S" then (*function Label::tree -> tree|x->x *)Label::Leaf(symbol,[])::((function Label::tree -> tree|x->x )(snd items)) else tree1 itm (snd items))),i))(PreCalculation.prevItem (fst items)))))|>union_all
      
      ;
      Set.union_all(
  