(defun make-expression (english-desc)
"Returns a Lisp expression
corresponding to
the ENGLISH-DESC."
(let (v)
(cond
((setq v (match '(the product of (* x) times (* y))
english-desc))
(list '*
(make-expression (val 'x v))
(make-expression (val 'y v)) ) )
((setq v (match '(the (operator-name op) of (* x))
english-desc))
(list (val 'op v) (make-expression (val 'x v))) )
((setq v (match '(the (? x)) english-desc))
(val 'x v) )
((setq v (match '((? x)) english-desc))
(val 'x v) )
) ) )
(defun operator-name (name)
"Returns true
if NAME is the name of an operator."
(member name
'(square cube square-root negative)) )