From: Duncan C. <dun...@us...> - 2005-06-13 21:59:14
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/c2hs/toplevel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29697/tools/c2hs/toplevel Modified Files: Tag: branch-0-9-8 Main.hs Log Message: Makefile.am, configure.ac: remove the old C lexer and parser and rename the new lexer and parser (CLexer2.x, CParser2.y) to simply CLexer.x and CParser.y tools/c2hs/c/C.hs: use only the new lexer and parser rather than using both with the decision made at runtime. tools/c2hs/toplevel/Main.hs, tools/c2hs/state/Switches.hs: remove the command line switch which used to select which C parser implementation to use. Also remove the debug option to dump the C AST after parsing. tools/c2hs/base/syms/Attributes.hs, tools/c2hs/c/CAST.hs: remove Show instances for the AST data types since they are no longer needed. tools/c2hs/c/CPretty.hs: add back the old Show instance for CDecl. Index: Main.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/c2hs/toplevel/Main.hs,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -d -r1.4 -r1.4.2.1 --- Main.hs 31 May 2005 18:17:37 -0000 1.4 +++ Main.hs 13 Jun 2005 21:59:05 -0000 1.4.2.1 @@ -206,7 +206,6 @@ | Output String -- file where the generated file should go | OutDir String -- directory where generates files should go | PreComp String -- write or read a precompiled header - | OldParser -- use the old lexer/parser | Version -- print version information on stderr | Error String -- error occured during processing of options deriving Eq @@ -215,7 +214,6 @@ | GenBind -- trace `GenBind' | CTrav -- trace `CTrav' | CHS -- dump binding file - | CAST -- dump the C AST deriving Eq -- option description suitable for `GetOpt' @@ -258,10 +256,6 @@ ["precomp"] (ReqArg PreComp "FILE") "generate or read precompiled header file FILE", - Option [] - ["old-parser"] - (NoArg OldParser) - "use the old C lexer/parser", Option ['v'] ["version"] (NoArg Version) @@ -274,7 +268,6 @@ dumpArg "genbind" = Dump GenBind dumpArg "ctrav" = Dump CTrav dumpArg "chs" = Dump CHS -dumpArg "ast" = Dump CAST dumpArg _ = Error "Illegal dump type." -- main process (set up base configuration, analyse command line, and execute @@ -414,7 +407,6 @@ processOpt (Output fname ) = setOutput fname processOpt (OutDir fname ) = setOutDir fname processOpt (PreComp fname ) = setPreComp fname -processOpt (OldParser ) = setOldParser processOpt Version = do (version, _, _) <- getId putStrCIO (version ++ "\n") @@ -484,7 +476,6 @@ setDump GenBind = setTraces $ \ts -> ts {traceGenBindSW = True} setDump CTrav = setTraces $ \ts -> ts {traceCTravSW = True} setDump CHS = setTraces $ \ts -> ts {dumpCHSSW = True} -setDump CAST = setTraces $ \ts -> ts {dumpCASTSW = True} -- set flag to keep the pre-processed header file -- @@ -535,11 +526,6 @@ setPreComp :: FilePath -> CST s () setPreComp fname = setSwitch $ \sb -> sb { preCompSB = Just fname } --- set flag to use the old lexer/parser --- -setOldParser :: CST s () -setOldParser = setSwitch $ \sb -> sb {oldParsSB = True} - -- compilation process -- ------------------- |