]> git.pld-linux.org Git - packages/BNFC.git/commitdiff
- alexGetChar is renamed to alexGetByte in the generated code
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 28 Oct 2011 18:30:16 +0000 (18:30 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  See http://www.haskell.org/alex/doc/html/about.html#relnotes-30

Changed files:
    BNFC-alex3.patch -> 1.2

BNFC-alex3.patch

index d1c67dbb29f21356a5b8c6d743d2e827e30219bb..99afd1bf5b5cfbebc107469060cea17ddcde17c9 100644 (file)
@@ -1,13 +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:22:20.884850258 +0200
-+++ BNFC-2.4.2.0-alex3/formats/haskell2/CFtoAlex2.hs   2011-10-28 20:18:30.612414990 +0200
-@@ -1,5 +1,5 @@
- {-
--    BNF Converter: Alex 2.0 Generator
-+    BNF Converter: Alex 3.0 Generator
-     Copyright (C) 2004  Author:  Peter Gammie
-     This program is free software; you can redistribute it and/or modify
+--- 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
 @@ -59,6 +59,7 @@
    -- "import " ++ errMod,
    if shareStrings then "import " ++ shareMod else "",
@@ -16,14 +9,14 @@ diff -ur BNFC-2.4.2.0/formats/haskell2/CFtoAlex2.hs BNFC-2.4.2.0-alex3/formats/h
    "}",
    ""
    ]
-@@ -210,6 +211,10 @@
+@@ -200,8 +201,8 @@
+   "                AlexSkip  inp' len     -> go inp'",
+   "                AlexToken inp' len act -> act pos ("++stringTake++" len str) : (go inp')",
    "",
-   "alexInputPrevChar :: AlexInput -> Char",
-   "alexInputPrevChar (p, c, s) = c",
-+  "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))",
-   "}"
-   ]
-  where
+-  "alexGetChar :: AlexInput -> Maybe (Char,AlexInput)",
+-  "alexGetChar (p, _, s) =",
++  "alexGetByte :: AlexInput -> Maybe (Char,AlexInput)",
++  "alexGetByte (p, _, s) =",
+   "  case "++stringUncons++" s of",
+   "    "++stringNilP++"  -> Nothing",
+   "    "++stringConsP++" ->",
This page took 0.104212 seconds and 4 git commands to generate.