This is the mail archive of the 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: Use gcc front-end for metrics

In order to build a metrication tool I need a frontend that can
provide me with an abstract syntax tree containing information on all
actual language constructs in the code and also a CFG representation.
I reckon GCC has these capabilities and I was wondering if any of you
could tell me if it is possible to use just GCC's frontend.
Furthermore, where should I start, how do I extract the frontend from
GCC, which of the intermediate GCC representation could I use, are
they documented?

I would like to thank you in advance for any help you can give me.

Before you are to familiarized with GCC I want to give you a hint to another project from Berkley. It is called Elsa/Elkhound parser ( It is a C and C++ parser written in C++ with a cleaner internal structure as the GCC parser. Additionally, there is another projects, called OINK (funny name), which provides different back-ends for Elsa as well printing a CFG.
I started like you with implementing my own code inside GCC, then I found these two projects and this saves me a lot of time.


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