1 package antlr; 2 3 9 10 class TreeSpecifierNode { 11 private TreeSpecifierNode parent = null; 12 private TreeSpecifierNode firstChild = null; 13 private TreeSpecifierNode nextSibling = null; 14 private Token tok; 15 16 17 TreeSpecifierNode(Token tok_) { 18 tok = tok_; 19 } 20 21 public TreeSpecifierNode getFirstChild() { 22 return firstChild; 23 } 24 25 public TreeSpecifierNode getNextSibling() { 26 return nextSibling; 27 } 28 29 public TreeSpecifierNode getParent() { 31 return parent; 32 } 33 34 public Token getToken() { 35 return tok; 36 } 37 38 public void setFirstChild(TreeSpecifierNode child) { 39 firstChild = child; 40 child.parent = this; 41 } 42 43 public void setNextSibling(TreeSpecifierNode sibling) { 45 nextSibling = sibling; 46 sibling.parent = parent; 47 } 48 } 49 | Popular Tags |