Here is an update for py-cparser-2.18 to 2.19.

From the CHANGES file:

------------------------
+ Version 2.19 (2018.09.19)

  - PR #277: Fix parsing of floating point literals
  - PR #254: Add support for parsing empty structs
  - PR #240: Fix enum formatting in generated C code (also #216)
  - PR #222: Add support for #pragma in struct declarations
- There are reports that this release doesn't work with Python 2.6 (#281). Please note that the minimal supported version is 2.7; the required versions are listed in the README file. ------------------------

I ran 'make test' with py2 and py3 and they gave the same output (see below), I was curious so I ran the same tests on Ubuntu, and the test script gave the same output there as well:

------------------------
  WARNING: 36 shift/reduce conflicts
  WARNING: 1 reduce/reduce conflict
  WARNING: reduce/reduce conflict in state 351 resolved using rule
  (statement -> )
  WARNING: rejected rule (empty -> <empty>) in state 351

  Ran 107 tests in 1.181s

  OK (skipped=3)
-------------------------

I also created a simple.c file with a single printf statement and
ran it through cparser:

$ gcc -E -I./ -I/usr/ports/pobj/py-cparser-2.19-python3/pycprser-2.19/ \
utils/fake_libc_include simple.c > s.c
$ python3
import pycparser
pycparser.parse_file('s.c')
FileAST(ext=[Typedef(name=u'size_t',
[...]

It worked ok. Any feedback and/or oks?

Regards,
Mark

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/py-cparser/Makefile,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 Makefile
--- Makefile    14 Nov 2017 06:52:56 -0000      1.7
+++ Makefile    20 Dec 2018 18:35:33 -0000
@@ -2,7 +2,7 @@

 COMMENT=               C parser in pure Python

-MODPY_EGG_VERSION=     2.18
+MODPY_EGG_VERSION=     2.19
 DISTNAME=              pycparser-${MODPY_EGG_VERSION}
 PKGNAME=               ${DISTNAME:S/py/py-/}
 CATEGORIES=            devel textproc
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/py-cparser/distinfo,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 distinfo
--- distinfo    14 Nov 2017 06:52:56 -0000      1.3
+++ distinfo    20 Dec 2018 18:35:33 -0000
@@ -1,2 +1,2 @@
-SHA256 (pycparser-2.18.tar.gz) = majKA+KYUdlmFq0EBLSq19nuFvJcn5cIoR+vKBD3siY=
-SIZE (pycparser-2.18.tar.gz) = 245897
+SHA256 (pycparser-2.19.tar.gz) = qYhxir+tgLaxV6zOe/Ewowh20nYDc4rDnxQJkyRrJbM=
+SIZE (pycparser-2.19.tar.gz) = 158295

Reply via email to