diff options
| author | John J. Camilleri <john@digitalgrammars.com> | 2019-07-03 15:07:31 +0200 |
|---|---|---|
| committer | John J. Camilleri <john@digitalgrammars.com> | 2019-07-03 15:07:31 +0200 |
| commit | c5a75c482ccaf1ce955694fb63dd4e05e9d34a02 (patch) | |
| tree | d7f5e3941739ab564cf5b076d225806452bc2504 /src/compiler/GF/Infra | |
| parent | 32379a8d1118838e8f3487e1c54ab6eee813e7a5 (diff) | |
Start work on PGFtoJSON module. Add compiler flag `-f json`.
Diffstat (limited to 'src/compiler/GF/Infra')
| -rw-r--r-- | src/compiler/GF/Infra/Option.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/GF/Infra/Option.hs b/src/compiler/GF/Infra/Option.hs index 7e1c22b9d..7455c83c4 100644 --- a/src/compiler/GF/Infra/Option.hs +++ b/src/compiler/GF/Infra/Option.hs @@ -90,6 +90,7 @@ data OutputFormat = FmtPGFPretty | FmtCanonicalGF | FmtCanonicalJson | FmtJavaScript + | FmtJSON | FmtPython | FmtHaskell | FmtJava @@ -328,7 +329,7 @@ optDescr = Option ['f'] ["output-format"] (ReqArg outFmt "FMT") (unlines ["Output format. FMT can be one of:", "Canonical GF grammar: canonical_gf, canonical_json, (and haskell with option --haskell=concrete)", - "Multiple concrete: pgf (default), js, pgf_pretty, prolog, python, ...", -- gar, + "Multiple concrete: pgf (default), json, js, pgf_pretty, prolog, python, ...", -- gar, "Single concrete only: bnf, ebnf, fa, gsl, jsgf, regexp, slf, srgs_xml, srgs_abnf, vxml, ....", -- cf, lbnf, "Abstract only: haskell, ..."]), -- prolog_abs, Option [] ["sisr"] (ReqArg sisrFmt "FMT") @@ -474,6 +475,7 @@ outputFormatsExpl = (("canonical_gf", FmtCanonicalGF),"Canonical GF source files"), (("canonical_json", FmtCanonicalJson),"Canonical JSON source files"), (("js", FmtJavaScript),"JavaScript (whole grammar)"), + (("json", FmtJSON),"JSON (whole grammar)"), (("python", FmtPython),"Python (whole grammar)"), (("haskell", FmtHaskell),"Haskell (abstract syntax)"), (("java", FmtJava),"Java (abstract syntax)"), |
