mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-06-27 20:06:28 -06:00
example generation started
This commit is contained in:
@@ -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 ()
|
||||
|
||||
Reference in New Issue
Block a user