开发者

Implementing a C preprocessor

开发者 https://www.devze.com 2023-04-03 22:46 出处:网络
Much has been written over the years on implementing pars开发者_开发技巧ers, but the C preprocessor is not quite the same as any of the stages of a typical parser, and implementation thereof doubtless

Much has been written over the years on implementing pars开发者_开发技巧ers, but the C preprocessor is not quite the same as any of the stages of a typical parser, and implementation thereof doubtless has its share of particular pitfalls to watch out for. Does anyone know of anything written on the topic of implementing a C preprocessor?


Hartmut Kaiser, the author of Boost Wave, wrote a nice article on CodeProject http://www.codeproject.com/KB/recipes/wave_preprocessor.aspx about the Boost Wave project. You can use Boost Wave to make your own C preprocessor with custom extensions.


I found a useful discussion in the document mcpp-summary at http://mcpp.sourceforge.net/


I've based mine on the gnu internals

0

精彩评论

暂无评论...
验证码 换一张
取 消