From 8131ddc22af5d39114a55349d71bcdc467599187 Mon Sep 17 00:00:00 2001 From: bd-912 Date: Wed, 27 Mar 2024 13:09:08 -0600 Subject: Expand file structure, Vaporize skeleton --- J2V.java | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 J2V.java (limited to 'J2V.java') 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=Void, A=String. + PPrinter pp = new PPrinter(); + root.accept(pp, ""); + } + catch (ParseException e) { + System.out.println(e.toString()); + System.exit(1); + } + + } +} -- cgit v1.2.3