diff options
Diffstat (limited to 'src-3.0/PGF.hs')
| -rw-r--r-- | src-3.0/PGF.hs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src-3.0/PGF.hs b/src-3.0/PGF.hs index f60ba852e..aa2fa2edf 100644 --- a/src-3.0/PGF.hs +++ b/src-3.0/PGF.hs @@ -172,11 +172,15 @@ readPGF f = do linearize pgf lang = PGF.Linearize.linearize pgf (mkCId lang) parse pgf lang cat s = - case lookParser pgf (mkCId lang) of - Nothing -> error ("Unknown language: " ++ lang) - Just pinfo -> case parseFCFG "bottomup" pinfo (mkCId cat) (words s) of - Ok x -> x - Bad s -> error s + case Map.lookup (mkCId lang) (concretes pgf) of + Just cnc -> case parser cnc of + Just pinfo -> if Map.lookup (mkCId "erasing") (cflags cnc) == Just "on" + then Incremental.parse pinfo (mkCId cat) (words s) + else case parseFCFG "bottomup" pinfo (mkCId cat) (words s) of + Ok x -> x + Bad s -> error s + Nothing -> error ("No parser built fo language: " ++ lang) + Nothing -> error ("Unknown language: " ++ lang) linearizeAll mgr = map snd . linearizeAllLang mgr linearizeAllLang mgr t = |
