anchor.diff:                  simpleEdges.[vertex].Clear()
   
           let shift () =
  -            print "dot\stack_6_%A"
               let newAstNodes = curTokens.Value.Tokens |> Array.mapi (fun i _ -> tokens.Count + i |> box)
               let oldTokens = !curTokens
               curTokens.Value.Tokens |> Array.iter (fun t -> tokens.Add t.Token)
  -            let flg = 
  -                //enum.MoveNext() |> ref
  -                ref false
  -            //let actualVertices = usedStates |> Seq.map (fun x -> stateToVertex.[x].Level) |> Array.ofSeq
  -            while (flg := enum.MoveNext(); !flg) && fst (!rangeToSkip) < (fst enum.Current) && (fst enum.Current) < snd (!rangeToSkip) do printfn "sckiped %A"  (fst enum.Current)
  -            if !flg then
  -                curTokens := processChunk enum.Current                
  +            if enum.MoveNext() then
  +                curTokens := processChunk enum.Current
                   curLvl := (!curTokens).CurLvl
                   isEOF := 
                       curTokens.Value.Tokens.Length = 0 
  
positive.code:                 then 
                      pushesMap.[num].Add((oldPushes,newAstNode)) 
                  else pushesMap.Add(num,new ResizeArray<_>([|oldPushes,newAstNode|]))
              print "dot\stack_6_1_%A"
              pushesInitFun curTokens.Value.Tokens.Length
  
          let print (fName:PrintfFormat<_,_,_,_>) =
  #if DEBUG
              let path = fName.Value |> System.IO.Path.GetDirectoryName
              if path |> System.IO.Directory.Exists |> not
              then System.IO.Directory.CreateDirectory path |> ignore
              let vertices = usedStates.ToArray() |> Array.map (fun i -> stateToVertex.[i])
              drawDot parserSource.TokenToNumber tokens parserSource.LeftSide vertices parserSource.NumToString parserSource.ErrorIndex
                          <| sprintf fName !curLvl
  #endif
              ()
  
          let mutable errorList = []
          let errorRuleExist = parserSource.ErrorRulesExists
          let mutable wasError = false
          let lastErr = ref -1
          let pushesBackup = ref [||]
  
          let errors = new ResizeArray<_>()
          
          let restorePushes () =
            if pushesMap.ContainsKey !curLvl
            then
                for vertex in usedStates do
                    stateToVertex.[vertex] <- null
                usedStates.Clear()
                for oldPushes,newAstNode in pushesMap.[!curLvl] do
                    for (vertex, state) in oldPushes do
                        let newVertex = addVertex [|state, !curLvl,  Some (vertex, newAstNode)|]
                        addSimpleEdge vertex newAstNode simpleEdges.[state]
                pushesMap.Remove(!curLvl) |> ignore
  
          let erTok () = 
              //let shiftBase = tokens.Count - (!pushesBackup).Length 
              //let x = !pushesBackup |> Array.mapi (fun i (a:Stack<_>) -> if a.Count = 0  then Some (tokens.Item(shiftBase + i)) else None)
              rangeToSkip := !curLvl, try pushesMap.Keys |> Seq.min with _ -> !curLvl
              let x = !pushesBackup |> Array.mapi (fun i (a:Stack<_>) -> if a.Count = 0  then Some (curTokens.Value.Tokens.[i].Token) else None)
              x |> Array.choose id
              |> errors.AddRange
              //(try curTokens.Value.Tokens.[0].Token with _ -> tokens.[tokens.Count-1])
  
          while not !isEnd && not wasError do
              print @"dot\stack_%A_1"
              if usedStates.Count = 0 && reductions.Count = 0
              then
                  if pushesMap.Count = 0
                  then
                    let errInfo = !curTokens
                    errorList <- errInfo :: errorList
                    wasError <- true
                  else
                      pushesBackup := !pushes
                      erTok()
                      curLvl := pushesMap.Keys |> Seq.min
                      restorePushes ()
                      makeReductions ()
                      attachEdges()
                      if not !isEOF then shift()
              else
                  print @"dot\stack_%A_2"
                  if !isEOF
                  then
                      restorePushes ()
                      makeReductions()
                      attachEdges()
                      print @"dot\stack_%A_3"               
                      isEnd := true
                  else
                      print @"dot\stack_%A_4"
                      if !curLvl > 0
                      then
                          if pushesMap.ContainsKey !curLvl
                          then restorePushes ()
                          else
                              for vertex in usedStates do
                                  stateToVertex.[vertex] <- null
                              usedStates.Clear()
                      makeReductions ()
                      attachEdges()
                      let bad, good = !pushes |> Array.partition (fun x -> x.Count = 0)
                      if bad.Length > 0 || good.Length = 0
                      then
                          //()
                          pushesBackup := !pushes 
                          erTok ()
  //                    if good.Length = 0
  //                    then 
  //                        //wasError <- true
  //                        pushesBackup := !pushes
  //                        erTok ()
  //                        if pushesMap.Count > 0 
  //                        then ()
  //                          //curLvl := pushesMap.Keys |> Seq.min
  //                          //restorePushes ()
  //                        //else wasError <- true
                      shift ()
                      print "dot\stack_4_%A"
  
          let isAcceptState() = 
              let flag = ref false
  
negative.code:         new TokensInfo<_>(Array.map (fun (t,nl) -> new TokenWithInfo<_>(t,nl, parserSource.TokenToNumber t))ts,cl)
      
      let pushesMap = new Dictionary<_,ResizeArray<_>>(10)
  
      let enum = tokens.GetEnumerator()
      // Change if it doesn't equal to zero. Now it's true according to states building algorithm
      let startState = 0
  