Haskell Program Coverage
[ghc-hetmet.git] / compiler / cmm / CmmLex.x
index d1a64f6..fb1179f 100644 (file)
@@ -1,5 +1,6 @@
 -----------------------------------------------------------------------------
--- (c) The University of Glasgow, 2004
+--
+-- (c) The University of Glasgow, 2004-2006
 --
 -- Lexer for concrete Cmm.  We try to stay close to the C-- spec, but there
 -- are a few minor differences:
@@ -24,7 +25,7 @@ import UniqFM
 import StringBuffer
 import FastString
 import Ctype
-import Util            ( readRational )
+import Util
 --import TRACE
 }
 
@@ -276,7 +277,7 @@ lexToken = do
   sc <- getLexState
   case alexScan inp sc of
     AlexEOF -> do let span = mkSrcSpan loc1 loc1
-                 setLastToken span 0
+                 setLastToken span 0 0
                  return (L span CmmT_EOF)
     AlexError (loc2,_) -> do failLocMsgP loc1 loc2 "lexical error"
     AlexSkip inp2 _ -> do
@@ -285,7 +286,7 @@ lexToken = do
     AlexToken inp2@(end,buf2) len t -> do
        setInput inp2
        let span = mkSrcSpan loc1 end
-       span `seq` setLastToken span len
+       span `seq` setLastToken span len len
        t span buf len
 
 -- -----------------------------------------------------------------------------