diff options
| author | krasimir <krasimir@chalmers.se> | 2009-10-24 09:03:40 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-10-24 09:03:40 +0000 |
| commit | 59172a0380cc0c9553b2146af1600bbcacde0b2a (patch) | |
| tree | be738dc0d710e17b6bc2d65e6aab9867a47b8baa /src/GF/Command | |
| parent | 0e3e2d03f94fb3705bc3d2ba0ea3e76fdb814691 (diff) | |
expose the tree visualization via PGF API
Diffstat (limited to 'src/GF/Command')
| -rw-r--r-- | src/GF/Command/Commands.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/GF/Command/Commands.hs b/src/GF/Command/Commands.hs index d182b65ba..c8ea292f3 100644 --- a/src/GF/Command/Commands.hs +++ b/src/GF/Command/Commands.hs @@ -15,10 +15,10 @@ module GF.Command.Commands ( import PGF import PGF.CId import PGF.ShowLinearize +import PGF.VisualizeTree import PGF.Macros import PGF.Data ---- import PGF.Morphology -import PGF.VisualizeTree import GF.Compile.Export import GF.Infra.Option (noOptions, readOutputFormat, Encoding(..)) import GF.Infra.UseIO @@ -146,7 +146,7 @@ allCommands cod env@(pgf, mos) = Map.fromList [ "flag -format." ], exec = \opts es -> do - let grph = if null es then [] else alignLinearize pgf (head es) + let grph = if null es then [] else graphvizAlignment pgf (head es) if isFlag "view" opts || isFlag "format" opts then do let file s = "_grph." ++ s let view = optViewGraph opts ++ " " @@ -592,7 +592,7 @@ allCommands cod env@(pgf, mos) = Map.fromList [ "" -> return Nothing _ -> readFile file >>= return . Just . getDepLabels . lines let lang = optLang opts - let grphs = unlines $ map (dependencyTree outp debug mlab Nothing pgf lang) es + let grphs = unlines $ map (graphvizDependencyTree outp debug mlab Nothing pgf lang) es if isFlag "view" opts || isFlag "format" opts then do let file s = "_grphd." ++ s let view = optViewGraph opts ++ " " @@ -631,7 +631,7 @@ allCommands cod env@(pgf, mos) = Map.fromList [ ], exec = \opts es -> do let lang = optLang opts - let grph = if null es then [] else parseTree Nothing pgf lang (head es) + let grph = if null es then [] else graphvizParseTree pgf lang (head es) if isFlag "view" opts || isFlag "format" opts then do let file s = "_grph." ++ s let view = optViewGraph opts ++ " " @@ -667,7 +667,7 @@ allCommands cod env@(pgf, mos) = Map.fromList [ exec = \opts es -> do let funs = not (isOpt "nofun" opts) let cats = not (isOpt "nocat" opts) - let grph = visualizeTrees pgf (funs,cats) es -- True=digraph + let grph = unlines (map (graphvizAbstractTree pgf (funs,cats)) es) -- True=digraph if isFlag "view" opts || isFlag "format" opts then do let file s = "_grph." ++ s let view = optViewGraph opts ++ " " |
