1 20 21 package JFlex; 22 23 24 35 public class RegExp1 extends RegExp { 36 37 40 Object content; 41 42 43 51 public RegExp1(int type, Object content) { 52 super(type); 53 this.content = content; 54 } 55 56 57 65 public String print(String tab) { 66 if (content instanceof RegExp) { 67 return tab+"type = "+type+Out.NL+tab+"content :"+Out.NL+((RegExp)content).print(tab+" "); 68 } 69 else 70 return tab+"type = "+type+Out.NL+tab+"content :"+Out.NL+tab+" "+content; 71 } 72 73 74 77 public String toString() { 78 return print(""); 79 } 80 } 81 | Popular Tags |