// Path: src/java/minijava/parser/MiniJavaParser.java
// public class MiniJavaParser {
// 
// 	/**
// 	 * Read input from a File and parse it into an AST representation.
// 	 */
// 	public static Program parse(File file) throws IOException, ParseException {
// 		FileReader input = new FileReader(file);
// 		try {
// 			return parse(input);
// 		}
// 		finally { //No matter what happens, always close the file!
// 			input.close();
// 		}
// 	}
// 
// 	/**
// 	 * Read input from a java.io.Reader and parse it into an AST. It is the
// 	 * caller's responsibility to close the Reader.
// 	 */
// 	private static Program parse(Reader input) throws ParseException {
// 		JCCMiniJavaParser parser = new JCCMiniJavaParser(input);
// 		return parser.Program();
// 	}
// 
// 	/**
// 	 * Read input directly from a String and parse it into an AST.
// 	 */
// 	public static Program parse(String inputText) throws ParseException {
// 		return parse(new StringReader(inputText));
// 	}
// 
// 	/**
// 	 * Normally we don't need to parse just expressions by themselves. But this
// 	 * is a convenience method, used by the unit tests for creating error messages.
// 	 * @throws ParseException 
// 	 */
// 	public static Expression parseExp(String exp) throws ParseException {
// 		JCCMiniJavaParser parser = new JCCMiniJavaParser(new StringReader(exp));
// 		return parser.Expression();
// 	}
// 	/**
// 	 * Pretty print an AST node and return the result as a String.
// 	 */
// 	public static String unparse(AST node) {
// 		return node.toString(); 
// 		// This assumes that toString on AST nodes is appropriately implemented.
// 		// If you decided to generate/implement your own AST classes rather than use 
// 		// the ones we provided for you, you may need to implement this unparse method 
// 		// differently.
// 	}
// 
// }
// 
// Path: src/java/minijava/test/SampleCode.java
// public class SampleCode {
// 
// 	/**
// 	 * Points to a directory containing sample java code to parse.
// 	 */
// 	public final static File sample_dir = new File("resources/sample");
// 
// 	/**
// 	 * Filter for selecting Java files only.
// 	 */
// 	private static final FilenameFilter javaFileFilter = new FilenameFilter() {
// 		@Override
// 		public boolean accept(File dir, String name) {
// 			return name.endsWith(".java");
// 		}
// 	};
// 
// 	/**
// 	 * @return An array of sample MiniJava files.
// 	 */
// 	public static File[] sampleFiles() {
// 		File[] files = sample_dir.listFiles(javaFileFilter);
// 		// Should sort the array to ensure that we produce the files in the same order
// 		// independent of the order in which the OS produces them.
// 		Arrays.sort(files);
// 		return files;
// 	}
// 
// }


import java.io.File;
import minijava.parser.MiniJavaParser;
import minijava.test.SampleCode;
import org.junit.Test;
				"class Box {\n" +
				"    int x;\n" +
				"    public int getX() {\n" +
				"       return x;" +
				"    }" +
				"}");
		acceptClass(
				"class Box {\n" +
				"    public int getX() {\n" +
				"       return x;" +
				"    }" +
				"    int x;\n" +
				"}");
		acceptClass(
				"class Box {\n" +
				"    public int getX() {\n" +
				"       return x;" +
				"    }" +
				"    int x;\n" +
				"    public int get2X() {\n" +
				"       return 2*x;" +
				"    }" +
				"}");
		acceptClass(
				"class Point {\n" +
				"    int x;\n" +
				"    int y;\n" +
				"    public int getX() {\n" +
				"       return x;" +
				"    }" +
// Path: src/java/minijava/parser/MiniJavaParser.java
// public class MiniJavaParser {
// 
// 	/**
// 	 * Read input from a File and parse it into an AST representation.
// 	 */
// 	public static Program parse(File file) throws IOException, ParseException {
// 		FileReader input = new FileReader(file);
// 		try {
// 			return parse(input);
// 		}
// 		finally { //No matter what happens, always close the file!
// 			input.close();
// 		}
// 	}
// 
// 	/**
// 	 * Read input from a java.io.Reader and parse it into an AST. It is the
// 	 * caller's responsibility to close the Reader.
// 	 */
// 	private static Program parse(Reader input) throws ParseException {
// 		JCCMiniJavaParser parser = new JCCMiniJavaParser(input);
// 		return parser.Program();
// 	}
// 
// 	/**
// 	 * Read input directly from a String and parse it into an AST.
// 	 */
// 	public static Program parse(String inputText) throws ParseException {
// 		return parse(new StringReader(inputText));
// 	}
// 
// 	/**
// 	 * Normally we don't need to parse just expressions by themselves. But this
// 	 * is a convenience method, used by the unit tests for creating error messages.
// 	 * @throws ParseException 
// 	 */
// 	public static Expression parseExp(String exp) throws ParseException {
// 		JCCMiniJavaParser parser = new JCCMiniJavaParser(new StringReader(exp));
// 		return parser.Expression();
// 	}
// 	/**
// 	 * Pretty print an AST node and return the result as a String.
// 	 */
// 	public static String unparse(AST node) {
// 		return node.toString(); 
// 		// This assumes that toString on AST nodes is appropriately implemented.
// 		// If you decided to generate/implement your own AST classes rather than use 
// 		// the ones we provided for you, you may need to implement this unparse method 
// 		// differently.
// 	}
// 
// }
// 
// Path: src/java/minijava/test/SampleCode.java
// public class SampleCode {
// 
// 	/**
// 	 * Points to a directory containing sample java code to parse.
// 	 */
// 	public final static File sample_dir = new File("resources/sample");
// 
// 	/**
// 	 * Filter for selecting Java files only.
// 	 */
// 	private static final FilenameFilter javaFileFilter = new FilenameFilter() {
// 		@Override
// 		public boolean accept(File dir, String name) {
// 			return name.endsWith(".java");
// 		}
// 	};
// 
// 	/**
// 	 * @return An array of sample MiniJava files.
// 	 */
// 	public static File[] sampleFiles() {
// 		File[] files = sample_dir.listFiles(javaFileFilter);
// 		// Should sort the array to ensure that we produce the files in the same order
// 		// independent of the order in which the OS produces them.
// 		Arrays.sort(files);
// 		return files;
// 	}
// 
// }


// Path: src/java/minijava/test/parser/Test3Parse.java
import java.io.File;
import minijava.parser.MiniJavaParser;
import minijava.test.SampleCode;
import org.junit.Test;

				"class Box {\n" +
				"    int x;\n" +
				"    public int getX() {\n" +
				"       return x;" +
				"    }" +
				"}");
		acceptClass(
				"class Box {\n" +
				"    public int getX() {\n" +
				"       return x;" +
				"    }" +
				"    int x;\n" +
				"}");
		acceptClass(
				"class Box {\n" +
				"    public int getX() {\n" +
				"       return x;" +
				"    }" +
				"    int x;\n" +
				"    public int get2X() {\n" +
				"       return 2*x;" +
				"    }" +
				"}");
		acceptClass(
				"class Point {\n" +
				"    int x;\n" +
				"    int y;\n" +
				"    public int getX() {\n" +
				"       return x;" +
				"    }" +
				"    public int getY() {\n" +