anchor.diff:                      | RNGLR_EOF _ -> [||]
                       | t -> failwith (sprintf "Unexpected token: %A" t))
               |> Array.ofSeq
  -        positons |> printfn "pos=%A"
  -        Assert.AreEqual(positons.Length,3)
  -        Assert.AreEqual(0, positons.[0])
  -        Assert.AreEqual(1, positons.[1])
  -        Assert.AreEqual(2, positons.[2])
  +        checkArr [|0; 1; 2|] positions
   
   
       [<Test>]
       member this.``Calc. Simple sum.`` () =
  -        let lexerInputGraph = loadLexerInputGraph "test_1.dot"
  -        let res = Calc.Lexer._fslex_tables.Tokenize(Calc.Lexer.fslex_actions_token, lexerInputGraph, eofToken)
  -        Assert.AreEqual(res.Edges |> Seq.length, 4)
  -        Assert.AreEqual(res.Vertices |> Seq.length, 5)
  +        calcTokenizationTest "test_1.dot" 4 5
   
       [<Test>]
       member this.``Calc. Simple sum. Check back refs.`` () =
           let lexerInputGraph = loadLexerInputGraph "test_1.dot"
           let res = Calc.Lexer._fslex_tables.Tokenize(Calc.Lexer.fslex_actions_token, lexerInputGraph, eofToken)
  -        Assert.AreEqual(res.Edges |> Seq.length, 4)
  -        Assert.AreEqual(res.Vertices |> Seq.length, 5)
  +        checkGraph res 4 5
           check_brs res.Edges
   
       [<Test>]
       member this.``Calc. Start from PLUS.`` () =
           let lexerInputGraph = loadLexerInputGraph "test_2.dot"
           let res = Calc.Lexer._fslex_tables.Tokenize(Calc.Lexer.fslex_actions_token, lexerInputGraph, eofToken)
  -        Assert.AreEqual(res.Edges |> Seq.length, 3)
  -        Assert.AreEqual(res.Vertices |> Seq.length, 4)
  +        checkGraph res 3 4
   
       [<Test>]
       member this.``Calc. Two-digit numbers sum.`` () =
           let lexerInputGraph = loadLexerInputGraph "test_3.dot"
           let res = Calc.Lexer._fslex_tables.Tokenize(Calc.Lexer.fslex_actions_token, lexerInputGraph, eofToken)
  -        Assert.AreEqual(res.Edges |> Seq.length, 4)
  -        Assert.AreEqual(res.Vertices |> Seq.length, 5)
  +        checkGraph res 4 5
   
       [<Test>]
       member this.``Calc. Two-digit numbers sum. Check back refs.`` () =
           let lexerInputGraph = loadLexerInputGraph "test_3.dot"
           let res = Calc.Lexer._fslex_tables.Tokenize(Calc.Lexer.fslex_actions_token, lexerInputGraph, eofToken)
  -        Assert.AreEqual(res.Edges |> Seq.length, 4)
  -        Assert.AreEqual(res.Vertices |> Seq.length, 5)
  +        checkGraph res 4 5
           check_brs res.Edges
   
       [<Test>]
       member this.``Multi-digit with branch.`` () =
           let lexerInputGraph = loadLexerInputGraph "test_14.dot"
           let res = Calc.Lexer._fslex_tables.Tokenize(Calc.Lexer.fslex_actions_token, lexerInputGraph, eofToken)
  -        Assert.AreEqual(res.Edges |> Seq.length, 3)
  -        Assert.AreEqual(res.Vertices |> Seq.length, 3)
  +        checkGraph res 3 3
           res.Edges 
             |> Seq.iter
                 (fun e -> 
                   match e.Tag with
  -                | NUMBER (n,brs)
  -                | PLUS (n,brs)->
  -                //n.EndsWith("5") 
  +                | NUMBER (n, brs)
  +                | PLUS (n, brs)->
                       Assert.AreEqual(brs.Length,n.Length)
  -                    //Assert.IsTrue(brs |> Array.forall (fun x -> x.back_ref |> Option.isSome))
                       let brs' = brs |> Array.map (fun i -> i.back_ref)
  -                    Assert.IsTrue(brs'.[0] = "12|")
  -                    Assert.IsTrue(brs'.[1] = "12|")
  -                    Assert.IsTrue(brs'.[2] = string n.[2] + "|")
  +                    checkArr [|"12|"; "12|"; string n.[2] + "|"|] brs'
                   | RNGLR_EOF _ -> ()
                   | t -> Assert.Fail(sprintf "Unexpected token: %A" t)) 
                  
  
positive.code:     member this.``Test with position. Ident on edgs with branch in begin_1.`` () =
          let lexerInputGraph = loadLexerInputGraph "test_with_pos_5.dot"
          let res = Calc.Lexer._fslex_tables.Tokenize(Calc.Lexer.fslex_actions_token, lexerInputGraph, eofToken)
          Assert.AreEqual(res.Edges |> Seq.length, 3)
          Assert.AreEqual(res.Vertices |> Seq.length, 3)
          let positons =
              res.Edges 
                |> Seq.collect
                    (fun e -> 
  
negative.code:                     | RNGLR_EOF _ -> [||]
                      | t -> failwith (sprintf "Unexpected token: %A" t))
              |> Array.ofSeq
          checkArr [|0; 1; 0; 0; 1; 0|] positions
  
      [<Test>]
      member this.``Test with position. Ident on edgs with branch in begin.`` () =
          let lexerInputGraph = loadLexerInputGraph "test_with_pos_4.dot"
          let res = Calc.Lexer._fslex_tables.Tokenize(Calc.Lexer.fslex_actions_token, lexerInputGraph, eofToken)
          checkGraph res 3 3
          res.Edges 
            |> Seq.iter
                (fun e -> 
  