1|Workflows| |Pypi Installs| |Latest Version| |Supported Python Versions| 2 3|Packaging status| 4 5Mathics Scanner 6=============== 7 8This is the tokeniser or scanner portion for the Wolfram Language. 9 10As such, it also contains a full set of translation between Wolfram Language 11named characters, their Unicode/ASCII equivalents and code-points. 12 13Uses 14---- 15 16This is used as the scanner inside `Mathics <https://mathics.org>`_ but it can 17also be used for tokenizing and formatting Wolfram Language code. In fact we 18intend to write one. This library is also quite usefull if you need to work 19with Wolfram Language named character and convert them to various formats. 20 21Usage 22----- 23 24- For tokenizing and scanning Wolfram Language code, use the 25 ``mathics_scanner.tokenizer.Tokenizer`` class. 26- To convert between Wolfram Language named characters and Unicode/ASCII, use 27 the ``mathics_scanner.characters.replace_wl_with_plain_text`` and 28 ``mathics_scanner.characters.replace_unicode_with_wl`` functions. 29- To convert between qualified names of named characters (such ``FormalA`` for 30 ``\[FormalA]``) and Wolfram's internal representation use the 31 ``m̀athics_scanner.characters.named_characters`` dictionary. 32 33To regenerate scanner tables run: 34 35:: 36 37 $ mathics-generate-json-table 38 39Implementation 40-------------- 41 42For notes on the implementation of the packages or details on the conversion 43scheme please read ``implementation.rst``. 44 45Contributing 46------------ 47 48Please feel encouraged to contribute to this package or Mathics! Create your 49own fork, make the desired changes, commit, and make a pull request. 50 51License 52------- 53 54Mathics is released under the GNU General Public License Version 3 (GPL3). 55 56.. |Workflows| image:: https://github.com/Mathics3/mathics-scanner/workflows/Mathics%20(ubuntu)/badge.svg 57.. |Packaging status| image:: https://repology.org/badge/vertical-allrepos/mathics-scanner.svg 58 :target: https://repology.org/project/mathics-scanner/versions 59.. |Latest Version| image:: https://badge.fury.io/py/Mathics-Scanner.svg 60 :target: https://badge.fury.io/py/Mathics-Scanner 61.. |Pypi Installs| image:: https://pepy.tech/badge/Mathics-Scanner 62.. |Supported Python Versions| image:: https://img.shields.io/pypi/pyversions/Mathics-Scanner.svg 63