in reply to C compiler ... in Perl

Check out Inline::ASM. It should be no big deal to parse C code and use it to generate assembly. I mean, if the authors of GCC can do it, why not you?

You might also be interested in HTML::Template::JIT. It's a just-in-time compiler that generates C code from HTML::Template templates. It uses Inline::C to compile the C code on the fly. The result is the fastest templating system known to (this) man.

-sam