Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Commit [c14db5] antlr Maximize Restore History

backing out of attempt to mess with CodeCompiler etc. Too much

to go after at once. First thing is attempt to replace javacc.

fwierzbicki@79b11f02-f210-0410-99aa-fb189b3d1ac4 fwierzbicki@79b11f02-f210-0410-99aa-fb189b3d1ac4 2007-11-05

changed build.xml
copied src/org/python/compiler/PythonWalker.g -> src/org/python/antlr/PythonWalker.g
build.xml Diff Switch to side-by-side view
Loading...
src/org/python/compiler/PythonWalker.g to src/org/python/antlr/PythonWalker.g
--- a/src/org/python/compiler/PythonWalker.g
+++ b/src/org/python/antlr/PythonWalker.g
@@ -6,13 +6,14 @@
 }
 
 @header { 
-package org.python.compiler;
+package org.python.antlr;
 
 import org.python.parser.ast.argumentsType;
 import org.python.parser.ast.exprType;
 import org.python.parser.ast.modType;
 import org.python.parser.ast.stmtType;
 import org.python.parser.ast.FunctionDef;
+import org.python.parser.ast.Module;
 import org.python.core.CompilerFlags;
 import org.python.core.Py;
 import org.python.parser.ast.Pass;
@@ -44,23 +45,6 @@
 
 @after {
     try {
-
-        Module module = new Module(name, filename, linenumbers);
-        module.setFile = setFile;
-        //FJW module.futures.preprocessFutures(node, cflags);
-        //FJW new ScopesCompiler(module, module.scopes).parse(node);
-
-        //Add __doc__ if it exists
-        //Add __file__ for filename (if it exists?)
-
-        Constant main = module.PyCode(node, "?", false, null, false,
-                                      printResults, 0,
-                                      module.getScopeInfo(node),
-                                      cflags);
-        module.mainCode = main;
-        //FJW module.write(ostream);
-
-
         byte[] ba = cw.toByteArray();
         FileOutputStream fos = new FileOutputStream(name + ".class");
         ByteArrayOutputStream baos = new ByteArrayOutputStream(ba.length);
@@ -73,7 +57,7 @@
     }
     System.out.println("file_input finished");
     stmtType[] s = new stmtType[0];
-    return new org.python.parser.ast.Module(s);
+    return new Module(s);
 
 }
     : stmt+