1
0
forked from GitHub/gf-core

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:
peb
2008-09-03 09:04:09 +00:00
parent 2efc33329e
commit 8952a626d0
3 changed files with 308 additions and 2 deletions

View File

@@ -84,6 +84,8 @@ data OutputFormat = FmtPGF
| FmtJavaScript
| FmtHaskell
| FmtHaskell_GADT
| FmtProlog
| FmtProlog_Abs
| FmtBNF
| FmtSRGS_XML
| FmtSRGS_XML_NonRec
@@ -393,9 +395,9 @@ optDescr =
Option [] ["gfo-dir"] (ReqArg gfoDir "DIR") "Directory to put .gfo files in (default = '.').",
Option ['f'] ["output-format"] (ReqArg outFmt "FMT")
(unlines ["Output format. FMT can be one of:",
"Multiple concrete: pgf (default), gar, js, ...",
"Multiple concrete: pgf (default), gar, js, prolog, ...",
"Single concrete only: cf, bnf, lbnf, gsl, srgs_xml, srgs_abnf, ...",
"Abstract only: haskell, ..."]),
"Abstract only: haskell, prolog_abs, ..."]),
Option [] ["sisr"] (ReqArg sisrFmt "FMT")
(unlines ["Include SISR tags in generated speech recognition grammars.",
"FMT can be one of: old, 1.0"]),
@@ -444,6 +446,8 @@ outputFormats =
("js", FmtJavaScript),
("haskell", FmtHaskell),
("haskell_gadt", FmtHaskell_GADT),
("prolog", FmtProlog),
("prolog_abs", FmtProlog_Abs),
("bnf", FmtBNF),
("srgs_xml", FmtSRGS_XML),
("srgs_xml_nonrec", FmtSRGS_XML_NonRec),