summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Command
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-01-27 09:39:14 +0000
committerkrasimir <krasimir@chalmers.se>2010-01-27 09:39:14 +0000
commit890d45579300f39d50a5a18a9f6feed8634ae8ba (patch)
tree056af80026eea5d67b68ef74f50ee5931566c822 /src/compiler/GF/Command
parentb206aa3464bf8b766b61a31efb72d03c7dd3c1a9 (diff)
cleanup the code of the PGF interpreter and polish the binary serialization to match the preliminary specification
Diffstat (limited to 'src/compiler/GF/Command')
-rw-r--r--src/compiler/GF/Command/Commands.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs
index a032145a8..5d2b5421b 100644
--- a/src/compiler/GF/Command/Commands.hs
+++ b/src/compiler/GF/Command/Commands.hs
@@ -845,9 +845,9 @@ allCommands cod env@(pgf, mos) = Map.fromList [
-- - If lang has coding=other, and -to_utf8 is in opts, from_other is applied first.
-- THIS DOES NOT WORK UNFORTUNATELY - can't use the grammar flag properly
unlexx opts lang = {- trace (unwords optsC) $ -} stringOps Nothing optsC where ----
- optsC = case lookFlag pgf lang "coding" of
- Just "utf8" -> filter (/="to_utf8") $ map prOpt opts
- Just other | isOpt "to_utf8" opts ->
+ optsC = case lookConcrFlag pgf (mkCId lang) (mkCId "coding") of
+ Just (LStr "utf8") -> filter (/="to_utf8") $ map prOpt opts
+ Just (LStr other) | isOpt "to_utf8" opts ->
let cod = ("from_" ++ other)
in cod : filter (/=cod) (map prOpt opts)
_ -> map prOpt opts
@@ -974,9 +974,6 @@ morphologyQuiz cod pgf ig typ = do
infinity :: Int
infinity = 256
-lookFlag :: PGF -> String -> String -> Maybe String
-lookFlag pgf lang flag = lookConcrFlag pgf (mkCId lang) (mkCId flag)
-
prFullFormLexicon :: Morpho -> String
prFullFormLexicon mo =
unlines (map prMorphoAnalysis (fullFormLexicon mo))