public String testFile(String file) throws Exception {
		FileInputStream fis = new FileInputStream(file);

		Lexer lex = new Lexer(fis);
		Parser p = new Parser();
		ArrayList<Definition> defs = p.parse(lex);
		Compiler c = new Compiler(defs);

		Node reduced=ReductionMachine.reduce(c.getCompiledTree());


		ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
		PrintStream ps = new PrintStream(byteOut);
		Printer.print(ps, reduced);
		String result = byteOut.toString();

		return result;
	}