1 2 23 24 25 26 27 import java.io.*; 28 29 public class ASTCompilationUnit extends SimpleNode { 30 ASTCompilationUnit(int id) { 31 super(id); 32 } 33 34 35 37 public void process (PrintWriter ostr) { 38 Token t = begin; 39 ASTSpecialBlock bnode; 40 for (int i = 0; i < jjtGetNumChildren(); i++) { 41 bnode = (ASTSpecialBlock)jjtGetChild(i); 42 do { 43 print(t, ostr); 44 t = t.next; 45 } while (t != bnode.begin); 46 bnode.process(ostr); 47 t = bnode.end.next; 48 } 49 while (t != null) { 50 print(t, ostr); 51 t = t.next; 52 } 53 } 54 55 } 56 | Popular Tags |