public static void main(String[] args) throws FileNotFoundException, IOException {
        Utils.suppressWarning = true;
        ESL cg = new ESL();
        CharStream cs = null;
        String path = null, pack = null;
        if (args.length >= 3) {
            path = args[0];
            pack = args[1];
            for(int i =2;i<args.length-1;i++) {
                pack += ";\nimport "+args[i];
            }
            cs = new FileStream(new File(args[args.length-1]));
        } else {
            System.out.println("Usage: java -jar EriLex.jar <path> <package> <imports> <specification>");
            System.exit(-1);
        }
        System.out.println("Parsing...");
        CharStream.Label start = cs.mark();
        if(cg.parse(Spec, cs)) {
            if(cs.next() != -1) Utils.error(cg,"Not fully parsed!");
        } else {
            Utils.printError(cs);
            //printTree(((TreeBuildingHandler) cg.handler).getAST(),"","|");
            System.exit(-1);
        }
        //printTree(((TreeBuildingHandler) cg.handler).getAST(),"","|");
        final Tree<ASTValueData> ast = ((TreeBuildingHandler) cg.handler).getAST();
        System.out.println("Procesing...");
        final SupportCodeGenerator scg = new SupportCodeGenerator();
        scg.setPack(pack);
        scg.setPath(path);
        cg.semantics.trans("gen", ast, scg);
        boolean verbose = false;
         if(verbose) {   scg.G.dumpRuleMap();
            System.out.println("Preprocesing complete.");
            System.out.println("Grammar:");
            scg.G.dumpRuleMap();
            System.out.println("Types:");
            scg.T.dumpRuleMap();
            System.out.println("Environment:");
            scg.E.dumpRuleMap();

            System.out.println("Typing Rules:");
            List<TypingRule> rs = new LanguageGenerator(scg.t, scg.d, scg.e, scg.E, null, scg.T, null, scg.G, null, null).toTypingRules(scg.G);
            for (TypingRule r : rs) {
                System.out.println(r);
                System.out.println();
            }
         }
    
        System.out.println("Generating code...");
        scg.generate();
        System.out.println("Code generation complete.");
    }