[pypy-dev] EBNF translation error
arigo at tunes.org
Sat Mar 5 16:51:44 CET 2011
On Fri, Mar 4, 2011 at 5:14 AM, Timothy Baldridge <tbaldridge at gmail.com> wrote:
> I hope this is the right place for this question.
> pypy.rpython.error.TyperError: don't know how to convert from
> <InstanceRepr for pypy.rlib.parsing.tree.Node> to <PyObjRepr *
Basically, it worked all right, except that you are trying to return
from the main translated function an instance of Node, which the
translator doesn't know how to convert back to Python level. You can
only return simple types, like ints, strings, and so on.
In "real usage", i.e. translating a stand-alone program with
pypy/translator/goal/translate.py, the main translated function needs
anyway to have a specific signature, similar to the main() function in
C code: takes a list of strings (argv), and returns an integer (exit
More information about the Pypy-dev