Re: playing with invalid chars / reader errors and the repl

Shiro Kawai <[email protected]> Thu, 7 Nov 2024 11:18:56 -1000
Newsgroups gmane.lisp.scheme.gauche
Message-ID <CALN0JNHNfrHaqtPRSe9Yo49+1ROhwVKXgrtbw415jp470XKn4w@mail.gmail.com>
Thanks. Check this out.
https://github.com/shirok/Gauche/issues/1078


On Wed, Nov 6, 2024 at 11:10 PM Jens Thiele <[email protected]> wrote:

> Hi,
>
> something is strange with the handling of invalid chars in the repl.
>
> Example session:
>
> This part works as expected:
> ,----
> | gosh$ (gauche-version)
> | "0.9.15"
> | gosh$ "aabb"1"dd"
> | "aabb"
> | 1
> | "dd"
> `----
>
> This is strange:
> ,----
> | gosh$ "aa\Uffffffffbb"1"dd"
> | *** ERROR: bad character code: -1
> | Stack Trace:
> | _______________________________________
> |   0  (report-error e)
> |   1  (reader buffer)
> |         at
> "/usr/local/share/gauche-0.98/0.9.15/lib/gauche/interactive/editable-reader.scm":69
> |   2  (read)
> |         at
> "/usr/local/share/gauche-0.98/0.9.15/lib/gauche/interactive.scm":303
> |   3  (reader)
> |   4  (with-error-handler (^e (report-error e) #t) (^ () (let loop2 ...
> | "1"
> | *** UNBOUND-VARIABLE-ERROR: unbound variable: dd
> | Stack Trace:
> | _______________________________________
> |   0  (report-error e)
> |   1  (eval expr env)
> |         at
> "/usr/local/share/gauche-0.98/0.9.15/lib/gauche/interactive.scm":359
> |   2  (evaluator exp (vm-current-module))
> |   3  (with-error-handler (^e (report-error e) #t) (^ () (let loop2 ...
> | *** READ-ERROR: Read error at "(input string port)":line 2: EOF
> encountered in a string literal: "\n"
> | Stack Trace:
> | _______________________________________
> |   0  (report-error e)
> |   1  (reader buffer)
> |         at
> "/usr/local/share/gauche-0.98/0.9.15/lib/gauche/interactive/editable-reader.scm":69
> |   2  (read)
> |         at
> "/usr/local/share/gauche-0.98/0.9.15/lib/gauche/interactive.scm":303
> |   3  (reader)
> |   4  (with-error-handler (^e (report-error e) #t) (^ () (let loop2 ...
> `----
>
> greetings
> jens
>
>
> _______________________________________________
> Gauche-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gauche-devel
>

_______________________________________________
Gauche-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gauche-devel