diff options
author | drochner <drochner@pkgsrc.org> | 2015-12-02 18:22:10 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2015-12-02 18:22:10 +0000 |
commit | a528e23dab900f85845d5c7528073e5e9acf22ba (patch) | |
tree | 301056910aeecdb3ea34aac2663ae952f535ee14 /devel/py-ply | |
parent | 8067a5de1b79b176dbc175006897b24b66ffec38 (diff) | |
download | pkgsrc-a528e23dab900f85845d5c7528073e5e9acf22ba.tar.gz |
add py-ply-3.8, a lex/yacc parser for Python, from Ura Hiroshi
per pkgsrc-wip
Diffstat (limited to 'devel/py-ply')
-rw-r--r-- | devel/py-ply/DESCR | 30 | ||||
-rw-r--r-- | devel/py-ply/Makefile | 22 | ||||
-rw-r--r-- | devel/py-ply/PLIST | 23 | ||||
-rw-r--r-- | devel/py-ply/distinfo | 6 |
4 files changed, 81 insertions, 0 deletions
diff --git a/devel/py-ply/DESCR b/devel/py-ply/DESCR new file mode 100644 index 00000000000..2f7ffcd7a27 --- /dev/null +++ b/devel/py-ply/DESCR @@ -0,0 +1,30 @@ +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. + + - 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 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. diff --git a/devel/py-ply/Makefile b/devel/py-ply/Makefile new file mode 100644 index 00000000000..f4ae28aacd4 --- /dev/null +++ b/devel/py-ply/Makefile @@ -0,0 +1,22 @@ +# $NetBSD: Makefile,v 1.1 2015/12/02 18:22:10 drochner Exp $ +# + +PYMODULENAME= ply +PYMODULEVER= 3.8 +DISTNAME= ${PYMODULENAME}-${PYMODULEVER} +PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +CATEGORIES= devel +MASTER_SITES= http://www.dabeaz.com/ply/ + +MAINTAINER= ura@jp.NetBSD.org +HOMEPAGE= http://www.dabeaz.com/ply/ +COMMENT= Lex an yacc parsing tools for Python +LICENSE= gnu-lgpl-v2.1 + +do-test: + cd ${WRKSRC}/test; \ + ${SETENV} PYTHONPATH=${WRKSRC} ${PYTHONBIN} testlex.py; \ + ${SETENV} PYTHONPATH=${WRKSRC} ${PYTHONBIN} testyacc.py + +.include "../../lang/python/egg.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/devel/py-ply/PLIST b/devel/py-ply/PLIST new file mode 100644 index 00000000000..1753b4f1104 --- /dev/null +++ b/devel/py-ply/PLIST @@ -0,0 +1,23 @@ +@comment $NetBSD: PLIST,v 1.1 2015/12/02 18:22:10 drochner Exp $ +${PYSITELIB}/${EGG_INFODIR}/PKG-INFO +${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt +${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt +${PYSITELIB}/${EGG_INFODIR}/top_level.txt +${PYSITELIB}/ply/__init__.py +${PYSITELIB}/ply/__init__.pyc +${PYSITELIB}/ply/__init__.pyo +${PYSITELIB}/ply/cpp.py +${PYSITELIB}/ply/cpp.pyc +${PYSITELIB}/ply/cpp.pyo +${PYSITELIB}/ply/ctokens.py +${PYSITELIB}/ply/ctokens.pyc +${PYSITELIB}/ply/ctokens.pyo +${PYSITELIB}/ply/lex.py +${PYSITELIB}/ply/lex.pyc +${PYSITELIB}/ply/lex.pyo +${PYSITELIB}/ply/yacc.py +${PYSITELIB}/ply/yacc.pyc +${PYSITELIB}/ply/yacc.pyo +${PYSITELIB}/ply/ygen.py +${PYSITELIB}/ply/ygen.pyc +${PYSITELIB}/ply/ygen.pyo diff --git a/devel/py-ply/distinfo b/devel/py-ply/distinfo new file mode 100644 index 00000000000..d207429119b --- /dev/null +++ b/devel/py-ply/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2015/12/02 18:22:10 drochner 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 |