A FrontEnd in C++?
Kelley Cook
kelley.r.cook@gm.com
Tue Aug 20 11:18:00 GMT 2002
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
More information about the Gcc
mailing list