KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ASTCompilationUnit


1
2 /*
3  * Copyright © 2002 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
4  * California 95054, U.S.A. All rights reserved. Sun Microsystems, Inc. has
5  * intellectual property rights relating to technology embodied in the product
6  * that is described in this document. In particular, and without limitation,
7  * these intellectual property rights may include one or more of the U.S.
8  * patents listed at http://www.sun.com/patents and one or more additional
9  * patents or pending patent applications in the U.S. and in other countries.
10  * U.S. Government Rights - Commercial software. Government users are subject
11  * to the Sun Microsystems, Inc. standard license agreement and applicable
12  * provisions of the FAR and its supplements. Use is subject to license terms.
13  * Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered
14  * trademarks of Sun Microsystems, Inc. in the U.S. and other countries. This
15  * product is covered and controlled by U.S. Export Control laws and may be
16  * subject to the export or import laws in other countries. Nuclear, missile,
17  * chemical biological weapons or nuclear maritime end uses or end users,
18  * whether direct or indirect, are strictly prohibited. Export or reexport
19  * to countries subject to U.S. embargo or to entities identified on U.S.
20  * export exclusion lists, including, but not limited to, the denied persons
21  * and specially designated nationals lists is strictly prohibited.
22  */

23
24
25 /* JJT: 0.2.2 */
26
27 import java.io.*;
28
29 public class ASTCompilationUnit extends SimpleNode {
30   ASTCompilationUnit(int id) {
31     super(id);
32   }
33
34
35 // Manually inserted code begins here
36

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