summaryrefslogtreecommitdiff
path: root/src/GF/Command
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2008-01-04 14:51:20 +0000
committerbringert <bringert@cs.chalmers.se>2008-01-04 14:51:20 +0000
commita68b2850e76a36c1f4ca032ea69c1ffa81b69885 (patch)
tree01a0b82d654890ee3142d522885fb8d31738f496 /src/GF/Command
parentd54c209e9dc37825b153232a56e4c5adbbb685b1 (diff)
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.
Diffstat (limited to 'src/GF/Command')
-rw-r--r--src/GF/Command/Importing.hs13
1 files changed, 2 insertions, 11 deletions
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