Comment #10 on issue 2864 by smi...@gmail.com: Parsing issue with
mathematica.py with regex expressions
http://code.google.com/p/sympy/issues/detail?id=2864
Here are some other parsing issues that arose today while trying to use the
parser to parse simple algebraic expressions entered with my class:
matha('2x')
2*x
matha('-2x')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "sympy\parsing\mathematica.py", line 6, in mathematica
return sympify(parse(s))
File "sympy\core\sympify.py", line 297, in sympify
raise SympifyError('could not parse %r' % a, exc)
sympy.core.sympify.SympifyError: Sympify of expression 'could not parse
u'-2x''
failed, because of exception being raised:
SyntaxError: invalid syntax (<string>, line 1)
matha('0-2x')
-2*x
matha('2(x+3)')
2*x + 6
matha('2(x+3)-3')
2*x + 3
matha('(x+3)(x+1)')
(x + 1)*(x + 3)
matha('2*(x+3)(x+1)')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "sympy\parsing\mathematica.py", line 6, in mathematica
return sympify(parse(s))
File "sympy\core\sympify.py", line 295, in sympify
expr = parse_expr(a, local_dict=locals, transformations=transformations)
File "sympy\parsing\sympy_parser.py", line 723, in parse_expr
return eval_expr(code, local_dict, global_dict)
File "sympy\parsing\sympy_parser.py", line 661, in eval_expr
code, global_dict, local_dict) # take local objects in preference
File "<string>", line 1, in <module>
TypeError: 'Add' object is not callable
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.