anchor.diff:  open RNGLR.PrettySimpleCalc
   open Yard.Generators.RNGLR.AbstractParser
   open AbstractLexer.Common
  +open AbstractParsing.Common
  +open Yard.Generators.RNGLR.Parser
   
   let loadGraphFromDOT filePath = 
       let parser = AntlrParserAdapter<string>.GetParser()
  
positive.code: //    let qGraph = loadDotToQG gFile
  //    let lexerInputG = new LexerInputGraph<_>()
  //    lexerInputG.StartVertex <- 0
  //    for e in qGraph.Edges do lexerInputG.AddEdgeForsed (new ParserEdge<_>(e.Source,e.Target,(Some e.Tag, Some e.Tag)))
  //    lexerInputG
  
  
  
  
  let lbl tokenId = tokenId
  
  let loadLexerInputGraph gFile =
      let qGraph = loadDotToQG gFile
  
negative.code: 
      [<Test>]
      member this.``Simple calc with nterm 2. Brabch first operand.`` () =
          let qGraph = new ParserInputGraph<_>()
          qGraph.AddVertexRange[0;1;2;3] |> ignore
          qGraph.AddVerticesAndEdgeRange
              [edg 0 1 (RNGLR.SimpleCalcWithNTerms_2.NUM 1)
               edg 0 1 (RNGLR.SimpleCalcWithNTerms_2.NUM 3)
               edg 1 2 (RNGLR.SimpleCalcWithNTerms_2.PLUS 0)
               edg 2 3 (RNGLR.SimpleCalcWithNTerms_2.NUM 2)
               ] |> ignore
  
          let r = (new Parser<_>()).Parse  RNGLR.SimpleCalcWithNTerms_2.buildAstAbstract qGraph
          printfn "%A" r
          match r with
          | Error (num, tok, message, debug, _) ->
              printfn "Error in position %d on Token %A: %s" num tok message
              debug.drawGSSDot "out.dot"
              Assert.Fail "!!!!!!"
          | Success(tree, _, _) ->
              tree.PrintAst()
              RNGLR.SimpleCalcWithNTerms_2.defaultAstToDot tree "ast.dot"
              Assert.Pass()
  
      [<Test>]
      member this.``Simple calc with nterm 2. Fully brabched.`` () =
          let qGraph = new ParserInputGraph<_>()
          qGraph.AddVertexRange[0;1;2;3] |> ignore
          qGraph.AddVerticesAndEdgeRange
              [edg 0 1 (RNGLR.SimpleCalcWithNTerms_2.NUM 1)
               edg 0 4 (RNGLR.SimpleCalcWithNTerms_2.NUM 3)
               edg 4 5 (RNGLR.SimpleCalcWithNTerms_2.PLUS 4)
               edg 5 3 (RNGLR.SimpleCalcWithNTerms_2.NUM 5)
               edg 1 2 (RNGLR.SimpleCalcWithNTerms_2.PLUS 0)
               edg 2 3 (RNGLR.SimpleCalcWithNTerms_2.NUM 2)
               ] |> ignore
  
          let r = (new Parser<_>()).Parse  RNGLR.SimpleCalcWithNTerms_2.buildAstAbstract qGraph
          printfn "%A" r
          match r with
          | Error (num, tok, message, debug, _) ->
              printfn "Error in position %d on Token %A: %s" num tok message
              debug.drawGSSDot "out.dot"
              Assert.Fail "!!!!!!"
          | Success(tree, _, _) ->
              tree.PrintAst()
              RNGLR.SimpleCalcWithNTerms_2.defaultAstToDot tree "ast.dot"        
              Assert.Pass()
  
      [<Test>]
      member this.``Simple calc with nterm 3. Seq input.`` () =
          let qGraph = new ParserInputGraph<_>()
          qGraph.AddVertexRange[0;1;2;3] |> ignore
          qGraph.AddVerticesAndEdgeRange
              [edg 0 1 (RNGLR.SimpleCalcWithNTerms_3.NUM 1)
               edg 1 2 (RNGLR.SimpleCalcWithNTerms_3.PLUS 0)
               edg 2 3 (RNGLR.SimpleCalcWithNTerms_3.NUM 2)
               ] |> ignore
  
          let r = (new Parser<_>()).Parse  RNGLR.SimpleCalcWithNTerms_3.buildAstAbstract qGraph
          printfn "%A" r
          match r with
          | Error (num, tok, message, debug, _) ->
              printfn "Error in position %d on Token %A: %s" num tok message
              debug.drawGSSDot "out.dot"
              Assert.Fail "!!!!!!"
          | Success(tree, _, _) ->
              tree.PrintAst()
              RNGLR.SimpleCalcWithNTerms_3.defaultAstToDot tree "ast.dot"
              Assert.Pass()
  
      [<Test>]
      member this.``Simple calc with nterm 4. Seq input.`` () =
          let qGraph = new ParserInputGraph<_>()
          qGraph.AddVertexRange[0;1;2;3] |> ignore
          qGraph.AddVerticesAndEdgeRange
              [edg 0 1 (RNGLR.SimpleCalcWithNTerms_4.NUM 1)
               edg 1 2 (RNGLR.SimpleCalcWithNTerms_4.PLUS 0)
               edg 2 3 (RNGLR.SimpleCalcWithNTerms_4.NUM 2)
               ] |> ignore
  
          let r = (new Parser<_>()).Parse  RNGLR.SimpleCalcWithNTerms_4.buildAstAbstract qGraph
          printfn "%A" r
          match r with
          | Error (num, tok, message, debug, _) ->
              printfn "Error in position %d on Token %A: %s" num tok message
              debug.drawGSSDot "out.dot"
              Assert.Fail "!!!!!!"
          | Success(tree, _, _) ->
              tree.PrintAst()
              RNGLR.SimpleCalcWithNTerms_4.defaultAstToDot tree "ast.dot"
              Assert.Pass()
  