Here is my patch as an attachment.
. This the debug output if I define "#define PARSER_DEBUG_OUTPUT 1"
Passing list of files to parse
DoParse Loop:m_Str='', token='typedef'
Before HandleClass m_LastUnnamedTokenName=''
DoParse Loop:m_Str='', token='public'
DoParse Loop:m_Str='public ', token=':'
DoParse Loop:m_Str='', token='int'
DoParse Loop:m_Str='int ', token='m_aaaa'
DoParse Loop:m_Str='int', token=';'
DoParse Loop:m_Str='', token='int'
DoParse Loop:m_Str='int ', token='m_bbbb'
DoParse Loop:m_Str='int', token=';'
DoParse Loop:m_Str='', token='}'
After HandleClass m_LastUnnamedTokenName='Ancestor'
Adding typedef: name='Parent', ancestor='Ancestor'
DoParse Loop:m_Str='', token='int'
DoParse Loop:m_Str='int ', token='*'
DoParse Loop:m_Str='int * ', token='func'
Adding function 'func': m_Str='int * '
ParserThread::HandleFunction: name='func', args='(int)', peek='{'
Add token name='func', args='(int)', return type='int * '
DoParse Loop:m_Str='', token='int'
DoParse Loop:m_Str='int(void)', token='main'
Adding function 'main': m_Str='int(void)'
ParserThread::HandleFunction: name='main', args='()', peek='{'
Add token name='main', args='()', return type='int(void)'
Starting batch parsing
DoParse Loop:m_Str='', token='typedef'
Before HandleClass m_LastUnnamedTokenName=''
DoParse Loop:m_Str='', token='public'
DoParse Loop:m_Str='public ', token=':'
DoParse Loop:m_Str='', token='int'
DoParse Loop:m_Str='int ', token='m_aaaa'
DoParse Loop:m_Str='int', token=';'
DoParse Loop:m_Str='', token='int'
DoParse Loop:m_Str='int ', token='m_bbbb'
DoParse Loop:m_Str='int', token=';'
DoParse Loop:m_Str='', token='}'
After HandleClass m_LastUnnamedTokenName='Ancestor'
Adding typedef: name='Parent', ancestor='Ancestor'
DoParse Loop:m_Str='', token='int'
DoParse Loop:m_Str='int ', token='*'
DoParse Loop:m_Str='int * ', token='func'
Adding function 'func': m_Str='int * '
ParserThread::HandleFunction: name='func', args='(int)', peek='{'
Add token name='func', args='(int)', return type='int * '
DoParse Loop:m_Str='', token='int'
DoParse Loop:m_Str='int(void)', token='main'
Adding function 'main': m_Str='int(void)'
ParserThread::HandleFunction: name='main', args='()', peek='{'
Add token name='main', args='()', return type='int(void)'