diff options
| author | aarne <aarne@cs.chalmers.se> | 2007-05-15 16:35:13 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2007-05-15 16:35:13 +0000 |
| commit | 035689f8c745a23c9a3a073d316adf82e5f7d00b (patch) | |
| tree | e1e8921cfd504dcddca5fa3fff5271598aa9b01f /src/GF/Compile/Compile.hs | |
| parent | 8af473a6f5e04ce2aaf74916d91866f1bdb62151 (diff) | |
started direct compiler from GF to GFCC
Diffstat (limited to 'src/GF/Compile/Compile.hs')
| -rw-r--r-- | src/GF/Compile/Compile.hs | 6 |
1 files changed, 6 insertions, 0 deletions
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)) |
