diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-03-27 13:09:08 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-03-27 13:09:08 -0600 |
commit | 8131ddc22af5d39114a55349d71bcdc467599187 (patch) | |
tree | 9aaa7b984f223b1b405bb1598982ea992eeba67d /J2V.java | |
parent | e8af241aa57104d62c25c8bcbc2df76510998bf9 (diff) |
Expand file structure, Vaporize skeleton
Diffstat (limited to 'J2V.java')
-rw-r--r-- | J2V.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/J2V.java b/J2V.java new file mode 100644 index 0000000..c22ed8c --- /dev/null +++ b/J2V.java @@ -0,0 +1,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); + } + + } +} |