[pypy-dev] rlib parsing

Leonardo Santagada santagada at gmail.com
Wed Apr 20 07:25:34 CEST 2011


Sorry I forgot to reply to the list. The first step would be to tell
us the error you are getting. But the fastest way to solve your
problems, and get help learning how to debug pypy is to join the pypy
channel at freenode (IRC)

On Tue, Apr 19, 2011 at 8:54 PM, Ian Overgard <ian.overgard at gmail.com> wrote:
> That's what I thought too (my code is exactly like that), but something in
> it is causing the translator to break, and the error I get back doesn't seem
> to tell me anything I can work with.
>
> I wouldn't mind jumping in to help fix it, is there maybe some sort of
> guide/general tips on how to go about debugging translation issues? So far
> I've just been looking at the exceptions and the rpython docs and guessing
> it out, but I'm guessing people that have worked with this longer might have
> more robust ideas on ways to trace things?
>
> On Tue, Apr 19, 2011 at 5:24 PM, Leonardo Santagada <santagada at gmail.com>
> wrote:
>>
>> This code is rpython
>>
>> t = parsef(code)
>> ToAST().transform(t)
>>
>> Maybe you can look at the tests in the library or the prolog and js
>> implementation, both use parsing I think (at least js does). I really
>> think that parsing could be polished to be a great tool for people
>> wanting to implement a language in pypy.
>>
>> On Tue, Apr 19, 2011 at 7:51 PM, Ian Overgard <ian.overgard at gmail.com>
>> wrote:
>> > Thanks, that definitely helped. I forgot you could run arbitrary python
>> > before the entry point.
>> >
>> > I've got it parsing now, but the one issue I'm still running into is
>> > that
>> > the syntax tree that comes back has a lot of junk nodes. The
>> > ToAST.transform
>> > function will clean them up, but it seems to be not-rpython, and I don't
>> > think there's any way I can call it before the entry point (since it's
>> > processing the ast, not the grammar).
>> >
>> > Is that class just hopeless? Or is there some way I can annotate it
>> > myself
>> > in the code? (
>>
>> --
>> Leonardo Santagada
>
>



-- 
Leonardo Santagada



More information about the Pypy-dev mailing list