eliben / pycparser

:snake: Complete C99 parser in pure Python
Other
3.26k stars 612 forks source link

AttributeError: 'Coord' object has no attribute 'type' #477

Open MaggieCwj opened 2 years ago

MaggieCwj commented 2 years ago

I tried using pycparser to analyze the code in binutils, but I got the following problem, how should this be solved?

File "/home/chen/ifcut/slice_func_ifline.py", line 124, in split_if ast = parser.parse(cont, filename='<none>')#, debuglevel=1) File "/usr/local/lib/python3.5/dist-packages/pycparserext-2021.1-py3.5.egg/pycparserext/ext_c_parser.py", line 34, in parse File "/usr/local/lib/python3.5/dist-packages/pycparser/ply/yacc.py", line 331, in parse return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc) File "/usr/local/lib/python3.5/dist-packages/pycparser/ply/yacc.py", line 1118, in parseopt_notrack p.callable(pslice) File "/usr/local/lib/python3.5/dist-packages/pycparser/plyparser.py", line 126, in param_rule func(self, p) File "/usr/local/lib/python3.5/dist-packages/pycparserext-2021.1-py3.5.egg/pycparserext/ext_c_parser.py", line 438, in p_xxx_declarator_2 File "/usr/local/lib/python3.5/dist-packages/pycparser/c_parser.py", line 273, in _type_modify_decl modifier_tail.type = decl AttributeError: 'Coord' object has no attribute 'type'

eliben commented 1 year ago

Please provide a minimal, reproducible example: https://stackoverflow.com/help/minimal-reproducible-example

And don't forget to properly format the issue report