[plt-scheme] read error handling in the repl

From: Doug Orleans (dougorleans at gmail.com)
Date: Tue Feb 26 15:53:32 EST 2008

I was curious about how infix operators were parsed, so I tried an
experiment, but the results were stranger than I expected (note that I
only typed the first line, the rest is MzScheme output):

> '(1 . < . 2 . < . 3)
stdin::12: read: illegal use of `.'

 === context ===
/usr/local/plt/collects/scheme/private/misc.ss:63:7

> #<procedure:<>
> stdin::16: read: illegal use of "."

 === context ===
/usr/local/plt/collects/scheme/private/misc.ss:63:7

> 3
> stdin::19: read: unexpected `)'

 === context ===
/usr/local/plt/collects/scheme/private/misc.ss:63:7


Is this supposed to happen?  Why doesn't it keep reading until the
matching close-paren before starting to eval again?

--dougorleans at gmail.com


Posted on the users mailing list.