
public class Typecheck
{
	public static void main(String[] args)
	{
		//just getting started
		if(args.length > 0)
		{
			//args[0] is the file.. use parser to interact with it?

			//just checking if java compiles and stuff, basically at "hello world" stage right now.
			System.out.println(args[0]);
		}
		else
		{
			System.out.println("Error, no file to typecheck.");
		}
	}
}

public class Typecheck {
    public static void main(String[] args) throws ParseException {
		// According to the instruction: "java Typecheck < P.java"
        // We use `System.in` as the input stream.
        try {
            new MiniJavaParser(System.in);
            MiniJavaParser.Goal();

            System.out.println("Program type checked successfully");
        } catch (ParseException e) {
            System.out.println("Type error");
        }
	}
}

make the parser runnable