(setq a '(("operator" "(") ("keyword" "deffun") ("identifier" "checkcoord") ("operator" "(") ("identifier" "x") ("identifier" "y") ("operator" ")") ("operator" "(") ("keyword" "if") ("operator" "(") ("keyword" "and") ("operator" "(") ("keyword" "equal") ("identifier" "x") ("integer" "1") ("operator" ")") ("operator" "(") ("keyword" "equal") ("identifier" "y") ("integer" "2") ("operator" ")") ("operator" ")") ("integer" "1") ("integer" "0") ("operator" ")") ("operator" ")"))) (write a) (terpri)(terpri) (write (caar a)) (terpri)(terpri) (write (reverse a)) (terpri)(terpri) ;(deffun ID (ID ID) (f (and (equal ID ID) (equal ID ID)) IntegerValue IntegerValue)) (setq change (make-hash-table :test 'equalp)) (setf (gethash "identifier" change) "ID") (setf (gethash "integer" change) "IntegerValue") (setf (gethash "BinaryValue" change) "BinaryValue") (setq a (map 'list (lambda (x) (cond ((gethash (string (car x)) change) (gethash (string (car x)) change) ) (t (cadr x)) ) ) a)) (setq b a) (write (setq c (list a b))) (terpri)(terpri) (terpri)(terpri) (write (car c))
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more