C Precompiler/Preprocessor Source Code

  • Thread starter Werner Nussbaumer
  • Start date
W

Werner Nussbaumer

Hi all

I'm searching for a C precompiler (preprocessor) source code. It
should read C code and output the precompiled C code. I found some
examples but none of them was able to handle boolean construct line
"#if (mode == 2) && (test == 1)" or defines like "#define test 5".

Any help is appresciated
Regards
Werner Nussbaumer
 
R

Rolf Magnus

Werner said:
Hi all

I'm searching for a C precompiler (preprocessor) source code. It
should read C code and output the precompiled C code. I found some
examples but none of them was able to handle boolean construct line
"#if (mode == 2) && (test == 1)" or defines like "#define test 5".

You might want to have a look at
http://gcc.gnu.org/projects/cpplib.html. It's the preprocessor library
of gcc and available as source code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top