Thanks for this library! I'm having great fun using it to nitpick some code.
Attempting to parse a function declaration with an unnamed static array:
from pycparser.c_parser import CParser
CParser().parse('void f(int [static 10]);')
fails with:
File "/usr/local/lib/python3.9/site-packages/pycparser/plyparser.py", line 67, in _parse_error
raise ParseError("%s: %s" % (coord, msg))
pycparser.plyparser.ParseError: :1:13: before: static
If we name the argument -- i.e. (int x[static 10]) -- then it works fine (since the example would be exactly the same as #21, the issue which prompted support for static arrays in the first place). Omitting the argument name is valid in C99.
I'm using pycparser 2.22. Thanks again for this library!
Thanks for this library! I'm having great fun using it to nitpick some code.
Attempting to parse a function declaration with an unnamed static array:
fails with:
If we name the argument -- i.e.
(int x[static 10])
-- then it works fine (since the example would be exactly the same as #21, the issue which prompted support for static arrays in the first place). Omitting the argument name is valid in C99.I'm using pycparser 2.22. Thanks again for this library!