[pypy-dev] Parser

Armin Rigo arigo at tunes.org
Thu Mar 31 10:18:53 CEST 2005

Hi all,

Last sprint, one of the things we integrated into PyPy was Jon's parser.  
There was some potential collision here: the Logilab people, Ludovic in
particular, has also been working on a parser for some time.  Unfortunately,
the sprint started on a Saturday and the integration was mostly done by
Monday, so contacting Ludovic for feed-back was difficult.

After a chat with Adrien, the situation seems to be as follows: the Logilab
parser is roughly ready (needs polishing) and will be checked in somewhere
soon.  (Checking in regularly would be a good idea anyway, even for incomplete
stuff...)  It ressembles Jon's in that it parses Python's Grammar file and
makes a parser from that, producing nested tuples in the format that the
compiler package can turn into AST and then bytecode.  We will have to compare
the two parsers to know more precisely the current status.  I suspect that the
Logilab parser is more appropriate to Logilab's and DFKI's own goals in the
WP09/WP10, which involve playing around with the syntax, using a visitor
pattern to generate its output; as far as I understand it, Jon's parser is not
meant to be nice and flexible but mainly just a rewrite in Python of CPython's
own parser.

This is a bit unfortunate, as it means that some work has been done twice.  
Not having a Logilab person at the PyCon sprint was certainly a problem, given
that they should take the lead on the parsing and compiling stages (which, I
admit freely, I'm not too interested in).

I'll let Adrien and Ludovic comment on this...

A bientôt,


More information about the Pypy-dev mailing list