[pypy-dev] Re: Notes on compiler package

Michael Hudson mwh at python.net
Thu Jan 23 13:38:33 CET 2003

On Thu, 23 Jan 2003, logistix wrote:

> Michael Hudson <mwh at python.net> wrote: 
> > 
> > > In general, the compiler package is in alot better shape than I expected.
> > 
> > What were you expecting?
> I don't know.  I guess in general I expect nothing, and this looks like
> something ;)

Oh I see.  I got the impression that you expected the compiler package to 
be broken.

> BTW, there's a note in compiler.ast that says it's autogenerated.  I
> this still true?  If so, how?

Errr... Tools/compiler/astgen.py, I think.  Although the docstring of said 
script doesn't sound entirely encouraging

"""Generate ast module from specification

This script generates the ast module from a simple specification,
which makes it easy to accomodate changes in the grammar.  This
approach would be quite reasonable if the grammar changed often.
Instead, it is rather complex to generate the appropriate code.  And
the Node interface has changed more often than the grammar.

I *think* it's still used...

I don't want to give the impression that I know the compiler module inside
out.  I just have enough of an idea about it that I can find the bit
that's broken this week without *too* much effort (changes to
Python/compile.c and other places routinely break the compiler module).


More information about the Pypy-dev mailing list