generating example file

This commit is contained in:
aarne
2007-06-04 14:14:04 +00:00
parent 308b579cff
commit f7aaed3822
3 changed files with 37 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ main = mkgfs
src = "ExxI.gf"
script = "exx.gfs"
linkfile ex = "links/" ++ ex ++ ".txt"
mkgfs = do
writeFile script ""
@@ -11,7 +12,11 @@ mkgfs = do
addLin s = case words s of
c@('e':'x':_):_ -> appendFile script ("l " ++ cc ++ "\n") where
c@('e':'x':_):"=":def -> do
appendFile script ("ps \"" ++ unwords (init def) ++ "\\n\\n\" | wf " ++ linkfile c ++ "\n")
appendFile script ("l -multi " ++ cc ++ " | af " ++ linkfile c ++ "\n")
where
cc = case take 2 (reverse c) of
"PV" -> "utt " ++ c
_ -> c