On 28 Jul 2003, Luke Palmer wrote: > Klass-jan wrote: > > Maybe it's not possible to have the eval instruction right away, in the new > > Python->IMC code generator. As long as this command is not used in the code > > for this new code generator, this can just be skipped, and it may be > > implemented in IMC by hand, and inserted into the new code generator > > (Python->IMC, written in IMC) > > Well, is the Python parser written in Python? If so, then we have a > bootstrapping problem... but since there is already a good bootstrap > program (the python executable), there's no problem at all.
Well, No, and yes. :) No, "the" python parser is written in c, but there is "a" supposedly drop-in replacement for it (that I've not yet tried) written in python as part of the pypython project: http://codespeak.net/moin/pypy/moin.cgi/BytecodeCompiler So you are correct, in theory there is no big problem here. Incidentally, python legend amk emailed me last friday and pointed out his work getting a small python script to compile down to parrot 0.0.2: http://www.amk.ca/conceit/parrot.html It uses this approach of walking the python parse tree (as opposed to translating the python bytecode), so my plan is to try and update it this week for IMCC. Assuming that works out, the python compiler should be just a matter of writing the rest of these 50-something "visit" methods and then dealing with the C-stuff. I think it would be nice to have that python API wrapper so C-module authors could support both versions with the same API... Sincerely, Michal J Wallace Sabren Enterprises, Inc. ------------------------------------- contact: [EMAIL PROTECTED] hosting: http://www.cornerhost.com/ my site: http://www.withoutane.com/ --------------------------------------