1
0
forked from GitHub/gf-core

langs option to Make.hs ; utf8 exception in linearization from the coding flag in grammar

This commit is contained in:
aarne
2008-06-24 08:35:02 +00:00
parent 984c5ecc48
commit 9945a5b08e
6 changed files with 38 additions and 14 deletions

View File

@@ -497,7 +497,11 @@ allCommands pgf = Map.fromList [
(abstractName pgf ++ ": " ++ showTree t) :
[lang ++ ": " ++ linear opts lang t | lang <- optLangs opts]
unlex opts lang = stringOps opts
unlex opts lang = stringOps (exceptUTF8 opts) where
exceptUTF8 = if isUTF8 then filter ((/="to_UTF8") . prOpt) else id
isUTF8 = case lookFlag pgf lang "coding" of
Just "utf8" -> True
_ -> False
optRestricted opts = restrictPGF (hasLin pgf (mkCId (optLang opts))) pgf
@@ -570,3 +574,5 @@ morphologyQuiz pgf ig cat = do
infinity :: Int
infinity = 256
lookFlag :: PGF -> String -> String -> Maybe String
lookFlag pgf lang flag = lookConcrFlag pgf (mkCId lang) (mkCId flag)