1
0
forked from GitHub/gf-rgl

Move everything related to synopsis into subfolder

Clean up some unused and generated files
This commit is contained in:
John J. Camilleri
2018-11-12 10:05:42 +01:00
parent 3ac2bcc8af
commit 74384044c9
26 changed files with 94 additions and 4407 deletions

32
doc/synopsis/MkExx.hs Normal file
View File

@@ -0,0 +1,32 @@
-- make a script for computing examples
-- usage: runghc MkExx.hs <koe.txt >koe.gfs
-- then: gf -retain -s ../alltenses/TryRon.gfo <koe.gfs
-- called automatically by 'make exx'
main = interact (unlines . concatMap mkScript . takeWhile (/="--.") . lines)
mkScript l = case l of
' ':_ ->
let ident = mkIdent $ unwords $ takeWhile (/="--") $ words l
in [add $ psq ident]
'-':_ -> []
_ -> [
add $ psq l,
add $ "cc -one " ++ l,
add $ psq "*"
]
add = ('\n':)
psq s = "ps \"" ++ s ++ "\""
-- makes mkUtt : QS -> Utt to mkUtt-QS-Utt
mkIdent :: String -> String
mkIdent = concatMap unspec where
unspec c = case c of
' ' -> ""
'>' -> ""
'(' -> ""
')' -> ""
':' -> "-"
_ -> [c]