X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=BNFC-alex3.patch;fp=BNFC-alex3.patch;h=63788bbc0f1f3e3d1a8ebe4eb832b4e366e9ad16;hb=2ca602d01f409755dcec517dd5ac464dbf35fe23;hp=99afd1bf5b5cfbebc107469060cea17ddcde17c9;hpb=046a7f65c757735b83bd346440e59c0c4b074dcc;p=packages%2FBNFC.git diff --git a/BNFC-alex3.patch b/BNFC-alex3.patch index 99afd1b..63788bb 100644 --- a/BNFC-alex3.patch +++ b/BNFC-alex3.patch @@ -1,6 +1,6 @@ diff -ur BNFC-2.4.2.0/formats/haskell2/CFtoAlex2.hs BNFC-2.4.2.0-alex3/formats/haskell2/CFtoAlex2.hs --- BNFC-2.4.2.0/formats/haskell2/CFtoAlex2.hs 2011-10-28 20:28:01.560188285 +0200 -+++ BNFC-2.4.2.0-alex3/formats/haskell2/CFtoAlex2.hs 2011-10-28 20:29:32.819832372 +0200 ++++ BNFC-2.4.2.0-alex3/formats/haskell2/CFtoAlex2.hs 2011-10-28 20:49:10.615238951 +0200 @@ -59,6 +59,7 @@ -- "import " ++ errMod, if shareStrings then "import " ++ shareMod else "", @@ -9,14 +9,20 @@ diff -ur BNFC-2.4.2.0/formats/haskell2/CFtoAlex2.hs BNFC-2.4.2.0-alex3/formats/h "}", "" ] -@@ -200,8 +201,8 @@ +@@ -200,13 +201,13 @@ " AlexSkip inp' len -> go inp'", " AlexToken inp' len act -> act pos ("++stringTake++" len str) : (go inp')", "", - "alexGetChar :: AlexInput -> Maybe (Char,AlexInput)", - "alexGetChar (p, _, s) =", -+ "alexGetByte :: AlexInput -> Maybe (Char,AlexInput)", ++ "alexGetByte :: AlexInput -> Maybe (Word8,AlexInput)", + "alexGetByte (p, _, s) =", " case "++stringUncons++" s of", " "++stringNilP++" -> Nothing", " "++stringConsP++" ->", + " let p' = alexMove p c", +- " in p' `seq` Just (c, (p', c, s))", ++ " in p' `seq` Just ((fromIntegral $ ord c), (p', c, s))", + "", + "alexInputPrevChar :: AlexInput -> Char", + "alexInputPrevChar (p, c, s) = c",