This is the mail archive of the gcc-help@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: identify gcc C (and C++) frontend source files


George Florea schrieb:
Hello,

I'm trying to build a smart refactoring tool for C and
later C++ and want to use the gcc frontend.

After reading the relevant parts from the "Internals"
manual (chapter 9 particularly), I've looked around
the source code to extract the parts I need. Working
my way up from the lexer and parser didn't get me very
far so I figured somebody here may be willing to give
me some help  with this.


I could tell you a few things about where to start but if I understand the term "refactoring" correctly(I wasn't aware of it before googling) you might want to have a look at this:
http://www-user.uni-bremen.de/~strasser/metacpp/


the version released atm can only process headers(->no function bodies) but full source processing incl. bodies is finished in the main.

the refactoring products I've found seem the preserve code readability which my project doesn't, but I assume you don't need this because that's not possible with GCC's parser.



--
Stefan Strasser


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