Using GCC's front-end to parse SystemC
Matthieu Moy
Matthieu.Moy@imag.fr
Tue Apr 1 20:03:00 GMT 2003
Fergus Henderson <fjh@cs.mu.oz.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
More information about the Gcc
mailing list