summaryrefslogtreecommitdiff
path: root/src/GF/Canon/GFCC/GFCCAPI.hs
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2007-09-24 14:36:19 +0000
committerkr.angelov <kr.angelov@gmail.com>2007-09-24 14:36:19 +0000
commitc6c7557b13091116f66884c0d6105dca0fd33df3 (patch)
tree03b141c295280c703cf39f82df099d5168b1842a /src/GF/Canon/GFCC/GFCCAPI.hs
parent9222e4d34c00cffb47a581693a17403e1e4cc3d2 (diff)
merge FCFGParsing with GF.Parsing.FCFG
Diffstat (limited to 'src/GF/Canon/GFCC/GFCCAPI.hs')
-rw-r--r--src/GF/Canon/GFCC/GFCCAPI.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/GF/Canon/GFCC/GFCCAPI.hs b/src/GF/Canon/GFCC/GFCCAPI.hs
index f04808037..0ee273f02 100644
--- a/src/GF/Canon/GFCC/GFCCAPI.hs
+++ b/src/GF/Canon/GFCC/GFCCAPI.hs
@@ -21,7 +21,7 @@ import GF.Canon.GFCC.AbsGFCC
import GF.Canon.GFCC.ParGFCC
import GF.Canon.GFCC.PrintGFCC
import GF.Canon.GFCC.ErrM
-import GF.Canon.GFCC.FCFGParsing
+import GF.Parsing.FCFG
import qualified GF.Canon.GFCC.GenGFCC as G
import GF.Conversion.SimpleToFCFG (convertGrammar,FCat(..))
@@ -82,7 +82,11 @@ file2gfcc f =
linearize mgr lang = GF.Canon.GFCC.DataGFCC.linearize (gfcc mgr) (CId lang)
parse mgr lang cat s =
- err error id $ parserLang (gfcc mgr) (CId lang) (CId cat) (words s)
+ case lookup lang (parsers mgr) of
+ Nothing -> error "no parser"
+ Just pinfo -> case parseFCF "bottomup" pinfo (CId cat) (words s) of
+ Ok x -> x
+ Bad s -> error s
linearizeAll mgr = map snd . linearizeAllLang mgr
linearizeAllLang mgr t =