<spadcommand bound="x">{x:=2}</spadcommand>
<spadcommand bound="y">{y:=3}</spadcommand>
<spadcommand free="x,y">{x*y}</spadcommand>

requires a huge program to parse (DOM or SAX, callbacks) vs

(spadcommand "x:=2" (bound 'x))
(spadcommand "y:=3" (bound 'y))
(spadcommand "x*y" (free '(x y)))

requires (read) to parse and (eval (read)) to execute.

(defun spadcommand (expr bindings)
 (when (eq (car bindings) 'bound) (hashput (cdr bindings) expr))
 (when (eq (car bindings) 'free)  (axiomeval (hashget (cdr bindings))))
 (axiomeval expr))


t



_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to