diff options
| author | bjorn <bjorn@bringert.net> | 2008-10-16 10:18:54 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-10-16 10:18:54 +0000 |
| commit | d10c8bd20a23344af7e50c90b3b6b3f1cf075c7e (patch) | |
| tree | b206b549602683b88cc393ace7df578156434306 /src | |
| parent | dc3f2833441d1a7e00cc04602aab8c72174d54b7 (diff) | |
Removed on-demand parser generation from the PGF interpreter.
Diffstat (limited to 'src')
| -rw-r--r-- | src/PGF.hs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/PGF.hs b/src/PGF.hs index 96fd73c86..dc777f4d5 100644 --- a/src/PGF.hs +++ b/src/PGF.hs @@ -69,7 +69,6 @@ import PGF.Raw.Parse import PGF.Raw.Print (printTree) import PGF.Parsing.FCFG import qualified PGF.Parsing.FCFG.Incremental as Incremental -import qualified GF.Compile.GeneratePMCFG as PMCFG import GF.Text.UTF8 import GF.Data.ErrM @@ -205,14 +204,7 @@ complete :: PGF -> Language -> Category -> String readPGF f = do s <- readFile f >>= return . decodeUTF8 -- pgf is in UTF8, internal in unicode g <- parseGrammar s - return $! addParsers $ toPGF g - --- Adds parsers for all concretes that don't have a parser. -addParsers :: PGF -> PGF -addParsers pgf = pgf { concretes = Map.map conv (concretes pgf) } - where - conv cnc | isJust (parser cnc) = cnc - | otherwise = cnc { parser = Just (PMCFG.convertConcrete (abstract pgf) cnc) } + return $! toPGF g linearize pgf lang = concat . take 1 . PGF.Linearize.linearizes pgf (mkCId lang) |
