Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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: 2 additions & 2 deletions .github/workflows/mathics3-doctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
- name: Build Mathics3
run: |
# Until next Mathics3/mathics-core release is out...
git clone --depth 1 https://github.com/Mathics3/mathics-core.git
git clone --depth 1 -b scanner-name-changes https://github.com/Mathics3/mathics-core.git
cd mathics-core/
python -m pip install -e .[dev]
cp -v ../mathics_scanner/data/boxing-characters.json mathics/data/boxing-characters.json
cd ..
- name: Run Mathics3 tests
run: |
remake -x check
remake -x check-mathics3
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RM ?= rm
PIP_INSTALL_OPTS ?=

.PHONY: all build \
check check-full check-mathics clean \
check check-full check-mathics3 clean \
develop dist doc \
inputrc-no-unicode \
inputrc-unicode \
Expand Down
5 changes: 5 additions & 0 deletions mathics_scanner/data/operators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4731,6 +4731,11 @@ Pattern:
FullForm: Pattern[symb, expr]
arity: Binary
affix: Infix
# Should be right associative,
# but something in implicit multiplication
# is messing things up? In:
# ConditionalExpression[expr1_, cond_] expr2_
# ?
associativity: "unknown"
meaningful: true
# comments:
Expand Down
13 changes: 4 additions & 9 deletions mathics_scanner/tokeniser.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,6 @@
"Prefix": "At",
"Put": "GreaterGreater",
"RawComma": "Comma",
"RawLeftBrace": "OpenCurly",
"RawLeftBracket": "OpenSquare",
"RawRightBrace": "CloseCurly",
"RawRightBracket": "CloseSquare",
"RightRowBox": "CloseParen",
"Rule": "MinusGreater",
"RuleDelayed": "ColonGreater",
"ReplaceAll": "SlashDot",
Expand Down Expand Up @@ -245,11 +240,11 @@ def init_module():
("RawComma", r" \, "),
("LessBar", r" \<\| "),
("OpenCurly", r" \{ "),
("RawLeftBracket", r" \[ "),
("OpenParen", r" \( "),
("OpenSquare", r" \[ "),
("BarGreater", r" \|\> "),
("CloseCurly", r" \} "),
("RawRightBracket", r" \] "),
("CloseSquare", r" \] "),
("CloseParen", r" \) "),
("Slot", slot_pattern),
("SlotSequence", r"\#\#\d*"),
Expand Down Expand Up @@ -508,7 +503,7 @@ def init_module():
"PatternTest",
),
"@": ("ApplyList", "Apply", "Composition", "Prefix"),
"[": ("RawLeftBracket",),
"[": ("OpenSquare",),
"\\": (
# Note that "RawBackSlash" has to come last.
"BoxInputEscape",
Expand All @@ -526,7 +521,7 @@ def init_module():
"FormBox",
"RawBackslash",
),
"]": ("RawRightBracket",),
"]": ("CloseSquare",),
"^": (
# Note that "Power" has to come last.
"UpSetDelayed",
Expand Down
2 changes: 1 addition & 1 deletion mathics_scanner/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# well as importing into Python. That's why there is no
# space around "=" below.
# fmt: off
__version__="2.0.1.dev0" # noqa
__version__="10.0.0.dev0" # noqa
4 changes: 2 additions & 2 deletions test/test_tokeniser.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ def test_boxes():
Token("LeftRowBox", "\\(", 0),
Token("BoxInputEscape", "\\*", 2),
Token("Symbol", "RowBox", 4),
Token("RawLeftBracket", "[", 10),
Token("OpenSquare", "[", 10),
Token("Symbol", "a", 11),
Token("RawRightBracket", "]", 12),
Token("CloseSquare", "]", 12),
Token("RightRowBox", "\\)", 13),
]

Expand Down
Loading