1 package antlr; 2 3 9 10 import antlr.collections.AST; 11 import antlr.collections.ASTEnumeration; 12 import antlr.Token; 13 14 15 public class ASTNULLType implements AST { 16 public void addChild(AST c) { 17 } 18 19 public boolean equals(AST t) { 20 return false; 21 } 22 23 public boolean equalsList(AST t) { 24 return false; 25 } 26 27 public boolean equalsListPartial(AST t) { 28 return false; 29 } 30 31 public boolean equalsTree(AST t) { 32 return false; 33 } 34 35 public boolean equalsTreePartial(AST t) { 36 return false; 37 } 38 39 public ASTEnumeration findAll(AST tree) { 40 return null; 41 } 42 43 public ASTEnumeration findAllPartial(AST subtree) { 44 return null; 45 } 46 47 public AST getFirstChild() { 48 return this; 49 } 50 51 public AST getNextSibling() { 52 return this; 53 } 54 55 public String getText() { 56 return "<ASTNULL>"; 57 } 58 59 public int getType() { 60 return Token.NULL_TREE_LOOKAHEAD; 61 } 62 63 public void initialize(int t, String txt) { 64 } 65 66 public void initialize(AST t) { 67 } 68 69 public void initialize(Token t) { 70 } 71 72 public void setFirstChild(AST c) { 73 } 74 75 public void setNextSibling(AST n) { 76 } 77 78 public void setText(String text) { 79 } 80 81 public void setType(int ttype) { 82 } 83 84 public String toString() { 85 return getText(); 86 } 87 88 public String toStringList() { 89 return getText(); 90 } 91 92 public String toStringTree() { 93 return getText(); 94 } 95 } 96 | Popular Tags |