Commit Graph

139 Commits

Author SHA1 Message Date
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
hallgren
9556cf453f Parallel compilation: "gf -make -j" and "gf -make -j=n" now work as expected
* "gf -make -j=n" uses n parallel threads.
  * "gf -make -j" adapts to the number of processors in the system.

This mimics how "cabal build -j" and "ghc --make -j" works.

Support for this is implemented in the new module GF.System.Concurrency and
it depends on the function Control.Concurrent.setNumCapabilities, which is
only available in GHC>=7.6 (base>=4.6). GF can still be compiled with
GHC<7.6, but then you have to use +RTS -N -RTS to take advantage of
multicore processors.

To detect the number of processors in the system, the code depends on a
foreign import of a C function in the GHC run-time system.
2015-09-11 14:18:01 +00:00
hallgren
829e1bbfd3 PGF2.Expr fixes
It needs to be listed in gf.cabal
unsafePerformIO is only exported from System.IO.Unsafe, starting with ghc-7.8
2015-09-03 20:41:00 +00:00
hallgren
6fff2def39 GF shell: source commands (cc, sd, so, ss & dg) can now be used in pipes
These commands are now implemented as regular commands (i.e. using the
CommandInfo data type) in the new module GF.Command.SourceCommands.

The list of commands exported from GF.Command.Commmands now called pgfCommands
instead of allCommands.

The list allCommands of all commands is now assembled
from sourceCommands, pgfCommands, commonCommands and helpCommand in
GF.Interactive.
2015-08-12 11:05:08 +00:00
hallgren
666945a7b0 Forgot to include gf.cabal in previous patch 2015-08-10 16:38:28 +00:00
hallgren
8d6e61a8df gf -cshell: preliminary support for the C run-time system in the GF shell
Some C run-time functionality is now available in the GF shell, by starting
GF with 'gf -cshell' or 'gf -crun'. Only limited functionality is available
when running the shell in these modes:

- You can only import .pgf files, not source files.
- The -retain flag can not be used and the commands that require it to work
  are not available.
- Only 18 of the 40 commands available in the usual shell have been
  implemented. The 'linearize' and 'parse' commands are the only ones
  that call the C run-time system, and they support only a limited set of
  options and flags. Use the 'help' commmands for details.
- A new command 'generate_all', that calls PGF2.generateAll, has been added.
  Unfortuntaly, using it causes 'segmentation fault'.

This is implemented by adding two new modules: GF.Command.Commands2 and
GF.Interactive2. They are copied and modified versions of GF.Command.Commands
and GF.Interactive, respectively. Code for unimplemented commands and other
code that has not been adapted to the C run-time system has been left in
place, but commented out, pending further work.
2015-08-10 14:12:51 +00:00
hallgren
d38efbaa6a Refactor GF shell modules to improve modularity and reusability
+ Move type CommandInfo from GF.Command.Commands to a new module
  GF.Commands.CommandInfo and make it independent of the PGF type.
+ Make the module GF.Command.Interpreter independent of the PGF type and
  eliminate the import of GF.Command.Commands.
+ Move the implementation of the "help" command to its own module
  GF.Command.Help
2015-08-10 13:01:02 +00:00
hallgren
21df1ed2f5 Remove left over [...] from release notes, bump version number in gf.cabal to 3.7-darcs 2015-06-25 14:56:15 +00:00
hallgren
c90c8afca5 Update home page, download page & release notes for GF 3.7. Bump version number in gf.cabal 2015-06-25 12:22:06 +00:00
hallgren
2643f3cee6 Documentation updates for the release of GF 3.7 2015-06-25 12:10:47 +00:00
krasimir
27bd12ce67 forgot to update gf.cabal 2015-04-20 12:25:52 +00:00
hallgren
8cfb989c9c Translating linearization functions to Haskell: move Haskell AST and pretty printer to GF.Haskell
For further separation of pretty printing concerns from conversion concerns,
the Haskell AST and pretty printer has been moved to its own module,
GF.Haskell, also allowing it to be reused in other places where Haskell
code is generated.
2015-04-14 12:44:14 +00:00
hallgren
4e4d2a77e1 gf.cabal: increase idle time before full GC to 5 seconds
The builtin GHC RTS default is 0.3 seconds, which results in very bad
interactive behaviour when working with a large grammar in the GF shell.
2015-03-05 15:30:41 +00:00
krasimir
0238579610 remove some more old code 2015-03-05 14:47:36 +00:00
hallgren
d3f6b9851f gf.cabal: adjust version constrains on the network, cgi and httpd-shed packages 2015-02-25 18:41:57 +00:00
hallgren
9c6b5df741 PGFService: make the restriction on parallelism more effective
Restrict the entire request handler instead of just the call to the C parser.
2015-02-25 16:08:21 +00:00
hallgren
54ae70a81e Changes for compatibility with ghc-7.10-rc2
2 modules: Name clashes caused by Applicative-Monad change in Prelude
2 modules: Ambiguities caused by Foldable/Traversable in Prelude
2 modules: Backwards incompatible changes in time-1.5 for defaultTimeLocale
9 modules: {-# LANGUAGE FlexibleContexts #-} (because GHC checks inferred types
           now, in addition to explicitly given type signatures)

Also silenced warnings about tab characters in source files.
2015-02-16 15:05:06 +00:00
hallgren
507b52cc23 gf.cabal: include PGF.Haskell 2015-01-14 14:53:28 +00:00
hallgren
9235f49ab3 gf.cabal: include editor modes in the list of data files to install
Also add ghc-7.8.3 to the list of tested compiler versions
2014-12-15 15:16:50 +00:00
hallgren
2eaf46f610 Work in progress on translating linearization functions to Haskell
The translation is currently good enough to translate all concrete syntaxes
of the Foods and Letter grammars, and some concrete syntaxes of the Phrasebook
grammar (e.g. PhrasebookEng & PhrasebookSpa works, but there are problems with
e.g. PhrasebookSwe and PhrasebookChi)

This functionality is enabled by running

	gf -make -output-format=haskell -haskell=concrete ...

TODO:
	- variants
	- pre { ... }
	- eta expansion of linearization functions
	- record subtyping can still cause type errors in the Haskell code
	  in some cases
	- reduce code large tables
2014-12-11 16:08:36 +00:00
hallgren
33571ba44f Some work to improve the structure of the haddock documenation 2014-11-10 15:23:02 +00:00
hallgren
ad36dbc0ed gf.cabal: when compiling with ghc>=7.8 require cgi>=3001.2.2.0 2014-11-05 15:38:10 +00:00
hallgren
0519493ca9 Use terminfo to highlight warnings and errors in blue and red
This replaces the hardwired ANSI escape codes that were accidentally included
in a previous patch.

This adds a dependency on terminfo, but this should be unproblematic, since
haskeline already depends on the same underlying C library.

The color highlighting is omitted on Windows.
2014-10-28 19:04:48 +00:00
hallgren
a9bc116052 Some small documentation improvements 2014-10-20 19:45:43 +00:00
hallgren
5a641ebe73 Rename src/programs/gf.hs to gf-main.hs to avoid confusing GHC
It appears that GHC can't keep GF.hs and gf.hs apart on systems with case
insensitive file names.
2014-10-16 15:21:00 +00:00
hallgren
2e2e7acf12 Turn the GF compiler into a library. Main program is now in src/programs/gf.hs
The module src/compiler/GF.hs now serves as a prelimiary compiler API. It just
exports a selection of functions and types from the compiler.

Haddock documentation can be generated with

	cabal haddock --hyperlink-source

Also bumbed the version number to 3.6.10.
2014-10-16 15:00:49 +00:00
hallgren
b70dba87ba Rename modules GFI, GFC & GFServer...
... to GF.Interactive, GF.Compiler & GF.Server, respectively.
2014-10-15 21:04:29 +00:00
hallgren
18ee232497 gf.cabal: add missing c-sources for the Haskell binding to the C run-time library 2014-09-11 11:53:07 +00:00
hallgren
a21ffc1941 gf.cabal, gf-server.cabal: add version bounds on network & httpd-shed
* httpd-shed-0.4 does not specify an upper bound on network, but it fails
  to build against network>=2.6. This is fixed in httpd-shed-0.4.0.2.
* With network-2.6, the Network.URI modules is moved to a separate package,
  so for the time being GF requires network>=2.3 && <2.6. This is compatible
  with the four most recent versions of the Haskell Platform.
2014-09-03 15:40:26 +00:00
hallgren
883d1ae21c gf.cabal ghc-options: don't force -j, -auto-all has been renamed to -fprof-auto 2014-08-25 23:30:22 +00:00
kr.angelov
584d589041 a partial support for def rules in the C runtime
The def rules are now compiled to byte code by the compiler and then to
native code by the JIT compiler in the runtime. Not all constructions
are implemented yet. The partial implementation is now in the repository
but it is not activated by default since this requires changes in the
PGF format. I will enable it only after it is complete.
2014-08-11 10:59:10 +00:00