summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/Export.hs
AgeCommit message (Collapse)Author
2019-07-03Start work on PGFtoJSON module. Add compiler flag `-f json`.John J. Camilleri
2019-02-26replace aeson with jsonkrangelov
2019-02-08enable export of canonical grammars to JSON and YAMLPeter Ljunglöf
2019-01-22More work on the canonica_gf exportThomas Hallgren
+ Abstract syntax now is converted directly from the Grammar and not via PGF, so you can use `gf -batch -no-pmcfg -f canonical_gf ...`, to export to canonical_gf while skipping PMCFG and PGF file generation completely. + Flags that are normally copied to PGF files are now included in the caninical_gf output as well (in particular the startcat flag).
2019-01-17Adding -output-format canonical_gfThomas Hallgren
This output format converts a GF grammar to a "canonical" GF grammar. A canonical GF grammar consists of - one self-contained module for the abstract syntax - one self-contained module per concrete syntax The concrete syntax modules contain param, lincat and lin definitions, everything else has been eliminated by the partial evaluator, including references to resource library modules and functors. Record types and tables are retained. The -output-format canonical_gf option writes canonical GF grammars to a subdirectory "canonical/". The canonical GF grammars are written as normal GF ".gf" source files, which can be compiled with GF in the normal way. The translation to canonical form goes via an AST for canonical GF grammars, defined in GF.Grammar.Canonical. This is a simple, self-contained format that doesn't cover everyting in GF (e.g. omitting dependent types and HOAS), but it is complete enough to translate the Foods and Phrasebook grammars found in gf-contrib. The AST is based on the GF grammar "GFCanonical" presented here: https://github.com/GrammaticalFramework/gf-core/issues/30#issuecomment-453556553 The translation of concrete syntax to canonical form is based on the previously existing translation of concrete syntax to Haskell, implemented in module GF.Compile.ConcreteToHaskell. This module could now be reimplemented and simplified significantly by going via the canonical format. Perhaps exports to other output formats could benefit by going via the canonical format too. There is also the possibility of completing the GFCanonical grammar mentioned above and using GF itself to convert canonical GF grammars to other formats...
2017-09-07the experimental export to Lambda Prolog is now obsolete and is removedKrasimir Angelov
2017-08-29added option -output-format=java for producing code for embedded grammars in ↵Krasimir Angelov
Java
2014-12-08Haddock documentation: expose exportPGF, some other small improvementshallgren
2014-07-28Convert from Text.PrettyPrint to GF.Text.Prettyhallgren
All compiler modules now use GF.Text.Pretty instead of Text.PrettyPrint
2014-06-12PGF library: expose only PGF and PGF.Internal instead of all moduleshallgren
PGF exports the public, stable API. PGF.Internal exports additional things needed in the GF compiler & shell, including the nonstardard version of Data.Binary.
2013-11-05Eliminate mutual dependencies between the GF compiler and the PGF libraryhallgren
+ References to modules under src/compiler have been eliminated from the PGF library (under src/runtime/haskell). Only two functions had to be moved (from GF.Data.Utilities to PGF.Utilities) to make this possible, other apparent dependencies turned out to be vacuous. + In gf.cabal, the GF executable no longer directly depends on the PGF library source directory, but only on the exposed library modules. This means that there is less duplication in gf.cabal and that the 30 modules in the PGF library will no longer be compiled twice while building GF. To make this possible, additional PGF library modules have been exposed, even though they should probably be considered for internal use only. They could be collected in a PGF.Internal module, or marked as "unstable", to make this explicit. + Also, by using the -fwarn-unused-imports flag, ~220 redundant imports were found and removed, reducing the total number of imports by ~15%.
2012-06-27major changes to the prolog exportpeter.ljunglof
2012-06-25Export PGF in Python formatpeter.ljunglof
2010-03-20added experimental generation of Lambda Prolog code. Could be used for ↵krasimir
exhaustive generation with dependent types. Doesn't support def rules yet but supports high-order syntax and lambda expressions.
2010-01-27cleanup the code of the PGF interpreter and polish the binary serialization ↵krasimir
to match the preliminary specification
2010-01-17PGF is now real synchronous PMCFGkrasimir
2009-12-14rename some modules that had GFCC in the name to PGF+somethingkrasimir
2009-12-13reorganize the directories under src, and rescue the JavaScript interpreter ↵krasimir
from deprecated