public static void main(String argv[]) {
		if (argv.length == 0) {
			System.out.println("Usage : java MyScanner <inputfile>");
		} else {
			for (int i = 0; i < argv.length; i++) {
				String fileName = null;
				try {

					fileName = argv[i];
					Parser parser = new Parser(new Scanner(new java.io.FileReader(fileName)), fileName);
					AbstractNode abstractTree = parser.parse();
					SymbolTable syms = new SymbolTable();
					
					System.out.println(abstractTree);
					System.out.println(abstractTree.compile(syms));
					System.out.println(syms);

					PrintWriter w = new PrintWriter("codetxt");
					w.print(abstractTree.code());
					w.close();

				} catch (java.io.FileNotFoundException e) {
					System.err.println("File not found : \"" + fileName + "\"");
				} catch (ParserException e) {
					System.err.println(e);
				} catch (Exception e) {
					System.err.println("Unexpected exception:");
					e.printStackTrace();
				}
			}
		}
	}