fix R6RS parsing ofr numbers that start with two # things, like #i#xe/f

svn: r10822
This commit is contained in:
Matthew Flatt 2008-07-17 17:38:06 +00:00
parent ac12b79bb9
commit a14a6d7272
2 changed files with 4 additions and 2 deletions

View File

@ -447,7 +447,7 @@
(bytes->string/utf-8
(car (or (if (string=? prefix "\\")
(regexp-match #px"^x[0-9a-fA-F]+;(?:\\\\x[0-9a-fA-F]+;|[^\\\\\\s\\[\\]()#\";,'`])*" port)
(regexp-match #px"^(?:\\\\x[0-9a-fA-F]+;|[^\\\\\\s\\[\\]()#\";,'`])*" port))
(regexp-match #px"^(?:#[xXdDbBoOeEiI])*(?:\\\\x[0-9a-fA-F]+;|[^\\\\\\s\\[\\]()#\";,'`])*" port))
'(#"")))))])
(cond
[(regexp-match? #rx"^[a-zA-Z!$%&*/:<=>?^_~][a-zA-Z0-9+!$%&*/:<=>?^_~.@-]*$" thing)

View File

@ -71,7 +71,9 @@
"#O+23761236721631263126371263712"
"#O+0"
"#O-0"
"#O0")
"#O0"
"#i#xf/e"
"#x#if/e")
(test (read (open-string-input-port "#\\nul"))
(integer->char #x0))