Navigation Menu

Skip to content

Commit

Permalink
textproc/py-mathics-pygments: new port used by math/mathicsscript
Browse files Browse the repository at this point in the history
This is a lexer and highlighter for Mathematica/Wolfram Language source
code using the pygments engine.
  • Loading branch information
thierry-FreeBSD committed Jun 6, 2021
1 parent 8297b68 commit a2caf64
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 5 deletions.
6 changes: 1 addition & 5 deletions textproc/Makefile
Expand Up @@ -648,7 +648,6 @@
SUBDIR += p5-PPIx-QuoteLike
SUBDIR += p5-PPIx-Regexp
SUBDIR += p5-PPIx-Utilities
SUBDIR += p5-PPIx-Utils
SUBDIR += p5-Parse-ANSIColor-Tiny
SUBDIR += p5-Parse-BooleanLogic
SUBDIR += p5-Parse-CSV
Expand Down Expand Up @@ -1288,7 +1287,6 @@
SUBDIR += py-gambit-elasticsearch
SUBDIR += py-genshi
SUBDIR += py-gensim
SUBDIR += py-gi-docgen
SUBDIR += py-googletrans
SUBDIR += py-grako
SUBDIR += py-guess-language
Expand All @@ -1306,7 +1304,6 @@
SUBDIR += py-j2cli
SUBDIR += py-jc
SUBDIR += py-jinja2-cli
SUBDIR += py-jq
SUBDIR += py-jsonslicer
SUBDIR += py-jsx-lexer
SUBDIR += py-jtextfsm
Expand All @@ -1327,6 +1324,7 @@
SUBDIR += py-markuppy
SUBDIR += py-markups
SUBDIR += py-markupsafe
SUBDIR += py-mathics-pygments
SUBDIR += py-mdit-py-plugins
SUBDIR += py-misaka
SUBDIR += py-mistune
Expand Down Expand Up @@ -1611,7 +1609,6 @@
SUBDIR += rubygem-hikidoc
SUBDIR += rubygem-html-pipeline
SUBDIR += rubygem-html-pipeline27
SUBDIR += rubygem-html-proofer
SUBDIR += rubygem-html2text
SUBDIR += rubygem-htmlentities
SUBDIR += rubygem-ini
Expand Down Expand Up @@ -1799,7 +1796,6 @@
SUBDIR += sl-hyphen
SUBDIR += sl-mythes
SUBDIR += slides
SUBDIR += slowcat
SUBDIR += smi
SUBDIR += smu
SUBDIR += so-hunspell
Expand Down
27 changes: 27 additions & 0 deletions textproc/py-mathics-pygments/Makefile
@@ -0,0 +1,27 @@
# Created by: Thierry Thomas <thierry@pompo.net>

PORTNAME= mathics_pygments
PORTVERSION= 1.0.2
CATEGORIES= textproc math python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= thierry@FreeBSD.org
COMMENT= Lexer and highlighter for Mathematica/Wolfram Language source code

LICENSE= MIT

BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pygments>0:textproc/py-pygments@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}Mathics_Scanner>0:math/py-mathics-scanner
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pygments>0:textproc/py-pygments@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}Mathics_Scanner>0:math/py-mathics-scanner

#USE_GITHUB= yes
#GH_ACCOUNT= Mathics3

USES= python:3.6+
USE_PYTHON= distutils noflavors

NO_ARCH= yes

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions textproc/py-mathics-pygments/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1622913478
SHA256 (mathics_pygments-1.0.2.tar.gz) = 1ab9ca84896e841d9b07d5a3b28b82fb8db22e19f5f777bf0f7892cbc80bdb77
SIZE (mathics_pygments-1.0.2.tar.gz) = 51951
19 changes: 19 additions & 0 deletions textproc/py-mathics-pygments/pkg-descr
@@ -0,0 +1,19 @@
This is a lexer and highlighter for Mathematica/Wolfram Language source code
using the pygments engine.

It currently supports:
- All builtin functions in the System context including unicode symbols except
those that use characters from the private unicode space (e.g. \[FormalA]).
- User defined symbols, including those in a context.
- All operators including unicode operators like U+1D70B (pi).
- Comments, including multi line and nested.
- Strings, including multi line and escaped quotes.
- Patterns, slots (including named slots #name introduced in version 10) and
slot sequences.
- Message names (e.g. the ivar in General::ivar)
- Numbers including base notation (e.g. 8 ^^ 23 == 19) and scientific notation
(e.g. 1 *^ 3 == 1000).
- Local variables in Block, With and Module

WWW: https://mathics.org/
WWW: http://github.com/Mathics3/mathics-pygments/
16 changes: 16 additions & 0 deletions textproc/py-mathics-pygments/pkg-plist
@@ -0,0 +1,16 @@
%%PYTHON_SITELIBDIR%%/mathics_pygments/__init__.py
%%PYTHON_SITELIBDIR%%/mathics_pygments/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
%%PYTHON_SITELIBDIR%%/mathics_pygments/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc
%%PYTHON_SITELIBDIR%%/mathics_pygments/__pycache__/builtins.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
%%PYTHON_SITELIBDIR%%/mathics_pygments/__pycache__/builtins.cpython-%%PYTHON_SUFFIX%%.pyc
%%PYTHON_SITELIBDIR%%/mathics_pygments/__pycache__/lexer.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
%%PYTHON_SITELIBDIR%%/mathics_pygments/__pycache__/lexer.cpython-%%PYTHON_SUFFIX%%.pyc
%%PYTHON_SITELIBDIR%%/mathics_pygments/__pycache__/style.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
%%PYTHON_SITELIBDIR%%/mathics_pygments/__pycache__/style.cpython-%%PYTHON_SUFFIX%%.pyc
%%PYTHON_SITELIBDIR%%/mathics_pygments/__pycache__/version.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
%%PYTHON_SITELIBDIR%%/mathics_pygments/__pycache__/version.cpython-%%PYTHON_SUFFIX%%.pyc
%%PYTHON_SITELIBDIR%%/mathics_pygments/builtins.py
%%PYTHON_SITELIBDIR%%/mathics_pygments/data/mma-tables.json
%%PYTHON_SITELIBDIR%%/mathics_pygments/lexer.py
%%PYTHON_SITELIBDIR%%/mathics_pygments/style.py
%%PYTHON_SITELIBDIR%%/mathics_pygments/version.py

0 comments on commit a2caf64

Please sign in to comment.