>>>>> "Doug84" == Doug84  <[EMAIL PROTECTED]> writes:

Doug84> What I wish to do is create my own front end outside of GCC
Doug84> and then send the partly-processed code through the back end
Doug84> (i.e. an intermediate to assembly code transformation would be
Doug84> done by GCC - the High language to intermediate would be done
Doug84> by my program).

As Rafael said, there is no way to do that right now.

You could generate C or C++ if you really want strict separation like
that.  There are plenty of examples of this -- gcl and vala spring to
mind.

Doug84> Now, what would be ideal for me is if I could write the
Doug84> generated output into a file (I presume in RTL format, judging
Doug84> from what I've read)

You want trees, not RTL.

Doug84> My program:- Lexical analysis, Syntax Analysis, Semantic Analysis,
Doug84> Intermediate Code Generation

I recommend the approach I took with gcjx: write your compiler as a
library, and design it to allow multiple back ends.  Then, treat GCC's
trees as one particular back end.  This lets you design your compiler
the way you like, while avoiding messing with streaming out an
intermediate representation.  It has a bunch of other benefits as
well.

Tom

Reply via email to