mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-10 19:52:50 -06:00
started direct compiler from GF to GFCC
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user