mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-12 12:42:50 -06:00
compiler "gfc" in GF/Devel
This commit is contained in:
20
src/GF/Devel/GFC.hs
Normal file
20
src/GF/Devel/GFC.hs
Normal file
@@ -0,0 +1,20 @@
|
||||
module Main where
|
||||
|
||||
import GF.Devel.Compile
|
||||
import GF.Devel.GrammarToGFCC
|
||||
|
||||
import System
|
||||
|
||||
|
||||
main = do
|
||||
xx <- getArgs
|
||||
case xx of
|
||||
"-help":[] -> putStrLn "usage: gfc (--make) FILES"
|
||||
"--make":fs -> do
|
||||
gr <- batchCompile fs
|
||||
putStrLn $ prGrammar2gfcc gr ---
|
||||
--- writeFile "a.gfcc" $ prGrammar2gfcc gr
|
||||
--- putStrLn "wrote file a.gfcc"
|
||||
_ -> do
|
||||
mapM_ batchCompile (map return xx)
|
||||
putStrLn "Done."
|
||||
Reference in New Issue
Block a user