From f7dfc6f1d7298ca5fd5aa63dddcdcb196ead251f Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 19 Dec 2008 14:28:58 +0000 Subject: command dg for showing source grammar dep graph restored --- src/GFI.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/GFI.hs') diff --git a/src/GFI.hs b/src/GFI.hs index cbc9b5e84..748fcfe55 100644 --- a/src/GFI.hs +++ b/src/GFI.hs @@ -8,6 +8,7 @@ import GF.Command.Abstract import GF.Command.Parse import GF.Data.ErrM import GF.Grammar.API -- for cc command +import GF.Infra.Dependencies import GF.Infra.UseIO import GF.Infra.Option import GF.System.Readline @@ -101,6 +102,10 @@ loop opts gfenv0 = do Ok x -> putStrLn $ enc (showTerm style x) Bad s -> putStrLn $ enc s loopNewCPU gfenv + "dg":ws -> do + writeFile "_gfdepgraph.dot" (depGraph sgr) + putStrLn "wrote graph in file _gfdepgraph.dot" + loopNewCPU gfenv "i":args -> do gfenv' <- case parseOptions args of Ok (opts',files) -> -- cgit v1.2.3