mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-08 10:42:50 -06:00
command dg for showing source grammar dep graph restored
This commit is contained in:
@@ -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) ->
|
||||
|
||||
Reference in New Issue
Block a user