Skip to main content

Characters Tables and Tokenizer for Mathics and the Wolfram Language.

Project description

Workflows Pypi Installs Latest Version Supported Python Versions

Packaging status

Mathics Character Tables and Scanner

This repository really contains two things:

  • extensive tables describing WL symbols and operators their properties

  • a tokenizer or scanner portion for the Wolfram Language.

With respect to the first item, there is a commented YAML that contains a full set of translation between:

  • Wolfram Language named characters,

  • their Unicode/ASCII equivalents and Unicode and WL code-points,

  • Operator name (if symbol is an operator),

  • Operator precedence (if an operator)

  • Keyboard escape sequences for the symbol

Uses

The scanner and character tables are used inside Mathics. However information can also be used by other programs for tokenizing and formatting Wolfram Language code.

For example, tables are used in mathics-pygments, a Pygments-based lexer and highlighter for Mathematica/Wolfram Language source code.

This library may be useful if you need to work with Wolfram Language named character and convert them to various formats.

Usage

  • For tokenizing and scanning Wolfram Language code, use the mathics_scanner.tokenizer.Tokenizer class.

  • To convert between Wolfram Language named characters and Unicode/ASCII, use the mathics_scanner.characters.replace_wl_with_plain_text and mathics_scanner.characters.replace_unicode_with_wl functions.

  • To convert between qualified names of named characters (such FormalA for \[FormalA]) and Wolfram’s internal representation use the m̀athics_scanner.characters.named_characters dictionary.

To regenerate JSON-format tables run:

$ mathics-generate-json-table

Without options mathics-generate-json-table produces the maximum set of correspondences.

In most applications though you may need just a few of these. The --field option can be used to narrow the list of entries to output in JSON. Run mathics-generate-json-table --help for a full list of fields.

Implementation

For notes on the implementation of the packages or details on the conversion scheme please read Implementation.

Contributing

Please feel encouraged to contribute to this package or Mathics! Create your own fork, make the desired changes, commit, and make a pull request.

License

Mathics is released under the GNU General Public License Version 3 (GPL3).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Mathics_Scanner-1.2.1.tar.gz (84.1 kB view details)

Uploaded Source

Built Distributions

Mathics_Scanner-1.2.1-py3.9.egg (76.7 kB view details)

Uploaded Source

Mathics_Scanner-1.2.1-py3.8.egg (76.8 kB view details)

Uploaded Source

Mathics_Scanner-1.2.1-py3.7.egg (76.7 kB view details)

Uploaded Source

Mathics_Scanner-1.2.1-py3.6.egg (77.2 kB view details)

Uploaded Source

Mathics_Scanner-1.2.1-py3-none-any.whl (71.6 kB view details)

Uploaded Python 3

Mathics_Scanner-1.2.1-py2.py3-none-any.whl (71.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file Mathics_Scanner-1.2.1.tar.gz.

File metadata

  • Download URL: Mathics_Scanner-1.2.1.tar.gz
  • Upload date:
  • Size: 84.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for Mathics_Scanner-1.2.1.tar.gz
Algorithm Hash digest
SHA256 8d9d321f0119edaa7cd8d4c70459704a896a93e87246eb1f6e8ca5643584c94d
MD5 4d4f0fbb04dc40c7852aa6a270223708
BLAKE2b-256 da9d52cf507aff3a99686942ef5a94d90305a7dab1f7434c3368f7290d2a9306

See more details on using hashes here.

Provenance

File details

Details for the file Mathics_Scanner-1.2.1-py3.9.egg.

File metadata

  • Download URL: Mathics_Scanner-1.2.1-py3.9.egg
  • Upload date:
  • Size: 76.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for Mathics_Scanner-1.2.1-py3.9.egg
Algorithm Hash digest
SHA256 d6444872b6d2cb3c86a869470d7138b327f13f0f41443cc6ca5d0747976770d2
MD5 c7566cbb8cecd73483f30fa6a619532f
BLAKE2b-256 0c535aa29c71f87b1241e290918a6f0174d71aed602c9f86de42b79243c3fb93

See more details on using hashes here.

Provenance

File details

Details for the file Mathics_Scanner-1.2.1-py3.8.egg.

File metadata

  • Download URL: Mathics_Scanner-1.2.1-py3.8.egg
  • Upload date:
  • Size: 76.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for Mathics_Scanner-1.2.1-py3.8.egg
Algorithm Hash digest
SHA256 0026ff307c9a60b7c0d96a6722a47378d699a70ba12f077a33a67ba046ac7359
MD5 750e850ff97d20c7468717f4ebc50fea
BLAKE2b-256 dfe0ca0732a0cdf3392b3800a9b6e0f11384fda11769763e92cfdf9e376fb732

See more details on using hashes here.

Provenance

File details

Details for the file Mathics_Scanner-1.2.1-py3.7.egg.

File metadata

  • Download URL: Mathics_Scanner-1.2.1-py3.7.egg
  • Upload date:
  • Size: 76.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for Mathics_Scanner-1.2.1-py3.7.egg
Algorithm Hash digest
SHA256 4b77788494dec5e3190aa09a64aff738acce8cb010f68f16af8c7950f0ff1216
MD5 6f34ce61ccae5657c1b97bee0fb335c2
BLAKE2b-256 d929f8bce8633839d8c0a29b7054598e5084d227a412e93a4013712e7d96fbef

See more details on using hashes here.

Provenance

File details

Details for the file Mathics_Scanner-1.2.1-py3.6.egg.

File metadata

  • Download URL: Mathics_Scanner-1.2.1-py3.6.egg
  • Upload date:
  • Size: 77.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for Mathics_Scanner-1.2.1-py3.6.egg
Algorithm Hash digest
SHA256 e7b37904f37e4bdc3b80273896b60bc5ac734b451a414c3ab6c1391a77541004
MD5 f1870668d9065963ac2c5b4a14a0cf74
BLAKE2b-256 00a417851a2e78294ae0e027713888d08c7606a4c27b55f3a440bb2863eba677

See more details on using hashes here.

Provenance

File details

Details for the file Mathics_Scanner-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: Mathics_Scanner-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 71.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for Mathics_Scanner-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dd62c0765913c1aabe55d2a7d32aed769bd55fdfba236c5da8365ed31845290f
MD5 4bf6167874a70c5c3e9ab56765f06ecb
BLAKE2b-256 4d2c281b5a7e612acb073ae7c7cd01411cfaa85af6de1f0a4c6bfb383aba9ded

See more details on using hashes here.

Provenance

File details

Details for the file Mathics_Scanner-1.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: Mathics_Scanner-1.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 71.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for Mathics_Scanner-1.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1d5161989fd56af572283d0a0da1da3157e3de582dae5f634e95d2f731db9c2f
MD5 80a83a9e1fa19d9781ff2e6b6c219926
BLAKE2b-256 be973958286483f56303a6d3db64c450d3a7709fe3aa893e877dd0a5b6a37f70

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page