Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Ken-Patrick/simplecpp

Open more actions menu
 
 

Repository files navigation

Simple C/C++ preprocessor

This is a simple C/C++ preprocessor.

The goal is to have good conformance with the C and C++ standards and to handle nonstandard preprocessor extensions in gcc / clang / visual studio preprocessors. Most of the preprocessor testcases in gcc and clang are handled OK by simplecpp.

To see how you can use simplecpp in your project, you can look at the file main.cpp.

Simplecpp has better fidelity than normal C/C++ preprocessors.

  • Preprocessor directives are available.
  • Comments are available.
  • Tracking macro usage.

This information is normally lost during preprocessing but it can be necessary for proper static analysis.

Compiling

Compiling standalone simplecpp preprocessor:

Either:

g++ -o simplecpp main.cpp simplecpp.cpp

Or:

make

Compiling and running tests (you need python to run the gcc/clang test cases)

make test

About

C++ preprocessor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 77.1%
  • C++ 21.3%
  • Cuda 0.5%
  • Python 0.4%
  • CMake 0.2%
  • Batchfile 0.1%
  • Other 0.4%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.