On 4/4/02 10:21 pm, in article [EMAIL PROTECTED], "Rafael Garcia-Suarez" <[EMAIL PROTECTED]> wrote:
> James A Duncan wrote in perl.perl6.internals : >> >> I've started work on B::Parrot, which is a Perl 5 to Parrot translation >> engine. Its very basic at the moment, but I've got it successfully >> translating things like: >> >> [ code snipped ] >> >> into working, assemble-able parrot code. Before I go any further on >> this crack-fuelled project is there anything I should be aware of? Are >> others working on this? Have I done far too much crack smoking to >> consider doing something like this now? > > I think you're already aware of the main issue : the compiler backends > are executed after compilation of the Perl 5 program. Thus, things that > happen at compile-time (BEGIN and CHECK blocks, hints to the compiler > via pragmas and the $^H / %^H variables) are difficult (or impossible) > to spot correctly. Yeah, its a big one for all the compiler backends. I was under the impression that Captain Deparse (robin) had come up with a solution for that one. I guess thatıs what I get for ignoring p5p. I know that only 95% of Perl is possible with this mechanism, but writing a full blown parser is not on my list of Fun Things To Do :-) The biggest issue that I can immediately foresee is Perl 5 Regular Expressions. Currently they occupy (I think) one op in perl. This is a problem, as also not on my Fun Things To Do list is grokking the regex engine, and then writing a backend for it. After talking with a couple of people at tonight's London.pm meeting one solution that talked about was wrapping the PCRE library in a PMC to deal with the problem, but I don't know how realistic this is. > this doesn't exclude the interest of your B::Parrot approach. Do you > plan to release it on CPAN ? If I can get it to an acceptable level of quality[0] then yes. But of course :-) > Oh, and don't forget to test it with and without threads. Look at the > existing B:: modules for hints. I think footnote 0 applies here. First priority is getting something working a couple of steps beyond what is going on now. Regards, James [0] This means being able to do a few very basic things, probably a little less than the sort of functionality that was in B::C when it originally came out some 5 odd years ago. A start, you know...