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