diff options
author | sjakie | 2000-08-29 15:07:54 +0000 |
---|---|---|
committer | sjakie | 2000-08-29 15:07:54 +0000 |
commit | eae93331c3cc213a4471b1ac5c525c0b36219544 (patch) | |
tree | 4b895278608ce6b69a23742cc546dbe81435b9ea /frontend/scanner.icl | |
parent | no message (diff) |
adjusted treatment of lazy and strict array functions
bugfix in scanner: reals were not treated correctly
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@209 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/scanner.icl')
-rw-r--r-- | frontend/scanner.icl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/frontend/scanner.icl b/frontend/scanner.icl index 6c01d52..d0f3fe7 100644 --- a/frontend/scanner.icl +++ b/frontend/scanner.icl @@ -910,13 +910,14 @@ TestFraction n input chars | IsDigit c = ScanFraction (n + 2) input [c,'.':chars] = (IntToken (revCharListToString n chars), charBack (charBack input)) + ScanFraction :: !Int !Input ![Char] -> (!Token, !Input) ScanFraction n input chars # (eof, c, input) = ReadNormalChar input | eof = (RealToken (revCharListToString n chars), input) | c == 'E' = case chars of - [c:_] | IsDigit c -> ScanExponentSign (n + 1) input [c:chars] - _ -> ScanExponentSign (n + 2) input [c,'0':chars] + [c:_] | IsDigit c -> ScanExponentSign (n + 1) input ['E':chars] /* Sjaak, was [c:chars] */ + _ -> ScanExponentSign (n + 2) input ['E','0':chars] /* Sjaak, idem */ | IsDigit c = ScanFraction (n + 1) input [c:chars] = case chars of [c:_] | IsDigit c -> (RealToken (revCharListToString n chars), charBack input) |