mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-12 20:52:50 -06:00
gfcc generation in gfc works for some grammars
This commit is contained in:
@@ -2,6 +2,7 @@ module Main where
|
||||
|
||||
import GF.Devel.Compile
|
||||
import GF.Devel.GrammarToGFCC
|
||||
import GF.Devel.UseIO
|
||||
---import GF.Devel.PrGrammar ---
|
||||
|
||||
import System
|
||||
@@ -13,9 +14,11 @@ main = do
|
||||
"-help":[] -> putStrLn "usage: gfc (--make) FILES"
|
||||
"--make":fs -> do
|
||||
gr <- batchCompile fs
|
||||
--- putStrLn $ prGrammar gr
|
||||
writeFile "a.gfcc" $ prGrammar2gfcc gr
|
||||
putStrLn "Wrote file a.gfcc."
|
||||
let name = justModuleName (last fs)
|
||||
let (abs,gc) = prGrammar2gfcc name gr
|
||||
let target = abs ++ ".gfcc"
|
||||
writeFile target gc
|
||||
putStrLn $ "wrote file " ++ target
|
||||
_ -> do
|
||||
mapM_ batchCompile (map return xx)
|
||||
putStrLn "Done."
|
||||
|
||||
Reference in New Issue
Block a user