diff options
| author | aarne <unknown> | 2003-12-09 16:39:24 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2003-12-09 16:39:24 +0000 |
| commit | 08c9a2ab8cf7b77a5c0392f5f8e9643e39c89c5b (patch) | |
| tree | 56add96ffe8436f3fe920deb4bc7da320bc19e5d /src/GF/Shell | |
| parent | 8e637feb793364134d469cb7d1e68605aab2c2ea (diff) | |
Introduced output of stripped format gfcm.
Diffstat (limited to 'src/GF/Shell')
| -rw-r--r-- | src/GF/Shell/PShell.hs | 1 | ||||
| -rw-r--r-- | src/GF/Shell/SubShell.hs | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/GF/Shell/PShell.hs b/src/GF/Shell/PShell.hs index f28218f27..666b5b681 100644 --- a/src/GF/Shell/PShell.hs +++ b/src/GF/Shell/PShell.hs @@ -51,6 +51,7 @@ pCommand ws = case ws of "i" : f : [] -> aUnit (CImport f) "rl" : l : [] -> aUnit (CRemoveLanguage (language l)) "e" : [] -> aUnit CEmptyState + "s" : [] -> aUnit CStripState "tg" : f : [] -> aUnit (CTransformGrammar f) "cl" : f : [] -> aUnit (CConvertLatex f) diff --git a/src/GF/Shell/SubShell.hs b/src/GF/Shell/SubShell.hs index 1b8a647df..0134b3530 100644 --- a/src/GF/Shell/SubShell.hs +++ b/src/GF/Shell/SubShell.hs @@ -26,7 +26,11 @@ translateSession :: Options -> ShellState -> IO () translateSession opts st = do let grs = allStateGrammars st cat = firstCatOpts opts (firstStateGrammar st) - trans = unlines . translateBetweenAll grs cat + trans s = unlines $ + if oElem showLang opts then + [l +++ ":" +++ s | (l,s) <- zip (map (prIdent . cncId) grs) + (translateBetweenAll grs cat s)] + else translateBetweenAll grs cat s translateLoop opts trans translateLoop opts trans = do |
