diff options
| author | Inari Listenmaa <inari.listenmaa@gmail.com> | 2017-12-28 13:20:44 +0200 |
|---|---|---|
| committer | Inari Listenmaa <inari.listenmaa@gmail.com> | 2017-12-28 13:20:44 +0200 |
| commit | ced0bff5c7d3e947390b51e3c5e03fc521f22feb (patch) | |
| tree | 500fb84dc12803ebe15123588b28b7a6d4afcfcf /src/compiler/GF/Command | |
| parent | ef1b67356d598a341ace23264771aeb82ed342f2 (diff) | |
| parent | e2ec40a22f1ac754413828212f0468358ffc3936 (diff) | |
Merge remote-tracking branch 'origin/master' into basque
Diffstat (limited to 'src/compiler/GF/Command')
| -rw-r--r-- | src/compiler/GF/Command/Commands.hs | 4 | ||||
| -rw-r--r-- | src/compiler/GF/Command/Commands2.hs | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs index 27b72b5c4..3ca2ab962 100644 --- a/src/compiler/GF/Command/Commands.hs +++ b/src/compiler/GF/Command/Commands.hs @@ -275,6 +275,7 @@ pgfCommands = Map.fromList [ ("list","show all forms and variants, comma-separated on one line (cf. l -all)"), ("multi","linearize to all languages (default)"), ("table","show all forms labelled by parameters"), + ("tabtreebank","show the tree and its linearizations on a tab-separated line"), ("treebank","show the tree and tag linearizations with language names") ] ++ stringOpOptions, flags = [ @@ -791,6 +792,9 @@ pgfCommands = Map.fromList [ _ | isOpt "treebank" opts -> (showCId (abstractName pgf) ++ ": " ++ showExpr [] t) : [showCId lang ++ ": " ++ s | lang <- optLangs pgf opts, s<-linear pgf opts lang t] + _ | isOpt "tabtreebank" opts -> + return $ concat $ intersperse "\t" $ (showExpr [] t) : + [s | lang <- optLangs pgf opts, s <- linear pgf opts lang t] _ | isOpt "chunks" opts -> map snd $ linChunks pgf opts t _ -> [s | lang <- optLangs pgf opts, s<-linear pgf opts lang t] linChunks pgf opts t = diff --git a/src/compiler/GF/Command/Commands2.hs b/src/compiler/GF/Command/Commands2.hs index 995d2d560..0cc5d7d23 100644 --- a/src/compiler/GF/Command/Commands2.hs +++ b/src/compiler/GF/Command/Commands2.hs @@ -612,7 +612,7 @@ pgfCommands = Map.fromList [ Nothing -> let funs = functionsByCat pgf id in showCat id funs)) where - showCat c funs = "cat "++showCategory pgf c++ + showCat c funs = "cat "++c++ " ;\n\n"++ unlines [showFun f ty| f<-funs, Just ty <- [functionType pgf f]] |
