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
749 ["-- automatically generated by BNF Converter",
750 "module Main where\n",
752 - "import IO ( stdin, hGetContents )",
753 - "import System ( getArgs, getProgName )",
754 + "import System.IO ( stdin, hGetContents )",
755 + "import System.Environment ( getArgs, getProgName )",
757 "import " ++ alexFileM opts,
758 "import " ++ happyFileM opts,
760 if lay then ("import " ++ layoutFileM opts) else "",
761 if use_xml then ("import " ++ xmlFileM opts) else "",
762 if_glr "import Data.FiniteMap(FiniteMap, lookupFM, fmToList)",
763 - if_glr "import Maybe(fromJust)",
764 + if_glr "import Data.Maybe(fromJust)",
765 "import " ++ errFileM opts,
768 diff -ur BNFC-2.4.2.0/formats/haskell2/RegToAlex.hs BNFC-2.4.2.0-ghc-7.2/formats/haskell2/RegToAlex.hs
769 --- BNFC-2.4.2.0/formats/haskell2/RegToAlex.hs 2010-09-15 16:26:38.000000000 +0200
770 +++ BNFC-2.4.2.0-ghc-7.2/formats/haskell2/RegToAlex.hs 2011-10-28 14:51:30.906655477 +0200
772 -- modified from pretty-printer generated by the BNF converter
778 -- the top-level printing method
779 printRegAlex :: Reg -> String
780 diff -ur BNFC-2.4.2.0/formats/java/CFtoCup.hs BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoCup.hs
781 --- BNFC-2.4.2.0/formats/java/CFtoCup.hs 2010-09-15 16:26:38.000000000 +0200
782 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoCup.hs 2011-10-28 14:51:40.103322559 +0200
784 module CFtoCup ( cf2Cup ) where
787 -import List (intersperse, isPrefixOf)
788 +import Data.List (intersperse, isPrefixOf)
789 import Data.Char (isUpper)
790 import NamedVariables
791 import TypeChecker -- We need to (re-)typecheck to figure out list instances in
792 diff -ur BNFC-2.4.2.0/formats/java/CFtoJLex.hs BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJLex.hs
793 --- BNFC-2.4.2.0/formats/java/CFtoJLex.hs 2010-09-15 16:26:38.000000000 +0200
794 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJLex.hs 2011-10-28 14:51:44.849989439 +0200
797 import Utils ( (+++) )
798 import NamedVariables
802 --The environment must be returned for the parser to use.
803 cf2jlex :: String -> String -> CF -> (String, SymEnv)
804 diff -ur BNFC-2.4.2.0/formats/java/CFtoJavaAbs.hs BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJavaAbs.hs
805 --- BNFC-2.4.2.0/formats/java/CFtoJavaAbs.hs 2010-09-15 16:26:38.000000000 +0200
806 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJavaAbs.hs 2011-10-28 14:51:50.013323006 +0200
809 import Utils((+++),(++++))
810 import NamedVariables hiding (IVar, getVars, varName)
812 -import Char(toLower)
814 +import Data.Char(toLower)
816 --Produces abstract data types in Java.
817 --These follow Appel's "non-object oriented" version.
818 diff -ur BNFC-2.4.2.0/formats/java/CFtoJavaPrinter.hs BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJavaPrinter.hs
819 --- BNFC-2.4.2.0/formats/java/CFtoJavaPrinter.hs 2010-09-15 16:26:38.000000000 +0200
820 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJavaPrinter.hs 2011-10-28 14:51:55.646656593 +0200
823 import NamedVariables
824 import Utils ( (+++) )
826 -import Char ( toLower )
828 +import Data.Char ( toLower )
830 --Produces the PrettyPrinter class.
831 --It will generate two methods "print" and "show"
832 diff -ur BNFC-2.4.2.0/formats/java/CFtoJavaSkeleton.hs BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJavaSkeleton.hs
833 --- BNFC-2.4.2.0/formats/java/CFtoJavaSkeleton.hs 2010-09-15 16:26:38.000000000 +0200
834 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoJavaSkeleton.hs 2011-10-28 14:52:01.343323517 +0200
837 import Utils ((+++), (++++))
838 import NamedVariables
840 -import Char(toLower)
842 +import Data.Char(toLower)
845 cf2JavaSkeleton :: String -> String -> CF -> String
846 diff -ur BNFC-2.4.2.0/formats/java/CFtoVisitSkel.hs BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoVisitSkel.hs
847 --- BNFC-2.4.2.0/formats/java/CFtoVisitSkel.hs 2010-09-15 16:26:38.000000000 +0200
848 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/CFtoVisitSkel.hs 2011-10-28 14:52:06.073323730 +0200
851 import Utils ((+++), (++++))
852 import NamedVariables
854 -import Char(toLower, toUpper)
856 +import Data.Char(toLower, toUpper)
858 --Produces a Skeleton using the Visitor Design Pattern.
859 --Thus the user can choose which Skeleton to use.
860 diff -ur BNFC-2.4.2.0/formats/java/JavaTop.hs BNFC-2.4.2.0-ghc-7.2/formats/java/JavaTop.hs
861 --- BNFC-2.4.2.0/formats/java/JavaTop.hs 2010-09-15 16:26:38.000000000 +0200
862 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/JavaTop.hs 2011-10-28 15:00:30.163346474 +0200
864 -------------------------------------------------------------------
866 -------------------------------------------------------------------
867 -import Directory ( createDirectory )
868 -import IO ( try, isAlreadyExistsError )
869 +import System.Directory ( createDirectory )
871 +import System.IO.Error
872 +-- ( try, isAlreadyExistsError )
877 import CFtoJavaSkeleton
882 import GetCF ( tryReadCF, writeFileRep )
884 -import List(intersperse)
886 +import Data.List(intersperse)
888 -------------------------------------------------------------------
889 -- | Build the Java output.
890 diff -ur BNFC-2.4.2.0/formats/java/RegToJLex.hs BNFC-2.4.2.0-ghc-7.2/formats/java/RegToJLex.hs
891 --- BNFC-2.4.2.0/formats/java/RegToJLex.hs 2010-09-15 16:26:38.000000000 +0200
892 +++ BNFC-2.4.2.0-ghc-7.2/formats/java/RegToJLex.hs 2011-10-28 14:52:17.229990901 +0200
894 -- modified from pretty-printer generated by the BNF converter
900 -- the top-level printing method
901 printRegJLex :: Reg -> String
902 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
903 --- BNFC-2.4.2.0/formats/java1.5/CFtoAbstractVisitor.hs 2010-09-15 16:26:38.000000000 +0200
904 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoAbstractVisitor.hs 2011-10-28 14:52:25.139991258 +0200
906 import CFtoJavaAbs15 (typename)
907 import Utils ((+++), (++++))
908 import NamedVariables
910 -import Char(toLower, toUpper, isDigit)
912 +import Data.Char(toLower, toUpper, isDigit)
914 cf2AbstractVisitor :: String -> String -> CF -> String
915 cf2AbstractVisitor packageBase packageAbsyn cf =
916 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
917 --- BNFC-2.4.2.0/formats/java1.5/CFtoAllVisitor.hs 2010-09-15 16:26:38.000000000 +0200
918 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoAllVisitor.hs 2011-10-28 14:52:30.846658182 +0200
920 import CFtoJavaAbs15 (typename)
921 import Utils ((+++), (++++))
922 import NamedVariables
924 -import Char(toLower, toUpper, isDigit)
926 +import Data.Char(toLower, toUpper, isDigit)
928 cf2AllVisitor :: String -> String -> CF -> String
929 cf2AllVisitor packageBase packageAbsyn cf =
930 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
931 --- BNFC-2.4.2.0/formats/java1.5/CFtoComposVisitor.hs 2010-09-15 16:26:38.000000000 +0200
932 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoComposVisitor.hs 2011-10-28 14:52:36.249991759 +0200
934 import CFtoJavaAbs15 (typename)
935 import Utils ((+++), (++++))
936 import NamedVariables
938 -import Char(toLower, toUpper, isDigit)
940 +import Data.Char(toLower, toUpper, isDigit)
942 cf2ComposVisitor :: String -> String -> CF -> String
943 cf2ComposVisitor packageBase packageAbsyn cf =
944 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
945 --- BNFC-2.4.2.0/formats/java1.5/CFtoCup15.hs 2010-09-15 16:26:38.000000000 +0200
946 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoCup15.hs 2011-10-28 14:52:44.713325474 +0200
948 module CFtoCup15 ( cf2Cup ) where
951 -import List (intersperse, isPrefixOf)
952 +import Data.List (intersperse, isPrefixOf)
953 import NamedVariables
954 import Utils ( (+++) )
955 import TypeChecker -- We need to (re-)typecheck to figure out list instances in
956 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
957 --- BNFC-2.4.2.0/formats/java1.5/CFtoFoldVisitor.hs 2010-09-15 16:26:38.000000000 +0200
958 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoFoldVisitor.hs 2011-10-28 14:52:49.933325710 +0200
960 import CFtoJavaAbs15 (typename)
961 import Utils ((+++), (++++))
962 import NamedVariables
964 -import Char(toLower, toUpper, isDigit)
966 +import Data.Char(toLower, toUpper, isDigit)
968 cf2FoldVisitor :: String -> String -> CF -> String
969 cf2FoldVisitor packageBase packageAbsyn cf =
970 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
971 --- BNFC-2.4.2.0/formats/java1.5/CFtoJLex15.hs 2010-09-15 16:26:38.000000000 +0200
972 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoJLex15.hs 2011-10-28 14:52:54.106659231 +0200
975 import Utils ( (+++) )
976 import NamedVariables
980 --The environment must be returned for the parser to use.
981 cf2jlex :: String -> String -> CF -> (String, SymEnv)
982 --- BNFC-2.4.2.0/formats/java1.5/CFtoJavaAbs15.hs 2010-09-15 16:26:38.000000000 +0200
983 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoJavaAbs15.hs 2011-10-28 14:54:05.833329134 +0200
986 import Utils((+++),(++++))
987 import NamedVariables hiding (IVar, getVars, varName)
989 -import Char(toLower, isDigit)
990 -import Maybe(catMaybes,fromMaybe)
992 +import Data.Char(toLower, isDigit)
993 +import Data.Maybe(catMaybes,fromMaybe)
995 --Produces abstract data types in Java.
996 --These follow Appel's "non-object oriented" version.
997 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
998 --- BNFC-2.4.2.0/formats/java1.5/CFtoJavaPrinter15.hs 2010-09-15 16:26:38.000000000 +0200
999 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoJavaPrinter15.hs 2011-10-28 14:53:04.176659685 +0200
1002 import NamedVariables
1003 import Utils ( (+++) )
1005 -import Char ( toLower, isSpace )
1007 +import Data.Char ( toLower, isSpace )
1009 --Produces the PrettyPrinter class.
1010 --It will generate two methods "print" and "show"
1011 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
1012 --- BNFC-2.4.2.0/formats/java1.5/CFtoVisitSkel15.hs 2010-09-15 16:26:38.000000000 +0200
1013 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/CFtoVisitSkel15.hs 2011-10-28 14:53:09.309993250 +0200
1015 import CFtoJavaAbs15 (typename)
1016 import Utils ((+++), (++++))
1017 import NamedVariables
1019 -import Char(toLower, toUpper, isDigit)
1021 +import Data.Char(toLower, toUpper, isDigit)
1023 --Produces a Skeleton using the Visitor Design Pattern.
1024 --Thus the user can choose which Skeleton to use.
1025 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
1026 --- BNFC-2.4.2.0/formats/java1.5/JavaTop15.hs 2010-09-15 16:26:38.000000000 +0200
1027 +++ BNFC-2.4.2.0-ghc-7.2/formats/java1.5/JavaTop15.hs 2011-10-28 14:59:35.690010683 +0200
1029 -------------------------------------------------------------------
1031 -------------------------------------------------------------------
1032 -import Directory ( createDirectory )
1033 -import IO ( try, isAlreadyExistsError )
1034 +import System.Directory ( createDirectory )
1036 +-- ( try, isAlreadyExistsError )
1041 import CFtoFoldVisitor
1042 import CFtoAllVisitor
1046 import GetCF ( tryReadCF, writeFileRep )
1048 -import List(intersperse)
1050 +import Data.List(intersperse)
1052 -------------------------------------------------------------------
1053 -- | Build the Java output.
1054 diff -ur BNFC-2.4.2.0/formats/ocaml/CFtoOCamlAbs.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlAbs.hs
1055 --- BNFC-2.4.2.0/formats/ocaml/CFtoOCamlAbs.hs 2010-09-15 16:26:38.000000000 +0200
1056 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlAbs.hs 2011-10-28 14:42:12.693296959 +0200
1060 import Utils((+++),(++++))
1061 -import List(intersperse)
1062 +import Data.List(intersperse)
1065 -- to produce an OCaml module
1066 diff -ur BNFC-2.4.2.0/formats/ocaml/CFtoOCamlLex.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlLex.hs
1067 --- BNFC-2.4.2.0/formats/ocaml/CFtoOCamlLex.hs 2010-09-15 16:26:38.000000000 +0200
1068 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlLex.hs 2011-10-28 14:43:09.089966170 +0200
1071 module CFtoOCamlLex (cf2ocamllex) where
1080 diff -ur BNFC-2.4.2.0/formats/ocaml/CFtoOCamlPrinter.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlPrinter.hs
1081 --- BNFC-2.4.2.0/formats/ocaml/CFtoOCamlPrinter.hs 2010-09-15 16:26:38.000000000 +0200
1082 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlPrinter.hs 2011-10-28 14:41:13.969960976 +0200
1087 -import List (intersperse)
1088 -import Char(toLower,isDigit)
1089 +import Data.List (intersperse)
1090 +import Data.Char(toLower,isDigit)
1093 -- derive pretty-printer from a BNF grammar. AR 15/2/2002
1094 diff -ur BNFC-2.4.2.0/formats/ocaml/CFtoOCamlShow.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlShow.hs
1095 --- BNFC-2.4.2.0/formats/ocaml/CFtoOCamlShow.hs 2010-09-15 16:26:38.000000000 +0200
1096 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlShow.hs 2011-10-28 14:40:47.476626448 +0200
1101 -import List (intersperse)
1102 -import Char(toLower,isDigit)
1103 +import Data.List (intersperse)
1104 +import Data.Char(toLower,isDigit)
1107 cf2show :: String -> String -> CF -> String
1108 diff -ur BNFC-2.4.2.0/formats/ocaml/CFtoOCamlTemplate.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlTemplate.hs
1109 --- BNFC-2.4.2.0/formats/ocaml/CFtoOCamlTemplate.hs 2010-09-15 16:26:38.000000000 +0200
1110 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlTemplate.hs 2011-10-28 14:41:29.796628357 +0200
1116 -import List (delete)
1118 +import Data.List (delete)
1122 diff -ur BNFC-2.4.2.0/formats/ocaml/CFtoOCamlYacc.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlYacc.hs
1123 --- BNFC-2.4.2.0/formats/ocaml/CFtoOCamlYacc.hs 2010-09-15 16:26:38.000000000 +0200
1124 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/CFtoOCamlYacc.hs 2011-10-28 14:41:56.553296231 +0200
1129 -import List (intersperse,nub)
1131 +import Data.List (intersperse,nub)
1134 import Utils ((+++))
1136 diff -ur BNFC-2.4.2.0/formats/ocaml/OCamlTop.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/OCamlTop.hs
1137 --- BNFC-2.4.2.0/formats/ocaml/OCamlTop.hs 2010-09-15 16:26:38.000000000 +0200
1138 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/OCamlTop.hs 2011-10-28 14:56:52.490003319 +0200
1145 import Data.Maybe (fromMaybe,maybe)
1149 +import Control.Monad(when)
1151 -- naming conventions
1153 diff -ur BNFC-2.4.2.0/formats/ocaml/OCamlUtil.hs BNFC-2.4.2.0-ghc-7.2/formats/ocaml/OCamlUtil.hs
1154 --- BNFC-2.4.2.0/formats/ocaml/OCamlUtil.hs 2010-09-15 16:26:38.000000000 +0200
1155 +++ BNFC-2.4.2.0-ghc-7.2/formats/ocaml/OCamlUtil.hs 2011-10-28 14:40:31.863292410 +0200
1160 -import Char (toLower, toUpper)
1161 +import Data.Char (toLower, toUpper)
1163 -- Translate Haskell types to OCaml types
1164 -- Note: OCaml (data-)types start with lowercase letter
1165 diff -ur BNFC-2.4.2.0/formats/profile/CFtoHappyProfile.hs BNFC-2.4.2.0-ghc-7.2/formats/profile/CFtoHappyProfile.hs
1166 --- BNFC-2.4.2.0/formats/profile/CFtoHappyProfile.hs 2010-09-15 16:26:38.000000000 +0200
1167 +++ BNFC-2.4.2.0-ghc-7.2/formats/profile/CFtoHappyProfile.hs 2011-10-28 14:53:28.246660771 +0200
1172 -import List (intersperse)
1174 +import Data.List (intersperse)
1177 -- Type declarations
1179 diff -ur BNFC-2.4.2.0/formats/profile/ProfileTop.hs BNFC-2.4.2.0-ghc-7.2/formats/profile/ProfileTop.hs
1180 --- BNFC-2.4.2.0/formats/profile/ProfileTop.hs 2010-09-15 16:26:38.000000000 +0200
1181 +++ BNFC-2.4.2.0-ghc-7.2/formats/profile/ProfileTop.hs 2011-10-28 15:00:45.843347181 +0200
1191 +import Control.Monad(when)
1193 -- naming conventions
1195 diff -ur BNFC-2.4.2.0/formats/xml/CFtoXML.hs BNFC-2.4.2.0-ghc-7.2/formats/xml/CFtoXML.hs
1196 --- BNFC-2.4.2.0/formats/xml/CFtoXML.hs 2010-09-15 16:26:38.000000000 +0200
1197 +++ BNFC-2.4.2.0-ghc-7.2/formats/xml/CFtoXML.hs 2011-10-28 14:38:23.549953287 +0200
1199 import GetCF (writeFileRep)
1202 -import List (intersperse, nub)
1203 -import Char(toLower)
1204 +import Data.List (intersperse, nub)
1205 +import Data.Char(toLower)
1207 type Coding = Bool ---- change to at least three values