Date: Sun, 31 Dec 2023 18:45:00 GMT From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: dca037638300 - main - textproc/py-TatSu: New port: Generate Python parsers from grammars in a variation of EBNF Message-ID: <202312311845.3BVIj0SW077770@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=dca0376383009c19cea98420455feb02ec2da8d9 commit dca0376383009c19cea98420455feb02ec2da8d9 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2023-12-31 18:44:09 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2023-12-31 18:44:58 +0000 textproc/py-TatSu: New port: Generate Python parsers from grammars in a variation of EBNF This is a successor to textproc/py-grako. --- textproc/Makefile | 1 + textproc/py-TatSu/Makefile | 30 ++++++++++++++++++++++++++++++ textproc/py-TatSu/distinfo | 3 +++ textproc/py-TatSu/pkg-descr | 10 ++++++++++ 4 files changed, 44 insertions(+) diff --git a/textproc/Makefile b/textproc/Makefile index 9626d9770b24..2582dca0305f 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1288,6 +1288,7 @@ SUBDIR += py-Morfessor SUBDIR += py-QDarkStyle SUBDIR += py-RTFDE + SUBDIR += py-TatSu SUBDIR += py-Tempita SUBDIR += py-accessible-pygments SUBDIR += py-acora diff --git a/textproc/py-TatSu/Makefile b/textproc/py-TatSu/Makefile new file mode 100644 index 000000000000..d9f381f5f8e5 --- /dev/null +++ b/textproc/py-TatSu/Makefile @@ -0,0 +1,30 @@ +PORTNAME= TatSu +DISTVERSION= 5.11.2 +CATEGORIES= textproc python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Generate Python parsers from grammars in a variation of EBNF +WWW= https://tatsu.readthedocs.io/en/stable/ + +LICENSE= BSD4CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +BUILD_DEPENDS= ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} + +USES= python:3.11+ +USE_PYTHON= pep517 concurrent autoplist + +NO_ARCH= yes + +POST_PLIST+= fix-plist + +post-install: # workaround https://github.com/neogeny/TatSu/issues/333 + @${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/test + +fix-plist: + ${REINPLACE_CMD} -e 's|^.*/test/.*$$||' ${TMPPLIST} + +.include <bsd.port.mk> diff --git a/textproc/py-TatSu/distinfo b/textproc/py-TatSu/distinfo new file mode 100644 index 000000000000..668f22581a7d --- /dev/null +++ b/textproc/py-TatSu/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1704045545 +SHA256 (TatSu-5.11.2.tar.gz) = 5c29d9fad096ce9bb6c9b0758ee182bba6dbd6ba1a893540b3707dc2a4306626 +SIZE (TatSu-5.11.2.tar.gz) = 149641 diff --git a/textproc/py-TatSu/pkg-descr b/textproc/py-TatSu/pkg-descr new file mode 100644 index 000000000000..a9b64426c1a5 --- /dev/null +++ b/textproc/py-TatSu/pkg-descr @@ -0,0 +1,10 @@ +TatSu is a tool that takes grammars in a variation of EBNF as input, and outputs +memoizing (Packrat) PEG parsers in Python. + +TatSu can compile a grammar stored in a string into a tatsu.grammars.Grammar +object that can be used to parse any given input, much like the re module does +with regular expressions, or it can generate a Python module that implements the +parser. + +TatSu supports left-recursive rules in PEG grammars, and it honors +left-associativity in the resulting parse trees.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202312311845.3BVIj0SW077770>