pcpp
pcpp copied to clipboard
A C99 preprocessor written in pure Python
I'm getting unfound includes passed through to the output file although I did not specify `--passthru-unfound-includes`. Am I using the tool wrongly ... ?
I was trying to use `pcpp` (1.30) on this header-only library: https://github.com/tzlaine/parser I am using command ``` /home/andrzej/.local/bin/pcpp boost/parser/parser.hpp -UBOOST_PARSER_DOXYGEN -I. ``` I am encountering two problems. 1. The tool...
If the source file begins with ``` # if ! defined X ... # define X ``` then this is not considered an include guard. Any whitespace after the `!`...
If a **'** or **"** doesn't have a matching terminator _on the same line_, this is not a valid token. The newline character at the end of the line is...
`pcpp` handles space and newline characters in the macro argument correctly by replacing all of them with a single space. However, it does not consider comments as whitespace. This code:...
`pcpp` tends to keep whitespace tokens around when they are found in the source file. Normally, this is benign because they wind up getting passed to the output. In fact,...
The string "1.5" tokenizes as 3 tokens, "1", ".", and "5". This is a consequence of the regex for `INTEGER` being tried before `FLOAT.` This has probably escaped attention because...
C99 Standard 6.10.3.3 (the ## operator) says that the name of an empty argument should be replaced with a placeholder, before performing the operator. Concatenating a placeholder with another token...
Generally, I'd like to engage with you one-on-one (occasionally, since I know you're really busy). Could you suggest a way that would work for you. I'd prefer to use the...