Mathics-Scanner


NameMathics-Scanner JSON
Version 1.3.1 PyPI version JSON
download
home_pageNone
SummaryCharacter Tables and Tokenizer for Mathics and the Wolfram Language.
upload_time2024-08-09 12:06:52
maintainerMathics3 Group
docs_urlNone
authorNone
requires_python>=3.8
licenseGPL-3.0-only
keywords mathematica wolfram interpreter shell math cas
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            |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,
* Unicode/ASCII equivalents and Unicode and WL code-points,
* AMSLaTeX equivalent names,
* 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 <https://mathics.org>`_. However information can
also be used by other programs for tokenizing and formatting Wolfram Language code.

For example, tables are used in `mathics-pygments <https://pypi.org/project/Mathics-Scanner/>`_, 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 <https://mathics-scanner.readthedocs.io/en/latest/implementation.html>`_.

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).

.. |Workflows| image:: https://github.com/Mathics3/mathics-scanner/workflows/Mathics%20(ubuntu)/badge.svg
.. |Packaging status| image:: https://repology.org/badge/vertical-allrepos/mathics-scanner.svg
			    :target: https://repology.org/project/mathics-scanner/versions
.. |Latest Version| image:: https://badge.fury.io/py/Mathics-Scanner.svg
		 :target: https://badge.fury.io/py/Mathics-Scanner
.. |Pypi Installs| image:: https://pepy.tech/badge/Mathics-Scanner
.. |Supported Python Versions| image:: https://img.shields.io/pypi/pyversions/Mathics-Scanner.svg

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "Mathics-Scanner",
    "maintainer": "Mathics3 Group",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Mathematica, Wolfram, Interpreter, Shell, Math, CAS",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/b4/94/efe09f370643ca61ce720e7d2ca79d79a1ba27b43c9ee5dd25520c2e0a16/mathics_scanner-1.3.1.tar.gz",
    "platform": null,
    "description": "|Workflows| |Pypi Installs| |Latest Version| |Supported Python Versions|\n\n|Packaging status|\n\nMathics Character Tables and Scanner\n=====================================\n\nThis repository really contains two things:\n\n* extensive tables describing WL symbols and operators their properties\n* a tokenizer or scanner portion for the Wolfram Language.\n\nWith respect to the first item, there is a commented YAML that contains a\nfull set of translation between:\n\n* Wolfram Language named characters,\n* Unicode/ASCII equivalents and Unicode and WL code-points,\n* AMSLaTeX equivalent names,\n* Operator name (if symbol is an operator),\n* Operator precedence (if an operator)\n* Keyboard escape sequences for the symbol\n\nUses\n----\n\nThe scanner and character tables are used inside `Mathics <https://mathics.org>`_. However information can\nalso be used by other programs for tokenizing and formatting Wolfram Language code.\n\nFor example, tables are used in `mathics-pygments <https://pypi.org/project/Mathics-Scanner/>`_, a Pygments-based\nlexer and highlighter for Mathematica/Wolfram Language source code.\n\nThis library may be useful if you need to work with Wolfram Language\nnamed character and convert them to various formats.\n\nUsage\n-----\n\n- For tokenizing and scanning Wolfram Language code, use the\n  ``mathics_scanner.tokenizer.Tokenizer`` class.\n- To convert between Wolfram Language named characters and Unicode/ASCII, use\n  the ``mathics_scanner.characters.replace_wl_with_plain_text`` and\n  ``mathics_scanner.characters.replace_unicode_with_wl`` functions.\n- To convert between qualified names of named characters (such ``FormalA`` for\n  ``\\[FormalA]``) and Wolfram's internal representation use the\n  ``m\u0300athics_scanner.characters.named_characters`` dictionary.\n\nTo regenerate JSON-format tables run:\n\n::\n\n   $ mathics-generate-json-table\n\nWithout options ``mathics-generate-json-table`` produces the maximum set of correspondences.\n\nIn most applications though you may need just a few of these. The\n``--field`` option can be used to narrow the list of entries to output in JSON. Run\n``mathics-generate-json-table --help`` for a full list of fields.\n\n\nImplementation\n--------------\n\nFor notes on the implementation of the packages or details on the conversion\nscheme please read `Implementation <https://mathics-scanner.readthedocs.io/en/latest/implementation.html>`_.\n\nContributing\n------------\n\nPlease feel encouraged to contribute to this package or Mathics! Create your\nown fork, make the desired changes, commit, and make a pull request.\n\nLicense\n-------\n\nMathics is released under the GNU General Public License Version 3 (GPL3).\n\n.. |Workflows| image:: https://github.com/Mathics3/mathics-scanner/workflows/Mathics%20(ubuntu)/badge.svg\n.. |Packaging status| image:: https://repology.org/badge/vertical-allrepos/mathics-scanner.svg\n\t\t\t    :target: https://repology.org/project/mathics-scanner/versions\n.. |Latest Version| image:: https://badge.fury.io/py/Mathics-Scanner.svg\n\t\t :target: https://badge.fury.io/py/Mathics-Scanner\n.. |Pypi Installs| image:: https://pepy.tech/badge/Mathics-Scanner\n.. |Supported Python Versions| image:: https://img.shields.io/pypi/pyversions/Mathics-Scanner.svg\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Character Tables and Tokenizer for Mathics and the Wolfram Language.",
    "version": "1.3.1",
    "project_urls": {
        "Homepage": "https://mathics.org/"
    },
    "split_keywords": [
        "mathematica",
        " wolfram",
        " interpreter",
        " shell",
        " math",
        " cas"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "13171c0fc60c508d88c91f873efbc8fe6d9fbc6746624e54e1cf3cb736cf395b",
                "md5": "4740d6a1f10fb5d9ee94988429019c1f",
                "sha256": "e80b882c6e648ce2b56eb7244695df8969af967cdb281e8d2bb8212ac8ae8c3c"
            },
            "downloads": -1,
            "filename": "Mathics_Scanner-1.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4740d6a1f10fb5d9ee94988429019c1f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 115924,
            "upload_time": "2024-08-09T12:06:13",
            "upload_time_iso_8601": "2024-08-09T12:06:13.174137Z",
            "url": "https://files.pythonhosted.org/packages/13/17/1c0fc60c508d88c91f873efbc8fe6d9fbc6746624e54e1cf3cb736cf395b/Mathics_Scanner-1.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b494efe09f370643ca61ce720e7d2ca79d79a1ba27b43c9ee5dd25520c2e0a16",
                "md5": "00319a274fe404960014192a753c4ec0",
                "sha256": "599a1e5bb84a802de424256b008ca93365bd73471d0aab5ae99f69028088df22"
            },
            "downloads": -1,
            "filename": "mathics_scanner-1.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "00319a274fe404960014192a753c4ec0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 127755,
            "upload_time": "2024-08-09T12:06:52",
            "upload_time_iso_8601": "2024-08-09T12:06:52.488043Z",
            "url": "https://files.pythonhosted.org/packages/b4/94/efe09f370643ca61ce720e7d2ca79d79a1ba27b43c9ee5dd25520c2e0a16/mathics_scanner-1.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-09 12:06:52",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mathics-scanner"
}
        
Elapsed time: 0.33295s