From dbde8d38a4a59f47be4f042aa70fc6eae5759a27 Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Tue, 3 Jul 2018 06:16:35 +0000 Subject: [PATCH] New port: textproc/py-grako: Convert EBNF grammar to PEG/Packrat parser in Python --- textproc/Makefile | 1 + textproc/py-grako/Makefile | 20 ++++++++++++++++++++ textproc/py-grako/distinfo | 3 +++ textproc/py-grako/pkg-descr | 8 ++++++++ 4 files changed, 32 insertions(+) create mode 100644 textproc/py-grako/Makefile create mode 100644 textproc/py-grako/distinfo create mode 100644 textproc/py-grako/pkg-descr diff --git a/textproc/Makefile b/textproc/Makefile index d937a7356bfe..77e09a8a664a 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1303,6 +1303,7 @@ SUBDIR += py-genshi SUBDIR += py-gensim SUBDIR += py-gfm + SUBDIR += py-grako SUBDIR += py-guess-language SUBDIR += py-hexdump SUBDIR += py-html2text diff --git a/textproc/py-grako/Makefile b/textproc/py-grako/Makefile new file mode 100644 index 000000000000..4f8eab60caba --- /dev/null +++ b/textproc/py-grako/Makefile @@ -0,0 +1,20 @@ +# $FreeBSD$ + +PORTNAME= grako +DISTVERSION= 3.99.9 +CATEGORIES= textproc python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Convert EBNF grammar to PEG/Packrat parser in Python + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-runner>0:devel/py-pytest-runner@${PY_FLAVOR} + +USES= python zip +USE_PYTHON= distutils cython autoplist + +.include diff --git a/textproc/py-grako/distinfo b/textproc/py-grako/distinfo new file mode 100644 index 000000000000..0bacce330e3d --- /dev/null +++ b/textproc/py-grako/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1530596270 +SHA256 (grako-3.99.9.zip) = fcc37309eab7cd0cbbb26cfd6a54303fbb80a00a58ab295d1e665bc69189c364 +SIZE (grako-3.99.9.zip) = 159278 diff --git a/textproc/py-grako/pkg-descr b/textproc/py-grako/pkg-descr new file mode 100644 index 000000000000..74178199413e --- /dev/null +++ b/textproc/py-grako/pkg-descr @@ -0,0 +1,8 @@ +Grako (for grammar compiler) is a tool that takes grammars in a variation of +EBNF as input, and outputs memoizing (Packrat) PEG parsers in Python. + +Grako can also compile a grammar stored in a string into a Grammar object that +can be used to parse any given input, much like the re module does with regular +expressions. + +WWW: https://bitbucket.org/neogeny/grako