mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-30 01:15:52 +00:00
add py-bison 0.1.8
Python-based parsing at the speed of C
This commit is contained in:
parent
f980e2ae20
commit
ec2569e771
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=117092
@ -1123,6 +1123,7 @@
|
||||
SUBDIR += pwlib
|
||||
SUBDIR += py-anonfunc
|
||||
SUBDIR += py-ansistyle
|
||||
SUBDIR += py-bison
|
||||
SUBDIR += py-cheetah
|
||||
SUBDIR += py-ciphon
|
||||
SUBDIR += py-clientcookie
|
||||
|
46
devel/py-bison/Makefile
Normal file
46
devel/py-bison/Makefile
Normal file
@ -0,0 +1,46 @@
|
||||
# ex:ts=8
|
||||
# Ports collection makefile for: py-bison
|
||||
# Date created: Aug 23, 2004
|
||||
# Whom: ijliao
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= bison
|
||||
PORTVERSION= 0.1.8
|
||||
CATEGORIES= devel python
|
||||
MASTER_SITES= http://www.freenet.org.nz/python/pybison/
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
DISTNAME= py${PORTNAME}-${PORTVERSION}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Python-based parsing at the speed of C
|
||||
|
||||
BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/Pyrex/__init__.py:${PORTSDIR}/devel/pyrex
|
||||
RUN_DEPENDS= bison:${PORTSDIR}/devel/bison
|
||||
|
||||
USE_PYTHON= yes
|
||||
USE_PYDISTUTILS= yes
|
||||
|
||||
.if !defined(NOPORTDOCS)
|
||||
DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
|
||||
EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
|
||||
.endif
|
||||
|
||||
.if !defined(NOPORTDOCS)
|
||||
post-install:
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
${CP} -R ${WRKSRC}/doc/ ${DOCSDIR}
|
||||
@${FIND} ${DOCSDIR} ! -type d | \
|
||||
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
|
||||
@${FIND} ${DOCSDIR} -type d | ${SORT} -r | \
|
||||
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
|
||||
@${MKDIR} ${EXAMPLESDIR}
|
||||
${CP} -R ${WRKSRC}/examples/ ${EXAMPLESDIR}
|
||||
@${FIND} ${EXAMPLESDIR} ! -type d | \
|
||||
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
|
||||
@${FIND} ${EXAMPLESDIR} -type d | ${SORT} -r | \
|
||||
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
2
devel/py-bison/distinfo
Normal file
2
devel/py-bison/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
MD5 (pybison-0.1.8.tar.gz) = c57ea56225c205dff1b7291d9a9f1048
|
||||
SIZE (pybison-0.1.8.tar.gz) = 115211
|
19
devel/py-bison/files/patch-setup.py
Normal file
19
devel/py-bison/files/patch-setup.py
Normal file
@ -0,0 +1,19 @@
|
||||
--- setup.py.orig Sat Apr 24 10:05:41 2004
|
||||
+++ setup.py Mon Jul 26 14:20:35 2004
|
||||
@@ -24,6 +24,16 @@
|
||||
extra_link_args = []
|
||||
bison2pyscript = 'utils/bison2py'
|
||||
bisondynlibModule = "src/c/bisondynlib-linux.c"
|
||||
+elif sys.platform == 'freebsd4':
|
||||
+ libs = []
|
||||
+ extra_link_args = []
|
||||
+ bison2pyscript = 'utils/bison2py'
|
||||
+ bisondynlibModule = "src/c/bisondynlib-linux.c"
|
||||
+elif sys.platform == 'freebsd5':
|
||||
+ libs = []
|
||||
+ extra_link_args = []
|
||||
+ bison2pyscript = 'utils/bison2py'
|
||||
+ bisondynlibModule = "src/c/bisondynlib-linux.c"
|
||||
else:
|
||||
print "Sorry, your platform is presently unsupported"
|
||||
sys.exit(1)
|
24
devel/py-bison/pkg-descr
Normal file
24
devel/py-bison/pkg-descr
Normal file
@ -0,0 +1,24 @@
|
||||
PyBison is a Python binding to the Bison (yacc) and Flex (lex)
|
||||
parser-generator utilities.
|
||||
|
||||
It allows parsers to be quickly and easily developed as Python class
|
||||
declarations, and for these parsers to take advantage of the fast and
|
||||
powerful C-based Bison/Flex.
|
||||
|
||||
Users write a subclass of a basic Parser object, containing a set of methods
|
||||
and attributes specifying the grammar and lexical analysis rules, and taking
|
||||
callbacks for providing parser input, and receiving parser target events.
|
||||
|
||||
Features
|
||||
* Runs at near the speed of C-based parsers, due to direct hooks into
|
||||
bison-generated C code
|
||||
* Full LALR(1) grammar support
|
||||
* Includes a utility to convert your legacy grammar (.y) and scanner (.l)
|
||||
scripts into python modules compatible with PyBison
|
||||
* Easy to understand - the walkthrough and the examples will have you
|
||||
writing your own parsers in minutes
|
||||
* Comfortable and intuitive callback mechanisms
|
||||
* Can export parse tree to XML with a simple method call
|
||||
* Can reconstitute a parse tree from XML
|
||||
|
||||
WWW: http://www.freenet.org.nz/python/pybison/
|
5
devel/py-bison/pkg-plist
Normal file
5
devel/py-bison/pkg-plist
Normal file
@ -0,0 +1,5 @@
|
||||
bin/bison2py
|
||||
%%PYTHON_SITELIBDIR%%/bison.py
|
||||
%%PYTHON_SITELIBDIR%%/bison.pyc
|
||||
%%PYTHON_SITELIBDIR%%/bison.pyo
|
||||
%%PYTHON_SITELIBDIR%%/bison_.so
|
Loading…
Reference in New Issue
Block a user