Marco wrote:> I have no desire or time to learn a complicated compiler such as gcc.> I am thinking of starting with PCC or TCC or something like that and> then put a new front end on it.

I am actually writing an Extremely long tutorial on how to do this!
Well its how to build your own interpreted, then it goes into how to
make your own compiler using gcc. So I'll post it here when i finish it,
making your own front-end in gcc is actually easier that you might
think, I'll put a more concise tutorial on their wiki soon.

If you want to work with a compiler collection that may be easier to
learn to build a new front-end LLVM is meant to be much easier from what
i have been reading. They use C++ so the virtual functions are much
easier to find and implement. And i think they have some good documentation.

> Would generating C code be a better approach?

The problem with doing this i find is if your developing a front-end to
a compiler-collection is that what are you actually using then of the
compiler. As in generally in compiler-collections you do your own
front-end parsing generate your own IR then push it into GIMPLE
representation internally to the compiler. If you decide to generate C
code then all you use is a popen() or execl() to exec the compiler (and
you could use any compiler then) and pass in the code from your codegen.