Front page | perl.perl6.internals.api.parser |
Postings from January 2001
Re: Now, to try again...
Thread Previous
|
Thread Next
From:
Steve Fink
Date:
January 2, 2001 18:23
Subject:
Re: Now, to try again...
Message ID:
3A528CE7.BEC41C00@digital-integrity.com
That is way cool.
Though I'm not sure that all of the constructs of another language are
going to be that easy to map into perl opcodes. Arithmetic, sure. But
perl opcodes aren't exactly a universal intermediate language.
Just in looking at your example, it seems like some complex replacements
would be a bit of a pain to generate. It would be nice to have a
specification for those opcode replacements. Like, say, perl code. How
hard would it be to do:
use constant SUBTRACT_TWO_THINGS => B::eval(<<'END');
print("Subtracting!!!\n"),
$XYZZY_PLACEHOLDER_PARAM1-$XYZZY_PLACEHOLDER_PARAM2
END
CHECK {
.
.
.
$z = new B::subst_op(SUBTRACT_TWO_THINGS, XYZZY_PLACEHOLDER_PARAM1 =>
$x->first, XYZZY_PLACEHOLDER_PARAM2 => $x->last);
.
.
.
}
Thread Previous
|
Thread Next