pycparser now supports C99
October 31st, 2010 at 7:42 amToday I released pycparser version 2.00, with support for C99 syntax. The following features were implemented:
- Mix of declarations and statements inside a block
long longtype, including corresponding integer literals- New keywords:
restrict, inline - Variable-length arrays (VLAs), including the
[*]notation for function parameter lists - Declaration in the first expression of
forloops - Named initializers, including support for anonymous objects (compound literals)
The API (specifically, some of the AST nodes) of version 2.00 is slightly incompatible with that of 1.xx as described here. For this reason I intend to keep the 1.xx alive and available for download for a long time – it’s a very functional parser fully supporting the old ANSI/ISO C89/C90. However, most future development effort will be invested in version 2.xx, which can be thought as a superset of 1.xx
Related posts:

November 1st, 2010 at 10:15
I can’t seem to find a reference to actual license of pycparser. The package states LGPL in various places and there is a link to the official GNU page, but it would nice if the license version was specified somewhere.
[Would also be nice if the "enable javascript" message was before you filled out the comment
]
November 1st, 2010 at 13:21
@James,
The license link is unambiguous, I think
It links to http://www.gnu.org/licenses/lgpl.html, which is currently LGPL v3. Correct me if I’m wrong.
November 1st, 2010 at 17:29
@eliben,
Fair enough, and thanks for the reply. I guess I’m just used to more explicit license definitions.
I’m not the only person who feels this way. (Please don’t take offense at the title of the page I linked, but it has good advice.)
March 7th, 2011 at 21:27
You are my hero!!!!
I used your library two summers ago for a static analysis suite. I was targeting C99 but didn’t realize the parser wasn’t C99 compatible and didn’t have enough time left in my internship to get the parser up to spec. Your work on pycparsing is tremendously useful and I can’t thank you enough for your efforts!
Best Regards,
Michael Van Veen
March 8th, 2011 at 06:19
Michael,
Thank you for the kind feedback
I’m glad you find
pycparseruseful.