This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using GCC's front-end to parse SystemC
- From: Matthieu Moy <Matthieu dot Moy at imag dot fr>
- To: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- Cc: tm_gccmail at mail dot kloo dot net, gcc at gcc dot gnu dot org
- Date: Tue, 01 Apr 2003 21:23:55 +0200
- Subject: Re: Using GCC's front-end to parse SystemC
- References: <vpqel4wpxl8.fsf@imag.fr><Pine.LNX.4.21.0303241224480.24829-100000@mail.kloo.net><20030401075417.GB13035@earth.cs.mu.oz.au>
Fergus Henderson <fjh at cs dot mu dot oz dot au> writes:
>> You might want to look at something more lightweight instead, like lcc.
>
> What he needs is a C++ parser. lcc doesn't support C++.
Hmm, this is what I understood ...
As SystemC does a *heavy* use of C++ features, a simple C parser will
clearly not do.
> However, I agree that using the GCC C++ front-end is not a great idea.
> Several parser generators come with parsers for C++ that would probably
> be a fair bit easier to use for this purpose than GCC's C++
> front-end.
But will they do type analysis & so on ? Typically, if a global and a
local variable have the same name, I don't want to bother about which
one is which one, and the front-end must have done it for me. For
example, a yacc grammar would not be sufficient.
But off course, if you have a precise idea/name of software/...
At the moment, the main options seem to be hacking GCC (I began some
work on it, and I confess I'm a bit lost ...) or using the proprietary
EDG front-end, but I would prefer to use free software.
Thanks anyway,
--
Matthieu