K Stol wrote:
> 
> ----- Original Message -----
> From: "Michal Wallace" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 23, 2003 4:48 PM
> Subject: approaching python
> 
> >
> > Hey all,
> >
> > I've been thinking about the "compiling python to
> > parrot" concept. Right now it looks like the
> > approach is to start from scratch, but I'm
> > wondering if it might make more sense to
> > leverage python itself, at least for now?
> >
> > Python has a compiler module (written in python
> > and standard with the distribution) that can
> > take a python parse tree and produce python
> > byte code. It basically just walks the tree
> > and has a method for each python structure.
> >
> > The actual parser is written in c, but there's
> > a drop-in replacement (or at least a partial one)
> > written in python described here:
> >
> >   http://codespeak.net/moin/pypy/moin.cgi/BytecodeCompiler
> >
> > Would it make sense to use this to boostrap the
> > python parrot compiler? I was thinking about taking
> > a shot next week at replacing compiler.pycodegen.CodeGenerator
> > with something that produced IMCC.
> 
> Correct me if I'm wrong, but there's no bootstrap problem, just a matter
> of reimplementing the code generator.

Except that you'd have to reimplement the code generator *in python* to
produce parrot bytecode.

Then run it once (on the python parser and code generator themselves)
using the python executable, *then* you can run them using parrot.

Sounds like bootstrapping to me. :P

-- 
$a=24;split//,240513;s/\B/ => /for@@=qw(ac ab bc ba cb ca
);{push(@b,$a),($a-=6)^=1 for 2..$a/6x--$|;print "[EMAIL PROTECTED]
]\n";((6<=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))&&redo;}

Reply via email to