1 package antlr; 2 3 9 10 import antlr.collections.impl.Vector; 11 12 class RuleSymbol extends GrammarSymbol { 13 RuleBlock block; boolean defined; Vector references; String access; String comment; 21 public RuleSymbol(String r) { 22 super(r); 23 references = new Vector(); 24 } 25 26 public void addReference(RuleRefElement e) { 27 references.appendElement(e); 28 } 29 30 public RuleBlock getBlock() { 31 return block; 32 } 33 34 public RuleRefElement getReference(int i) { 35 return (RuleRefElement)references.elementAt(i); 36 } 37 38 public boolean isDefined() { 39 return defined; 40 } 41 42 public int numReferences() { 43 return references.size(); 44 } 45 46 public void setBlock(RuleBlock rb) { 47 block = rb; 48 } 49 50 public void setDefined() { 51 defined = true; 52 } 53 } 54 | Popular Tags |