It is possible to implement a language compiler in C or C++. See the
"Winxed" language for an example of that. Winxed uses a C++ compiler
to javascript-like code into PIR, which is then loaded into Parrot for
execution.

Parrot does have an extending API and an embedding API, so there are
many C-level hooks into the VM that can be used by alternate
front-ends. To run a program, Parrot really needs to operate on
bytecode. Parrot is a VM and runs on bytecode so almost all program
logic is going to need bytecode at some point if you want to make use
of all the power of Parrot.

HLLs can be written in PIR, but the reality is that NQP and PCT are
much better choices.

--Andrew Whitworth



On Sun, Jan 24, 2010 at 9:45 PM, atex.way <[email protected]> wrote:
> since parrot is a vm for dynamic languages, and mostly written in c , i
> have suggestions for the ways of implementing a HLL.
>      1. can completely implement a HLL in c. for c is a common language for
> most people, the c APIs should be the inner interface to pir.
>      2. implementing a HLL in pir(allow c modules embeded).
>      3. through a common extention interface for other lanuages to implement
> a HLL. the parrot core should include the interfaces of perl, php,python .
> (perl may be a  language running on parrot, also a language for implementing
> a HLL, instead of a language to be used to compiling parrot, certainly,
> except for parrot being implemented in perl completely)
> 2010-01-25
> ________________________________
> atex.way
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to