1
0
forked from GitHub/gf-core
Commit Graph

169 Commits

Author SHA1 Message Date
John J. Camilleri
c5a75c482c Start work on PGFtoJSON module. Add compiler flag -f json. 2019-07-03 15:07:31 +02:00
krangelov
32379a8d11 fully supported case-insensitive parsing/lookup 2019-06-30 08:48:23 +02:00
Thomas Hallgren
86066d4b12 Eliminate the dependency on time-compat
It was only needed for compatibility with directory<1.2, but
directory>=1.2 has been shipped with ghc since ghc-7.6.

Note: time-compat-1.9.* (the current version) is a completely different
package, that does not provide the needed function toUTCTime, which
was provided in time-compat-0.1.*.
2019-05-15 12:05:38 +02:00
Thomas Hallgren
5b401f3880 Expose GF.Grammar.Canonical + some refactoring
to make it available in other tools by depending on the gf package and
importing it
2019-03-07 17:41:16 +01:00
Thomas Hallgren
b783299b73 Rename module GF.Compile.ConcreteToCanonical to GF.Compile.GrammarToCanonical 2019-03-07 14:47:37 +01:00
Thomas Hallgren
bf17fa0bb2 Bump version number to 3.10.3-git
This is not an announced realase, but this is version now installed on our
server.
2019-03-05 20:18:30 +01:00
Thomas Hallgren
eb46577f58 debian/rules bug fix: the RGL was not included in .deb packages
The problem was that the RGL was both built and copied to the destdir
during the build step, which caused it to be deleted before the install
step. It is now copied to destdir during the install step.
2019-03-05 16:19:46 +01:00
krangelov
bde1a6d586 fix the dependency to json 2019-02-26 19:32:08 +01:00
krangelov
25dc934871 replace aeson with json 2019-02-26 19:27:36 +01:00
Thomas Hallgren
a928e4657e Need aeson>=1.3
Also remove ununsed GF.Compile.PGFtoAbstract
2019-02-21 14:43:53 +01:00
Peter Ljunglöf
a0c1da2548 encoding/decoding canonical GF grammars to/from JSON and YAML 2019-02-08 09:10:04 +01:00
Thomas Hallgren
e4abff7725 More work on the canonica_gf export
+ 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-22 17:16:32 +01:00
Thomas Hallgren
fc1b51aa95 Adding -output-format canonical_gf
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...
2019-01-17 21:04:08 +01:00
Thomas Hallgren
5fe963dd02 Fix compilation with ghc-7.10
NoMonadFailDesugaring is not supported by ghc-7.10, but it is only needed
with ghc>=8.6
2019-01-16 14:42:34 +01:00
John J. Camilleri
ee5ac81dfc Make GF compile with GHC 8.6.2
- Re-implement `Distribution.Simple.BuildPaths.exeExtension`
- Turn off `MonadFailDesugaring`

Tested with GHC:

- 7.10.3
- 8.0.2
- 8.2.2
- 8.4.3
- 8.6.2

Yay Stack!
2018-12-04 10:31:53 +01:00
Thomas Hallgren
60738dda6d gf.cabal: update tested-with 2018-12-02 21:20:54 +01:00
Thomas Hallgren
47c983c625 gf.cabal: remove redundant dependency on old-locale 2018-11-29 23:06:30 +01:00
John J. Camilleri
07768ba4c4 Revert "Completely remove uses of example-based"
This reverts commit 69cea20dac.
2018-11-28 19:23:05 +01:00
John J. Camilleri
69cea20dac Completely remove uses of example-based 2018-11-28 18:09:56 +01:00
John J. Camilleri
397f18a298 remove custom-binary flag; update Cabal version restriction; bump version to 3.10 2018-11-28 13:36:11 +01:00
Thomas Hallgren
d9f0dfd400 gf.cabal: expose GF.Text.Lexing, needed by gf-server.cabal 2018-07-31 15:02:59 +02:00
John J. Camilleri
636a8142b4 Minimal update with new repo URLs & build instructions 2018-07-26 01:37:03 +02:00
John J. Camilleri
e1dd7bfdf5 [GF Split] Post-split updates 2018-07-25 19:55:11 +02:00
John J. Camilleri
8b5532c1e9 Relax dependency on directory package for Setup
Since `listDirectory` is no longer used (852a49920)
2018-07-05 14:21:05 +02:00
Krasimir Angelov
73cf58da23 revert to a version compatible with Cabal 1.22 2018-07-05 13:10:02 +02:00
John J. Camilleri
0ef7fb8b0f Cleanup in Setup.hs; include custom-setup:setup-depends in cabal file. 2018-07-05 12:23:02 +02:00
John J. Camilleri
b9b0217160 Remove code which tries to get version information from darcs folder 2018-07-04 13:40:46 +02:00
John J. Camilleri
f0c5d53e78 Remove editor mode files from Haskell package (in gf.cabal) 2018-06-13 10:18:25 +02:00
Thomas Hallgren
6f707461e1 gf.cabal: use -fhide-source-paths
if ghc>=8.2
2018-04-18 19:30:03 +02:00
Krasimir Angelov
60bd12a952 the experimental export to Lambda Prolog is now obsolete and is removed 2017-09-07 14:01:46 +02:00
Krasimir Angelov
1f908fa7bf eliminate modules PGF.Lexing, PGF.LexingAGreek. Make PGF.Utilities an internal module in the runtime. These are not really part of the core runtime. 2017-09-04 11:43:37 +02:00
Krasimir Angelov
4fe9f88128 move the custom Binary package back to src/runtime/haskell 2017-09-04 09:55:17 +02:00
Krasimir Angelov
1e4ab95e41 added option -output-format=java for producing code for embedded grammars in Java 2017-08-29 20:53:47 +02:00
Thomas Hallgren
0a0eaa01bc Bump version requirements to base>=4.6, Cabal>=1.20
Cabal>=1.20 allows control over parallelism when compiling grammars from
Setup.hs and WebSetup.hs.

base>=4.6 allows conditional compilation with CPP to be eliminated from
a few modules.

base-4.6 corresponds to GHC 7.6.3, which is what you get in
Debian 8 (aka jessie, aka oldstable) from 2015.
2017-08-18 11:55:44 +02:00
Thomas Hallgren
2d85550e54 Final changes before the release of GF 3.9 2017-08-11 21:11:24 +02:00
Thomas Hallgren
ce1c1042e7 gf.cabal: don't enable warnings about unused imports by default 2017-08-11 15:45:19 +02:00
Thomas Hallgren
b87cefb8cf gf.cabal: update bug-reports and tested-with 2017-06-30 15:46:07 +02:00
Thomas Hallgren
1ada3fc522 gf.cabal: update the source repository to point to the GitHub repository 2017-06-29 14:51:27 +02:00
hallgren
ae512e09e0 Fix compilation errors caused by changes in PGF2
These prevented GF from being built with C run-time support (-fc-runtime).
2017-02-21 13:21:59 +00:00
hallgren
7863a383b0 gf.cabal: bump version to 3.8-darcs 2016-07-05 10:27:00 +00:00
hallgren
ee9fcef787 Final changes for the GF 3.8 release
News item on the home page
Put the download page and release notes in place.
Add an entry in debian/changelog.
Update the version number in gf.cabal.
2016-06-22 11:13:06 +00:00
hallgren
5b8c6887ca Documentation updates
Remove ghc-7.4 from the list of tested/recommended versions of GHC
(because of Hackage dependency problems).
Recommend version 7.10.3 of the Haskell Platform. (GHC 8.0.1 works too,
but I haven't tested the corresponding Haskell Platform packages.)
2016-06-17 10:09:25 +00:00
hallgren
c49b920ecf A few documentation updates
gf.cabal: include more GHC versions in the Tested-Width field.
2016-06-16 15:09:45 +00:00
hallgren
3f27aeb618 gf.cabal: don't build pgf-shell any more, it's been superceded by gf -cshell 2016-06-16 09:57:28 +00:00
krasimir
c8ebe09315 initial support for BNFC syntax in context-free grammars for GF. Not all features are supported yet. Based on contribution from Gleb Lobanov 2016-03-21 13:27:44 +00:00
hallgren
a2922e35fd gf.cabal: Remove GF.Compile.Compute.ConcreteNew1 2016-03-02 16:29:13 +00:00
leiss
df2901c9c0 add lexer and unlexer for Ancient Greek accent normalization 2016-02-23 16:30:39 +00:00
hallgren
8f23e37fe2 gf.cabal: require base>=4.5 (ghc>=7.4)
There are some low-level dependencies in GF.Text.Coding that break
compatibility with older versions of GHC and some other known problems.
2015-10-07 14:57:01 +00:00
hallgren
3a3963206b Update PGF API documentation link on home page, bump version number in gf.cabal to 3.7.1-darcs 2015-10-05 12:38:23 +00:00
hallgren
1b2dfbb6d8 Bump version number to 3.7.1 and finalize documentation
Updated version number in gf.cabal and update debian/changelog
News item on home page (index.html)
Some last minute edits on the download page
Move the new release notes and download page in place.
2015-10-02 10:15:02 +00:00