diff --git a/.github/workflows/mathics3-doctest.yml b/.github/workflows/mathics3-doctest.yml index 58b00157..4942f9a1 100644 --- a/.github/workflows/mathics3-doctest.yml +++ b/.github/workflows/mathics3-doctest.yml @@ -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 diff --git a/Makefile b/Makefile index e6de2cd9..0bd56995 100644 --- a/Makefile +++ b/Makefile @@ -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 \ diff --git a/mathics_scanner/data/operators.yml b/mathics_scanner/data/operators.yml index fe667ab6..b0dd7cf4 100644 --- a/mathics_scanner/data/operators.yml +++ b/mathics_scanner/data/operators.yml @@ -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: diff --git a/mathics_scanner/tokeniser.py b/mathics_scanner/tokeniser.py index 2441f55d..9d8d7e13 100644 --- a/mathics_scanner/tokeniser.py +++ b/mathics_scanner/tokeniser.py @@ -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", @@ -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*"), @@ -508,7 +503,7 @@ def init_module(): "PatternTest", ), "@": ("ApplyList", "Apply", "Composition", "Prefix"), - "[": ("RawLeftBracket",), + "[": ("OpenSquare",), "\\": ( # Note that "RawBackSlash" has to come last. "BoxInputEscape", @@ -526,7 +521,7 @@ def init_module(): "FormBox", "RawBackslash", ), - "]": ("RawRightBracket",), + "]": ("CloseSquare",), "^": ( # Note that "Power" has to come last. "UpSetDelayed", diff --git a/mathics_scanner/version.py b/mathics_scanner/version.py index 446464f0..6e486294 100644 --- a/mathics_scanner/version.py +++ b/mathics_scanner/version.py @@ -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 diff --git a/test/test_tokeniser.py b/test/test_tokeniser.py index bd28a2a2..357fe26c 100644 --- a/test/test_tokeniser.py +++ b/test/test_tokeniser.py @@ -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), ]