From eb0fefec28cf9c089c55f1ef5de9c772faa61786 Mon Sep 17 00:00:00 2001 From: krasimir Date: Mon, 20 Oct 2008 08:42:39 +0000 Subject: preparation for dep. types. The -cat option can take any type instead of just a category. The PGF API is generalized as well. --- src/PGF/Parsing/FCFG.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/PGF/Parsing/FCFG.hs') diff --git a/src/PGF/Parsing/FCFG.hs b/src/PGF/Parsing/FCFG.hs index fe56f8712..088c9f480 100644 --- a/src/PGF/Parsing/FCFG.hs +++ b/src/PGF/Parsing/FCFG.hs @@ -30,10 +30,10 @@ import qualified Data.Map as Map parseFCFG :: String -- ^ parsing strategy -> ParserInfo -- ^ compiled grammar (fcfg) - -> CId -- ^ starting category + -> Type -- ^ start type -> [String] -- ^ input tokens -> Err [Tree] -- ^ resulting GF terms -parseFCFG "bottomup" pinfo start toks = return $ Active.parse "b" pinfo start toks -parseFCFG "topdown" pinfo start toks = return $ Active.parse "t" pinfo start toks -parseFCFG "incremental" pinfo start toks = return $ Incremental.parse pinfo start toks -parseFCFG strat pinfo start toks = fail $ "FCFG parsing strategy not defined: " ++ strat +parseFCFG "bottomup" pinfo typ toks = return $ Active.parse "b" pinfo typ toks +parseFCFG "topdown" pinfo typ toks = return $ Active.parse "t" pinfo typ toks +parseFCFG "incremental" pinfo typ toks = return $ Incremental.parse pinfo typ toks +parseFCFG strat pinfo typ toks = fail $ "FCFG parsing strategy not defined: " ++ strat -- cgit v1.2.3