[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LISP prefix to infix conversion
- To: info-mcl
- Subject: LISP prefix to infix conversion
- From: firstname.lastname@example.org (m. mcknight)
- Date: 29 Oct 91 07:34:51 GMT
- Followup-to: poster
- Keywords: help
- Newsgroups: comp.lang.lisp, comp.lang.lisp.mcl
- Organization: University of NC at Charlotte
Continuing with my project I have encountered yet another problem. I need to
take lists in the LISP prefix notation and convert them into a more normal
english type notation. This only has to work with math formulas.
(prefix-to-infix '(+ a (* b c)))
would return: A+(B*C)
(+ (* (/ x (- y 3)) 5 z)
would return: x/(y+3)*5+z
Notice how the extra ()'s need to be deleted and there aren't any spaces in
If anyone can shed some light on this for me I would greatly appreciate it.
Any suggestion or actual code can be used. Thanks.
Please reply to me via Email: email@example.com