]> git.pld-linux.org Git - packages/BNFC.git/blob - BNFC-alex3.patch
- alexGetChar is renamed to alexGetByte in the generated code
[packages/BNFC.git] / BNFC-alex3.patch
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-28 20:28:01.560188285 +0200
3 +++ BNFC-2.4.2.0-alex3/formats/haskell2/CFtoAlex2.hs    2011-10-28 20:29:32.819832372 +0200
4 @@ -59,6 +59,7 @@
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)",
9    "}",
10    ""
11    ]
12 @@ -200,8 +201,8 @@
13    "                AlexSkip  inp' len     -> go inp'",
14    "                AlexToken inp' len act -> act pos ("++stringTake++" len str) : (go inp')",
15    "",
16 -  "alexGetChar :: AlexInput -> Maybe (Char,AlexInput)",
17 -  "alexGetChar (p, _, s) =",
18 +  "alexGetByte :: AlexInput -> Maybe (Char,AlexInput)",
19 +  "alexGetByte (p, _, s) =",
20    "  case "++stringUncons++" s of",
21    "    "++stringNilP++"  -> Nothing",
22    "    "++stringConsP++" ->",
This page took 0.067547 seconds and 4 git commands to generate.