mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 08:32:50 -06:00
new PGF output format: prolog syntax
* output a PGF grammar in prolog readable syntax * variables in abstract syntax (hypotheses and lambda-abstractions) are translated to unique logical variables * PGF terms in concrete syntax are translated to more prolog-like terms
This commit is contained in:
@@ -5,6 +5,7 @@ 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
|
||||
import GF.Infra.Option
|
||||
import GF.Speech.CFG
|
||||
@@ -32,6 +33,8 @@ exportPGF opts fmt pgf =
|
||||
FmtJavaScript -> multi "js" pgf2js
|
||||
FmtHaskell -> multi "hs" (grammar2haskell name)
|
||||
FmtHaskell_GADT -> multi "hs" (grammar2haskellGADT name)
|
||||
FmtProlog -> multi "pl" grammar2prolog
|
||||
FmtProlog_Abs -> multi "pl" grammar2prolog_abs
|
||||
FmtBNF -> single "bnf" bnfPrinter
|
||||
FmtSRGS_XML -> single "grxml" (srgsXmlPrinter sisr)
|
||||
FmtSRGS_XML_NonRec -> single "grxml" srgsXmlNonRecursivePrinter
|
||||
|
||||
Reference in New Issue
Block a user