Example #1
0
 public override TsurgeonMatcher GetMatcher()
 {
     CoindexationGenerator coindexer = null;
     if (coindexes)
     {
         coindexer = new CoindexationGenerator();
     }
     return GetMatcher(new Dictionary<string, Tree>(), coindexer);
 }
Example #2
0
            public LocationMatcher(Dictionary<string, Tree> newNodeNames, CoindexationGenerator coindexer,
                TreeLocation location)
            {
                this.newNodeNames = newNodeNames;
                this.coindexer = coindexer;
                this.location = location;

                this.childMatcher = location.child.GetMatcher(newNodeNames, coindexer);
            }
Example #3
0
        public override TsurgeonMatcher GetMatcher()
        {
            CoindexationGenerator coindexer = null;

            if (coindexes)
            {
                coindexer = new CoindexationGenerator();
            }
            return(GetMatcher(new Dictionary <string, Tree>(), coindexer));
        }
Example #4
0
        // TODO: ideally we should have the tree and the tregex matcher be part of this as well.
        // That would involve putting some of the functionality in Tsurgeon.java in this object
        public TsurgeonMatcher(TsurgeonPattern pattern, Dictionary <string, Tree> newNodeNames,
                               CoindexationGenerator coindexer)
        {
            this.NewNodeNames = newNodeNames;
            this.Coindexer    = coindexer;

            this.ChildMatcher = new TsurgeonMatcher[pattern.children.Length];
            for (int i = 0; i < pattern.children.Length; ++i)
            {
                this.ChildMatcher[i] = pattern.children[i].GetMatcher(newNodeNames, coindexer);
            }
        }
Example #5
0
        // TODO: ideally we should have the tree and the tregex matcher be part of this as well.
        // That would involve putting some of the functionality in Tsurgeon.java in this object
        public TsurgeonMatcher(TsurgeonPattern pattern, Dictionary<string, Tree> newNodeNames,
            CoindexationGenerator coindexer)
        {
            this.NewNodeNames = newNodeNames;
            this.Coindexer = coindexer;

            this.ChildMatcher = new TsurgeonMatcher[pattern.children.Length];
            for (int i = 0; i < pattern.children.Length; ++i)
            {
                this.ChildMatcher[i] = pattern.children[i].GetMatcher(newNodeNames, coindexer);
            }
        }
Example #6
0
 public RelabelMatcher(Dictionary<string, Tree> newNodeNames, CoindexationGenerator coindexer,
     RelabelNode node) :
         base(node, newNodeNames, coindexer)
 {
     this.node = node;
 }
Example #7
0
 public override TsurgeonMatcher GetMatcher(Dictionary<string, Tree> newNodeNames, CoindexationGenerator coindexer)
 {
     return new RelabelMatcher(newNodeNames, coindexer, this);
 }
Example #8
0
 public LocationMatcher Matcher(Dictionary<string, Tree> newNodeNames, CoindexationGenerator coindexer)
 {
     return new LocationMatcher(newNodeNames, coindexer, this);
 }
Example #9
0
 public Matcher(Dictionary<string, Tree> newNodeNames, CoindexationGenerator coindexer, InsertNode node) :
     base(node, newNodeNames, coindexer)
 {
     this.node = node;
     locationMatcher = node.location.Matcher(newNodeNames, coindexer);
 }
Example #10
0
 public Matcher(Dictionary<string, Tree> newNodeNames, CoindexationGenerator coindexer,
     TsurgeonPatternRoot tRoot) :
         base(tRoot, newNodeNames, coindexer)
 {
 }
 public Matcher(Dictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer, AdjoinToHeadNode node)
     :
     base(node, newNodeNames, coindexer)
 {
     this.node = node;
 }
Example #12
0
 public Matcher(Dictionary<string, Tree> newNodeNames, CoindexationGenerator coindexer, AdjoinToHeadNode node)
     :
         base(node, newNodeNames, coindexer)
 {
     this.node = node;
 }
Example #13
0
 public Matcher(Dictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer,
                TsurgeonPatternRoot tRoot) :
     base(tRoot, newNodeNames, coindexer)
 {
 }
Example #14
0
 public Matcher(Dictionary<string, Tree> newNodeNames, CoindexationGenerator coindexer,
     CreateSubtreeNode node) :
         base(node, newNodeNames, coindexer)
 {
     this.node = node;
 }
Example #15
0
 public abstract TsurgeonMatcher GetMatcher(Dictionary<string, Tree> newNodeNames, CoindexationGenerator coindexer);