Commit Graph

5930 Commits

Author SHA1 Message Date
hallgren
cd5193b7e1 Fix warnings in 16 modules, mostly forward compatibility warnings from GHC 7.8 2014-08-13 22:16:18 +00:00
hallgren
a06351b625 Refactoring in GF.Compile and GF.ReadFiles with an eye to parallel compilation
In particular, the function compileOne has been moved to the new module
GF.CompileOne and its type has been changed from

    compileOne :: ... -> CompileEnv -> FilePath -> IOE CompileEnv

to

    compileOne :: ... -> SourceGrammar -> FilePath -> IOE OneCompiledModule

making it more suitable for use in a parallel compiler.
2014-08-13 16:46:11 +00:00
hallgren
64a3f76b1f Setup.hs: reduce zero build time by a couple of seconds
The RGL is now compile with only three calls to GF (prelude, present,
alltenses). This also makes even more parallelism available to GF for speeding
up full builds of the RGL.
2014-08-13 16:25:03 +00:00
hallgren
9093ff3fe5 GF.Compile: remove the Int from CompileEnv
It has been unused since the refresh pass was removed.
This eliminates one obstacle to parallel module compilation.
2014-08-11 16:30:11 +00:00
kr.angelov
c30e2df228 pattern matching in def rules is now supported 2014-08-11 15:53:41 +00:00
kr.angelov
d3b9652b81 revert an accidental change that I pushed together with the last patch 2014-08-11 11:44:49 +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
hallgren
02dda1e66f Setup.hs: don't build example grammars when the rgl-none argument is specified 2014-08-08 17:02:36 +00:00
hallgren
f07096c409 Setup.hs: comment out debugging code 2014-07-28 15:35:22 +00:00
hallgren
4adb4bab71 Setup.hs: reduce zero build time by ~30% (from 26 to 18 seconds on my laptop)
This speedup is obtained by instead of generating 211 shell commands to compile the RGL one file at a time, generate 7 shell commands, passing a number of
related files to GF in one go.

In addition to cutting down the zero build time, this opens up for speeding up
full builds of the RGL, by adding more parallelism in GF's grammar compilation
machinery.

(Note: gf.cabal already takes advantage of GHC's parallel build option to
speed up the compilation of GF itself, if GHC>=7.8 is used.)
2014-07-28 15:11:58 +00:00
hallgren
7a91afc02a Convert from Text.PrettyPrint to GF.Text.Pretty
All compiler modules now use GF.Text.Pretty instead of Text.PrettyPrint
2014-07-28 11:58:00 +00:00
hallgren
59172ce9c5 Adding GF.Infra.Location and GF.Text.Pretty (forgot to 'darcs add' them before) 2014-07-27 22:13:13 +00:00
hallgren
30cda51516 Introducing GF.Text.Pretty for more concise pretty printers and GF.Infra.Location for modularity
GF.Text.Pretty provides the class Pretty and overloaded versions of the pretty
printing combinators in Text.PrettyPrint, allowing pretty printable values to
be used directly instead of first having to convert them to Doc with functions
like text, int, char and ppIdent. Some modules have been converted to use
GF.Text.Pretty, but not all. Precedences could be added to simplify the pretty
printers for terms and patterns.

GF.Infra.Location contains the types Location and L, factored out from
GF.Grammar.Grammar, and the class HasSourcePath. This allowed the import
of GF.Grammar.Grammar to be removed from GF.Infra.CheckM, making it more
like a pure library module.
2014-07-27 22:06:23 +00:00
Sergei Trofimovich
7eaea44386 gf.cabal: fix depend in --flags=-custom-binary case
Detected when building today:

Building gf-3.6...
Preprocessing library gf-3.6...

src/runtime/haskell/PGF/Internal.hs:17:8:
    Could not find module ‘Data.Binary.IEEE754’
    It is a member of the hidden package ‘data-binary-ieee754-0.4.4’.
    Perhaps you need to add ‘data-binary-ieee754’ to the build-depends in your .cabal file.
2014-07-25 14:41:11 +00:00
hallgren
3660339b23 PGF service: expire PGFs from the cache when they have been unused for 24 hours
...to keep memory use down on the server.
2014-07-21 15:53:38 +00:00
hallgren
1ba0c4b354 WebSetup.hs: include Chinese when building the Phrasebook 2014-07-21 15:48:49 +00:00
aarne
1780742549 Qiao's corrections in PhrasebookChi. This replaces the old, partial and low-quality version and is hence the first Chinese phrasebook version that can claim high quality. 2014-07-16 21:07:34 +00:00
hallgren
3ec95e481b src/server/gf-server.cabal: update dependencies 2014-07-15 12:00:51 +00:00
aarne
810acc9258 modified some explanations in app.html 2014-07-15 09:55:45 +00:00
john.j.camilleri
37a35734a5 PGF Web Service: include entire completion in full mode
When using full=yes in the web service 'complete' command,
you now get an additional field 'seq' with the longest possible completion.
So, given:

  lin
    f1 = ss "the" ;
    f2 = ss ("the red house" | "the real deal") ;

and trying to complete on input "th", you get:

    [
        {
            "from": "TestCnc",
            "brackets": {
                "cat": "_",
                "fid": 0,
                "index": 0,
                "fun": "_",
                "children": []
            },
            "text": "th",
            "completions": [
                {
                    "token": "the",
                    "funs": [
                        {
                            "fun": "f1",
                            "hyps": [],
                            "cat": "C",
                            "seq": "the"
                        },
                        {
                            "fun": "f2",
                            "hyps": [],
                            "cat": "C",
                            "seq": "the red house"
                        },
                        {
                            "fun": "f2",
                            "hyps": [],
                            "cat": "C",
                            "seq": "the real deal"
                        }
                    ]
                }
            ]
        }
    ]
2014-07-15 09:33:22 +00:00
john
9b49608451 PGF web service: Return additional completion info with 'full' flag
BETA! The 'complete' command now has a new flag 'full' which when set
returns additional info about completions.

Without 'full' flag (default):

[
    {
        "from": "PhrasebookEng",
        "brackets": {
            "cat": "_",
            "fid": 0,
            "index": 0,
            "fun": "_",
            "children": [
                {
                    "token": "the"
                }
            ]
        },
        "text": "su",
        "completions": [
            "supermarket",
            "suspect"
        ]
    }
]

With full=true or full=yes:

[
    {
        "from": "PhrasebookEng",
        "brackets": {
            "cat": "_",
            "fid": 0,
            "index": 0,
            "fun": "_",
            "children": [
                {
                    "token": "the"
                }
            ]
        },
        "text": "su",
        "completions": [
            {
                "token": "supermarket",
                "funs": [
                    {
                        "fid": 421,
                        "fun": "Supermarket",
                        "hyps": [],
                        "cat": "PlaceKind"
                    }
                ]
            },
            {
                "token": "suspect",
                "funs": [
                    {
                        "fid": 445,
                        "fun": "Suspect",
                        "hyps": [],
                        "cat": "Property"
                    }
                ]
            }
        ]
    }
]
2014-07-11 09:25:26 +00:00
kr.angelov
0222d2440c implemented computing with abstract syntax trees. It passes all test cases except those that require def rules. The design is consistent with the STG virtual machine 2014-07-08 19:45:49 +00:00
kr.angelov
e0fe6d01c4 bugfix for the typechecker in the C runtime 2014-07-08 19:19:48 +00:00
kr.angelov
ada85ae44e an API for visitor patterns on abstract syntax trees from Python. This makes the embedded grammars especially pleasing 2014-07-06 23:48:51 +00:00
kr.angelov
85672af858 small fix for the embedded mode in Python 2014-07-06 19:55:08 +00:00
kr.angelov
e52d5bf715 embedded mode for GF grammar in Python. Only generation for now 2014-07-06 19:49:17 +00:00
aarne
ac1e58817b making hard-wired questiong in PhrasebookChi type correct after addition of indirect questions 2014-07-05 08:34:22 +00:00
kr.angelov
7ad2f7dac3 filter out the leading +/* from the parser tree 2014-07-03 18:27:39 +00:00
kr.angelov
aa746ad0f6 bugfix in the ParseTreeView 2014-07-03 18:09:34 +00:00
kr.angelov
272a8487f8 scroll bars for the ParseTreeView 2014-07-03 13:42:26 +00:00
kr.angelov
e0fa954256 Visualization for parse trees on Android 2014-07-02 11:30:06 +00:00
kr.angelov
abb50f9c73 added bracketedLinearize in the Java binding 2014-07-02 07:08:01 +00:00
kr.angelov
4a7055e994 fixed rare memory leak in the Java bindings 2014-07-02 07:06:51 +00:00
kr.angelov
064cf03005 a few changes in the Nerc that I have forgoten to push 2014-07-01 17:32:25 +00:00
kr.angelov
7aa8bf4150 fix warnings in the compilation of the Java binding 2014-07-01 17:31:29 +00:00
aarne
fd5525149b link to play store from app.html 2014-06-30 09:14:17 +00:00
hallgren
0715cfe2ae minibar: include the grammar's last modification in the grammar info shown by the "i" button
Also bumped version number in gf.cabal to 3.6-darcs.
Also removed some unecessary use of CPP.
2014-06-24 13:59:09 +00:00
hallgren
23ec403402 Adjust the release date on the home page 2014-06-23 13:33:38 +00:00
hallgren
e3e2227dfe Final updates of the download page for the 3.6 release
+ Describe which features are included in the different binary packages.
+ Describe the new MINGW package.
2014-06-23 13:30:33 +00:00
hallgren
89eb3fd60a Update web pages and bump version number to 3.6! 2014-06-21 18:29:29 +00:00
hallgren
cfbd152a39 doc/gf-developers.t2t: made the C run-time section a bit more informative 2014-06-23 13:28:10 +00:00
hallgren
3cba76592e release-3.6.t2t: just a couple of more fixes.
Sorry.
2014-06-21 18:25:52 +00:00
hallgren
f66440a1e7 release-3.6.t2t: fix broken link 2014-06-21 18:17:00 +00:00
hallgren
cba51a97ab release-3.6.t2t: fix a formatting problem 2014-06-21 18:12:47 +00:00
hallgren
03274b76d3 debian/changelog: updated for the release of GF 3.6 2014-06-21 17:10:24 +00:00
hallgren
5a39637bcd build-binary-dist.sh: include a ghc package configuration file
as an experiment
2014-06-21 16:32:10 +00:00
hallgren
38f28da6c1 Polished and renamed release notes to release-3.6.t2t
Also added an example use of lookupmorpho to gf-web-api-examples.html.
2014-06-21 13:02:10 +00:00
hallgren
58156369fa The --output-dir option now applies also to PGF files 2014-06-21 12:26:56 +00:00
hallgren
fc4c8b0058 Cloud service & apps: better error handling in wide coverage translation
The wide coverage demo apps now shows a "please wait" message while the grammar
is loading, and a red error message if the grammar is not found on the server.
The Simple Translation Tool also show red error messages if the grammar is not
found.
2014-06-20 18:39:28 +00:00
hallgren
9eb6557376 PGF Service: return error code 404 (not found) instead of 500 (internal server error) for missing grammars 2014-06-20 17:28:02 +00:00