Commit Graph

14 Commits

Author SHA1 Message Date
hallgren
0e87a88f4b src/server: refactoring to isolate dependencies on the cgi/fastcgi packages
* Introducing the module CGI, re-exporting a subset of the cgi package. It
  might complete replace the cgi package in the future.
* Introducing the module CGIUtils, containing functions from FastCGIUtils that
  have nothing to do with fastcgi.

Some low level hackery with unsafePerformIO and global variables was left
in FastCGIUtils, but it is actually not used, neither for gf -server nor
exec/pgf-fcgi.hs.
2014-09-02 12:27:47 +00:00
hallgren
decd7122de Eliminate mutual dependencies between the GF compiler and the PGF library
+ 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%.
2013-11-05 13:11:10 +00:00
hallgren
a3e813914c example-based: bug fix: apply UTF-8 decoding to CGI inputs
You can now use words with ÅÄÖ when writing Swedish grammars by example...
2011-11-21 15:15:49 +00:00
hallgren
366922aa0f gfse: supply information about what's defined in the exampe language to the server functions for example-based grammar writing 2011-11-02 16:54:22 +00:00
hallgren
bed4395a3d gfse: example-based: remove target language from the example language menu 2011-11-02 16:13:30 +00:00
hallgren
e35917b779 TODO list for example-based grammar writing and grammar editor functionality 2011-10-25 12:47:51 +00:00
hallgren
a452274617 Work on example-based grammar writing
+ Preparations to support more target languages. Tested with Swedish.
+ Don't enable example-based editing if there is less that two concrete
  languages in the grammar.
+ Don't show the "By example" button until the required lincat has been defined.
+ Remember the chosen language for examples.
2011-10-21 15:43:57 +00:00
hallgren
9c4564c8a4 example-based: use random generation for the examples 2011-10-17 13:51:25 +00:00
hallgren
b318509528 More functionality in "gf -server" mode
"gf -server" mode now includes PGF service and the services to support
example-based grammar writing. (But gf -server is not quite ready to replace
pgf-http yet...) 

Also bumped GF version number to 3.2.10-darcs
2011-10-10 16:16:16 +00:00
hallgren
21a5e3c2cb example-based grammar writing: avoid a problem by returning Nothing instead of calling error 2011-10-04 10:04:01 +00:00
hallgren
598138bfa1 gfse: browser compatibility fixes 2011-10-03 12:28:49 +00:00
hallgren
8f82e71517 Example-based grammar writing: fix problems caused by the use of exprToAPI
The editor needs to keep track of both the raw term and the nice term returned
by exprToAPI. (Manually constructed linearization rules will now have the
raw term and can not be tested.)

Also replace metavariables in generalized terms with the apropriate parameter
from the linearization rule.

Also fix communication problems caused by inconsistent use of show/read vs
showExpr/readExpr.
2011-09-29 15:19:03 +00:00
hallgren
5588ba99cd exb: call exprToAPI to create nicer linearization functions 2011-09-27 19:17:53 +00:00
hallgren
ee0a6e6aad Server-side support for example-based grammar writing 2011-09-27 18:59:54 +00:00