
CParser: A C preprocessor written in pure Lua with useful extensions - pcr910303
https://github.com/facebookresearch/CParser
======
foundry27
This looks like a cool project! I really like the extensions they’ve
implemented for things like recursive macros, certainly an interesting space
to experiment in.

It isn’t quite as standard-compliant as advertised though, for anyone who
might be interested. It looks like it gets hung up on the same case that
Boost.Wave has trouble with: macro expansions resulting in partial macro
expansions, like getting “MY_MACRO (“ out of an expansion. So far GCC has the
only preprocessor I’ve seen to get that bit right.

------
gaussian-guy
Interesting, what was the motivation for this?

