Export PGF in Python format

This commit is contained in:
peter.ljunglof
2012-06-25 14:16:24 +00:00
parent 98a967a173
commit deec2d4ecf
3 changed files with 112 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import GF.Compile.PGFtoHaskell
import GF.Compile.PGFtoProlog
import GF.Compile.PGFtoLProlog
import GF.Compile.PGFtoJS
import GF.Compile.PGFtoPython
import GF.Infra.Option
import GF.Speech.CFG
import GF.Speech.PGFToCFG
@@ -32,6 +33,7 @@ exportPGF opts fmt pgf =
case fmt of
FmtPGFPretty -> multi "txt" (render . ppPGF)
FmtJavaScript -> multi "js" pgf2js
FmtPython -> multi "py" pgf2python
FmtHaskell -> multi "hs" (grammar2haskell opts name)
FmtProlog -> multi "pl" grammar2prolog
FmtProlog_Abs -> multi "pl" grammar2prolog_abs