summaryrefslogtreecommitdiff
path: root/src/GF/Command
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2009-08-07 13:20:45 +0000
committeraarne <aarne@chalmers.se>2009-08-07 13:20:45 +0000
commitacb930a34915894543472b4e639148b7d7f895b0 (patch)
treefbd86727eecdd0b1d2b75acac93a65f225b47fe0 /src/GF/Command
parentb180ac61a5f6fb06a43da37a82428e1f74ea75d6 (diff)
transliteration now needs addition only in one file; a code can be more than 2 chars; ancientgreek added
Diffstat (limited to 'src/GF/Command')
-rw-r--r--src/GF/Command/Commands.hs31
1 files changed, 8 insertions, 23 deletions
diff --git a/src/GF/Command/Commands.hs b/src/GF/Command/Commands.hs
index a85602b1d..07d710e0a 100644
--- a/src/GF/Command/Commands.hs
+++ b/src/GF/Command/Commands.hs
@@ -36,7 +36,7 @@ import Data.Maybe
import qualified Data.Map as Map
import System.Cmd
import Text.PrettyPrint
-
+import Data.List (sort)
import Debug.Trace
type CommandOutput = ([Expr],String) ---- errors, etc
@@ -550,14 +550,7 @@ allCommands cod env@(pgf, mos) = Map.fromList [
let t = concatMap prOpt (take 1 opts)
let out = maybe "no such transliteration" characterTable $ transliteration t
return $ fromString out,
- options = [
- ("arabic", "Arabic"),
- ("hebrew", "Hebrew (unvocalized)"),
- ("greek", "Greek (modern)"),
- ("devanagari","Devanagari"),
- ("telugu", "Telugu"),
- ("thai", "Thai")
- ]
+ options = transliterationPrintNames
}),
("vt", emptyCommandInfo {
longname = "visualize_tree",
@@ -748,28 +741,16 @@ allCommands cod env@(pgf, mos) = Map.fromList [
ELit (LStr s) -> s
_ -> "\n" ++ showExpr t --- newline needed in other cases than the first
-stringOpOptions = [
+stringOpOptions = sort $ [
("bind","bind tokens separated by Prelude.BIND, i.e. &+"),
("chars","lexer that makes every non-space character a token"),
("from_cp1251","decode from cp1251 (Cyrillic used in Bulgarian resource)"),
- ("from_arabic","from unicode to GF Arabic transliteration"),
- ("from_devanagari","from unicode to GF Devanagari transliteration"),
- ("from_hebrew","from unicode to GF unvocalized Hebrew transliteration"),
- ("from_greek","from unicode to GF modern Greek transliteration"),
- ("from_telugu","from unicode to GF Telugu transliteration"),
- ("from_thai","from unicode to GF Thai transliteration"),
("from_utf8","decode from utf8 (default)"),
("lextext","text-like lexer"),
("lexcode","code-like lexer"),
("lexmixed","mixture of text and code (code between $...$)"),
("to_cp1251","encode to cp1251 (Cyrillic used in Bulgarian resource)"),
- ("to_arabic","from GF Arabic transliteration to unicode"),
- ("to_devanagari","from GF Devanagari transliteration to unicode"),
- ("to_greek","from GF modern Greek transliteration to unicode"),
- ("to_hebrew","from GF unvocalized Hebrew transliteration to unicode"),
("to_html","wrap in a html file with linebreaks"),
- ("to_telugu","from GF Telugu transliteration to unicode"),
- ("to_thai","from GF Thai transliteration to unicode"),
("to_utf8","encode to utf8 (default)"),
("unlextext","text-like unlexer"),
("unlexcode","code-like unlexer"),
@@ -777,7 +758,11 @@ stringOpOptions = [
("unchars","unlexer that puts no spaces between tokens"),
("unwords","unlexer that puts a single space between tokens (default)"),
("words","lexer that assumes tokens separated by spaces (default)")
- ]
+ ] ++
+ concat [
+ [("from_" ++ p, "from unicode to GF " ++ n ++ " transliteration"),
+ ("to_" ++ p, "from GF " ++ n ++ " transliteration to unicode")] |
+ (p,n) <- transliterationPrintNames]
treeOpOptions pgf = [(op,expl) | (op,(expl,_)) <- allTreeOps pgf]