This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ front-end / C++ compiler
- To: klaxi at t-online dot de
- Subject: Re: C++ front-end / C++ compiler
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Fri, 18 Feb 2000 09:19:28 +0100
- CC: gcc at gcc dot gnu dot org
- References: <00b401bf79ba$19faad80$0300a8c0@Home.de>
> we are trying to write a C++ compiler back-end for the GUPRO-Project
> (graphbased program understanding) at the University of
> Koblenz,Germany.
Christian,
I don't know what the requirements for your back-end are, but why
can't you use g++ as-is?
> A C++ front-end that
> - generates AST and symbol table
Depends on what your requirements on the AST are. g++ generates tree
structures (see gcc/tree.def, and gcc/cp/cp-tree.def). Also, gcc 2.95
normally generates them on a per-statement basis, and then throws them
away (unless it is a template). The mainline compiler operates in
function-at-once mode, so it produces an AST for the entire function,
and compiles that.
> - parses ANSI C++ (and dialects: MSVC++, GNU C++, Borland C++)
With restrictions, yes.
> - generates full source code information (line and column numbers,
> type names etc.) that would make it possible to reconstruct the
> source code with our back-end and your front-end
g++ currently does not have column numbers, as that would require
integration with the preprocessor (otherwise, column numbers are
meaningless). Integration with cpplib (thus providing column numbers)
is in progress, but not complete.
> - runs on NT and Solaris
Yes.
> Further information about your front-end (price, support, known bugs,
> how to access the AST, available manuals and docs)
> would be nice.
Hmm. This is a boilerplate request, right? gcc is free software, and
free of charge. In the mainline compiler, gcc/cp/ir.texi explains the
internal representation.
Regards,
Martin