I'm sure this has been thought out before, but I'll
press on anyway.  Assuming parrot shouldn't always
create intermediate files (.pbc), then shouldn't
parrot be able to take an input stream as an argument
instead of a filename?  That way, one just has to pipe
the output from assemble.pl to parrot.  Of course,
there will be times you want to create an intermediate
file, so I propose we leave that as default, and add a
command line option to take an input stream.  Below is
a quick implementation of that (using -s as the
option), but I'm not sending it over the parrot bugs
route, because I don't know if this is something you
all want or not.  There is one problem with this,
though: if there is no 'end' command in the code, then
you get an error that says "Error: Control left bounds
of byte-code block (now at location [LINE_NUMBER])!"

Stephen Rawls


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
Index: test_main.c
===================================================================
RCS file: /cvs/public/parrot/test_main.c,v
retrieving revision 1.55
diff -r1.55 test_main.c
41a42
> #ifndef PARROT_DRIVER_STREAM
42a44,47
> #else
>     pf = filename;
> #endif
>
71a77,78
>         case 's':
>             #define PARROT_DRIVER_STREAM
138a146
>   -s    Stream input, not a file name, pure parrot bytecode

Reply via email to