[pypy-dev] scheme parser.

Leonardo Santagada santagada at gmail.com
Thu May 10 00:24:19 CEST 2007

Em 09/05/2007, às 18:05, Jakub Gustak escreveu:

> I have been experimenting with rlib.parsing.ebnfparse today. One thing
> which is not described, if you want to use ebnfparse you have to:
>> py.test.config.parse([])
I don't do that, so thats probably not necessary. Wy not put your  
code on lang/scheme so we can all see it?

> Can anyone explain what happens there? Is there any other "magical"
> initialization stuff which i have to know before going on?
> ebnfparse seems to work just fine, so I will stick with it, unless
> there is any contraindication.

parsing is a great language parser generator, and probably has  
everything a scheme interpreter will need.

> Now I am considering if the parser should generate some bytecode?
> Maybe pickling (not rpythonic) AST tree will be just fine (like in js
> interpreter)?

I am pickling the tree only if running on top of CPython, because  
RPython don't support that. And even then, it is really just a hack  
because parsing took a lot of time running on top of cpython. Iam  
going to give you the same advice I got from armin when I started...  
begin with AST and then when you have your parser ready we can see if  
using bytecode really get you faster.

Leonardo Santagada
santagada at gmail.com

More information about the Pypy-dev mailing list