diff options
| author | aarne <aarne@chalmers.se> | 2009-12-09 09:47:16 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2009-12-09 09:47:16 +0000 |
| commit | c8ceed08efcc0bdc1fcbd89bce643d9f52f0991b (patch) | |
| tree | 5f0b314341c129eba1bc67b8b887fb8a4486fad8 /deprecated/old-lib/resource/hindi/utf8/MkLex.hs | |
| parent | 101df06f6c8380328d4266adadac3ab6d1bac0b3 (diff) | |
moving a few things to deprecated
Diffstat (limited to 'deprecated/old-lib/resource/hindi/utf8/MkLex.hs')
| -rw-r--r-- | deprecated/old-lib/resource/hindi/utf8/MkLex.hs | 19 |
1 files changed, 19 insertions, 0 deletions
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" |
