From: simonmar Date: Mon, 13 Mar 2000 11:32:20 +0000 (+0000) Subject: [project @ 2000-03-13 11:32:20 by simonmar] X-Git-Tag: Approximately_9120_patches~5007 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8b90646791f16015f067e4654a069f64d8aeacb4;p=ghc-hetmet.git [project @ 2000-03-13 11:32:20 by simonmar] Disable the stuff that was supposed to lex octal & hexadecimal literals, but which didn't work. The code in the Haskell report doesn't attempt to lex these either. --- diff --git a/ghc/lib/std/PrelRead.lhs b/ghc/lib/std/PrelRead.lhs index ad3fe81..c096e80 100644 --- a/ghc/lib/std/PrelRead.lhs +++ b/ghc/lib/std/PrelRead.lhs @@ -175,6 +175,8 @@ lex (c:s) | isSingle c = return ([c],s) (nam,t) <- return (span isIdChar s) return (c:nam, t) | isDigit c = do +{- Removed, 13/03/2000 by SDM. + Doesn't work, and not required by Haskell report. let (pred, s', isDec) = case s of @@ -183,9 +185,9 @@ lex (c:s) | isSingle c = return ([c],s) ('x':rs) -> (isHexDigit, rs, False) ('X':rs) -> (isHexDigit, rs, False) _ -> (isDigit, s, True) - - (ds,s) <- return (span pred s') - (fe,t) <- lexFracExp isDec s +-} + (ds,s) <- return (span isDigit s) + (fe,t) <- lexFracExp s return (c:ds++fe,t) | otherwise = mzero -- bad character where @@ -193,11 +195,11 @@ lex (c:s) | isSingle c = return ([c],s) isSym c = c `elem` "!@#$%&*+./<=>?\\^|:-~" isIdChar c = isAlphaNum c || c `elem` "_'" - lexFracExp True ('.':cs) = do + lexFracExp ('.':c:cs) | isDigit c = do (ds,t) <- lex0Digits cs (e,u) <- lexExp t - return ('.':ds++e,u) - lexFracExp _ s = return ("",s) + return ('.':c:ds++e,u) + lexFracExp s = return ("",s) lexExp (e:s) | e `elem` "eE" = (do