1 package antlr; 2 3 9 10 15 class BlockContext { 16 AlternativeBlock block; int altNum; BlockEndElement blockEnd; 20 21 public void addAlternativeElement(AlternativeElement e) { 22 currentAlt().addElement(e); 23 } 24 25 public Alternative currentAlt() { 26 return (Alternative)block.alternatives.elementAt(altNum); 27 } 28 29 public AlternativeElement currentElement() { 30 return currentAlt().tail; 31 } 32 } 33 | Popular Tags |