The Lambda Lab
/
projects
/
scheme.forth.jl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed broken realnum? procedure.
[scheme.forth.jl.git]
/
scheme.4th
diff --git
a/scheme.4th
b/scheme.4th
index
bac3283
..
46c2969
100644
(file)
--- a/
scheme.4th
+++ b/
scheme.4th
@@
-513,16
+513,16
@@
parse-idx-stack parse-idx-sp !
;
: realnum? ( -- bool )
;
: realnum? ( -- bool )
- \ Record starting parse idx:
- \ Want to detect whether any characters were eaten.
- parse-idx @
-
push-parse-idx
minus? plus? or if
inc-parse-idx
then
push-parse-idx
minus? plus? or if
inc-parse-idx
then
+ \ Record starting parse idx:
+ \ Want to detect whether any characters (following +/-) were eaten.
+ parse-idx @
+
begin digit? while
inc-parse-idx
repeat
begin digit? while
inc-parse-idx
repeat
@@
-541,6
+541,10
@@
parse-idx-stack parse-idx-sp !
inc-parse-idx
then
inc-parse-idx
then
+ digit? invert if
+ drop pop-parse-idx false exit
+ then
+
begin digit? while
inc-parse-idx
repeat
begin digit? while
inc-parse-idx
repeat