1
0
forked from GitHub/gf-core

Wordlist format

This commit is contained in:
aarne
2006-05-18 14:59:58 +00:00
parent e38d847a54
commit 0ff652e33a
7 changed files with 134 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ import GF.Infra.Option
import GF.UseGrammar.Information
import GF.Shell.HelpFile
import GF.Compile.PrOld
import GF.Compile.Wordlist
import GF.Grammar.PrGrammar
import Control.Monad (foldM,liftM)
@@ -189,6 +190,10 @@ execLine put (c@(co, os), arg, cs) (outps,st) = do
execC :: CommandOpt -> ShellIO
execC co@(comm, opts0) sa@(sh@(st,(h,_,_,_)),a) = checkOptions st co >> case comm of
CImport file | fileSuffix file == "gfwl" -> do
fs <- mkWordlist file
foldM (\x y -> execC (CImport y, opts) x) sa fs
CImport file | oElem fromExamples opts -> do
es <- liftM nub $ getGFEFiles opts file
system $ "gf -examples" +++ unlines es