Commit Graph
100 Commits
Author SHA1 Message Date
Thomas Hallgren f1f47f7281 GF cloud: GFMorpho: responsive layout improvement for small screens 2019-12-03 17:07:20 +01:00
Thomas Hallgren fb1199c49c GF Cloud: add Word inflection with smart paradigms
This is a reimplemention of Aarne's GFMorpho service from 2012, using
the GF shell web API. Not all features are implemented (yet).
2019-12-03 16:40:21 +01:00
Thomas Hallgren 12e55c93c0 Fix another build problem in bin/build-binary-dist.sh
Make sure the dynamic C runtime libraries are found when running GF to
compile the RGL
2019-11-27 14:31:45 +01:00
Thomas Hallgren 33aeb53f7a PGFService: userLanguage now defaults to English, if present in the grammar
The userLangauge is the name of the concrete syntax that has a languageCode
that matches the user's preferred language, as reported by the web browser.
If no matching language code is found, the PGF service now sets userLanguage
to the concrete syntax for English (e.g. FoodsEng) if present, and defaults
to the first concrete syntax (e.g. FoodsAfr) only if English is not present
in the grammar.
2019-11-26 15:27:02 +01:00
Thomas Hallgren e6b33ac8b8 Minibar: make it possible to configure a list of preferred grammars
A preferred grammar is selected when a user visits the Minibar for the
first time. (Like before, Minibar remembers the selected grammar for future
visits.)

A preferred list of grammars can be specified in config.js in the .../minibar
directory on the server, e.g. like this:

  preferred_grammars=["/grammars/Foods.pgf","/grammars/ResourceDemo.pgf"]

The first available grammar from the list is used.
2019-11-21 14:25:07 +01:00
Thomas Hallgren 14e5528544 Fix build problems, bump versiom to gf-3.10.4-git
debian/rules and bin/build-binary-dist.sh needed to be adepted to changes
in how INSTALLPATH is used in src/runtime/java/Makefile.
2019-11-18 15:54:44 +01:00
Thomas Hallgren 28f53e801a PGFService: revert unlexing change in PGFService to restore &+ behaviour 2019-11-18 13:20:41 +01:00
Thomas Hallgren 9d3badd8b2 GrammarToCanonical: bug fix: add missing case for Empty 2019-09-10 12:41:16 +02:00
Thomas Hallgren a7a592d93e Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core 2019-08-21 14:33:30 +02:00
Thomas Hallgren d1bb1de87f Minibar: support for links to open a given grammar in the minibar
When you press the "i" or "More info" button for a grammar, the info now
includes a link that can be used by anyone to open this specific grammar in
the minibar.
2019-08-21 14:27:56 +02:00
Thomas Hallgren b77626b802 debian/rules: fix two build problems 2019-08-07 20:15:28 +02:00
Thomas Hallgren 12f2520b3c Download page: add binary package for Raspbian 10 2019-08-07 19:02:27 +02:00
Thomas Hallgren 941b4ddf1f GF home page: fix some links smoother operation over https 2019-08-07 14:07:47 +02:00
Thomas Hallgren 81362ed7b7 Minibar can now display grammar documentation.
The documentation is taken from a file called Grammar.pgf_info, located
next to the Grammar.pgf file on the server.

The first line of the documentation is displayed below the menu bar in
the minibar. The rest of the documentation is displayed when you press
the "More info" button (or the "i" button).

The documentation can contain HTML markup. Blank lines are treated as
paragraph breaks.
2019-08-05 15:25:29 +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 a5a019a124 runtime/javascript: use a grammar.js with two langauges
grammar.js contained only one langauge: FoodsEng. Now it contains
FoodsEng and FoodsIta, similar to what's shown in the gf-tutorial.
The grammar comes from gf-contrib/tutorial/foods.
2019-05-03 15:19:19 +02:00
Thomas Hallgren 61fe167392 gf-tutorial: fix link to JavaScript translator demo
After fixing trivial problem in translator.html, the demo works, but
the example grammar contains only one langauge, so it is not so
interesting. translator.html is located in src/runtime/javascript.
The editor.html in the same location also works.
2019-05-03 14:52:28 +02:00
Thomas Hallgren bea6aa1d2d GF.Compile.CheckGrammar: discard bad 'lincat C = …' with a warning
e.g. if C is a fun and not a cat in the abstract syntax.
Discarding bad lincats prevents GF from generating malformed PGFs that
are rejected by the C run-time system.
I also added code to reject bad lincats with an error, but I left it
commented out since it seems a bit pedantic compared to GF's otherwise
rather sloppy grammar checking.
2019-04-25 17:02:42 +02:00
Thomas Hallgren 61e7df4d1c Fix outdated comment about which version of the Haskell Platform to use 2019-04-05 16:38:12 +02:00
Thomas Hallgren a55c7c7889 GF.Compile.GrammarToCanonical: keep unreachable rows in tables
since unreachable rows can become reachable after grammar transformation.
Also export smart constructors for projection and selection.
2019-03-22 15:38:02 +01:00
Thomas Hallgren de0a997fcd Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core 2019-03-20 14:40:17 +01:00
Thomas Hallgren 0f53431221 GF.Grammar.Canonical: pretty printer: omit some redundant brackets 2019-03-20 14:39:42 +01:00
Thomas Hallgren 2979864752 GF.Compile.GrammarToCanonical: allow + in reg exps in pre { } 2019-03-14 16:52:37 +01:00
Thomas Hallgren b11d7d93dc GF.Grammar.Canonical: some Functor/Foldable/Traversable instances 2019-03-13 01:51:26 +01:00
Thomas Hallgren ba9aeb3322 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core 2019-03-12 22:34:00 +01:00
Thomas Hallgren 8e2424af49 GF.Grammar.Canonical: add TuplePattern and CommentedValue 2019-03-12 22:32:54 +01: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 0970d678cf haskell-bind/utils.c: add missing return
Found via C compiler warning
2019-03-07 14:11:29 +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 0b3c278f49 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core 2019-03-05 19:23:54 +01:00
Thomas Hallgren c710bf0e84 Update .deb packages to verion 3.10-2 on the download page
New .deb packages have been generated since it turned out that the
RGL was missing in original .deb packages.
2019-03-05 19:18:45 +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
Thomas Hallgren a928e4657e Need aeson>=1.3
Also remove ununsed GF.Compile.PGFtoAbstract
2019-02-21 14:43:53 +01:00
Thomas Hallgren 951b884118 Export of concrete syntax to Haskell now goes via Canonical GF
TODO: better treatment of Predef functions and record subtyping coercions
2019-01-23 02:47:10 +01:00
Thomas Hallgren fc5c2b5a22 PGF.Haskell.fromStr: fix double spaces caused by empty tokens 2019-01-23 02:45:23 +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 a40130ddc4 gfse: prevent scrolling during drag-and-drop on iOS
Applies to webkit-based browsers on other touch-based platforms too
2019-01-21 21:18:01 +01:00
Thomas Hallgren 71307d6518 Two fixes in GF.Grammar.Canonical
+ Hide Prelude.<> to avoid ambiguity with ghc-8.6
+ Vertical alternative in the pretty printer for table types A => B
2019-01-18 14:44:45 +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
Thomas Hallgren 1a842efeaf downloads: add .deb package for Ubuntu (32-bit) 2018-12-03 16:10:01 +01:00
Thomas Hallgren de005b9df3 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core 2018-12-03 15:53:36 +01:00
Thomas Hallgren 52bc0f566e debian/control: new dependency: pandoc
This should have been added before the 3.10 release
2018-12-03 15:52:52 +01:00
Thomas Hallgren bd7bb9b34a Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core 2018-12-03 01:34:49 +01:00
Thomas Hallgren 18251e57a3 debian/changelog: updated release date 2018-12-03 01:33:52 +01:00
Thomas Hallgren d06539c35c Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core 2018-12-02 21:21:18 +01:00
Thomas Hallgren 60738dda6d gf.cabal: update tested-with 2018-12-02 21:20:54 +01:00
Thomas Hallgren 769743c5c0 Minor fixes on the GF 3.10 download page 2018-12-02 15:29:55 +01:00
Thomas Hallgren 1c75d417ee Move 3.10 download page into place, update release date 2018-12-02 15:08:40 +01:00
Thomas Hallgren e6c2c844e9 GF.Main: leave the code page unchanged on Windows
This should make it easier to use GF with UTF-8 in the Windows Console
See https://groups.google.com/forum/#!topic/gf-dev/DCou6FDhCnU
2018-12-01 15:53:58 +01:00
Thomas Hallgren 883a7a95a1 build-binary-dist.sh: make it easy to choose which version of ghc to use 2018-12-01 15:53:27 +01:00
Thomas Hallgren 5ef390f188 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core 2018-11-30 00:47:10 +01:00
Thomas Hallgren fa5c6a2949 Fix spelling mistake on GF 3.9 download page 2018-11-30 00:46:24 +01:00
Thomas Hallgren d0bc368358 Update make deb for the GF 3.10 release
This includes adding commands in debian/rules to build and include
the RGL and the example grammars in the debian package.
2018-11-30 00:17:45 +01:00
Thomas Hallgren e0dca729d6 WebSetup.hs: don't output messages that lie about what's being installed 2018-11-30 00:15:37 +01:00
Thomas Hallgren 47c983c625 gf.cabal: remove redundant dependency on old-locale 2018-11-29 23:06:30 +01:00
Thomas Hallgren 32ce03dc94 bin/build-binary-dist.sh: include the RGL in binary distributions
TODO: the corresponding changes in debian/rules
2018-11-28 17:27:29 +01:00
Thomas Hallgren 8596fc5d26 Revert CSS change that produces overlapping text instead of responsive layout 2018-11-06 23:49:06 +01:00
Thomas Hallgren effa818408 gf -cshell bug fix
The functions cExpr and hsExpr in GF.Command.Commands2 need to
handle string literals.
2018-10-16 16:23:54 +02:00
Thomas Hallgren 6b1e21508e Comment out links to some old demos that no longer work 2018-10-10 14:22:24 +02:00
Thomas Hallgren d9f0dfd400 gf.cabal: expose GF.Text.Lexing, needed by gf-server.cabal 2018-07-31 15:02:59 +02:00
Thomas Hallgren 4fd1ec71c9 gf-server.cabal: relax network version bounds and make building the library and pgf-service executable optional
This allows you to build the content-service without installing the problematic fastcgi library.
2018-07-31 14:29:18 +02:00
Thomas Hallgren 23961ef0b3 GF.Server: add 'import Control.Applicative' for compatibilit with GHC<7.10
One could also add stricter version constraints in gf.cabal, e.g.
base>=4.8 (implies GHC>=7.10) if we want to only support building with
GHC>=7.10.
2018-06-27 17:40:35 +02:00
Thomas Hallgren 6f707461e1 gf.cabal: use -fhide-source-paths
if ghc>=8.2
2018-04-18 19:30:03 +02:00
Thomas Hallgren 820d2d503f Fixes for GHC 8.4.1 compatibility
* In GHC 8.4.1, the operator <> has become a method of the Semigroup class
  and is exported from the Prelude. This is unfortunate, since <> is also
  exported from the standard library module Text.PrettyPrint, so in any
  module that defines a pretty printer, there is likely to be an ambiguity.

  This affects ~18 modules in GF. Solution:

    import Prelude hiding (<>)

  This works also in older versions of GHC, since GHC does't complain if
  you hide something that doesn't exists.

* In GHC 8.4.1, Semigroup has become a superclass of Monoid. This means
  that anywhere you define an instance of the Monoid class you also have to
  define an instance in the Semigroup class.

  This affects Data.Binary.Builder in GF. Solution: conditionally define
  a Semigroup instance if compiling with base>=4.11 (ghc>=8.4.1)
2018-04-18 19:18:10 +02:00
Thomas Hallgren 3d6a5e8864 gfse: show grammar comments in the list of public grammars
gf -server now includes the comment field from the grammar in the
response to /cloud requests with command=ls-t and ext=.json
2018-03-29 18:23:32 +02:00
Thomas Hallgren 750a1349ff gfse: allow public grammars to be deleted in more cases
The editor doesn't show delete buttons on grammars published by other
users, but it was too picky when deciding which grammars you own. Now
it should be possible to delete grammars from the device/browser
you published it from, even if you don't have a private copy of it any more.

On a related note, there seems to be problem with the way unique grammars
names are created and maintained, causing published grammars to be duplicated
in some cases. This needs to be overhauled.
2018-03-29 17:02:22 +02:00
Thomas Hallgren 78cf184957 gfse: fix for some browser: hovering over an empty grammar comment to edit it
This was a problem in Safari (an other similar browsers I presume), but
not in Firefox: hovering over the grammar comment (shown below the grammar
name when you edit a grammar) didn't reveal the button to edit it, thus
preventing you from adding a comment. It was till possible by selecting the
"Enable editing on touch devices." at the bottom of the screen, but most
people probably didn't notice that it is possible to add a comment.
2018-03-29 16:17:25 +02:00
Thomas Hallgren a9135c9b7e Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2018-03-29 14:56:07 +02:00
Thomas Hallgren 31ef32a815 gfse: sort list of public grammars by age, by default
There is also a menu so you can choose to sort the list by name or by age
2018-03-29 14:54:42 +02:00
Thomas Hallgren 6cc95f664e index.html: update summer school link 2018-01-29 11:28:11 +01:00
Thomas Hallgren 725b518d5c demos/index.html: add link to multilingual_headlines.html
It was lost in the move from darcs to GIT, since it was added
with a local change and not recorded in the darcs repository.
2018-01-23 15:58:28 +01:00
Thomas Hallgren 5164951e23 Remove "Warning: default encoding has changed from Latin-1 to UTF-8"
The warning is about a change that was made in GF 3.6 (June 2014) and has
probably outlived its purpose by now.
2018-01-23 14:55:33 +01:00
Thomas Hallgren 9f7a6cfe10 PGF2.FFI: import Data.Word(Word)
for compatibility with older versions of GHC
2017-09-06 18:01:08 +02:00
Thomas Hallgren 2b52ff1f73 Merge https://github.com/GrammaticalFramework/GF 2017-09-01 11:02:02 +02:00
Thomas Hallgren c75d95b313 Merge https://github.com/GrammaticalFramework/GF 2017-08-29 16:00:04 +02:00
Thomas Hallgren 1f4807105b Merge https://github.com/GrammaticalFramework/GF 2017-08-29 12:00:05 +02:00
Thomas Hallgren 685307bf0d Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2017-08-28 21:37:35 +02:00
Thomas Hallgren fe2aeb839b Download page: adding a .deb package for the Raspberry Pi 2017-08-28 21:37:09 +02:00
Thomas Hallgren 4e4d07aeae Merge https://github.com/GrammaticalFramework/GF 2017-08-28 17:20:03 +02:00
Thomas Hallgren 7ec6590389 Merge https://github.com/GrammaticalFramework/GF 2017-08-24 18:20:03 +02:00
Thomas Hallgren 84c262a8e1 Merge https://github.com/GrammaticalFramework/GF 2017-08-21 13:15:46 +02:00
Thomas Hallgren a16ae62503 Merge https://github.com/GrammaticalFramework/GF 2017-08-21 09:40:03 +02:00
Thomas Hallgren 13aff8a704 Merge https://github.com/GrammaticalFramework/GF 2017-08-20 22:20:03 +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 5ab8b7082c Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2017-08-18 11:55:16 +02:00
Thomas Hallgren 1318a62da0 Home page: update link to PGF library API (Haskell)
to point to gf-3.9 in Hackage.
2017-08-18 11:54:13 +02:00
Thomas Hallgren c642421fa9 configure.ac: use a Cabal-friendly version number
and replace the outdated URL
2017-08-17 11:58:23 +02:00
Thomas Hallgren 2d85550e54 Final changes before the release of GF 3.9 2017-08-11 21:11:24 +02:00
Thomas Hallgren 06bf8454f7 Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2017-08-11 16:05:44 +02:00
Thomas Hallgren da1272c36d Some updates in index-next.t2t and release-next.t2t 2017-08-11 16:04:57 +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 8484dabd5b Disable detailed version info from darcs
TODO: get version info from git instead.
2017-08-11 15:33:21 +02:00
Thomas Hallgren a0e7e3bf83 A couple of fixes for GHC 8.2.1 compatibility 2017-08-11 10:07:43 +02:00
Thomas Hallgren cd817abc5a Merge branch 'master' of /usr/local/www/GF 2017-06-30 15:46:46 +02:00
Thomas Hallgren b87cefb8cf gf.cabal: update bug-reports and tested-with 2017-06-30 15:46:07 +02:00
Thomas Hallgren a0072a5487 Updates to reflect the darcs->git move in the developer guide and the download page & release notes for the next release 2017-06-30 15:16:52 +02:00
Thomas Hallgren ff82b0980b Link to the issue tracker on GitHub 2017-06-29 17:27:36 +02:00
Thomas Hallgren 366f75d78a index.html: a quick news item about the move to GitHub 2017-06-29 15:15:52 +02:00