1 diff -ur BNFC-2.4.2.0/formats/haskell2/CFtoAlex2.hs BNFC-2.4.2.0-alex3/formats/haskell2/CFtoAlex2.hs
2 --- BNFC-2.4.2.0/formats/haskell2/CFtoAlex2.hs 2011-10-29 00:19:00.596837566 +0200
3 +++ BNFC-2.4.2.0-alex3/formats/haskell2/CFtoAlex2.hs 2011-10-29 00:20:26.259836814 +0200
5 -- "import " ++ errMod,
6 if shareStrings then "import " ++ shareMod else "",
7 if byteStrings then "import qualified Data.ByteString.Char8 as BS" else "",
8 + "import Data.Word (Word8)",
13 " let p' = alexMove p c",
14 " in p' `seq` Just (c, (p', c, s))",
16 + "alexGetByte :: AlexInput -> Maybe (Word8,AlexInput)",
17 + "alexGetByte (p, _, s) =",
18 + " case "++stringUncons++" s of",
19 + " "++stringNilP++" -> Nothing",
20 + " "++stringConsP++" ->",
21 + " let p' = alexMove p c",
22 + " in p' `seq` Just ((fromIntegral $ ord c), (p', c, s))",
24 "alexInputPrevChar :: AlexInput -> Char",
25 "alexInputPrevChar (p, c, s) = c",