stubgen icon indicating copy to clipboard operation
stubgen copied to clipboard

Sized enum parse error

Open Archivist062 opened this issue 8 years ago • 1 comments

Parse error on sized enumerations:

enum Type : size_t
{
salsa,mayo,mustard
}
     enum Type : size_t
parse error on ^

Archivist062 avatar May 05 '17 16:05 Archivist062

Thanks for the bug report!

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.

If you would be interested in adapting the grammar to handle this case, we would gladly accept a pull request.

mjradwin avatar May 07 '17 07:05 mjradwin