I think it's a good idea. It sounds like something that will
definitely need to live somewhere in the parser stack.

The other direction is just printing. There is already a good system
for this in SymPy, so you might look at how it is designed.

Aaron Meurer

On Fri, May 3, 2013 at 1:35 PM, Angus Griffith <[email protected]> wrote:
> Inspiration: in Mathematica there's SymbolicC that just represents language
> constructs (without applying semantics yet).
>
> The symbolic representation acts as follows:
>
> external execution <- other language <-> symbolic representation <-> sympy
> translation -> sympy execution
>
> The symbolic representation is a Sympy object that represents some language
> expression of python, Mathematica, Sympy, LaTeX etc.
>
> Each representation would be equipped with two important methods, one for
> translation to Sympy and one for translation to it's own language.
>
> For example the python expression '1 + 2' would be parsed to a symbolic
> expression of python_add(python_int(1), python_int(2)). Calling .to_sympy()
> on this object would generate the Sympy expression Add(S(1), S(2)) which
> then evaluates to S(3). The important thing is that it works in the other
> direction too!
>
> Credit for this idea goes to @poescko.
>
> (We came up this idea only slightly too late for my GSOC proposal).
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy?hl=en-US.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to