From c8ceed08efcc0bdc1fcbd89bce643d9f52f0991b Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 9 Dec 2009 09:47:16 +0000 Subject: moving a few things to deprecated --- deprecated/old-lib/resource/hindi/utf8/MkLex.hs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 deprecated/old-lib/resource/hindi/utf8/MkLex.hs (limited to 'deprecated/old-lib/resource/hindi/utf8/MkLex.hs') diff --git a/deprecated/old-lib/resource/hindi/utf8/MkLex.hs b/deprecated/old-lib/resource/hindi/utf8/MkLex.hs new file mode 100644 index 000000000..248f6f875 --- /dev/null +++ b/deprecated/old-lib/resource/hindi/utf8/MkLex.hs @@ -0,0 +1,19 @@ +main = interact (concat . map mkOne . zip [10001..] . lines) + +mkOne (i,line) = case line of + '<':cs -> case pos line of + "nuon" -> entry (show i) (word line) "N" + "brev" -> entry (show i) (word line) "V" + "evitcejda" -> entry (show i) (word line) "A" + _ -> "" + _ -> "" + +pos line = case reverse line of + '>':cs -> takeWhile (/='<') cs + _ -> "" + +word line = takeWhile (/='>') line + +entry i w c = + "fun w" ++ i ++ "_" ++ c ++ " : " ++ c ++ " ;\n" ++ + "lin w" ++ i ++ "_" ++ c ++ " = mk" ++ c ++ " \"" ++ w ++ "\" ;\n" -- cgit v1.2.3