summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKrasimir Angelov <kr.angelov@gmail.com>2017-12-09 23:05:32 +0100
committerKrasimir Angelov <kr.angelov@gmail.com>2017-12-09 23:05:32 +0100
commit515ea697ba3274f28cb0f8c1f2a36e3c49391b6c (patch)
tree40e60352f5c48eea7a64097f800f284aa6547dd9 /src
parent7260d5496d8f28a686f6d3af26e9f52aae0aa0c8 (diff)
parent79feeaf5b8f4a7b1a9bcf5f08cec19d2164fdfc4 (diff)
Merge branch 'master' of https://github.com/GrammaticalFramework/GF
Diffstat (limited to 'src')
-rw-r--r--src/compiler/GF/Command/Commands.hs4
1 files changed, 4 insertions, 0 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 =