Changeset 25483 in project
- Timestamp:
- 11/08/11 08:06:35 (9 years ago)
- Location:
- release/4/honu
- Files:
-
- 6 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
release/4/honu/tags/2.0/honu.scm
r23116 r25483 85 85 (string->symbol 86 86 (read-token 87 (lambda (c) (or (char-alphabetic? c) (char-numeric? c) (char=? #\_ c))) 87 (lambda (c) 88 (or (char-alphabetic? c) (char-numeric? c) (char=? #\_ c))) 88 89 port) ) )) 89 90 ((opchar? c) (lnw (string->symbol (read-token opchar? port)))) 90 91 (else (err "invalid character" c)) ) ) ) ) ) ) 91 92 (define (read-num) 92 (string->number 93 (let ((e #f) 94 (d #f)) 95 (let loop ((lst '())) 96 (let ((c (peek-char port))) 97 (case c 98 ((#\e #\E) 99 (cond (e (reverse-list->string lst)) 100 (else 101 (set! e #t) 102 (read-char port) 103 (let ((c (peek-char port))) 104 (case c 105 ((#\+ #\-) (loop (cons (read-char port) (cons #\e lst)))) 106 (else 107 (if (char-numeric? c) 108 (loop (cons (read-char port) (cons #\e lst))) 109 (reverse-list->string lst)) ) ) ) ))) 110 ((#!eof) (reverse-list->string lst)) 111 ((#\.) 112 (cond (d (reverse-list->string lst)) 113 (else 114 (set! d #t) 115 (loop (cons (read-char port) lst))))) 116 (else 117 (if (char-numeric? c) 118 (loop (cons (read-char port) lst)) 119 (reverse-list->string lst) ) ) ) ) ) ) ) ) 93 (let ((base 10)) 94 (string->number 95 (let ((e #f) 96 (d #f)) 97 (let loop ((lst '()) (z? #f)) 98 (let ((c (peek-char port))) 99 (case c 100 ((#\0) 101 (when (null? lst) (set! base 8)) 102 (loop (cons (read-char port) lst) 103 (null? lst))) 104 ((#\x) 105 (cond (z? (set! base 16) 106 (read-char port) 107 (loop '() #f)) 108 (else (reverse-list->string lst)))) 109 ((#\e #\E) 110 (cond ((or e z?) (reverse-list->string lst)) 111 (else 112 (set! e #t) 113 (read-char port) 114 (let ((c (peek-char port))) 115 (case c 116 ((#\+ #\-) (loop (cons (read-char port) (cons #\e lst)) #f)) 117 (else 118 (if (char-numeric? c) 119 (loop (cons (read-char port) (cons #\e lst)) #f) 120 (reverse-list->string lst)) ) ) ) ))) 121 ((#!eof) (reverse-list->string lst)) 122 ((#\.) 123 (cond ((or d z?) (reverse-list->string lst)) 124 (else 125 (set! d #t) 126 (loop (cons (read-char port) lst) #f)))) 127 (else 128 (if (or (char-numeric? c) 129 (case base 130 ((16) (and (char-ci>=? c #\A) 131 (char-ci<=? c #\F))) 132 (else #f))) 133 (loop (cons (read-char port) lst) #f) 134 (reverse-list->string lst) ) ) ) ) ) ) 135 base))) 120 136 (define (read-escaped pred) 121 137 (##sys#read-from-string -
release/4/honu/tags/2.0/honu.setup
r23116 r25483 6 6 (install-extension 7 7 'honu '("honu.so" "honu.import.so") 8 '((version 1.9)))8 '((version 2.0))) -
release/4/honu/tags/2.0/tests/expected
r22280 r25483 107 107 |.| 108 108 write 109 (#%parens "Hal Applet Compiled by MLj 0.2 110 " |,| 0) 109 (#%parens "Hal Applet Compiled by MLj 0.2\n" |,| 0) 111 110 |;|) 112 111 public … … 145 144 |.| 146 145 write 147 (#%parens "**background computation stopped** 148 " |,| 0) 146 (#%parens "**background computation stopped**\n" |,| 0) 149 147 |;|) 150 148 Terminal … … 2384 2382 : 2385 2383 case 2386 0 2387 x7f 2384 127 2388 2385 : 2389 2386 if … … 2486 2483 |;| 2487 2484 write 2488 (#%parens "**interrupted** 2489 " |,| 0) 2485 (#%parens "**interrupted**\n" |,| 0) 2490 2486 |;| 2491 2487 computeThread -
release/4/honu/trunk/honu.scm
r23116 r25483 85 85 (string->symbol 86 86 (read-token 87 (lambda (c) (or (char-alphabetic? c) (char-numeric? c) (char=? #\_ c))) 87 (lambda (c) 88 (or (char-alphabetic? c) (char-numeric? c) (char=? #\_ c))) 88 89 port) ) )) 89 90 ((opchar? c) (lnw (string->symbol (read-token opchar? port)))) 90 91 (else (err "invalid character" c)) ) ) ) ) ) ) 91 92 (define (read-num) 92 (string->number 93 (let ((e #f) 94 (d #f)) 95 (let loop ((lst '())) 96 (let ((c (peek-char port))) 97 (case c 98 ((#\e #\E) 99 (cond (e (reverse-list->string lst)) 100 (else 101 (set! e #t) 102 (read-char port) 103 (let ((c (peek-char port))) 104 (case c 105 ((#\+ #\-) (loop (cons (read-char port) (cons #\e lst)))) 106 (else 107 (if (char-numeric? c) 108 (loop (cons (read-char port) (cons #\e lst))) 109 (reverse-list->string lst)) ) ) ) ))) 110 ((#!eof) (reverse-list->string lst)) 111 ((#\.) 112 (cond (d (reverse-list->string lst)) 113 (else 114 (set! d #t) 115 (loop (cons (read-char port) lst))))) 116 (else 117 (if (char-numeric? c) 118 (loop (cons (read-char port) lst)) 119 (reverse-list->string lst) ) ) ) ) ) ) ) ) 93 (let ((base 10)) 94 (string->number 95 (let ((e #f) 96 (d #f)) 97 (let loop ((lst '()) (z? #f)) 98 (let ((c (peek-char port))) 99 (case c 100 ((#\0) 101 (when (null? lst) (set! base 8)) 102 (loop (cons (read-char port) lst) 103 (null? lst))) 104 ((#\x) 105 (cond (z? (set! base 16) 106 (read-char port) 107 (loop '() #f)) 108 (else (reverse-list->string lst)))) 109 ((#\e #\E) 110 (cond ((or e z?) (reverse-list->string lst)) 111 (else 112 (set! e #t) 113 (read-char port) 114 (let ((c (peek-char port))) 115 (case c 116 ((#\+ #\-) (loop (cons (read-char port) (cons #\e lst)) #f)) 117 (else 118 (if (char-numeric? c) 119 (loop (cons (read-char port) (cons #\e lst)) #f) 120 (reverse-list->string lst)) ) ) ) ))) 121 ((#!eof) (reverse-list->string lst)) 122 ((#\.) 123 (cond ((or d z?) (reverse-list->string lst)) 124 (else 125 (set! d #t) 126 (loop (cons (read-char port) lst) #f)))) 127 (else 128 (if (or (char-numeric? c) 129 (case base 130 ((16) (and (char-ci>=? c #\A) 131 (char-ci<=? c #\F))) 132 (else #f))) 133 (loop (cons (read-char port) lst) #f) 134 (reverse-list->string lst) ) ) ) ) ) ) 135 base))) 120 136 (define (read-escaped pred) 121 137 (##sys#read-from-string -
release/4/honu/trunk/honu.setup
r23116 r25483 6 6 (install-extension 7 7 'honu '("honu.so" "honu.import.so") 8 '((version 1.9)))8 '((version 2.0))) -
release/4/honu/trunk/tests/expected
r22280 r25483 107 107 |.| 108 108 write 109 (#%parens "Hal Applet Compiled by MLj 0.2 110 " |,| 0) 109 (#%parens "Hal Applet Compiled by MLj 0.2\n" |,| 0) 111 110 |;|) 112 111 public … … 145 144 |.| 146 145 write 147 (#%parens "**background computation stopped** 148 " |,| 0) 146 (#%parens "**background computation stopped**\n" |,| 0) 149 147 |;|) 150 148 Terminal … … 2384 2382 : 2385 2383 case 2386 0 2387 x7f 2384 127 2388 2385 : 2389 2386 if … … 2486 2483 |;| 2487 2484 write 2488 (#%parens "**interrupted** 2489 " |,| 0) 2485 (#%parens "**interrupted**\n" |,| 0) 2490 2486 |;| 2491 2487 computeThread
Note: See TracChangeset
for help on using the changeset viewer.