On 24 Jul 2003, Luke Palmer wrote: > Klass-Jan Stol writes: > > module, right? I don't know Python, and I've a little experience > > with IMC, but it seems to me only a new code generator module should
...[snip] > Well... sortof. It's definitely going to take writing a whole new > code generator module; it's not just a matter of getting the right > instructions. Python's interpreter is stack-based, while Parrot's is > register-based, which are two very different kinds of data. Right. The implementation would be completely yanked out, but if we keep the code generator's interface, then that's the only file we have to touch. The other idea i had was a little crazy, but might make life a lot easier: if perl 6 can use pmcs directly, why not just compile it down to perl and let the perl compiler handle all the register stuff? [I honestly have no idea which way would be easier, since I don't realy know much about IMCC] Also, there's an older project called rattlesnake that never really got off the ground. I don't know if any code was produced, but the point was to make a register based python vm. Maybe someone from that camp could help us out. > I think it would be good design to have the python binary parse for > us, but it's not likely practical. Python has eval, so unless we > want to link with python, we should probably write our own > parser.[1] But there's already a parser written in python (in the pypython project), and it makes trees that work with the code generator. :) So I'm saying, use those tools, and just run the compiler from python until it's good enough to compile itself. That just seems like the quickest way to get python working. (Of course, then there's all the C-based python modules, but that's another story) Sincerely, Michal J Wallace Sabren Enterprises, Inc. ------------------------------------- contact: [EMAIL PROTECTED] hosting: http://www.cornerhost.com/ my site: http://www.withoutane.com/ --------------------------------------