Tue Jan 19 21:05:22 2021 UTC ()
py-ply: updated to 3.11

Version 3.11
------------
Fixed some minor bugs related to re flags and token order.

Added a set_lexpos() method to grammar symbols.

Mostly minor bug fixes and small code cleanups.

Version 3.10
------------
Changed grammar signature computation to not involve hashing
functions. Parts are just combined into a big string.

Fixed Issue 101: Incorrect shift-reduce conflict resolution with
precedence specifier.

PLY was incorrectly resolving shift-reduce conflicts in certain
cases.  For example, in the example/calc/calc.py example, you
could trigger it doing this:

calc > -3 - 4
1                         (correct answer should be -7)
calc >

Issue and suggested patch contributed by https://github.com/RomaVis

Version 3.9
-----------
Exposed the parser state number as the parser.state attribute
in productions and error functions. For example:

def p_somerule(p):
    '''
    rule : A B C
    '''
    print('State:', p.parser.state)

May address issue 65 (publish current state in error callback).

Fixed Issue 88. Python3 compatibility with ply/cpp.

Fixed Issue 93. Ply can crash if SyntaxError is raised inside
a production.   Not actually sure if the original implementation
worked as documented at all.  Yacc has been modified to follow
the spec as outlined in the CHANGES noted for 11/27/07 below.

Fixed Issue 97. Failure with code validation when the original
source files aren't present.   Validation step now ignores
the missing file.

Minor fixes to version numbers.


(adam)
diff -r1.1 -r1.2 pkgsrc/devel/py-ply/DESCR
diff -r1.1 -r1.2 pkgsrc/devel/py-ply/Makefile
diff -r1.1 -r1.2 pkgsrc/devel/py-ply/distinfo

cvs diff -r1.1 -r1.2 pkgsrc/devel/py-ply/DESCR (expand / switch to unified diff)

--- pkgsrc/devel/py-ply/DESCR 2015/12/02 18:22:10 1.1
+++ pkgsrc/devel/py-ply/DESCR 2021/01/19 21:05:22 1.2
@@ -1,30 +1,10 @@ @@ -1,30 +1,10 @@
1PLY is a 100% Python implementation of the common parsing tools lex and yacc. 1PLY is yet another implementation of lex and yacc for Python. Some notable
2Here are a few highlights: 2features include the fact that its implemented entirely in Python and it uses
 3LALR(1) parsing which is efficient and well suited for larger grammars.
 4
 5PLY provides most of the standard lex/yacc features including support for empty
 6productions, precedence rules, error recovery, and support for ambiguous
 7grammars.
3 8
4 - PLY is very closely modeled after traditional lex/yacc. If you know how to 9PLY is extremely easy to use and provides very extensive error checking. It is
5 use these tools in C, you will find PLY to be similar. 10compatible with both Python 2 and Python 3.
6 
7 - PLY provides *very* extensive error reporting and diagnostic information to 
8 assist in parser construction. The original implementation was developed 
9 for instructional purposes. As a result, the system tries to identify the 
10 most common types of errors made by novice users. 
11 
12 - PLY provides full support for empty productions, error recovery, precedence 
13 specifiers, and moderately ambiguous grammars. 
14 
15 - Parsing is based on LR-parsing which is fast, memory efficient, better 
16 suited to large grammars, and which has a number of nice properties when 
17 dealing with syntax errors and other parsing problems. Currently, PLY builds 
18 its parsing tables using the LALR(1) algorithm used in yacc. 
19 
20 - PLY uses Python introspection features to build lexers and parsers. This 
21 greatly simplifies the task of parser construction since it reduces the 
22 number of files and eliminates the need to run a separate lex/yacc tool 
23 before running your program. 
24 
25 - PLY can be used to build parsers for "real" programming languages. Although 
26 it is not ultra-fast due to its Python implementation, PLY can be used to 
27 parse grammars consisting of several hundred rules (as might be found for a 
28 language like C). The lexer and LR parser are also reasonably efficient 
29 when parsing typically sized programs. People have used PLY to build 
30 parsers for C, C++, ADA, and other real programming languages. 

cvs diff -r1.1 -r1.2 pkgsrc/devel/py-ply/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/py-ply/Makefile 2015/12/02 18:22:10 1.1
+++ pkgsrc/devel/py-ply/Makefile 2021/01/19 21:05:22 1.2
@@ -1,22 +1,22 @@ @@ -1,22 +1,22 @@
1# $NetBSD: Makefile,v 1.1 2015/12/02 18:22:10 drochner Exp $ 1# $NetBSD: Makefile,v 1.2 2021/01/19 21:05:22 adam Exp $
2# 
3 2
4PYMODULENAME= ply 3DISTNAME= ply-3.11
5PYMODULEVER= 3.8 4PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
6DISTNAME= ${PYMODULENAME}-${PYMODULEVER} 5CATEGORIES= devel python
7PKGNAME= ${PYPKGPREFIX}-${DISTNAME} 6MASTER_SITES= ${MASTER_SITE_PYPI:=p/ply/}
8CATEGORIES= devel 
9MASTER_SITES= http://www.dabeaz.com/ply/ 
10 7
11MAINTAINER= ura@jp.NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
12HOMEPAGE= http://www.dabeaz.com/ply/ 9HOMEPAGE= http://www.dabeaz.com/ply/
13COMMENT= Lex an yacc parsing tools for Python 10COMMENT= Lex an yacc parsing tools for Python
14LICENSE= gnu-lgpl-v2.1 11LICENSE= modified-bsd
 12
 13USE_LANGUAGES= # none
15 14
16do-test: 15do-test:
17 cd ${WRKSRC}/test; \ 16 cd ${WRKSRC}/test && \
18 ${SETENV} PYTHONPATH=${WRKSRC} ${PYTHONBIN} testlex.py; \ 17 ${SETENV} PYTHONPATH=${WRKSRC} ${PYTHONBIN} testlex.py
 18 cd ${WRKSRC}/test && \
19 ${SETENV} PYTHONPATH=${WRKSRC} ${PYTHONBIN} testyacc.py 19 ${SETENV} PYTHONPATH=${WRKSRC} ${PYTHONBIN} testyacc.py
20 20
21.include "../../lang/python/egg.mk" 21.include "../../lang/python/egg.mk"
22.include "../../mk/bsd.pkg.mk" 22.include "../../mk/bsd.pkg.mk"

cvs diff -r1.1 -r1.2 pkgsrc/devel/py-ply/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/py-ply/distinfo 2015/12/02 18:22:10 1.1
+++ pkgsrc/devel/py-ply/distinfo 2021/01/19 21:05:22 1.2
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
1$NetBSD: distinfo,v 1.1 2015/12/02 18:22:10 drochner Exp $ 1$NetBSD: distinfo,v 1.2 2021/01/19 21:05:22 adam Exp $
2 2
3SHA1 (ply-3.8.tar.gz) = 7f3f8504fd394e4f210857a59644d21b3b90f830 3SHA1 (ply-3.11.tar.gz) = 10a555a32095991fbc7f7ed10c677a14e21fad1d
4RMD160 (ply-3.8.tar.gz) = 028af8e860568c10f55321c830cbe8343aaa7012 4RMD160 (ply-3.11.tar.gz) = d0039bbbf095aeb7ed82fc2fab4b4699e8406d50
5SHA512 (ply-3.8.tar.gz) = 2c8cf0ee49ca6dec9ec8d5146e98885e871c26125fb5764988fbefae984ee94b4240f265762aaab26d6ec24989b35a4fd6905c3c0d14aac8a085e89b7d6159ef 5SHA512 (ply-3.11.tar.gz) = 37e39a4f930874933223be58a3da7f259e155b75135f1edd47069b3b40e5e96af883ebf1c8a1bbd32f914a9e92cfc12e29fec05cf61b518f46c1d37421b20008
6Size (ply-3.8.tar.gz) = 157286 bytes 6Size (ply-3.11.tar.gz) = 159130 bytes