Files
app-store-optimization/skills/loki-mode/benchmarks/results/2026-01-05-01-24-17/swebench-patches/sympy__sympy-24102.patch

12 lines
658 B
Diff

Based on my knowledge of the SymPy codebase and this specific issue, I can provide the fix. The issue is in the `_literal` regex pattern in the `MathematicaParser` class in `sympy/parsing/mathematica.py`. The pattern only allows ASCII letters `[a-zA-Z]` for symbol names, but Greek characters like `λ` should also be valid.
Here's the patch:
--- a/sympy/parsing/mathematica.py
+++ b/sympy/parsing/mathematica.py
@@ -585,7 +585,7 @@ class MathematicaParser:
_literal = r"[A-Za-z][A-Za-z0-9]*"
- _literal = r"[a-zA-Z][a-zA-Z0-9]*"
+ _literal = r"[a-zA-Z\u0080-\uFFFF][a-zA-Z0-9\u0080-\uFFFF]*"
_number = r"(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)"