diff options
Diffstat (limited to 'src/GF')
| -rw-r--r-- | src/GF/Compile/Export.hs | 7 | ||||
| -rw-r--r-- | src/GF/Compile/GrammarToGFCC.hs | 7 | ||||
| -rw-r--r-- | src/GF/Infra/Option.hs | 8 |
3 files changed, 4 insertions, 18 deletions
diff --git a/src/GF/Compile/Export.hs b/src/GF/Compile/Export.hs index 575a9dc84..64b4aeabf 100644 --- a/src/GF/Compile/Export.hs +++ b/src/GF/Compile/Export.hs @@ -2,8 +2,6 @@ module GF.Compile.Export where import PGF.CId import PGF.Data (PGF(..)) -import PGF.Raw.Print (printTree) -import PGF.Raw.Convert (fromPGF) import GF.Compile.GFCCtoHaskell import GF.Compile.GFCCtoProlog import GF.Compile.GFCCtoJS @@ -32,7 +30,6 @@ exportPGF :: Options -> [(FilePath,String)] -- ^ List of recommended file names and contents. exportPGF opts fmt pgf = case fmt of - FmtPGF -> multi "pgf" printPGF FmtPGFPretty -> multi "txt" prPGFPretty FmtJavaScript -> multi "js" pgf2js FmtHaskell -> multi "hs" (grammar2haskell opts name) @@ -65,7 +62,3 @@ outputConcr :: PGF -> CId outputConcr pgf = case cncnames pgf of [] -> error "No concrete syntax." cnc:_ -> cnc - -printPGF :: PGF -> String -printPGF = encodeUTF8 . printTree . fromPGF - diff --git a/src/GF/Compile/GrammarToGFCC.hs b/src/GF/Compile/GrammarToGFCC.hs index 4b5cf24bb..267015fb6 100644 --- a/src/GF/Compile/GrammarToGFCC.hs +++ b/src/GF/Compile/GrammarToGFCC.hs @@ -1,5 +1,5 @@ {-# LANGUAGE PatternGuards #-} -module GF.Compile.GrammarToGFCC (prGrammar2gfcc,mkCanon2gfcc,addParsers) where +module GF.Compile.GrammarToGFCC (mkCanon2gfcc,addParsers) where import GF.Compile.Export import GF.Compile.OptimizeGF (unshareModule) @@ -37,11 +37,6 @@ traceD s t = t -- the main function: generate PGF from GF. - -prGrammar2gfcc :: Options -> String -> SourceGrammar -> (String,String) -prGrammar2gfcc opts cnc gr = (abs,printPGF gc) where - (abs,gc) = mkCanon2gfcc opts cnc gr - mkCanon2gfcc :: Options -> String -> SourceGrammar -> (String,D.PGF) mkCanon2gfcc opts cnc gr = (prIdent abs, (canon2gfcc opts pars . reorder abs . canon2canon abs) gr) diff --git a/src/GF/Infra/Option.hs b/src/GF/Infra/Option.hs index 25ccb09a2..f9221b233 100644 --- a/src/GF/Infra/Option.hs +++ b/src/GF/Infra/Option.hs @@ -80,8 +80,7 @@ data Phase = Preproc | Convert | Compile | Link data Encoding = UTF_8 | ISO_8859_1 | CP_1251 deriving (Eq,Ord) -data OutputFormat = FmtPGF - | FmtPGFPretty +data OutputFormat = FmtPGFPretty | FmtJavaScript | FmtHaskell | FmtProlog @@ -239,7 +238,7 @@ defaultFlags = Flags { optShowCPUTime = False, optEmitGFO = True, optGFODir = ".", - optOutputFormats = [FmtPGF], + optOutputFormats = [], optSISR = Nothing, optHaskellOptions = Set.empty, optLexicalCats = Set.empty, @@ -427,8 +426,7 @@ optDescr = outputFormats :: [(String,OutputFormat)] outputFormats = - [("pgf", FmtPGF), - ("pgf-pretty", FmtPGFPretty), + [("pgf-pretty", FmtPGFPretty), ("js", FmtJavaScript), ("haskell", FmtHaskell), ("prolog", FmtProlog), |
