namespce is treated as class
namesapce a { class B { void fun(); }; }
stubgen will generate void a::B::fun() {}
but it should be namespace a { void B::fun() {} }
stubgen's parser does not conform to the latest C++ standard. It was developed back in 1998 as a gigantic hack that I created when I was teaching myself lex/yacc. Hacking the yacc grammar further probably isn’t a good idea, since C++ isn’t an LALR(1) language anyways.
At the time it was written it handled C++98 pretty well - but it may not handle C++03 or C++11 well at all.
Sent from my mobile device
On Jan 18, 2014, at 7:27 PM, Ares Young [email protected] wrote:
namesapce a { class B { void fun(); }; }
stubgen will generate void a::B::fun() {}
but it should be namespace a { void B::fun() {} }
— Reply to this email directly or view it on GitHub.
Do you have some plan to fixed this issue. for example, you may ignore namespace or support limited namespace.
Based on mjradwin's comment I don't think any fix is planned. You do have the option of fixing the issue yourself, if you think it's worth your time. I would not recommend attempting to achieve full support for C++03 or C++11.