Hello, Maxima users, I would like to demonstrate zero version of the Mathematica evaluator for MAXIMA. It's fully based on the Mathematica parser from the old Mma package. Now it accepts following Mathematica constructs: Assignments: = := Functional dependence: f[x_] Arithmetics: - + * / ^ Simple functions: Log Sin Cos Lists: {...} To use the evaluator interactively one can call :lisp(math) and type the Mathematica expression. Here's an example session: (%i1) load("e:/siver/develop/mma1.6/math-1.lisp"); (%o1) e:/siver/develop/mma1.6/math-1.lisp (%i2) load("e:/siver/develop/mma1.6/parser-1.lisp"); (%o2) e:/siver/develop/mma1.6/parser-1.lisp (%i3) :lisp(mtest) <!-- this executes code from the attached file test.txt contaning "a=0;b=a+1;f[x_]=a+x;a=1;c:=a+1;g[x_,y_]:=x+y+a;a=2" --> NIL (%i3) ?a; (%o3) 2 (%i4) ?b; (%o4) 1 (%i5) ?f(x); (%o5) x ... (%i18) ev(?c); (%o18) 3 (%i19) ?a:0; (%o19) 0 (%i20) ev(?c); (%o20) 1 (%i21) ?g(x,y); (%o21) y + x And at last one unresolved problem :) : (%i34) ?a:t; (%o34) t (%i35) t:1; (%o35) 1 (%i36) ev(?g(x,y)); (%o36) y + x + t Mathematica result: y+x+1 How it is possible to force MAXIMA to use final result of the assigments? Best regards, Andrey Siver
Attached file: parser-1.lisp
Attached file: test.txt