[project @ 2006-01-06 16:30:17 by simonmar]
[ghc-hetmet.git] / ghc / compiler / cmm / CmmLex.x
index e1be71a..c2efd17 100644 (file)
@@ -61,6 +61,7 @@ $namechar  = [$namebegin $digit]
 cmm :-
 
 $white_no_nl+          ;
+^\# pragma .* \n        ; -- Apple GCC 3.3 CPP generates pragmas in its output
 
 ^\# (line)?            { begin line_prag }
 
@@ -97,6 +98,7 @@ $white_no_nl+         ;
   CurrentTSO           { global_reg CurrentTSO }
   CurrentNursery       { global_reg CurrentNursery }
   HpAlloc              { global_reg HpAlloc }
+  BaseReg              { global_reg BaseReg }
   
   $namebegin $namechar*        { name }
   
@@ -225,10 +227,10 @@ tok_decimal span buf len
   = return (L span (CmmT_Int  $! parseInteger buf len 10 octDecDigit))
 
 tok_octal span buf len 
-  = return (L span (CmmT_Int  $! parseInteger (stepOn buf) (len-1) 8 octDecDigit))
+  = return (L span (CmmT_Int  $! parseInteger (offsetBytes 1 buf) (len-1) 8 octDecDigit))
 
 tok_hexadecimal span buf len 
-  = return (L span (CmmT_Int  $! parseInteger (stepOnBy 2 buf) (len-2) 16 hexDigit))
+  = return (L span (CmmT_Int  $! parseInteger (offsetBytes 2 buf) (len-2) 16 hexDigit))
 
 tok_float str = CmmT_Float $! readRational str