On Tue, 17 Dec 2002, K Stol wrote:
> After doing some reading about Parrot, I got very interested. I'd like to
> write some kind of compiler for my Bacherlor's in Computer Science. I'm
> thinking of a compiler for Tcl which produces Parrot Assembly code, but
> the source language (which will be compiled) is not definite yet.

> I have basic knowledge on compiler construction, but I think I can make a
> good start. The implementation language I'll use will most probably be C.

The rest of parrot is in C, so that's a good choice, especially if you want
your code added to /languages in the parrot tree.

> Does anybody have a good suggestion or tips to help me get further? Or is
> anybody interested in this as well?

Get the Tcl source.  Keep current with Parrot source
(http://dev.perl.org/cvs/) and of course being on this list is a good step.
You can probably start with Tcl's own lexer/parser and AST (assuming it
builds one), and traverse the AST to write out pasm/imcc code.  I'm doing
some work with Ruby -> Parrot ("Cardinal"), or was until I got sidetracked
by the ops' destination values being unpredictable, and then sidetracked
again into working on a PHP to Perl translator.

Parrot's a bit of a moving target, though, so be prepared to have to make
changes as the language/platform evolves.  You're fortunate in that Tcl's
fairly simple.

Dave
Isa. 40:31

Reply via email to