pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/py-ply py-ply: updated to 3.11

branches:  trunk
changeset: 445313:febe4957874c
user:      adam <>
date:      Tue Jan 19 21:05:22 2021 +0000

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/ example, you
could trigger it doing this:

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

Issue and suggested patch contributed by

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.


 devel/py-ply/DESCR    |  36 ++++++++----------------------------
 devel/py-ply/Makefile |  28 ++++++++++++++--------------
 devel/py-ply/distinfo |  10 +++++-----
 3 files changed, 27 insertions(+), 47 deletions(-)

diffs (96 lines):

diff -r bf144cb08c77 -r febe4957874c devel/py-ply/DESCR
--- a/devel/py-ply/DESCR        Tue Jan 19 21:01:37 2021 +0000
+++ b/devel/py-ply/DESCR        Tue Jan 19 21:05:22 2021 +0000
@@ -1,30 +1,10 @@
-PLY is a 100% Python implementation of the common parsing tools lex and yacc.
-Here are a few highlights:
- -  PLY is very closely modeled after traditional lex/yacc. If you know how to
-    use these tools in C, you will find PLY to be similar.
- -  PLY provides *very* extensive error reporting and diagnostic information to
-    assist in parser construction.  The original implementation was developed
-    for instructional purposes.  As a result, the system tries to identify the
-    most common types of errors made by novice users.
- -  PLY provides full support for empty productions, error recovery, precedence
-    specifiers, and moderately ambiguous grammars.
+PLY is yet another implementation of lex and yacc for Python. Some notable
+features include the fact that its implemented entirely in Python and it uses
+LALR(1) parsing which is efficient and well suited for larger grammars.
- -  Parsing is based on LR-parsing which is fast, memory efficient, better
-    suited to large grammars, and which has a number of nice properties when
-    dealing with syntax errors and other parsing problems. Currently, PLY builds
-    its parsing tables using the LALR(1) algorithm used in yacc.
+PLY provides most of the standard lex/yacc features including support for empty
+productions, precedence rules, error recovery, and support for ambiguous
- -  PLY uses Python introspection features to build lexers and parsers. This
-    greatly simplifies the task of parser construction since it reduces the
-    number of files and eliminates the need to run a separate lex/yacc tool
-    before running your program.
- -  PLY can be used to build parsers for "real" programming languages. Although
-    it is not ultra-fast due to its Python implementation, PLY can be used to
-    parse grammars consisting of several hundred rules (as might be found for a
-    language like C).  The lexer and LR parser are also reasonably efficient
-    when parsing typically sized programs.  People have used PLY to build
-    parsers for C, C++, ADA, and other real programming languages.
+PLY is extremely easy to use and provides very extensive error checking. It is
+compatible with both Python 2 and Python 3.
diff -r bf144cb08c77 -r febe4957874c devel/py-ply/Makefile
--- a/devel/py-ply/Makefile     Tue Jan 19 21:01:37 2021 +0000
+++ b/devel/py-ply/Makefile     Tue Jan 19 21:05:22 2021 +0000
@@ -1,21 +1,21 @@
-# $NetBSD: Makefile,v 1.1 2015/12/02 18:22:10 drochner Exp $
+# $NetBSD: Makefile,v 1.2 2021/01/19 21:05:22 adam Exp $
+DISTNAME=      ply-3.11
+CATEGORIES=    devel python
-PYMODULENAME=          ply
-PYMODULEVER=           3.8
-CATEGORIES=            devel
+COMMENT=       Lex an yacc parsing tools for Python
+LICENSE=       modified-bsd
-COMMENT=               Lex an yacc parsing tools for Python
-LICENSE=               gnu-lgpl-v2.1
-       cd ${WRKSRC}/test; \
+       cd ${WRKSRC}/test && \
+       cd ${WRKSRC}/test && \
 .include "../../lang/python/"
diff -r bf144cb08c77 -r febe4957874c devel/py-ply/distinfo
--- a/devel/py-ply/distinfo     Tue Jan 19 21:01:37 2021 +0000
+++ b/devel/py-ply/distinfo     Tue Jan 19 21:05:22 2021 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.1 2015/12/02 18:22:10 drochner Exp $
+$NetBSD: distinfo,v 1.2 2021/01/19 21:05:22 adam Exp $
-SHA1 (ply-3.8.tar.gz) = 7f3f8504fd394e4f210857a59644d21b3b90f830
-RMD160 (ply-3.8.tar.gz) = 028af8e860568c10f55321c830cbe8343aaa7012
-SHA512 (ply-3.8.tar.gz) = 2c8cf0ee49ca6dec9ec8d5146e98885e871c26125fb5764988fbefae984ee94b4240f265762aaab26d6ec24989b35a4fd6905c3c0d14aac8a085e89b7d6159ef
-Size (ply-3.8.tar.gz) = 157286 bytes
+SHA1 (ply-3.11.tar.gz) = 10a555a32095991fbc7f7ed10c677a14e21fad1d
+RMD160 (ply-3.11.tar.gz) = d0039bbbf095aeb7ed82fc2fab4b4699e8406d50
+SHA512 (ply-3.11.tar.gz) = 37e39a4f930874933223be58a3da7f259e155b75135f1edd47069b3b40e5e96af883ebf1c8a1bbd32f914a9e92cfc12e29fec05cf61b518f46c1d37421b20008
+Size (ply-3.11.tar.gz) = 159130 bytes

Home | Main Index | Thread Index | Old Index