On Tue, Nov 14, 2006 at 08:52:47PM -0800, Allison Randal wrote: > > Also for the record from the weekly meeting (which was actually today, > just a very long today): Yes, compilers are objects and compilation is a > method call. The compiler for TGE tree grammars is implemented this way, > and it's a very usable interface.
Our messages crossed in the mail. > We might want to resurrect the 'compile' opcode as an indirect syntax > for making the 'compile' method call. Maybe, but I can't see that this is worthy of a special opcode (and presumably a vtable slot?). There's just not a lot of difference between: $P0 = compile mycompiler, code # compile opcode $P0 = mycompiler.'compile'(code) # Parrot convention Another advantage of using (true) method calls is that it's easy to pass options and additional arguments to the compiler: $P0 = mycompiler.'compile'(code, 'target'=>'parse') Pm