From 5c713d8f027a9b6be687ee3f7e917e8bd2115773 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 27 Jun 2008 09:18:50 +0000 Subject: took away old-examples --- old-examples/CLE/CF2GF.hs | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 old-examples/CLE/CF2GF.hs (limited to 'old-examples/CLE/CF2GF.hs') diff --git a/old-examples/CLE/CF2GF.hs b/old-examples/CLE/CF2GF.hs deleted file mode 100644 index 1bb1d6611..000000000 --- a/old-examples/CLE/CF2GF.hs +++ /dev/null @@ -1,20 +0,0 @@ -import Data.List (intersperse) -import Data.Char (isAlpha) - --- to massage cf rules to funs, in order, preserving comments --- to get cats, use pg -printer=gf - -cf2gf :: FilePath -> IO () -cf2gf file = do - ss <- readFile file >>= return . lines - mapM_ (putStrLn . mkOne) ss - -mkOne line = case words line of - fun : cat : "::=" : cats -> - let - (cats0,cats2) = span (/=";") cats - cats1 = filter (isAlpha . head) cats0 ++ [cat] - in - unwords $ [init fun, ":"] ++ intersperse "->" cats1 ++ cats2 - _ -> line - \ No newline at end of file -- cgit v1.2.3