Dave Prosser's C Preprocessing Algorithm (2006)
spinellis.gr
spinellis.gr
[1] https://github.com/rofl0r/order-pp/blob/master/doc/notes.txt
Also, on the C compiler-side, people might be interested in the lexer hack because C isn't a CFG.
For those who can't be bothered diffing, the fix in the corrected version is inside the 3rd condition of subst().