[Larceny-users] Char - Printed Representation

Jed Davis jdev at panix.com
Wed Oct 17 23:15:51 EDT 2007


On Wed, Oct 17, 2007 at 05:06:35PM -0400, Felix wrote:
>
>  > (display '.a)
> 
> 
> Error: get-datum: Lexical Error: Illegal symbol syntax: .a)  #<INPUT  
> PORT *console-input*>
> Entering debugger; type "?" for help.
> debug>
> Error: get-datum: Syntax error while parsing a <outermost-datum>
>    Encountered rparen while expecting something in
>     backquote boolean bvecstart character comma eofobj id lbracket  
> lparen miscflag number quasisyntax quote splicing string syntax  
> unsyntax unsyntaxsplicing vecstart xbox xfaslb xfaslc xfaslf xfaslg  
> xfaslp xsharpdot xstring #<INPUT PORT *console-input*>
> Computation is not continuable.
> debug> q
> 
>  > '.a ; previous response is b/c of two exceptions from the reader.   
> More details on request.

Not that hard: because the reader chokes on the '.a, leaving the ) and
newline on the input stream to confuse the debugger prompt.

Less comprehensible is this, which I discovered the other night:

  > #o9 3


  Error: get-datum: Syntax error while parsing a <number>
    Encountered number while expecting something in
     number #<INPUT PORT *console-input*>
  Entering debugger; type "?" for help.

That is, the reader desires to complain about the invalid number, so it
reads the *next* token and says that that's not a number.  (Try also:
"#o9 asdf".)  Even after trying to read the reader I'm not sure why
that is; or perhaps what I don't know is why other error messages are
correct.

-- 
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l))))))  (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k)))))))    '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))



More information about the Larceny-users mailing list