summaryrefslogtreecommitdiff
path: root/MLKReader.m
diff options
context:
space:
mode:
Diffstat (limited to 'MLKReader.m')
-rw-r--r--MLKReader.m34
1 files changed, 19 insertions, 15 deletions
diff --git a/MLKReader.m b/MLKReader.m
index 28ac141..86fc60c 100644
--- a/MLKReader.m
+++ b/MLKReader.m
@@ -29,6 +29,7 @@
#import "MLKInteger.h"
#import "MLKRatio.h"
#import "MLKStringInputStream.h"
+#import "functions.h"
#import "runtime-compatibility.h"
#import "util.h"
@@ -306,11 +307,12 @@ readingUninternedSymbol:(BOOL)readingUninternedSymbol
if (i == [token length])
{
//NSLog (@"...");
- return [MLKInteger integerWithString:
- [token substringWithRange:
- NSMakeRange (firstNum, [token length] - firstNum)]
- negative:negative
- base:10];
+ return MLKCanoniseInteger ([MLKInteger integerWithString:
+ [token substringWithRange:
+ NSMakeRange (firstNum,
+ [token length] - firstNum)]
+ negative:negative
+ base:10]);
}
firstSeparator = [token characterAtIndex:i];
@@ -325,11 +327,12 @@ readingUninternedSymbol:(BOOL)readingUninternedSymbol
if (i == [token length] && [readtable isDecimalPoint:firstSeparator])
{
//NSLog (@"+++");
- return [MLKInteger integerWithString:
- [token substringWithRange:
- NSMakeRange (firstNum, [token length] - firstNum - 1)]
- negative:negative
- base:10];
+ return MLKCanoniseInteger ([MLKInteger integerWithString:
+ [token substringWithRange:
+ NSMakeRange (firstNum,
+ [token length] - firstNum - 1)]
+ negative:negative
+ base:10]);
}
else
{
@@ -425,11 +428,12 @@ readingUninternedSymbol:(BOOL)readingUninternedSymbol
if (i == [token length])
{
//NSLog (@"###");
- return [MLKInteger integerWithString:
- [token substringWithRange:
- NSMakeRange (firstNum, [token length] - firstNum)]
- negative:negative
- base:base];
+ return MLKCanoniseInteger ([MLKInteger integerWithString:
+ [token substringWithRange:
+ NSMakeRange (firstNum,
+ [token length] - firstNum)]
+ negative:negative
+ base:base]);
}
// Assume token[i] is a slash.