Anonymous struct causes crash
Brought to you by:
senexcanis
Header file:
struct Sample11Class {
struct {
int x;
} a;
};
Python code to parse header:
from CppHeaderParser import *
ph = CppHeader( "Sample11.h" )
ph.show()
Parser crashes with following output:
WARNING: t_ignore contains a literal backslash '\'
[ 279] Error detecting class
Traceback (most recent call last):
File "C:\work\cppp001\Sample11\Sample11.py", line 2, in <module>
ph = CppHeader( "Sample11.h" )
File "C:\work\cppp001\Sample11\CppHeaderParser.py", line 1793, in __init__
% (self.headerFileName, tok.lineno, tok.value, " ".join(self.nameStack)))
CppHeaderParser.CppParseError: Not able to parse Sample11.h on line 3 evaluating "{"
Error around: struct
This tracker is written against changeset 51 version of parser.
Fixed in commit 54:61ffebd082b9