From bb5af4bbba915fb137365718c9e74c62cf1b8955 Mon Sep 17 00:00:00 2001 From: aarne Date: Sun, 4 Nov 2007 10:17:48 +0000 Subject: interpreter with pipes --- src/GF/Devel/Shell.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/GF/Devel/Shell.hs') diff --git a/src/GF/Devel/Shell.hs b/src/GF/Devel/Shell.hs index f0aaf193b..9e6536087 100644 --- a/src/GF/Devel/Shell.hs +++ b/src/GF/Devel/Shell.hs @@ -1,7 +1,7 @@ module Main where +import GF.Command.Interpreter import GF.GFCC.API -import System.Random (newStdGen) import System (getArgs) import Data.Char (isDigit) @@ -18,14 +18,15 @@ loop :: MultiGrammar -> IO () loop grammar = do s <- getLine if s == "q" then return () else do - treat grammar s + interpretCommandLine grammar s loop grammar printHelp grammar = do putStrLn $ "languages: " ++ unwords (languages grammar) putStrLn $ "categories: " ++ unwords (categories grammar) - putStrLn commands +--- putStrLn commands +{- obsolete commands = unlines [ "Commands:", @@ -64,4 +65,5 @@ treat mgr s = case words s of prlinonly t prlinonly t = mapM_ (lin t) $ langs read1 s = if all isDigit s then read s else 1 +-} -- cgit v1.2.3