Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PBC to C Converter

1 view
Skip to first unread message

Chromatic

unread,
Jan 31, 2007, 10:26:26 PM1/31/07
to parrot-...@perl.org
Here's a quick Perl program that writes a C program that makes a
self-contained executable for a Parrot program. I used as one example:

$ parrot -o p8.pbc examples/japh/japh8.pasm
$ perl pbc_to_c.pl j8.pbc > japh.c
$ gcc -o japh japh.c -Iinclude -Lblib/lib -lparrot
$ LD_LIBRARY_PATH=blib/lib ./japh
Just another Parrot Hacker

It *should* run in a fairly cross-platform fashion, though I do have slight
concerns about big-endian processors.

It does have the problem that it works only as well as the PBC that you give
it. It also relies on having libparrot available, which is currently not a
problem for almost everyone on this list.

-- c

pbc_to_c.pl
0 new messages