On Jul 28, 2007, at 12:54 PM, Will Coleda wrote:

Since I found myself doing this for PGE::Codestring and now for Tcl's '__stringToList', I thought it might be a good idea to write down the process in case anyone else finds themselves working on a similar task.

http://www.perlfoundation.org/parrot/index.cgi?how_to_convert_pir_to_c

Regards.

--
Will "Coke" Coleda
[EMAIL PROTECTED]


For PIR you're intending to eventually turn into C, using the hllmacros.pir include can help provide block structure in a clearer way.

"That's a while loop. We just can't write those in PIR, so we were stuck with the more verbose syntax."

.While(orig_pos >= orig_len, {
    ...
})

Then it's more obvious what you're doing. Some code uses jumps so much that a higher level construct would end up being convoluted but most cases can be handled easily. There are just some small issues such as using .local inside the block, and other issues that for the most part are due to the macro syntax in use.

Reply via email to