Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tokenizer gets no-meaning infix ops from JSON #87

Merged
merged 7 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/mathics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ jobs:
- name: Test Mathics3
run: |
# Until next Mathics3/mathics-core release is out...
git clone https://github.com/Mathics3/mathics-core.git
# git clone https://github.com/Mathics3/mathics-core.git
# Until next operator-info-from-JSON is merges
git clone -b operator-info-from-JSON https://github.com/Mathics3/mathics-core.git
cd mathics-core/
make PIP_INSTALL_OPTS='[full]'
# pip install Mathics3[full]
Expand Down
1 change: 0 additions & 1 deletion admin-tools/make-tables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ PYTHON=${PYTHON:-python}

cd $mydir/../mathics_scanner/data
$PYTHON ../generate/build_tables.py -o characters.json
$PYTHON ../generate/operator_csv_to_yml.py
$PYTHON ../generate/build_operator_tables.py -o operators.json
8 changes: 4 additions & 4 deletions mathics_scanner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
)

# TODO: Move is_symbol_name to the characters module
from mathics_scanner.tokeniser import Token, Tokeniser, is_symbol_name
# from mathics_scanner.tokeniser import Token, Tokeniser, is_symbol_name
from mathics_scanner.version import __version__

__all__ = [
Expand All @@ -37,12 +37,12 @@
"MultiLineFeeder",
"ScanError",
"SingleLineFeeder",
"Token",
"Tokeniser",
# "Token",
# "Tokeniser",
"TranslateError",
"__version__",
"aliased_characters",
"is_symbol_name",
# "is_symbol_name",
"named_characters",
"replace_unicode_with_wl",
"replace_wl_with_plain_text",
Expand Down
402 changes: 0 additions & 402 deletions mathics_scanner/data/OperatorTable.csv

This file was deleted.

11 changes: 5 additions & 6 deletions mathics_scanner/data/named-characters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4933,21 +4933,20 @@ FreakedSmiley:
# the YAML name doesn't have to match since there is just ASCII for that.
# Since we use the name Function as the key here, the YAML name for "&" has
# to be different, since YAML keys need to be unique.

# Note \[Function] is not the same as \[RightTeeArrow] the
# unicode for each has to be different. Here we add
# "LONG".
Function:
amslatex: "\\mathsto"
ascii: "|->"
has-unicode-inverse: false
is-letter-like: false
operator-name: Function
# This needs to be greater than Alternative "|" which is
# 160 so that we don't treat |-> as | ->.
unicode-equivalent: "\u21A6"
unicode-equivalent-name: RIGHTWARDS ARROW FROM BAR
unicode-equivalent: "\u27FC"
unicode-equivalent-name: LONG RIGHTWARDS ARROW FROM BAR
unicode-reference: https://www.compart.com/en/unicode/U+21A6
wl-reference: https://reference.wolfram.com/language/ref/character/Function.html
wl-unicode: "\uF4A1"
wl-unicode-name: RIGHTWARDS ARROW FROM BAR

# Alternative form of Function. We use FunctionAmpersand
# since Function is already taken. See note above.
Expand Down
Loading
Loading