This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using GCC's front-end to parse SystemC


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]