예제 #1
0
 public KBDAST(int id, int command, List <int> tokens)
 {
     this.id         = id;
     this.command    = command;
     this.tokens     = new List <int>(tokens);
     cant_nodes_in   = 0;
     cant_nodes_next = 0;
     inside          = null;
     next            = null;
 }
예제 #2
0
 public void SetInsideSubTree(KBDAST inside)
 {
     this.inside        = inside;
     this.cant_nodes_in = inside.cant_nodes_next + inside.cant_nodes_in + 1;
     this.inside.parent = this;
 }
예제 #3
0
 public void SetNextSubTree(KBDAST next)
 {
     this.next            = next;
     this.cant_nodes_next = next.cant_nodes_in + next.cant_nodes_next + 1;
     this.next.parent     = this;
 }