--- a/Scanner.st Thu Jul 18 10:35:03 1996 +0200
+++ b/Scanner.st Fri Jul 19 12:26:00 1996 +0200
@@ -840,52 +840,57 @@
value := Integer readFrom:source radix:tokenRadix.
nextChar := source peek.
(nextChar == $r) ifTrue:[
- tokenRadix := value.
- source next.
- s := 1.
- source peek == $- ifTrue:[
- source next.
- s := -1
- ].
- value := Integer readFrom:source radix:tokenRadix.
- value := value * s.
- nextChar := source peek
+ tokenRadix := value.
+ source next.
+ s := 1.
+ source peek == $- ifTrue:[
+ source next.
+ s := -1
+ ].
+ value := Integer readFrom:source radix:tokenRadix.
+ value := value * s.
+ nextChar := source peek
].
(nextChar == $.) ifTrue:[
- nextChar := source nextPeek.
- (nextChar notNil and:[nextChar isDigitRadix:tokenRadix]) ifTrue:[
- value := value asFloat + (self nextMantissa:tokenRadix).
- nextChar := source peek
- ] ifFalse:[
- nextChar == (Character cr) ifTrue:[
- tokenLineNr := tokenLineNr + 1.
- ].
- peekChar := $.
- ]
+ nextChar := source nextPeek.
+ (nextChar notNil and:[nextChar isDigitRadix:tokenRadix]) ifTrue:[
+ value := value asFloat + (self nextMantissa:tokenRadix).
+ nextChar := source peek
+ ] ifFalse:[
+ nextChar == (Character cr) ifTrue:[
+ tokenLineNr := tokenLineNr + 1.
+ ].
+ peekChar := $.
+ ]
].
((nextChar == $e) or:[nextChar == $E]) ifTrue:[
- nextChar := source nextPeek.
- (nextChar notNil and:[(nextChar isDigitRadix:tokenRadix) or:['+-' includes:nextChar]]) ifTrue:[
- s := 1.
- (nextChar == $+) ifTrue:[
- nextChar := source nextPeek
- ] ifFalse:[
- (nextChar == $-) ifTrue:[
- nextChar := source nextPeek.
- s := s negated
- ]
- ].
- value := value asFloat
- * (10.0 raisedToInteger:((Integer readFrom:source radix:tokenRadix) * s))
- ]
+ nextChar := source nextPeek.
+ (nextChar notNil and:[(nextChar isDigitRadix:tokenRadix) or:['+-' includes:nextChar]]) ifTrue:[
+ s := 1.
+ (nextChar == $+) ifTrue:[
+ nextChar := source nextPeek
+ ] ifFalse:[
+ (nextChar == $-) ifTrue:[
+ nextChar := source nextPeek.
+ s := s negated
+ ]
+ ].
+ value := value asFloat
+ * (10.0 raisedToInteger:((Integer readFrom:source radix:tokenRadix) * s))
+ ]
].
tokenValue := value.
(value isMemberOf:Float) ifTrue:[
- tokenType := #Float
+ (nextChar == $d) ifTrue:[
+ source next
+ ].
+ tokenType := #Float
] ifFalse:[
- tokenType := #Integer
+ tokenType := #Integer
].
^ tokenType
+
+ "Modified: 19.7.1996 / 12:23:38 / cg"
!
nextPrimitive
@@ -1187,6 +1192,6 @@
!Scanner class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.48 1996-07-18 08:33:49 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.49 1996-07-19 10:26:00 cg Exp $'
! !
Scanner initialize!