@@ -0,0 +1,886 @@
+/**%0A * %0A */%0Apackage blog.parse;%0A%0Aimport blog.absyn.Absyn;%0A%0A/**%0A * @author leili%0A * @since Apr 18, 2012%0A * %0A */%0Apublic class Parse %7B%0A%0A%09protected blog.msg.ErrorMsg errorMsg;%0A%09protected Absyn absyn;%0A%0A%09public Parse(String filename) %7B%0A%09%09errorMsg = new blog.msg.ErrorMsg(filename);%0A%0A%09%09java.io.InputStream inp;%0A%09%09BLOGParser parser;%0A%09%09try %7B%0A%09%09%09inp = new java.io.FileInputStream(filename);%0A%09%09%7D catch (java.io.FileNotFoundException e) %7B%0A%09%09%09throw new Error(%22File not found: %22 + filename);%0A%09%09%7D%0A%09%09try %7B%0A%09%09%09parser = new BLOGParser(new BLOGLexer(inp, errorMsg), errorMsg);%0A%09%09%09/* open input files, etc. here */%0A%0A%09%09%09parser. /* debug_ */parse();%0A%09%09%09absyn = parser.parseResult;%0A%09%09%7D catch (Throwable e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%09throw new Error(e.toString());%0A%09%09%7D finally %7B%0A%09%09%09try %7B%0A%09%09%09%09inp.close();%0A%09%09%09%7D catch (java.io.IOException e) %7B%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%7D%0A%09%0A%09public Absyn getResult() %7B%0A%09%09return absyn;%0A%09%7D%0A%09%0A%7D%0A

add Parse class