Menu

#12 Anonymous struct causes crash

closed-fixed
nobody
None
5
2012-02-26
2012-02-22
No

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

Discussion

  • Gregory Borges

    Gregory Borges - 2012-02-22
     
  • Gregory Borges

    Gregory Borges - 2012-02-22
     
  • Gregory Borges

    Gregory Borges - 2012-02-22

    This tracker is written against changeset 51 version of parser.

     
  • Jashua Cloutier

    Jashua Cloutier - 2012-02-26
    • status: open --> closed-fixed
     
  • Jashua Cloutier

    Jashua Cloutier - 2012-02-26

    Fixed in commit 54:61ffebd082b9

     

Log in to post a comment.