From 035689f8c745a23c9a3a073d316adf82e5f7d00b Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 15 May 2007 16:35:13 +0000 Subject: started direct compiler from GF to GFCC --- src/GF/Compile/Compile.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/GF/Compile/Compile.hs') diff --git a/src/GF/Compile/Compile.hs b/src/GF/Compile/Compile.hs index 0e59b1c9d..cf1c542f5 100644 --- a/src/GF/Compile/Compile.hs +++ b/src/GF/Compile/Compile.hs @@ -38,6 +38,7 @@ import GF.Compile.CheckGrammar import GF.Compile.Optimize import GF.Compile.Evaluate import GF.Compile.GrammarToCanon +import GF.Compile.GrammarToGFCC ----- import GF.Canon.Share import GF.Canon.Subexpressions (elimSubtermsMod,unSubelimModule) import GF.UseGrammar.Linear (unoptimizeCanonMod) ---- @@ -293,6 +294,11 @@ compileSourceModule opts env@(k,gr,can,eenv) mo@(i,mi) = do generateModuleCode :: Options -> InitPath -> SourceModule -> IOE GFC.CanonModule generateModuleCode opts path minfo@(name,info) = do + + if oElem (iOpt "gfcc") opts + then ioeIO $ putStrLn $ prGrammar2gfcc minfo + else return () + let pname = prefixPathName path (prt name) minfo0 <- ioeErr $ redModInfo minfo let oopts = addOptions opts (iOpts (flagsModule minfo)) -- cgit v1.2.3