added experimental generation of Lambda Prolog code. Could be used for exhaustive generation with dependent types. Doesn't support def rules yet but supports high-order syntax and lambda expressions.

This commit is contained in:
krasimir
2010-03-20 07:26:53 +00:00
parent 973a0cacb7
commit fba592ecf8
3 changed files with 90 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import PGF
import PGF.Printer
import GF.Compile.PGFtoHaskell
import GF.Compile.PGFtoProlog
import GF.Compile.PGFtoLProlog
import GF.Compile.PGFtoJS
import GF.Infra.Option
import GF.Speech.CFG
@@ -32,8 +33,9 @@ exportPGF opts fmt pgf =
FmtPGFPretty -> multi "txt" (render . ppPGF)
FmtJavaScript -> multi "js" pgf2js
FmtHaskell -> multi "hs" (grammar2haskell opts name)
FmtProlog -> multi "pl" grammar2prolog
FmtProlog_Abs -> multi "pl" grammar2prolog_abs
FmtProlog -> multi "pl" grammar2prolog
FmtProlog_Abs -> multi "pl" grammar2prolog_abs
FmtLambdaProlog -> multi "mod" grammar2lambdaprolog_mod ++ multi "sig" grammar2lambdaprolog_sig
FmtBNF -> single "bnf" bnfPrinter
FmtEBNF -> single "ebnf" (ebnfPrinter opts)
FmtSRGS_XML -> single "grxml" (srgsXmlPrinter opts)