From eae93331c3cc213a4471b1ac5c525c0b36219544 Mon Sep 17 00:00:00 2001 From: sjakie Date: Tue, 29 Aug 2000 15:07:54 +0000 Subject: 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 --- frontend/scanner.icl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'frontend/scanner.icl') 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) -- cgit v1.2.3