开发者

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

开发者 https://www.devze.com 2023-02-25 12:45 出处:网络
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

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

精彩评论

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