diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/pf2sex.boot | 7 | ||||
-rw-r--r-- | src/interp/scan.boot | 12 |
2 files changed, 17 insertions, 2 deletions
diff --git a/src/interp/pf2sex.boot b/src/interp/pf2sex.boot index 56539978..c675054e 100644 --- a/src/interp/pf2sex.boot +++ b/src/interp/pf2sex.boot @@ -181,7 +181,12 @@ pf2Sex1 pf == pfLiteral2Sex pf == type := pfLiteralClass pf type = 'integer => - READ_-FROM_-STRING pfLiteralString pf + txt := pfLiteralString pf + MULTIPLE_-VALUE_-BIND(part1 pos1, + PARSE_-INTEGER(txt,KEYWORD::JUNK_-ALLOWED,true), + if pos1 = #txt then part1 + else PARSE_-INTEGER(SUBSTRING(txt,pos1+1,nil), + KEYWORD::RADIX, part1)) type = 'string or type = 'char => pfLiteralString pf type = 'float => diff --git a/src/interp/scan.boot b/src/interp/scan.boot index 557be8f8..674fe05e 100644 --- a/src/interp/scan.boot +++ b/src/interp/scan.boot @@ -38,6 +38,14 @@ import incl namespace BOOT module scan +--% + +$RDigits == + '"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + +$smallLetters == + '"abcdefghijklmnopqrstuvwxyz" + --% Separators $SPACE == QENUM('" ", 0) @@ -665,7 +673,9 @@ scanExponent(a,w)== else lffloat(a,w,'"0") rdigit? x== - STRPOS(x,'"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",0,nil) + d := STRPOS(x,$RDigits,0,nil) => d + d := STRPOS(x,$smallLetters,0,nil) => 10 + d + nil scanError()== n:=$n |