blob: c22ed8cc20cc612f3f1cbab14e82996648e14588 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import java.io.*;
import visitor.*;
import syntaxtree.*;
import java.util.*;
// Files are stored in the vaporize directory/package.
import vaporize.*;
public class Typecheck {
public static void main(String[] args) {
Node root = null;
try {
root = new MiniJavaParser(System.in).Goal();
// Pretty-print the tree. PPrinter inherits from
// GJDepthFirst<R,A>. R=Void, A=String.
PPrinter<Void,String> pp = new PPrinter<Void,String>();
root.accept(pp, "");
}
catch (ParseException e) {
System.out.println(e.toString());
System.exit(1);
}
}
}
|