From 59172a0380cc0c9553b2146af1600bbcacde0b2a Mon Sep 17 00:00:00 2001 From: krasimir Date: Sat, 24 Oct 2009 09:03:40 +0000 Subject: expose the tree visualization via PGF API --- src/GF/Command/Commands.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/GF/Command') 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 ++ " " -- cgit v1.2.3