This is the mail archive of the
mailing list for the GCC project.
Re: Use gcc front-end for metrics
- From: Christian Wagner <christian dot wagner at dnw-germany dot aero>
- To: Roel Meeuws <r dot j dot meeuws at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 21 Aug 2006 09:57:52 +0200
- Subject: Re: Use gcc front-end for metrics
- References: <email@example.com> <firstname.lastname@example.org>
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
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
(www.cs.berkeley.edu/~smcpeak/elkhound/). 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.