1
0
forked from GitHub/gf-core

added optimization to GrammarToGFCC

This commit is contained in:
aarne
2007-10-03 16:04:30 +00:00
parent e4ab0e274b
commit 17962eef1a
4 changed files with 130 additions and 141 deletions

View File

@@ -2,6 +2,7 @@ module Main where
import GF.Devel.Compile
import GF.Devel.GrammarToGFCC
import GF.Devel.OptimizeGFCC
import GF.Canon.GFCC.CheckGFCC
import GF.Canon.GFCC.PrintGFCC
import GF.Canon.GFCC.DataGFCC
@@ -21,7 +22,8 @@ main = do
gr <- batchCompile opts fs
let name = justModuleName (last fs)
let (abs,gc0) = mkCanon2gfcc opts name gr
gc <- check gc0
gc1 <- check gc0
let gc = if oElem (iOpt "noopt") opts then gc1 else optGFCC gc1
let target = abs ++ ".gfcc"
writeFile target (printGFCC gc)
putStrLn $ "wrote file " ++ target