This seems to do the trick --- a/c2hs/c/CLexer.x +++ b/c2hs/c/CLexer.x @@ -78,6 +78,8 @@ import CTokens import CParserMonad +import Data.Word (Word8) + } $space = [ \ \t ] -- horizontal white space @@ -390,6 +392,12 @@ alexInputPrevChar :: AlexInput -> Char alexInputPrevChar _ = error "alexInputPrevChar not used" +-- for alex 3 +alexGetByte :: AlexInput -> Maybe (Word8, AlexInput) +alexGetByte (p,[]) = Nothing +alexGetByte (p, (c:s)) = let p' = alexMove p c in p' `seq` + Just ((fromIntegral $ ord c), (p', s)) + alexGetChar :: AlexInput -> Maybe (Char,AlexInput) alexGetChar (p,[]) = Nothing alexGetChar (p,(c:s)) = let p' = alexMove p c in p' `seq`
-- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

