example generation started

This commit is contained in:
aarne
2007-06-02 21:50:55 +00:00
parent 0958b4ddd2
commit 0a3cf11859
8 changed files with 133 additions and 25 deletions

View File

@@ -0,0 +1,16 @@
-- to process constructor examples to lin commans
main = mkgfs
src = "ExxI.gf"
script = "exx.gfs"
mkgfs = do
writeFile script ""
readFile src >>= (mapM addLin . lines)
addLin s = case words s of
c@('e':'x':_):_ -> appendFile script ("l " ++ c ++ "\n")
_ -> return ()