At 2:05 AM +0000 1/23/04, [EMAIL PROTECTED] wrote:
The subject says it all.

As Leo's pointed out, that's what the compile op is for. It takes both a string with the source to compile as well as the name of the compilation module to pass it to. This currently works with the modules "PIR" and "PASM" for, well, PIR and pasm code, but it will work with any other language that can generate standard bytecode segments. (I really, *really* ought to get Forth thumped into shape enough to do this as an example)


The (currently nonfunctional) compreg op is there to register new compiler modules with the interpreter, which is how loaded compiler libraries will make themselves available to parrot.

At some point you'll probably be able to do, from within perl, something like:

eval :language(LISP) "(defun foo ...)";

or something more or less like that. (Assuming someone builds a lisp compiler for parrot, of course)
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to