On Monday, April 2, 2012 8:30:53 PM UTC+2, Dr. David Kirkby wrote: > > It's your project, but if it was me, I'd certainly go for the Engine->Sage > approach, which as you say it more Mathematica-like. > Thanks for your input.
> I've not looked at your program, but how did you write the parser? Do you > convert expressions to FullForm, so 1+2 is represented by > > Plus[1,2] > > or do you use some other method? > Yes, basically everything is converted to FullForm. The parser<https://github.com/poeschko/Mathics/blob/master/mathics/core/parser.py> (using spark <http://pages.cpsc.ucalgary.ca/~aycock/spark/>) constructs a tree consisting of Expressions with heads and children down to Atom instances ( Integer, Real, Symbol, String, etc). Then the expression is evaluated and formatted using built-in and user-defined rules. Some rules execute "native" Python code to construct the result (example<http://www.mathics.net/doc/manual/implementation/adding-built-in-symbols/>), others are stored in Mathematica form themselves. > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org