This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A FrontEnd in C++?
- From: Kelley Cook <kelley dot r dot cook at gm dot com>
- To: "Michael S. Zick" <mszick at goquest dot com>, khalid aggag <khalidaggag at hotmail dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 20 Aug 2002 14:18:29 -0400
- Subject: Re: A FrontEnd in C++?
- References: <F37crCgXAC98D6B8MK9000097e3@hotmail.com>
Michael S. Zick wrote:
>Writing a front end in C++ would make that process:
>
>Stage0: any 'ol C compiler -> gcc<c, c++>
>Stage1: gcc<c, c++> + new_frontend -> gcc<c, c++, New>
>Stage2: gcc<c, c++, New> -> presumably_finished_compiler
>Stage3: presumably_finished_compiler -> finished_compiler
>
>Compare Stage2 with Stage3, if same; then done; else punt!
Why?
You just need to treat the new front end the same as, say, the C++ Standard
Library, which requires C++ to build.
So you really get the exact same as what we have now.
Unamed Stage0: any 'ol C compiler -> gcc<c>
Stage1: gcc<c> -> presumably_finished_compiler <c, c++, F77, Java>
Stage2: presumably_finished_compiler -> finished_compiler <c, c++, F77, Java>
Compare stage1 and stage2
If they compare, then do the unnamed stage3 which is to build Fortran's, C++'s,
and Java's Libraries as well as your new Frontend that was written in C++.
Of course, I don't see that there is a good reason other than "It's always been
done that way" and for a greater code sample for the compare to build C++, F77,
and Java in stage 1. But that is not for this discussion.
Kelley Cook