mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 00:22:51 -06:00
labels read from config files for dependency trees, eg lib/src/dep.labels
This commit is contained in:
@@ -579,8 +579,14 @@ allCommands cod env@(pgf, mos) = Map.fromList [
|
||||
"flag -format."
|
||||
],
|
||||
exec = \opts es -> do
|
||||
let debug = isOpt "v" opts
|
||||
let file = valStrOpts "file" "" opts
|
||||
mlab <- case file of
|
||||
"" -> return Nothing
|
||||
_ -> readFile file >>= return . Just . getDepLabels . lines
|
||||
let lang = optLang opts
|
||||
let grph = if null es then [] else dependencyTree Nothing pgf lang (head es)
|
||||
let grph = if null es then [] else
|
||||
dependencyTree debug mlab Nothing pgf lang (head es)
|
||||
if isFlag "view" opts || isFlag "format" opts then do
|
||||
let file s = "_grph." ++ s
|
||||
let view = optViewGraph opts ++ " "
|
||||
@@ -595,8 +601,10 @@ allCommands cod env@(pgf, mos) = Map.fromList [
|
||||
"gr | vt -view=\"open\" -- generate a tree and display alignment on a Mac"
|
||||
],
|
||||
options = [
|
||||
("v","show extra information")
|
||||
],
|
||||
flags = [
|
||||
("file","configuration file for labels per fun, format 'fun l1 ... label ... l2'"),
|
||||
("format","format of the visualization file (default \"png\")"),
|
||||
("view","program to open the resulting file (default \"open\")")
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user