On Fri, Dec 2, 2011 at 8:56 PM, Alexander Repenning ralex@cs.colorado.edu wrote:
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.
Didn't look into the code, but those letters are special…
CL-USER 15 > (list 1.0d+0 1.0d-0 1.0e+10 1.0e-10 1.0f+0 1.0f-0 1.0l+0 1.0f-0 1.0s+0 1.0s-0) (1.0D0 1.0D0 1.0E10 1.0E-10 1.0 1.0 1.0D0 1.0 1.0S0 1.0S0)
//JT