diff options
| author | aarne <aarne@cs.chalmers.se> | 2005-11-25 17:40:51 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2005-11-25 17:40:51 +0000 |
| commit | fe1fdf3afd7755f6b5d8282d85f53924c662bf90 (patch) | |
| tree | 228842fe464f242a5a091b37b54287d6dfa7ed1a /src/GF/Shell | |
| parent | dbe8e61acc616b8f5ac07e8df89eb98a7997c29d (diff) | |
questions and transfer in shell state
Diffstat (limited to 'src/GF/Shell')
| -rw-r--r-- | src/GF/Shell/PShell.hs | 6 | ||||
| -rw-r--r-- | src/GF/Shell/ShellCommands.hs | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/GF/Shell/PShell.hs b/src/GF/Shell/PShell.hs index 0649fe7a8..cd54c71ed 100644 --- a/src/GF/Shell/PShell.hs +++ b/src/GF/Shell/PShell.hs @@ -119,6 +119,7 @@ pCommand ws = case ws of "gt" : t -> aTerm CGenerateTrees t "pt" : s -> aTerm CPutTerm s "wt" : f : s -> aTerm (CWrapTerm (pzIdent f)) s + "at" : f : s -> aTerm (CApplyTransfer (pmIdent f)) s "ma" : s -> aString CMorphoAnalyse s "tt" : s -> aString CTestTokenizer s "cc" : s -> aUnit $ CComputeConcrete $ unwords s @@ -175,4 +176,7 @@ pCommand ws = case ws of aTermLi c ss = (c [], [ASTrm $ unwords ss]) ---- (c forms, [ASTrms [term]]) where - ---- (forms,term) = ([], s2t (unwords ss)) ---- string2formsAndTerm (unwords ss) + ---- (forms,term) = ([], s2t (unwords ss)) ----string2formsAndTerm(unwords ss) + pmIdent m = case span (/='.') m of + (k,_:f) -> (Just (pzIdent k), pzIdent f) + _ -> (Nothing,pzIdent m) diff --git a/src/GF/Shell/ShellCommands.hs b/src/GF/Shell/ShellCommands.hs index 121d8cda6..b9ab2c01b 100644 --- a/src/GF/Shell/ShellCommands.hs +++ b/src/GF/Shell/ShellCommands.hs @@ -50,6 +50,7 @@ data Command = | CGenerateTrees | CPutTerm | CWrapTerm I.Ident + | CApplyTransfer (Maybe I.Ident, I.Ident) | CMorphoAnalyse | CTestTokenizer | CComputeConcrete String |
