[pypy-svn] r14066 - pypy/branch/pycompiler/translator/goal

adim at codespeak.net adim at codespeak.net
Fri Jul 1 20:57:48 CEST 2005


Author: adim
Date: Fri Jul  1 20:57:44 2005
New Revision: 14066

Added:
   pypy/branch/pycompiler/translator/goal/targetparser.py
Log:
added a target for the parser's main parse function

Added: pypy/branch/pycompiler/translator/goal/targetparser.py
==============================================================================
--- (empty file)
+++ pypy/branch/pycompiler/translator/goal/targetparser.py	Fri Jul  1 20:57:44 2005
@@ -0,0 +1,22 @@
+import os, sys
+from pypy.annotation.model import *
+from pypy.annotation.listdef import ListDef
+
+# WARNING: this requires the annotator.
+# There is no easy way to build all caches manually,
+# but the annotator can do it for us for free.
+
+this_dir = os.path.dirname(sys.argv[0])
+
+from pypy.module.recparser.pythonutil import annotateme
+# __________  Entry point  __________
+entry_point = annotateme
+
+# _____ Define and setup target ___
+def target():
+    s_list_of_strings = SomeList(ListDef(None, SomeString()))
+    return entry_point, [s_list_of_strings]
+
+# _____ Run translated _____
+def run(c_entry_point):
+    pass



More information about the Pypy-commit mailing list