Re: Punie

1 view
Skip to first unread message

Leopold Toetsch

unread,
Jul 12, 2005, 9:33:27 AM7/12/05
to Allison Randal, perl6-i...@perl.org, perl6-c...@perl.org
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

libpast.tar.gz

Leopold Toetsch

unread,
Jul 12, 2005, 9:52:00 AM7/12/05
to Allison Randal, perl6-i...@perl.org, perl6-c...@perl.org
Leopold Toetsch wrote:

> needs trunk rev 8598 for some added NCI signatures in src/call_list.txt.

or branches/leo-ctx5 r8599.

leo

Bernhard Schmalhofer

unread,
Jul 12, 2005, 3:15:15 PM7/12/05
to Autrijus Tang, Allison Randal, perl6-i...@perl.org, perl6-c...@perl.org
Autrijus Tang schrieb:

>If the goal is to demonstrate the capability of the upcoming expression
>parser and minimal AST, I think "bc", the arbitrary precision calculator
>language, is a good candidate.
>
>
Indeed it is. The nice thing about 'bc' is that is fairly simple, but
still has variables and subroutines.
It might also be a neat test case for a future BigNum PMC, as the specs
that it must support multi precission decimal coded numbers.

For my humble efforts, I'm just trying to make the step from evaluationg
'1+1' to evaluating '1+1+1'.

Anybody knows about a bc test suite?

CU, Bernhard

Reply all
Reply to author
Forward
0 new messages