But I'm thinking, how you will handle alredy compiled codes, specially libraries? C is used not only because it can be compiled in any OS, but because we can use a lot of libraries/includes that are already done and because it can work directly with the OS, soo we can do anything with it. (and you will need to rewrite a lot of code... Argh!)
But I understand that for now your idea has an educational purpose, and I give you the best luck with it. Maybe we will have the 1st real C interpreted (not a fake C ok!). ;-P
About Parrot, take a look, we can do anything with it (or will), since it has an great architecture and it's a really good VM.
http://www.parrotcode.org/ (Get involved!)
And don't forget that one of the plans of Parrot is to can convert a code to another through Parrot Assembly Code. Soo, from a C code I can automatically convert it to Perl, Java, etc... Or from Perl to C!
Thinking now, adding a C interpreted to Parrot will open an option to can automatically convert Perl codes to C and then use this to compile it as a normal C code. But this will only be possible if you keep your C interpreter compatible with gcc definitions!
Graciliano M. P.
"Creativity is the expression of the liberty".
In reply to Re: C compiler ... in Perl
by gmpassos
in thread C compiler ... in Perl
by rje
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |