diff options
| author | aarne <aarne@cs.chalmers.se> | 2007-11-04 10:17:48 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2007-11-04 10:17:48 +0000 |
| commit | bb5af4bbba915fb137365718c9e74c62cf1b8955 (patch) | |
| tree | bcade66d0908603f17a262493ef7cbf3ebc37702 /src/GF/Devel/Shell.hs | |
| parent | fdc39cf18c3cb8be2c142bef4a1bf80432a0cb3d (diff) | |
interpreter with pipes
Diffstat (limited to 'src/GF/Devel/Shell.hs')
| -rw-r--r-- | src/GF/Devel/Shell.hs | 8 |
1 files changed, 5 insertions, 3 deletions
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 +-} |
