From a68b2850e76a36c1f4ca032ea69c1ffa81b69885 Mon Sep 17 00:00:00 2001 From: bringert Date: Fri, 4 Jan 2008 14:51:20 +0000 Subject: Added -noparse flag to gfc. In the process, I refactored GF.Devel.GFC and GF.Command.Importing to use a common source to gfcc compilation function in the new module GF.Compile.API. --- src/GF/Command/Importing.hs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/GF/Command') diff --git a/src/GF/Command/Importing.hs b/src/GF/Command/Importing.hs index 788dab20a..73589533d 100644 --- a/src/GF/Command/Importing.hs +++ b/src/GF/Command/Importing.hs @@ -1,12 +1,8 @@ module GF.Command.Importing (importGrammar) where -import GF.Devel.Compile -import GF.Devel.GrammarToGFCC -import GF.GFCC.OptimizeGFCC -import GF.GFCC.CheckGFCC +import GF.Compile.API import GF.GFCC.DataGFCC import GF.GFCC.API -import qualified GF.Command.AbsGFShell as C import GF.Devel.UseIO import GF.Infra.Option @@ -17,12 +13,7 @@ import Data.List (nubBy) importGrammar :: MultiGrammar -> Options -> [FilePath] -> IO MultiGrammar importGrammar mgr0 opts files = do gfcc2 <- case fileSuffix (last files) of - s | elem s ["gf","gfo"] -> do - gr <- batchCompile opts files - let name = justModuleName (last files) - let (abs,gfcc0) = mkCanon2gfcc opts name gr - gfcc1 <- checkGFCCio gfcc0 - return $ addParsers $ if oElem (iOpt "noopt") opts then gfcc1 else optGFCC gfcc1 + s | elem s ["gf","gfo"] -> compileToGFCC opts files "gfcc" -> mapM file2gfcc files >>= return . foldl1 unionGFCC let gfcc3 = unionGFCC (gfcc mgr0) gfcc2 -- cgit v1.2.3