regexp-match + REPL leads to confusing output

Sage Gerard <sage-nnKKxiom5Z1/[email protected]>
Newsgroups gmane.comp.lang.racket.user,gmane.lisp.scheme.plt
Message-ID <wSywBnnCjlkGYj8831CE3ZvQbuMZRAtB3UIz-4hl1yKQiCdQLFVJjm_KXX5qOm0CwHO9YC1Q0y_6wVS8BJu-YNXWFRKe1IwgCiA6v8LPN1s=@sagegerard.com>
I'd like to understand the reader better, and this seems relevant to it. In this REPL session I do not escape \S with a second \ in the first interaction. After I introduce the slash later, the REPL never really "recovers." Even a simple (displayln) stops producing output.

What's happening?

Welcome to Racket v7.4.

> (regexp-match #rx"typedef (\S+)" "typedef void ()")

; readline-input:1:14: read-syntax: unknown escape sequence `\S` in string [,bt

;   for context]

#<procedure:+>

; readline-input:1:30: read-syntax: unexpected `)` [,bt for context]

" "

; typedef: undefined;

;  cannot reference an identifier before its definition

;   in module: top-level

; [,bt for context]

#<procedure:void>

; readline-input:1:47: #%app: missing procedure expression;

;  probably originally (), which is an illegal empty application

;   in: (#%app)

; [,bt for context]

> (regexp-match #rx"typedef (\\S+)" "typedef void ()")

")\n(regexp-match #rx"

; typedef: undefined;

;  cannot reference an identifier before its definition

;   in module: top-level

; [,bt for context]

; |\S+|: undefined;

;  cannot reference an identifier before its definition

;   in module: top-level

; [,bt for context]

" "

~slg

-- 
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/wSywBnnCjlkGYj8831CE3ZvQbuMZRAtB3UIz-4hl1yKQiCdQLFVJjm_KXX5qOm0CwHO9YC1Q0y_6wVS8BJu-YNXWFRKe1IwgCiA6v8LPN1s%3D%40sagegerard.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.