While watching some FOSDEM'14 presentations I found this one being particularly interesting. It is about the Go programming language and how it gives access to compiler's internal through packages. So basically you can write a program in Go that gets AST (abstract syntax tree) or more low level SSA (single static assignment) and analyze it, or transforms it into something else (like transcompiling it to JavaScript for example). I find it very interesting. I can remember a few other languages that do it: Vala (JavaScript transcompiler) and Boo another JavaScript transcompiler. Some languages provide parsing code to AST as a separate library, like Clang for C/C++/ObjC, ASIS for Ada, or CodeTools for Free Pascal, but it is not quite the same.
I'm thinking of making a Go transcompiler to bare bones C/C++ (to make it be more suitable for os development and just for the fun of it), do you think it is a good idea? Is there any other language that may be more easy to transcompile to bare bones C/C++?