public ParseTree.ParseTree GenerateParseTree(bool surfaceForm)
        {
            var result = new ParseTree.ParseTree(new ParseNode(root.GetData()));

            ((ParseNodeDrawable)root).GenerateParseNode(result.GetRoot(), surfaceForm);
            return(result);
        }
Ejemplo n.º 2
0
 public void Setup()
 {
     parseTree1 = new ParseTree.ParseTree("../../../trees/0000.dev");
     parseTree2 = new ParseTree.ParseTree("../../../trees/0001.dev");
     parseTree3 = new ParseTree.ParseTree("../../../trees/0002.dev");
     parseTree4 = new ParseTree.ParseTree("../../../trees/0003.dev");
     parseTree5 = new ParseTree.ParseTree("../../../trees/0014.dev");
 }
Ejemplo n.º 3
0
 public void EvaluarTest()
 {
     ParseTree.ParseTree sut = new ParseTree.ParseTree("1+3*2+8");
     sut.Expandir();
     Assert.Equal(15, sut.Evaluar());
 }
 public int StructureAgreementCount(ParseTree.ParseTree parseTree)
 {
     return(((ParseNodeDrawable)root).StructureAgreementCount((ParseNodeDrawable)parseTree.GetRoot()));
 }
 public int GlossAgreementCount(ParseTree.ParseTree parseTree, ViewLayerType viewLayerType)
 {
     return(((ParseNodeDrawable)root).GlossAgreementCount((ParseNodeDrawable)parseTree.GetRoot(),
                                                          viewLayerType));
 }