summaryrefslogtreecommitdiff
path: root/src/GF/Shell
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2005-12-01 17:58:31 +0000
committeraarne <aarne@cs.chalmers.se>2005-12-01 17:58:31 +0000
commitda22eac1803ea4e29dd88888157918878f75d149 (patch)
tree91d01a6110cc9159a93e729a56b68f2d7ad9dfac /src/GF/Shell
parent56f62f31d88348e25636e13d9f8f57a04c1b0b74 (diff)
making apply_transfer work
Diffstat (limited to 'src/GF/Shell')
-rw-r--r--src/GF/Shell/HelpFile.hs11
-rw-r--r--src/GF/Shell/ShellCommands.hs2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/GF/Shell/HelpFile.hs b/src/GF/Shell/HelpFile.hs
index 3162bd88a..82d3a9713 100644
--- a/src/GF/Shell/HelpFile.hs
+++ b/src/GF/Shell/HelpFile.hs
@@ -51,6 +51,7 @@ txtHelpFile =
"\n .gfe example-based grammar files (only with the -ex option)" ++
"\n .ebnf Extended BNF format" ++
"\n .cf Context-free (BNF) format" ++
+ "\n .trc TransferCore format" ++
"\n options:" ++
"\n -old old: parse in GF<2.0 format (not necessary)" ++
"\n -v verbose: give lots of messages " ++
@@ -219,6 +220,15 @@ txtHelpFile =
"\n p -cat=S -mcfg \"jag är gammal\" -- parse an S with the MCFG" ++
"\n rf examples.txt | p -lines -- parse each non-empty line of the file" ++
"\n" ++
+ "\nat, apply_transfer: at (Module.Fun | Fun)" ++
+ "\n Transfer a term using Fun from Module, or the topmost transfer" ++
+ "\n module. Transfer modules are given in the .trc format. They are" ++
+ "\n shown by the 'po' command." ++
+ "\n flags:" ++
+ "\n -lang typecheck the result in this lang instead of default lang" ++
+ "\n examples:" ++
+ "\n p -lang=Cncdecimal \"123\" | at num2bin | l -- convert dec to bin" ++
+ "\n" ++
"\ntt, test_tokenizer: tt String" ++
"\n Show the token list sent to the parser when String is parsed." ++
"\n HINT: can be useful when debugging the parser." ++
@@ -588,6 +598,7 @@ txtHelpFile =
"\n -printer=unpar a gfc grammar with parameters eliminated" ++
"\n -printer=functiongraph abstract syntax functions in 'dot' format" ++
"\n -printer=typegraph abstract syntax categories in 'dot' format" ++
+ "\n -printer=transfer Transfer language datatype (.tr file format)" ++
"\n -printer=gfcm M gfcm file (default for pm)" ++
"\n -printer=header M gfcm file with header (for GF embedded in Java)" ++
"\n -printer=graph M module dependency graph in 'dot' (graphviz) format" ++
diff --git a/src/GF/Shell/ShellCommands.hs b/src/GF/Shell/ShellCommands.hs
index b9ab2c01b..bf7d4f1ff 100644
--- a/src/GF/Shell/ShellCommands.hs
+++ b/src/GF/Shell/ShellCommands.hs
@@ -124,6 +124,7 @@ testValidFlag :: ShellState -> Command -> OptFunId -> String -> Err ()
testValidFlag st co f x = case f of
"cat" -> testIn (map prQIdent_ (allCategories st))
"lang" -> testIn (map prt (allLanguages st))
+ "transfer" -> testIn (map prt (allTransfers st))
"res" -> testIn (map prt (allResources (srcModules st)))
"number" -> testN
"printer" -> case co of
@@ -181,6 +182,7 @@ optionsOfCommand co = case co of
CGenerateTrees -> both "metas" "atoms depth alts cat lang number"
CPutTerm -> flags "transform number"
CWrapTerm _ -> opts "c"
+ CApplyTransfer _ -> flags "lang transfer"
CMorphoAnalyse -> both "short" "lang"
CTestTokenizer -> flags "lexer"
CComputeConcrete _ -> flags "res"