public static void main(String[] args) throws Exception {
		Reader reader = null;
		File input = new File(args[0]);
		
		if (args.length == 1) {
			if (!input.canRead())
				error("could not read " + input);
		} else
			error("Improper number of arguments");

		Preprocessor p = new Preprocessor();
		String newInput = p.replaceInsert(input);
		reader = new StringReader(newInput);
		Yylex scanner = new Yylex(reader);
		Symtab symtab = new Symtab();
		scanner.setSymtab(symtab);

		parser parser = new parser(scanner);
		Tprogram program = null;

		try {
			program = (Tprogram) parser.parse().value;
		} catch (Exception e) {
			e.printStackTrace();
		}

		program.setSymtab();
		PrintWriter printer = new PrintWriter(new File("src/Target.java"));
		printer.print(program.interpret());
		printer.close();
	}