1 diff -ur BNFC-2.4.2.0/BNFC.cabal BNFC-2.4.2.0-ghc-7.2/BNFC.cabal
2 --- BNFC-2.4.2.0/BNFC.cabal 2010-09-15 16:26:38.000000000 +0200
3 +++ BNFC-2.4.2.0-ghc-7.2/BNFC.cabal 2011-10-28 14:30:05.093264132 +0200
5 Extra-source-files: BNF.cf
8 - Build-Depends: haskell98, base>=4 && <5, mtl, directory, array, process
9 + Build-Depends: base>=4 && <5, mtl, directory, array, process
11 HS-source-dirs: . formats
13 diff -ur BNFC-2.4.2.0/CF.hs BNFC-2.4.2.0-ghc-7.2/CF.hs
14 --- BNFC-2.4.2.0/CF.hs 2010-09-15 16:26:38.000000000 +0200
15 +++ BNFC-2.4.2.0-ghc-7.2/CF.hs 2011-10-28 14:34:50.556610344 +0200
19 import Utils (prParenth,(+++))
20 -import List (nub, intersperse, partition, sort,sort,group)
22 +import Data.List (nub, intersperse, partition, sort,sort,group)
26 -- A context free grammar consists of a set of rules and some extended
27 diff -ur BNFC-2.4.2.0/GetCF.hs BNFC-2.4.2.0-ghc-7.2/GetCF.hs
28 --- BNFC-2.4.2.0/GetCF.hs 2010-09-15 16:26:38.000000000 +0200
29 +++ BNFC-2.4.2.0-ghc-7.2/GetCF.hs 2011-10-28 14:39:40.099956741 +0200
34 -import Directory ( doesFileExist, renameFile )
35 -import Monad ( when )
36 +import System.Directory ( doesFileExist, renameFile )
37 +import Control.Monad ( when )
42 -import List(nub,partition)
43 +import Data.List(nub,partition)
44 import qualified AbsBNF as Abs
51 readCF :: FilePath -> IO CF
52 diff -ur BNFC-2.4.2.0/Main.hs BNFC-2.4.2.0-ghc-7.2/Main.hs
53 --- BNFC-2.4.2.0/Main.hs 2010-09-15 16:26:38.000000000 +0200
54 +++ BNFC-2.4.2.0-ghc-7.2/Main.hs 2011-10-28 15:02:46.772214302 +0200
57 import MultiView (preprocessMCF, mkTestMulti, mkMakefileMulti)
60 +import System.Process
61 +import System.Environment
65 import Data.List (elemIndex)
68 diff -ur BNFC-2.4.2.0/MultiView.hs BNFC-2.4.2.0-ghc-7.2/MultiView.hs
69 --- BNFC-2.4.2.0/MultiView.hs 2010-09-15 16:26:38.000000000 +0200
70 +++ BNFC-2.4.2.0-ghc-7.2/MultiView.hs 2011-10-28 14:38:04.706619104 +0200
73 module MultiView where
75 -import Directory ( doesFileExist, renameFile )
76 +import System.Directory ( doesFileExist, renameFile )
78 import qualified CF as CF
82 -import List(nub,partition)
83 +import Data.List(nub,partition)
91 preprocessMCF :: FilePath -> IO ([FilePath],String)
92 diff -ur BNFC-2.4.2.0/ParBNF.hs BNFC-2.4.2.0-ghc-7.2/ParBNF.hs
93 --- BNFC-2.4.2.0/ParBNF.hs 2010-09-15 16:26:38.000000000 +0200
94 +++ BNFC-2.4.2.0-ghc-7.2/ParBNF.hs 2011-10-28 14:35:43.716612743 +0200
101 #if __GLASGOW_HASKELL__ >= 503
104 diff -ur BNFC-2.4.2.0/PrintBNF.hs BNFC-2.4.2.0-ghc-7.2/PrintBNF.hs
105 --- BNFC-2.4.2.0/PrintBNF.hs 2010-09-15 16:26:38.000000000 +0200
106 +++ BNFC-2.4.2.0-ghc-7.2/PrintBNF.hs 2011-10-28 14:35:28.079945370 +0200
108 -- pretty-printer generated by the BNF converter
114 -- the top-level printing method
115 printTree :: Print a => a -> String
116 diff -ur BNFC-2.4.2.0/formats/CFtoLatex.hs BNFC-2.4.2.0-ghc-7.2/formats/CFtoLatex.hs
117 --- BNFC-2.4.2.0/formats/CFtoLatex.hs 2010-09-15 16:26:38.000000000 +0200
118 +++ BNFC-2.4.2.0-ghc-7.2/formats/CFtoLatex.hs 2011-10-28 14:42:26.973297602 +0200
121 import AbsBNF (Reg (..))
123 -import List (nub,intersperse)
124 +import Data.List (nub,intersperse)
126 cfToLatex :: String -> CF -> String
127 cfToLatex name cf = unlines [
128 diff -ur BNFC-2.4.2.0/formats/CFtoTxt.hs BNFC-2.4.2.0-ghc-7.2/formats/CFtoTxt.hs
129 --- BNFC-2.4.2.0/formats/CFtoTxt.hs 2010-09-15 16:26:38.000000000 +0200
130 +++ BNFC-2.4.2.0-ghc-7.2/formats/CFtoTxt.hs 2011-10-28 14:42:32.619964525 +0200
133 import AbsBNF (Reg (..))
135 -import List (nub,intersperse)
136 +import Data.List (nub,intersperse)
138 cfToTxt :: String -> CF -> String
139 cfToTxt name cf = unlines [
140 diff -ur BNFC-2.4.2.0/formats/NamedVariables.hs BNFC-2.4.2.0-ghc-7.2/formats/NamedVariables.hs
141 --- BNFC-2.4.2.0/formats/NamedVariables.hs 2010-09-15 16:26:38.000000000 +0200
142 +++ BNFC-2.4.2.0-ghc-7.2/formats/NamedVariables.hs 2011-10-28 14:42:41.336631584 +0200
144 module NamedVariables where
147 -import Char (toLower)
149 +import Data.Char (toLower)
150 +import Data.List (nub)
152 type IVar = (String, Int)
153 --The type of an instance variable
154 diff -ur BNFC-2.4.2.0/formats/OOAbstract.hs BNFC-2.4.2.0-ghc-7.2/formats/OOAbstract.hs
155 --- BNFC-2.4.2.0/formats/OOAbstract.hs 2010-09-15 16:26:38.000000000 +0200
156 +++ BNFC-2.4.2.0-ghc-7.2/formats/OOAbstract.hs 2011-10-28 14:42:51.129965360 +0200
159 import Utils((+++),(++++))
160 import NamedVariables
162 -import Char(toLower)
164 +import Data.Char(toLower)
166 -- A datastructure more appropriate than CF
168 diff -ur BNFC-2.4.2.0/formats/c/CFtoBisonC.hs BNFC-2.4.2.0-ghc-7.2/formats/c/CFtoBisonC.hs
169 --- BNFC-2.4.2.0/formats/c/CFtoBisonC.hs 2010-09-15 16:26:38.000000000 +0200
170 +++ BNFC-2.4.2.0-ghc-7.2/formats/c/CFtoBisonC.hs 2011-10-28 14:45:15.879971891 +0200
172 module CFtoBisonC (cf2Bison) where
175 -import List (intersperse, isPrefixOf)
176 +import Data.List (intersperse, isPrefixOf)
177 import NamedVariables hiding (varName)
178 -import Char (toLower)
179 +import Data.Char (toLower)
180 import Utils ((+++), (++++))
182 --This follows the basic structure of CFtoHappy.
183 diff -ur BNFC-2.4.2.0/formats/c/CFtoCAbs.hs BNFC-2.4.2.0-ghc-7.2/formats/c/CFtoCAbs.hs
184 --- BNFC-2.4.2.0/formats/c/CFtoCAbs.hs 2010-09-15 16:26:38.000000000 +0200
185 +++ BNFC-2.4.2.0-ghc-7.2/formats/c/CFtoCAbs.hs 2011-10-28 14:47:42.956645193 +0200
188 import Utils((+++),(++++))
189 import NamedVariables
191 -import Char(toLower)
193 +import Data.Char(toLower)
196 --The result is two files (.H file, .C file)
197 diff -ur BNFC-2.4.2.0/formats/c/CFtoCPrinter.hs BNFC-2.4.2.0-ghc-7.2/formats/c/CFtoCPrinter.hs
198 --- BNFC-2.4.2.0/formats/c/CFtoCPrinter.hs 2010-09-15 16:26:38.000000000 +0200
199 +++ BNFC-2.4.2.0-ghc-7.2/formats/c/CFtoCPrinter.hs 2011-10-28 14:44:50.559970748 +0200
202 import Utils ((+++), (++++))
203 import NamedVariables
205 -import Char(toLower, toUpper)
207 +import Data.Char(toLower, toUpper)
209 --Produces (.h file, .c file)
210 cf2CPrinter :: CF -> (String, String)
211 diff -ur BNFC-2.4.2.0/formats/c/CFtoCSkel.hs BNFC-2.4.2.0-ghc-7.2/formats/c/CFtoCSkel.hs
212 --- BNFC-2.4.2.0/formats/c/CFtoCSkel.hs 2010-09-15 16:26:38.000000000 +0200
213 +++ BNFC-2.4.2.0-ghc-7.2/formats/c/CFtoCSkel.hs 2011-10-28 14:45:03.536637999 +0200
216 import Utils ( (+++) )
217 import NamedVariables
218 -import List ( isPrefixOf )
219 -import Char ( toLower, toUpper )
220 +import Data.List ( isPrefixOf )
221 +import Data.Char ( toLower, toUpper )
223 --Produces (.H file, .C file)
224 cf2CSkel :: CF -> (String, String)
225 diff -ur BNFC-2.4.2.0/formats/c/CFtoFlexC.hs BNFC-2.4.2.0-ghc-7.2/formats/c/CFtoFlexC.hs
226 --- BNFC-2.4.2.0/formats/c/CFtoFlexC.hs 2010-09-15 16:26:38.000000000 +0200
227 +++ BNFC-2.4.2.0-ghc-7.2/formats/c/CFtoFlexC.hs 2011-10-28 14:45:24.669972287 +0200
230 -- import Utils((+++), (++++))
231 import NamedVariables
235 --The environment must be returned for the parser to use.
236 cf2flex :: String -> CF -> (String, SymEnv)
237 diff -ur BNFC-2.4.2.0/formats/c/CTop.hs BNFC-2.4.2.0-ghc-7.2/formats/c/CTop.hs
238 --- BNFC-2.4.2.0/formats/c/CTop.hs 2010-09-15 16:26:38.000000000 +0200
239 +++ BNFC-2.4.2.0-ghc-7.2/formats/c/CTop.hs 2011-10-28 14:57:06.603337290 +0200
249 makeC :: Bool -> String -> FilePath -> IO ()
250 makeC make name file = do
251 diff -ur BNFC-2.4.2.0/formats/c-sharp/CAbstoCSharpAbs.hs BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CAbstoCSharpAbs.hs
252 --- BNFC-2.4.2.0/formats/c-sharp/CAbstoCSharpAbs.hs 2010-09-15 16:26:38.000000000 +0200
253 +++ BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CAbstoCSharpAbs.hs 2011-10-28 14:47:57.646645855 +0200
256 import Utils((+++),(++++))
257 import NamedVariables
259 -import Char(toLower)
261 +import Data.Char(toLower)
265 diff -ur BNFC-2.4.2.0/formats/c-sharp/CAbstoCSharpAbstractVisitSkeleton.hs BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CAbstoCSharpAbstractVisitSkeleton.hs
266 --- BNFC-2.4.2.0/formats/c-sharp/CAbstoCSharpAbstractVisitSkeleton.hs 2010-09-15 16:26:38.000000000 +0200
267 +++ BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CAbstoCSharpAbstractVisitSkeleton.hs 2011-10-28 14:48:01.649979370 +0200
270 import Utils ((+++), (++++))
271 import NamedVariables
274 import OOAbstract hiding (basetypes)
276 import CAbstoCSharpAbs
277 diff -ur BNFC-2.4.2.0/formats/c-sharp/CAbstoCSharpVisitSkeleton.hs BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CAbstoCSharpVisitSkeleton.hs
278 --- BNFC-2.4.2.0/formats/c-sharp/CAbstoCSharpVisitSkeleton.hs 2010-09-15 16:26:38.000000000 +0200
279 +++ BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CAbstoCSharpVisitSkeleton.hs 2011-10-28 14:48:05.163312861 +0200
282 import Utils ((+++), (++++))
283 import NamedVariables
286 import OOAbstract hiding (basetypes)
288 import CAbstoCSharpAbs
289 diff -ur BNFC-2.4.2.0/formats/c-sharp/CFtoCSharpPrinter.hs BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CFtoCSharpPrinter.hs
290 --- BNFC-2.4.2.0/formats/c-sharp/CFtoCSharpPrinter.hs 2010-09-15 16:26:38.000000000 +0200
291 +++ BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CFtoCSharpPrinter.hs 2011-10-28 14:48:10.306646427 +0200
294 import Utils ((+++), (++++))
295 import NamedVariables
297 -import Char(toLower, toUpper, isSpace)
299 +import Data.Char(toLower, toUpper, isSpace)
303 diff -ur BNFC-2.4.2.0/formats/c-sharp/CFtoGPLEX.hs BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CFtoGPLEX.hs
304 --- BNFC-2.4.2.0/formats/c-sharp/CFtoGPLEX.hs 2010-09-15 16:26:38.000000000 +0200
305 +++ BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CFtoGPLEX.hs 2011-10-28 14:48:14.363313276 +0200
308 import Utils((+++), (++++))
309 import NamedVariables
314 --The environment must be returned for the parser to use.
315 diff -ur BNFC-2.4.2.0/formats/c-sharp/CFtoGPPG.hs BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CFtoGPPG.hs
316 --- BNFC-2.4.2.0/formats/c-sharp/CFtoGPPG.hs 2010-09-15 16:26:38.000000000 +0200
317 +++ BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CFtoGPPG.hs 2011-10-28 14:48:20.333313546 +0200
319 module CFtoGPPG (cf2gppg) where
322 -import List (intersperse, isPrefixOf)
323 +import Data.List (intersperse, isPrefixOf)
324 import NamedVariables hiding (varName)
325 -import Char (toLower,isUpper,isDigit)
326 +import Data.Char (toLower,isUpper,isDigit)
327 import Utils ((+++), (++++))
330 diff -ur BNFC-2.4.2.0/formats/c-sharp/CSharpTop.hs BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CSharpTop.hs
331 --- BNFC-2.4.2.0/formats/c-sharp/CSharpTop.hs 2010-09-15 16:26:38.000000000 +0200
332 +++ BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CSharpTop.hs 2011-10-28 14:58:34.663341263 +0200
334 import CFtoCSharpPrinter
338 +import System.Environment
343 import System.Directory
345 import System.Process
346 diff -ur BNFC-2.4.2.0/formats/c-sharp/CSharpUtils.hs BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CSharpUtils.hs
347 --- BNFC-2.4.2.0/formats/c-sharp/CSharpUtils.hs 2010-09-15 16:26:38.000000000 +0200
348 +++ BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/CSharpUtils.hs 2011-10-28 14:50:02.039984801 +0200
351 import Control.Monad.ST
352 -- Control.Monad.State
353 -import Char (toLower)
354 +import Data.Char (toLower)
358 import OOAbstract hiding (basetypes)
360 type Namespace = String
361 diff -ur BNFC-2.4.2.0/formats/c-sharp/RegToGPLEX.hs BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/RegToGPLEX.hs
362 --- BNFC-2.4.2.0/formats/c-sharp/RegToGPLEX.hs 2010-09-15 16:26:38.000000000 +0200
363 +++ BNFC-2.4.2.0-ghc-7.2/formats/c-sharp/RegToGPLEX.hs 2011-10-28 14:48:52.096648312 +0200
365 -- modified from RegToFlex
371 -- the top-level printing method
372 printRegGPLEX :: Reg -> String
373 diff -ur BNFC-2.4.2.0/formats/cpp/CFtoBison.hs BNFC-2.4.2.0-ghc-7.2/formats/cpp/CFtoBison.hs
374 --- BNFC-2.4.2.0/formats/cpp/CFtoBison.hs 2010-09-15 16:26:38.000000000 +0200
375 +++ BNFC-2.4.2.0-ghc-7.2/formats/cpp/CFtoBison.hs 2011-10-28 14:46:35.719975492 +0200
377 module CFtoBison (cf2Bison) where
380 -import List (intersperse, isPrefixOf)
381 +import Data.List (intersperse, isPrefixOf)
382 import NamedVariables hiding (varName)
383 -import Char (toLower,isUpper)
384 +import Data.Char (toLower,isUpper)
385 import Utils ((+++), (++++))
388 diff -ur BNFC-2.4.2.0/formats/cpp/CFtoCPPAbs.hs BNFC-2.4.2.0-ghc-7.2/formats/cpp/CFtoCPPAbs.hs
389 --- BNFC-2.4.2.0/formats/cpp/CFtoCPPAbs.hs 2010-09-15 16:26:38.000000000 +0200
390 +++ BNFC-2.4.2.0-ghc-7.2/formats/cpp/CFtoCPPAbs.hs 2011-10-28 14:46:41.279975744 +0200
393 import Utils((+++),(++++))
394 import NamedVariables
396 -import Char(toLower)
398 +import Data.Char(toLower)
401 --The result is two files (.H file, .C file)
402 diff -ur BNFC-2.4.2.0/formats/cpp/CFtoCPPPrinter.hs BNFC-2.4.2.0-ghc-7.2/formats/cpp/CFtoCPPPrinter.hs
403 --- BNFC-2.4.2.0/formats/cpp/CFtoCPPPrinter.hs 2010-09-15 16:26:38.000000000 +0200
404 +++ BNFC-2.4.2.0-ghc-7.2/formats/cpp/CFtoCPPPrinter.hs 2011-10-28 14:46:47.326642683 +0200
407 import Utils ((+++), (++++))
408 import NamedVariables
410 -import Char(toLower, toUpper)
412 +import Data.Char(toLower, toUpper)
414 --Produces (.H file, .C file)
415 cf2CPPPrinter :: CF -> (String, String)
416 diff -ur BNFC-2.4.2.0/formats/cpp/CFtoCVisitSkel.hs BNFC-2.4.2.0-ghc-7.2/formats/cpp/CFtoCVisitSkel.hs
417 --- BNFC-2.4.2.0/formats/cpp/CFtoCVisitSkel.hs 2010-09-15 16:26:38.000000000 +0200
418 +++ BNFC-2.4.2.0-ghc-7.2/formats/cpp/CFtoCVisitSkel.hs 2011-10-28 14:47:08.076643619 +0200
421 import Utils ((+++), (++++))
422 import NamedVariables
424 -import Char(toLower, toUpper)
426 +import Data.Char(toLower, toUpper)
428 --Produces (.H file, .C file)
429 cf2CVisitSkel :: CF -> (String, String)
430 diff -ur BNFC-2.4.2.0/formats/cpp/CFtoFlex.hs BNFC-2.4.2.0-ghc-7.2/formats/cpp/CFtoFlex.hs
431 --- BNFC-2.4.2.0/formats/cpp/CFtoFlex.hs 2010-09-15 16:26:38.000000000 +0200
432 +++ BNFC-2.4.2.0-ghc-7.2/formats/cpp/CFtoFlex.hs 2011-10-28 14:47:13.686643872 +0200
435 import Utils((+++), (++++))
436 import NamedVariables
441 --The environment must be returned for the parser to use.
442 diff -ur BNFC-2.4.2.0/formats/cpp/CPPTop.hs BNFC-2.4.2.0-ghc-7.2/formats/cpp/CPPTop.hs
443 --- BNFC-2.4.2.0/formats/cpp/CPPTop.hs 2010-09-15 16:26:38.000000000 +0200
444 +++ BNFC-2.4.2.0-ghc-7.2/formats/cpp/CPPTop.hs 2011-10-28 14:58:58.886675688 +0200
446 import CFtoCVisitSkel
447 import CFtoCPPPrinter
457 makeCPP :: Bool -> String -> FilePath -> IO ()
458 makeCPP make name file = do
459 diff -ur BNFC-2.4.2.0/formats/cpp/RegToFlex.hs BNFC-2.4.2.0-ghc-7.2/formats/cpp/RegToFlex.hs
460 --- BNFC-2.4.2.0/formats/cpp/RegToFlex.hs 2010-09-15 16:26:38.000000000 +0200
461 +++ BNFC-2.4.2.0-ghc-7.2/formats/cpp/RegToFlex.hs 2011-10-28 14:47:30.029977943 +0200
463 -- modified from pretty-printer generated by the BNF converter
469 -- the top-level printing method
470 printRegFlex :: Reg -> String
471 diff -ur BNFC-2.4.2.0/formats/cpp_stl/CFtoBisonSTL.hs BNFC-2.4.2.0-ghc-7.2/formats/cpp_stl/CFtoBisonSTL.hs
472 --- BNFC-2.4.2.0/formats/cpp_stl/CFtoBisonSTL.hs 2010-09-15 16:26:38.000000000 +0200
473 +++ BNFC-2.4.2.0-ghc-7.2/formats/cpp_stl/CFtoBisonSTL.hs 2011-10-28 14:49:38.733317083 +0200
475 module CFtoBisonSTL (cf2Bison) where
478 -import List (intersperse, isPrefixOf)
479 +import Data.List (intersperse, isPrefixOf)
480 import NamedVariables hiding (varName)
481 -import Char (toLower,isUpper,isDigit)
482 +import Data.Char (toLower,isUpper,isDigit)
483 import Utils ((+++), (++++))
486 diff -ur BNFC-2.4.2.0/formats/cpp_stl/CFtoCVisitSkelSTL.hs BNFC-2.4.2.0-ghc-7.2/formats/cpp_stl/CFtoCVisitSkelSTL.hs
487 --- BNFC-2.4.2.0/formats/cpp_stl/CFtoCVisitSkelSTL.hs 2010-09-15 16:26:38.000000000 +0200
488 +++ BNFC-2.4.2.0-ghc-7.2/formats/cpp_stl/CFtoCVisitSkelSTL.hs 2011-10-28 14:49:33.259983502 +0200
491 import Utils ((+++), (++++))
492 import NamedVariables
494 -import Char(toLower, toUpper)
496 +import Data.Char(toLower, toUpper)
500 diff -ur BNFC-2.4.2.0/formats/cpp_stl/CFtoSTLAbs.hs BNFC-2.4.2.0-ghc-7.2/formats/cpp_stl/CFtoSTLAbs.hs
501 --- BNFC-2.4.2.0/formats/cpp_stl/CFtoSTLAbs.hs 2010-09-15 16:26:38.000000000 +0200
502 +++ BNFC-2.4.2.0-ghc-7.2/formats/cpp_stl/CFtoSTLAbs.hs 2011-10-28 14:49:27.763316588 +0200
505 import Utils((+++),(++++))
506 import NamedVariables
508 -import Char(toLower)
510 +import Data.Char(toLower)
513 --The result is two files (.H file, .C file)
514 diff -ur BNFC-2.4.2.0/formats/cpp_stl/CFtoSTLPrinter.hs BNFC-2.4.2.0-ghc-7.2/formats/cpp_stl/CFtoSTLPrinter.hs
515 --- BNFC-2.4.2.0/formats/cpp_stl/CFtoSTLPrinter.hs 2010-09-15 16:26:38.000000000 +0200
516 +++ BNFC-2.4.2.0-ghc-7.2/formats/cpp_stl/CFtoSTLPrinter.hs 2011-10-28 14:49:19.833316230 +0200
519 import Utils ((+++), (++++))
520 import NamedVariables
522 -import Char(toLower, toUpper)
524 +import Data.Char(toLower, toUpper)
527 --Produces (.H file, .C file)
528 diff -ur BNFC-2.4.2.0/formats/cpp_stl/STLTop.hs BNFC-2.4.2.0-ghc-7.2/formats/cpp_stl/STLTop.hs
529 --- BNFC-2.4.2.0/formats/cpp_stl/STLTop.hs 2010-09-15 16:26:38.000000000 +0200
530 +++ BNFC-2.4.2.0-ghc-7.2/formats/cpp_stl/STLTop.hs 2011-10-28 14:57:18.803337840 +0200
532 import CFtoCVisitSkelSTL
533 import CFtoSTLPrinter
544 makeSTL :: Bool -> Bool -> Maybe String -> String -> FilePath -> IO ()
545 diff -ur BNFC-2.4.2.0/formats/cpp_stl/STLUtils.hs BNFC-2.4.2.0-ghc-7.2/formats/cpp_stl/STLUtils.hs
546 --- BNFC-2.4.2.0/formats/cpp_stl/STLUtils.hs 2010-09-15 16:26:38.000000000 +0200
547 +++ BNFC-2.4.2.0-ghc-7.2/formats/cpp_stl/STLUtils.hs 2011-10-28 14:49:03.476648825 +0200
550 module STLUtils where
555 nsDefine :: Maybe String -> String -> String
556 nsDefine inPackage h = maybe h (\ns -> map toUpper ns ++ "_" ++ h) inPackage
557 diff -ur BNFC-2.4.2.0/formats/f-sharp/FSharpTop.hs BNFC-2.4.2.0-ghc-7.2/formats/f-sharp/FSharpTop.hs
558 --- BNFC-2.4.2.0/formats/f-sharp/FSharpTop.hs 2010-09-15 16:26:38.000000000 +0200
559 +++ BNFC-2.4.2.0-ghc-7.2/formats/f-sharp/FSharpTop.hs 2011-10-28 14:56:37.926669329 +0200
566 import Data.Maybe (fromMaybe,maybe)
570 +import Control.Monad(when)
572 -- naming conventions
574 diff -ur BNFC-2.4.2.0/formats/haskell-gadt/CFtoAbstractGADT.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell-gadt/CFtoAbstractGADT.hs
575 --- BNFC-2.4.2.0/formats/haskell-gadt/CFtoAbstractGADT.hs 2010-09-15 16:26:38.000000000 +0200
576 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell-gadt/CFtoAbstractGADT.hs 2011-10-28 14:50:13.799985332 +0200
580 import Utils((+++),(++++))
581 -import List(intersperse,nub)
582 +import Data.List(intersperse,nub)
584 import HaskellGADTCommon
586 diff -ur BNFC-2.4.2.0/formats/haskell-gadt/CFtoPrinterGADT.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell-gadt/CFtoPrinterGADT.hs
587 --- BNFC-2.4.2.0/formats/haskell-gadt/CFtoPrinterGADT.hs 2010-09-15 16:26:38.000000000 +0200
588 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell-gadt/CFtoPrinterGADT.hs 2011-10-28 14:50:20.019985612 +0200
593 -import List (intersperse)
594 -import Char(toLower)
595 +import Data.List (intersperse)
596 +import Data.Char(toLower)
598 import HaskellGADTCommon
600 diff -ur BNFC-2.4.2.0/formats/haskell-gadt/CFtoTemplateGADT.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell-gadt/CFtoTemplateGADT.hs
601 --- BNFC-2.4.2.0/formats/haskell-gadt/CFtoTemplateGADT.hs 2010-09-15 16:26:38.000000000 +0200
602 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell-gadt/CFtoTemplateGADT.hs 2011-10-28 14:50:24.599985819 +0200
607 -import List (delete,groupBy)
608 +import Data.List (delete,groupBy)
610 import HaskellGADTCommon
613 prCatTrans :: Cat -> [Constructor] -> [String]
614 prCatTrans cat cs = ["trans" ++ cat +++ "::" +++ cat +++ "-> Result",
615 "trans" ++ cat +++ "t = case t of"]
616 - ++ map prConsCase cs
617 \ No newline at end of file
618 + ++ map prConsCase cs
619 diff -ur BNFC-2.4.2.0/formats/haskell-gadt/HaskellGADTCommon.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell-gadt/HaskellGADTCommon.hs
620 --- BNFC-2.4.2.0/formats/haskell-gadt/HaskellGADTCommon.hs 2010-09-15 16:26:38.000000000 +0200
621 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell-gadt/HaskellGADTCommon.hs 2011-10-28 14:50:28.319985987 +0200
629 data Constructor = Constructor {
631 diff -ur BNFC-2.4.2.0/formats/haskell-gadt/HaskellTopGADT.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell-gadt/HaskellTopGADT.hs
632 --- BNFC-2.4.2.0/formats/haskell-gadt/HaskellTopGADT.hs 2010-09-15 16:26:38.000000000 +0200
633 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell-gadt/HaskellTopGADT.hs 2011-10-28 15:00:58.286681076 +0200
640 import Data.Maybe (fromMaybe,maybe)
644 +import Control.Monad(when)
646 -- naming conventions
648 diff -ur BNFC-2.4.2.0/formats/haskell2/CFtoAbstract.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell2/CFtoAbstract.hs
649 --- BNFC-2.4.2.0/formats/haskell2/CFtoAbstract.hs 2010-09-15 16:26:38.000000000 +0200
650 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell2/CFtoAbstract.hs 2011-10-28 14:50:42.843319975 +0200
654 import Utils((+++),(++++))
655 -import List(intersperse)
656 +import Data.List(intersperse)
658 -- to produce a Haskell module
659 cf2Abstract :: Bool -> String -> CF -> String
660 diff -ur BNFC-2.4.2.0/formats/haskell2/CFtoAlex.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell2/CFtoAlex.hs
661 --- BNFC-2.4.2.0/formats/haskell2/CFtoAlex.hs 2010-09-15 16:26:38.000000000 +0200
662 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell2/CFtoAlex.hs 2011-10-28 14:50:46.526653475 +0200
670 cf2alex :: String -> String -> CF -> String
671 cf2alex name errMod cf = unlines $ concat $ intersperse [""] [
672 diff -ur BNFC-2.4.2.0/formats/haskell2/CFtoAlex2.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell2/CFtoAlex2.hs
673 --- BNFC-2.4.2.0/formats/haskell2/CFtoAlex2.hs 2010-09-15 16:26:38.000000000 +0200
674 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell2/CFtoAlex2.hs 2011-10-28 14:50:52.769987090 +0200
676 module CFtoAlex2 (cf2alex2) where
682 -- For RegToAlex, see below.
687 cf2alex2 :: String -> String -> String -> Bool -> Bool -> CF -> String
688 cf2alex2 name errMod shareMod shareStrings byteStrings cf =
689 diff -ur BNFC-2.4.2.0/formats/haskell2/CFtoHappy.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell2/CFtoHappy.hs
690 --- BNFC-2.4.2.0/formats/haskell2/CFtoHappy.hs 2010-09-15 16:26:38.000000000 +0200
691 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell2/CFtoHappy.hs 2011-10-28 14:51:00.106654087 +0200
696 -import List (intersperse, sort)
698 +import Data.List (intersperse, sort)
703 diff -ur BNFC-2.4.2.0/formats/haskell2/CFtoPrinter.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell2/CFtoPrinter.hs
704 --- BNFC-2.4.2.0/formats/haskell2/CFtoPrinter.hs 2010-09-15 16:26:38.000000000 +0200
705 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell2/CFtoPrinter.hs 2011-10-28 14:51:09.816654525 +0200
710 -import List (intersperse)
711 -import Char(toLower)
712 +import Data.List (intersperse)
713 +import Data.Char(toLower)
715 -- derive pretty-printer from a BNF grammar. AR 15/2/2002
716 cf2Printer :: Bool -> String -> String -> CF -> String
717 diff -ur BNFC-2.4.2.0/formats/haskell2/CFtoTemplate.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell2/CFtoTemplate.hs
718 --- BNFC-2.4.2.0/formats/haskell2/CFtoTemplate.hs 2010-09-15 16:26:38.000000000 +0200
719 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell2/CFtoTemplate.hs 2011-10-28 14:38:42.819954157 +0200
725 -import List (delete)
727 +import Data.List (delete)
729 type ModuleName = String
730 type Constructor = String
731 diff -ur BNFC-2.4.2.0/formats/haskell2/HaskellTop.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell2/HaskellTop.hs
732 --- BNFC-2.4.2.0/formats/haskell2/HaskellTop.hs 2010-09-15 16:26:38.000000000 +0200
733 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell2/HaskellTop.hs 2011-10-28 15:01:17.467580274 +0200
740 import Data.Maybe (fromMaybe,maybe)
744 +import Control.Monad(when)
746 -- naming conventions
748 diff -ur BNFC-2.4.2.0/formats/haskell2/RegToAlex.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell2/RegToAlex.hs
749 --- BNFC-2.4.2.0/formats/haskell2/RegToAlex.hs 2010-09-15 16:26:38.000000000 +0200
750 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell2/RegToAlex.hs 2011-10-28 14:51:30.906655477 +0200
752 -- modified from pretty-printer generated by the BNF converter
758 -- the top-level printing method
759 printRegAlex :: Reg -> String
760 diff -ur BNFC-2.4.2.0/formats/java/CFtoCup.hs BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoCup.hs
761 --- BNFC-2.4.2.0/formats/java/CFtoCup.hs 2010-09-15 16:26:38.000000000 +0200
762 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoCup.hs 2011-10-28 14:51:40.103322559 +0200
764 module CFtoCup ( cf2Cup ) where
767 -import List (intersperse, isPrefixOf)
768 +import Data.List (intersperse, isPrefixOf)
769 import Data.Char (isUpper)
770 import NamedVariables
771 import TypeChecker -- We need to (re-)typecheck to figure out list instances in
772 diff -ur BNFC-2.4.2.0/formats/java/CFtoJLex.hs BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJLex.hs
773 --- BNFC-2.4.2.0/formats/java/CFtoJLex.hs 2010-09-15 16:26:38.000000000 +0200
774 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJLex.hs 2011-10-28 14:51:44.849989439 +0200
777 import Utils ( (+++) )
778 import NamedVariables
782 --The environment must be returned for the parser to use.
783 cf2jlex :: String -> String -> CF -> (String, SymEnv)
784 diff -ur BNFC-2.4.2.0/formats/java/CFtoJavaAbs.hs BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJavaAbs.hs
785 --- BNFC-2.4.2.0/formats/java/CFtoJavaAbs.hs 2010-09-15 16:26:38.000000000 +0200
786 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJavaAbs.hs 2011-10-28 14:51:50.013323006 +0200
789 import Utils((+++),(++++))
790 import NamedVariables hiding (IVar, getVars, varName)
792 -import Char(toLower)
794 +import Data.Char(toLower)
796 --Produces abstract data types in Java.
797 --These follow Appel's "non-object oriented" version.
798 diff -ur BNFC-2.4.2.0/formats/java/CFtoJavaPrinter.hs BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJavaPrinter.hs
799 --- BNFC-2.4.2.0/formats/java/CFtoJavaPrinter.hs 2010-09-15 16:26:38.000000000 +0200
800 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJavaPrinter.hs 2011-10-28 14:51:55.646656593 +0200
803 import NamedVariables
804 import Utils ( (+++) )
806 -import Char ( toLower )
808 +import Data.Char ( toLower )
810 --Produces the PrettyPrinter class.
811 --It will generate two methods "print" and "show"
812 diff -ur BNFC-2.4.2.0/formats/java/CFtoJavaSkeleton.hs BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJavaSkeleton.hs
813 --- BNFC-2.4.2.0/formats/java/CFtoJavaSkeleton.hs 2010-09-15 16:26:38.000000000 +0200
814 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJavaSkeleton.hs 2011-10-28 14:52:01.343323517 +0200
817 import Utils ((+++), (++++))
818 import NamedVariables
820 -import Char(toLower)
822 +import Data.Char(toLower)
825 cf2JavaSkeleton :: String -> String -> CF -> String
826 diff -ur BNFC-2.4.2.0/formats/java/CFtoVisitSkel.hs BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoVisitSkel.hs
827 --- BNFC-2.4.2.0/formats/java/CFtoVisitSkel.hs 2010-09-15 16:26:38.000000000 +0200
828 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoVisitSkel.hs 2011-10-28 14:52:06.073323730 +0200
831 import Utils ((+++), (++++))
832 import NamedVariables
834 -import Char(toLower, toUpper)
836 +import Data.Char(toLower, toUpper)
838 --Produces a Skeleton using the Visitor Design Pattern.
839 --Thus the user can choose which Skeleton to use.
840 diff -ur BNFC-2.4.2.0/formats/java/JavaTop.hs BNFC-2.4.2.0-ghc-7.2/formats/java/JavaTop.hs
841 --- BNFC-2.4.2.0/formats/java/JavaTop.hs 2010-09-15 16:26:38.000000000 +0200
842 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/JavaTop.hs 2011-10-28 15:00:30.163346474 +0200
844 -------------------------------------------------------------------
846 -------------------------------------------------------------------
847 -import Directory ( createDirectory )
848 -import IO ( try, isAlreadyExistsError )
849 +import System.Directory ( createDirectory )
851 +import System.IO.Error
852 +-- ( try, isAlreadyExistsError )
857 import CFtoJavaSkeleton
862 import GetCF ( tryReadCF, writeFileRep )
864 -import List(intersperse)
866 +import Data.List(intersperse)
868 -------------------------------------------------------------------
869 -- | Build the Java output.
870 diff -ur BNFC-2.4.2.0/formats/java/RegToJLex.hs BNFC-2.4.2.0-ghc-7.2/formats/java/RegToJLex.hs
871 --- BNFC-2.4.2.0/formats/java/RegToJLex.hs 2010-09-15 16:26:38.000000000 +0200
872 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/RegToJLex.hs 2011-10-28 14:52:17.229990901 +0200
874 -- modified from pretty-printer generated by the BNF converter
880 -- the top-level printing method
881 printRegJLex :: Reg -> String
882 diff -ur BNFC-2.4.2.0/formats/java1.5/CFtoAbstractVisitor.hs BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoAbstractVisitor.hs
883 --- BNFC-2.4.2.0/formats/java1.5/CFtoAbstractVisitor.hs 2010-09-15 16:26:38.000000000 +0200
884 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoAbstractVisitor.hs 2011-10-28 14:52:25.139991258 +0200
886 import CFtoJavaAbs15 (typename)
887 import Utils ((+++), (++++))
888 import NamedVariables
890 -import Char(toLower, toUpper, isDigit)
892 +import Data.Char(toLower, toUpper, isDigit)
894 cf2AbstractVisitor :: String -> String -> CF -> String
895 cf2AbstractVisitor packageBase packageAbsyn cf =
896 diff -ur BNFC-2.4.2.0/formats/java1.5/CFtoAllVisitor.hs BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoAllVisitor.hs
897 --- BNFC-2.4.2.0/formats/java1.5/CFtoAllVisitor.hs 2010-09-15 16:26:38.000000000 +0200
898 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoAllVisitor.hs 2011-10-28 14:52:30.846658182 +0200
900 import CFtoJavaAbs15 (typename)
901 import Utils ((+++), (++++))
902 import NamedVariables
904 -import Char(toLower, toUpper, isDigit)
906 +import Data.Char(toLower, toUpper, isDigit)
908 cf2AllVisitor :: String -> String -> CF -> String
909 cf2AllVisitor packageBase packageAbsyn cf =
910 diff -ur BNFC-2.4.2.0/formats/java1.5/CFtoComposVisitor.hs BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoComposVisitor.hs
911 --- BNFC-2.4.2.0/formats/java1.5/CFtoComposVisitor.hs 2010-09-15 16:26:38.000000000 +0200
912 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoComposVisitor.hs 2011-10-28 14:52:36.249991759 +0200
914 import CFtoJavaAbs15 (typename)
915 import Utils ((+++), (++++))
916 import NamedVariables
918 -import Char(toLower, toUpper, isDigit)
920 +import Data.Char(toLower, toUpper, isDigit)
922 cf2ComposVisitor :: String -> String -> CF -> String
923 cf2ComposVisitor packageBase packageAbsyn cf =
924 diff -ur BNFC-2.4.2.0/formats/java1.5/CFtoCup15.hs BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoCup15.hs
925 --- BNFC-2.4.2.0/formats/java1.5/CFtoCup15.hs 2010-09-15 16:26:38.000000000 +0200
926 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoCup15.hs 2011-10-28 14:52:44.713325474 +0200
928 module CFtoCup15 ( cf2Cup ) where
931 -import List (intersperse, isPrefixOf)
932 +import Data.List (intersperse, isPrefixOf)
933 import NamedVariables
934 import Utils ( (+++) )
935 import TypeChecker -- We need to (re-)typecheck to figure out list instances in
936 diff -ur BNFC-2.4.2.0/formats/java1.5/CFtoFoldVisitor.hs BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoFoldVisitor.hs
937 --- BNFC-2.4.2.0/formats/java1.5/CFtoFoldVisitor.hs 2010-09-15 16:26:38.000000000 +0200
938 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoFoldVisitor.hs 2011-10-28 14:52:49.933325710 +0200
940 import CFtoJavaAbs15 (typename)
941 import Utils ((+++), (++++))
942 import NamedVariables
944 -import Char(toLower, toUpper, isDigit)
946 +import Data.Char(toLower, toUpper, isDigit)
948 cf2FoldVisitor :: String -> String -> CF -> String
949 cf2FoldVisitor packageBase packageAbsyn cf =
950 diff -ur BNFC-2.4.2.0/formats/java1.5/CFtoJLex15.hs BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoJLex15.hs
951 --- BNFC-2.4.2.0/formats/java1.5/CFtoJLex15.hs 2010-09-15 16:26:38.000000000 +0200
952 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoJLex15.hs 2011-10-28 14:52:54.106659231 +0200
955 import Utils ( (+++) )
956 import NamedVariables
960 --The environment must be returned for the parser to use.
961 cf2jlex :: String -> String -> CF -> (String, SymEnv)
962 --- BNFC-2.4.2.0/formats/java1.5/CFtoJavaAbs15.hs 2010-09-15 16:26:38.000000000 +0200
963 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoJavaAbs15.hs 2011-10-28 14:54:05.833329134 +0200
966 import Utils((+++),(++++))
967 import NamedVariables hiding (IVar, getVars, varName)
969 -import Char(toLower, isDigit)
970 -import Maybe(catMaybes,fromMaybe)
972 +import Data.Char(toLower, isDigit)
973 +import Data.Maybe(catMaybes,fromMaybe)
975 --Produces abstract data types in Java.
976 --These follow Appel's "non-object oriented" version.
977 diff -ur BNFC-2.4.2.0/formats/java1.5/CFtoJavaPrinter15.hs BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoJavaPrinter15.hs
978 --- BNFC-2.4.2.0/formats/java1.5/CFtoJavaPrinter15.hs 2010-09-15 16:26:38.000000000 +0200
979 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoJavaPrinter15.hs 2011-10-28 14:53:04.176659685 +0200
982 import NamedVariables
983 import Utils ( (+++) )
985 -import Char ( toLower, isSpace )
987 +import Data.Char ( toLower, isSpace )
989 --Produces the PrettyPrinter class.
990 --It will generate two methods "print" and "show"
991 diff -ur BNFC-2.4.2.0/formats/java1.5/CFtoVisitSkel15.hs BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoVisitSkel15.hs
992 --- BNFC-2.4.2.0/formats/java1.5/CFtoVisitSkel15.hs 2010-09-15 16:26:38.000000000 +0200
993 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoVisitSkel15.hs 2011-10-28 14:53:09.309993250 +0200
995 import CFtoJavaAbs15 (typename)
996 import Utils ((+++), (++++))
997 import NamedVariables
999 -import Char(toLower, toUpper, isDigit)
1001 +import Data.Char(toLower, toUpper, isDigit)
1003 --Produces a Skeleton using the Visitor Design Pattern.
1004 --Thus the user can choose which Skeleton to use.
1005 diff -ur BNFC-2.4.2.0/formats/java1.5/JavaTop15.hs BNFC-2.4.2.0-ghc-7.2/formats/java1.5/JavaTop15.hs
1006 --- BNFC-2.4.2.0/formats/java1.5/JavaTop15.hs 2010-09-15 16:26:38.000000000 +0200
1007 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/JavaTop15.hs 2011-10-28 14:59:35.690010683 +0200
1009 -------------------------------------------------------------------
1011 -------------------------------------------------------------------
1012 -import Directory ( createDirectory )
1013 -import IO ( try, isAlreadyExistsError )
1014 +import System.Directory ( createDirectory )
1016 +-- ( try, isAlreadyExistsError )
1021 import CFtoFoldVisitor
1022 import CFtoAllVisitor
1026 import GetCF ( tryReadCF, writeFileRep )
1028 -import List(intersperse)
1030 +import Data.List(intersperse)
1032 -------------------------------------------------------------------
1033 -- | Build the Java output.
1034 diff -ur BNFC-2.4.2.0/formats/ocaml/CFtoOCamlAbs.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlAbs.hs
1035 --- BNFC-2.4.2.0/formats/ocaml/CFtoOCamlAbs.hs 2010-09-15 16:26:38.000000000 +0200
1036 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlAbs.hs 2011-10-28 14:42:12.693296959 +0200
1040 import Utils((+++),(++++))
1041 -import List(intersperse)
1042 +import Data.List(intersperse)
1045 -- to produce an OCaml module
1046 diff -ur BNFC-2.4.2.0/formats/ocaml/CFtoOCamlLex.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlLex.hs
1047 --- BNFC-2.4.2.0/formats/ocaml/CFtoOCamlLex.hs 2010-09-15 16:26:38.000000000 +0200
1048 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlLex.hs 2011-10-28 14:43:09.089966170 +0200
1051 module CFtoOCamlLex (cf2ocamllex) where
1060 diff -ur BNFC-2.4.2.0/formats/ocaml/CFtoOCamlPrinter.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlPrinter.hs
1061 --- BNFC-2.4.2.0/formats/ocaml/CFtoOCamlPrinter.hs 2010-09-15 16:26:38.000000000 +0200
1062 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlPrinter.hs 2011-10-28 14:41:13.969960976 +0200
1067 -import List (intersperse)
1068 -import Char(toLower,isDigit)
1069 +import Data.List (intersperse)
1070 +import Data.Char(toLower,isDigit)
1073 -- derive pretty-printer from a BNF grammar. AR 15/2/2002
1074 diff -ur BNFC-2.4.2.0/formats/ocaml/CFtoOCamlShow.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlShow.hs
1075 --- BNFC-2.4.2.0/formats/ocaml/CFtoOCamlShow.hs 2010-09-15 16:26:38.000000000 +0200
1076 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlShow.hs 2011-10-28 14:40:47.476626448 +0200
1081 -import List (intersperse)
1082 -import Char(toLower,isDigit)
1083 +import Data.List (intersperse)
1084 +import Data.Char(toLower,isDigit)
1087 cf2show :: String -> String -> CF -> String
1088 diff -ur BNFC-2.4.2.0/formats/ocaml/CFtoOCamlTemplate.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlTemplate.hs
1089 --- BNFC-2.4.2.0/formats/ocaml/CFtoOCamlTemplate.hs 2010-09-15 16:26:38.000000000 +0200
1090 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlTemplate.hs 2011-10-28 14:41:29.796628357 +0200
1096 -import List (delete)
1098 +import Data.List (delete)
1102 diff -ur BNFC-2.4.2.0/formats/ocaml/CFtoOCamlYacc.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlYacc.hs
1103 --- BNFC-2.4.2.0/formats/ocaml/CFtoOCamlYacc.hs 2010-09-15 16:26:38.000000000 +0200
1104 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlYacc.hs 2011-10-28 14:41:56.553296231 +0200
1109 -import List (intersperse,nub)
1111 +import Data.List (intersperse,nub)
1114 import Utils ((+++))
1116 diff -ur BNFC-2.4.2.0/formats/ocaml/OCamlTop.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/OCamlTop.hs
1117 --- BNFC-2.4.2.0/formats/ocaml/OCamlTop.hs 2010-09-15 16:26:38.000000000 +0200
1118 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/OCamlTop.hs 2011-10-28 14:56:52.490003319 +0200
1125 import Data.Maybe (fromMaybe,maybe)
1129 +import Control.Monad(when)
1131 -- naming conventions
1133 diff -ur BNFC-2.4.2.0/formats/ocaml/OCamlUtil.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/OCamlUtil.hs
1134 --- BNFC-2.4.2.0/formats/ocaml/OCamlUtil.hs 2010-09-15 16:26:38.000000000 +0200
1135 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/OCamlUtil.hs 2011-10-28 14:40:31.863292410 +0200
1140 -import Char (toLower, toUpper)
1141 +import Data.Char (toLower, toUpper)
1143 -- Translate Haskell types to OCaml types
1144 -- Note: OCaml (data-)types start with lowercase letter
1145 diff -ur BNFC-2.4.2.0/formats/profile/CFtoHappyProfile.hs BNFC-2.4.2.0-ghc-7.2/formats/profile/CFtoHappyProfile.hs
1146 --- BNFC-2.4.2.0/formats/profile/CFtoHappyProfile.hs 2010-09-15 16:26:38.000000000 +0200
1147 +++ BNFC-2.4.2.0-ghc-7.2/formats/profile/CFtoHappyProfile.hs 2011-10-28 14:53:28.246660771 +0200
1152 -import List (intersperse)
1154 +import Data.List (intersperse)
1157 -- Type declarations
1159 diff -ur BNFC-2.4.2.0/formats/profile/ProfileTop.hs BNFC-2.4.2.0-ghc-7.2/formats/profile/ProfileTop.hs
1160 --- BNFC-2.4.2.0/formats/profile/ProfileTop.hs 2010-09-15 16:26:38.000000000 +0200
1161 +++ BNFC-2.4.2.0-ghc-7.2/formats/profile/ProfileTop.hs 2011-10-28 15:00:45.843347181 +0200
1171 +import Control.Monad(when)
1173 -- naming conventions
1175 diff -ur BNFC-2.4.2.0/formats/xml/CFtoXML.hs BNFC-2.4.2.0-ghc-7.2/formats/xml/CFtoXML.hs
1176 --- BNFC-2.4.2.0/formats/xml/CFtoXML.hs 2010-09-15 16:26:38.000000000 +0200
1177 +++ BNFC-2.4.2.0-ghc-7.2/formats/xml/CFtoXML.hs 2011-10-28 14:38:23.549953287 +0200
1179 import GetCF (writeFileRep)
1182 -import List (intersperse, nub)
1183 -import Char(toLower)
1184 +import Data.List (intersperse, nub)
1185 +import Data.Char(toLower)
1187 type Coding = Bool ---- change to at least three values