Re: Writing a standalone c preprocessor (like the old cpp) using the cpplib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Oli,
for a project I need a standalone c preprocessor and I was thinking about using
the cpplib from the latest gcc-core 4.6 snapshot
as the base library. Could maybe anyone please post a very brief guide on how to
start and what files I have to look at. I am quite a beginner
and kinda lost without some help. My idea is to write a frontend that reads in
the files, include paths and the defines, then calls the libcpp to do
the preprocessing and afterwards writes out the preprocessed files.
Sorry for the question, but why do you want to (re)write the C preprocessor yourself? Although the preprocessor logic (libcpp.a) is integrated into the C compiler (cc1) in the meantime, there is still a stand-alone C preprocessr (cpp) which you could use for your purpose. Or is there any special requirement in your project to NOT use the shipped 'cpp'?

Best regards,
Andi


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux