https://github.com/danmar/simplecpp
C++ preprocessor
https://github.com/danmar/simplecpp
Last synced: about 1 year ago
JSON representation
C++ preprocessor
- Host: GitHub
- URL: https://github.com/danmar/simplecpp
- Owner: danmar
- License: 0bsd
- Created: 2015-04-05T07:59:36.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2025-05-09T13:43:38.000Z (about 1 year ago)
- Last Synced: 2025-05-16T10:04:47.111Z (about 1 year ago)
- Language: C
- Size: 930 KB
- Stars: 233
- Watchers: 13
- Forks: 88
- Open Issues: 86
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
## Status


## 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