mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-19 09:49:33 -06:00
New order among numerals.
This commit is contained in:
27
examples/numerals/MkScript.hs
Normal file
27
examples/numerals/MkScript.hs
Normal file
@@ -0,0 +1,27 @@
|
||||
module Main where
|
||||
|
||||
import System
|
||||
|
||||
-- to create a gfs script that builds a gfcm file. AR 29/1/2004
|
||||
-- reads old GF
|
||||
|
||||
-- change these to your needs
|
||||
|
||||
scriptFile = "mkNumerals.gfs"
|
||||
multiFile = "numerals.gfcm"
|
||||
absModule = "Numerals"
|
||||
excluded = ["numerals.Abs.gf"]
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
system "ls >files"
|
||||
s <- readFile "files"
|
||||
writeFile scriptFile $ unlines $ map mkOne $
|
||||
filter (flip notElem excluded) $ lines s
|
||||
appendFile scriptFile "s\n"
|
||||
appendFile scriptFile $ "pm | wf " ++ multiFile
|
||||
|
||||
mkOne file = "i -old -abs=" ++ absModule ++ " -cnc=" ++ lang ++ " " ++ file
|
||||
where
|
||||
lang = takeWhile (/= '.') file
|
||||
|
||||
Reference in New Issue
Block a user