Allison Randal wrote:
I'd like to add Punie to the Parrot repository.

Great. And for more fun I've created the basics of a NCI interface [1] for ast functions. Heavily underdocumented and unfinished (as of an hour hacking time ;-), but maybe someone takes it over and continues it. It needs trunk rev 8598 for some added NCI signatures in src/call_list.txt.

It needs probably also a split into a "Past" and "Node" classes. Compiling the resulting top node is also missing, but it should be quite simple to either call the ast compile / emit functions with NCI or create a better interface for that (I didn't look yet).

PS due to upcoming changes in parrot opcodes, you might avoid the 'compile' opcode. Instead:

  compi = compreg 'PIR'
  prog = compile compi, 'the_code'

the future is:

  prog = compi('the_code')

i.e. just invoke the compiler.

Thanks,
Allison

leo

[1]
$ tar -tzf libpast.tar.gz
ast.pir
libpast.pir
$ tar -xzf libpast.tar.gz
$ ./parrot ast.pir
libast loaded
open_unit ok

Py_Module(
  Py_Print(
    Const(hello
n)))
done

Attachment: libpast.tar.gz
Description: application/gzip

Reply via email to