1 package persistence.antlr; 2 3 8 9 class ActionElement extends AlternativeElement { 10 protected String actionText; 11 protected boolean isSemPred = false; 12 13 14 public ActionElement(Grammar g, Token t) { 15 super(g); 16 actionText = t.getText(); 17 line = t.getLine(); 18 column = t.getColumn(); 19 } 20 21 public void generate() { 22 grammar.generator.gen(this); 23 } 24 25 public Lookahead look(int k) { 26 return grammar.theLLkAnalyzer.look(k, this); 27 } 28 29 public String toString() { 30 return " " + actionText + (isSemPred?"?":""); 31 } 32 } 33 | Popular Tags |