Replace Category with Type in the PGF API. Added readLanguage and showLanguage.

This commit is contained in:
bjorn
2008-10-20 11:35:05 +00:00
parent 3d92897a94
commit a26290659d
8 changed files with 28 additions and 21 deletions

View File

@@ -578,7 +578,7 @@ allCommands cod pgf = Map.fromList [
lang -> map mkCId (chunks ',' lang)
optLang opts = head $ optLangs opts ++ [wildCId]
optType opts =
let str = valStrOpts "cat" (lookStartCat pgf) opts
let str = valStrOpts "cat" (prCId $ lookStartCat pgf) opts
in case readType str of
Just ty -> ty
Nothing -> error ("Can't parse '"++str++"' as type")
@@ -595,7 +595,7 @@ allCommands cod pgf = Map.fromList [
toString = unwords . toStrings
prGrammar opts = case opts of
_ | isOpt "cats" opts -> unwords $ map prCId $ categories pgf
_ | isOpt "cats" opts -> unwords $ map showType $ categories pgf
_ | isOpt "fullform" opts -> concatMap
(prFullFormLexicon . buildMorpho pgf) $ optLangs opts
_ | isOpt "missing" opts ->