开发者

where to find a good instruction how to parse a c++ header file?

where t开发者_如何学运维o find a good instruction how to parse a c++ header file?

edit: i want to parse it with haskell, there is a parsec libraray but i need some examples.


Use an existing C++ parser (you're unlikely to ever succeed in writing one yourself that cover all the corner cases of the grammar, it's horrendous).

I can only recommend the Clang libraries.


Parsing C++ is an immense undertaking, so step 1 is to use an established parser that someone else has already written. boost.wave is a good place to start.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜