mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
cleanup the code of the PGF interpreter and polish the binary serialization to match the preliminary specification
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user