Closed teskje closed 9 years ago
Contrary to your statement, it looks like you're using Python 3.4. I can reproduce your issue using Python 3, but not using Python 2.7.
I've traced this back to an error that's being reported (only on Py3):
"ERROR: /home/andreas/src/pycparserext/pycparserext/ext_c_lexer.py:11: No regular expression defined for rule
't_FLOAT_CONST'\n"
This is confusing to me, because there's an @TOKEN
decorator specifying a regex right above t_FLOAT_CONST
. That's all the time I've got for troubleshooting this right now. Hope this helps, and we'll leave this bug open to track Py3 compatibility.
Actually, the system I worked on has Python 3.4 as default, but as I figured just like you that this might be Python3-related, I verified it with Python 2.7 also. I just reproduced the issue on my laptop. To prove, that I am not crazy:
Also, the tests don't use the print
function, so since I got failing tests, I must have used Python 2.7.
So I think, this is not a Python3 problem. My best guess would be that there recently was some API change in PLY that broke backwards-compatibility. Have you tried updating PLY to verify the bug?
The real problem is that pycparser ships with its own copy of ply. Fixed in revision f04898f.
An exception is thrown when trying to instantiate a
GnuCParser
:This also leads to 4 of 6 tests failing and makes the whole library unusable.
I am using Python 2.7.9 on an up-to-date Arch Linux.
pycparserext
and its dependencies were installed from a freshly cloned repo viasetup.py
.