[project @ 1999-01-15 10:21:43 by sof]
authorsof <unknown>
Fri, 15 Jan 1999 10:21:43 +0000 (10:21 +0000)
committersof <unknown>
Fri, 15 Jan 1999 10:21:43 +0000 (10:21 +0000)
lexLitChar: '\DEL' wasn't being lexed properly

ghc/lib/std/PrelRead.lhs

index a4e394b..1ef7b43 100644 (file)
@@ -246,11 +246,13 @@ lexLitChar ('\\':s)     =  do
         lexEsc _                                   = mzero
 
         fromAsciiLab (x:y:z:ls) | isUpper y && (isUpper z || isDigit z) &&
-                                  [x,y,z] `elem` asciiTab = return ([x,y,z], ls)
+                                  [x,y,z] `elem` asciiEscTab = return ([x,y,z], ls)
         fromAsciiLab (x:y:ls)   | isUpper y &&
-                                  [x,y]   `elem` asciiTab = return ([x,y], ls)
-        fromAsciiLab _                                    = mzero
+                                  [x,y]   `elem` asciiEscTab = return ([x,y], ls)
+        fromAsciiLab _                                       = mzero
                                   
+        asciiEscTab = "DEL" : asciiTab
+
 
 lexLitChar (c:s)        =  return ([c],s)
 lexLitChar ""           =  mzero