[Openmcl-devel] Mark Kantrowitz infix.lisp easter egg?
ralex at cs.colorado.edu
Fri Dec 2 19:56:14 CST 2011
Using Mark Kantrowitz old but very handy infix we noticed some peculiar pattern of errors where very basic expressions do not correctly convert infix expressions into prefix ones. The version I just tried was this one: http://www.cliki.net/infix
in => pre, red for incorrect
"a + 1" => (+ A 1)
"s + 1" => S+1
"s - 1" => S-1
"s * 1" => (* S 1)
"a + 1.5" => (+ A 1.5)
"s + 1.5" => (+ S 1.5)
"s + s" => (+ S S)
"s + 1 + 1" => (+ S+1 1)
"s + 1e1" => (+ S 10.0)
Can somebody see a pattern here? AFAIK, the combination of the one letter variables names that are characters D, E, F, L, or S followed by "+" or "-" and then followed by an int does not work.
Is this a bug or some very special case that is supposed to work like this for no (to me) obvious reason? If this is bug, how could this have slipped through the net for so many years? I know many people have using this software. I tried various versions of infix.lisp. Are D, E, F, L, or S special tokens? If so, what do they mean, and where are they declared?
---- test program spitting out the variable names not working ------
This should print nothing:
(when (symbolp (read-from-string (format nil "#i(~A + 1)" Char))) ;; should be a list, NOT a symbol!
Prof. Alexander Repenning
University of Colorado
Computer Science Department
Boulder, CO 80309-430
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmcl-devel