summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-09-02src/server: refactoring to isolate dependencies on the cgi/fastcgi packageshallgren
* 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-01partial implementation for recursive def ruleskr.angelov
2014-09-01bug fixes in the JIT compilerkr.angelov
2014-08-29added evaluator.h which I had forgotenkr.angelov
2014-08-25Fix GHC 7.4 compatibility issue caused by previous patchhallgren
2014-08-25Experimental: parallel batch compilation of grammarshallgren
On my laptop these changes speed up the full build of the RGL and example grammars with 'cabal build' from ~95s to ~43s and the zero build from ~18s to ~5s. The main change is the introduction of the module GF.CompileInParallel that replaces GF.Compile and the function GF.Compile.ReadFiles.getAllFiles. At present, it is activated with the new -j flag, and it is only used when combined with --make or --batch. In addition, to get parallel computations, you need to add GHC run-time flags, e.g., +RTS -N -A20M -RTS, to the command line. The Setup.hs script has been modified to pass the appropriate flags to GF for parallel compilation when compiling the RGL and example grammars, but you need a recent version of Cabal for this to work (probably >=1.20). Some additonal refactoring were made during this work. A new monad is used to avoid warnings/error messages from different modules to be intertwined when compiling in parallel, so some functios that were hardiwred to the IO or IOE monads have been lifted to work in arbitrary monads that are instances in the appropriate classes.
2014-08-22bugfix in the android appkr.angelov
2014-08-22src/www/robots.txt: robot exclusion file for the GF cloud service.hallgren
To reduce potential server load caused by search bots.
2014-08-22Command line flag -s/-q now silences all warningshallgren
These flags now do what the say.
2014-08-20Add lifted directory operations in GF.System.Directory to eliminate the need ↵hallgren
for liftIO in various places
2014-08-20GF.CompileOne: refactoring to reduce code duplication and improve readabilityhallgren
I prefer small functions with descriptive names over large monilithic chunks of code, so I grouped the compiler passes called from compileSourceModule into funcitons named frontend, middle and backend. This also makes decisions about which passes to run clearly visible up front. Also made some small changes in GF.Compile.
2014-08-19GF.Compile.ReadFiles: a simpler & faster way to convert from Latin1 to UTF-8hallgren
2014-08-13Fix compliation error with GHC 7.4 caused by previous patchhallgren
2014-08-13Fix warnings in 16 modules, mostly forward compatibility warnings from GHC 7.8hallgren
2014-08-13Refactoring in GF.Compile and GF.ReadFiles with an eye to parallel compilationhallgren
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-11GF.Compile: remove the Int from CompileEnvhallgren
It has been unused since the refresh pass was removed. This eliminates one obstacle to parallel module compilation.
2014-08-11pattern matching in def rules is now supportedkr.angelov
2014-08-11revert an accidental change that I pushed together with the last patchkr.angelov
2014-08-11a partial support for def rules in the C runtimekr.angelov
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-07-28Convert from Text.PrettyPrint to GF.Text.Prettyhallgren
All compiler modules now use GF.Text.Pretty instead of Text.PrettyPrint
2014-07-27Adding GF.Infra.Location and GF.Text.Pretty (forgot to 'darcs add' them before)hallgren
2014-07-27Introducing GF.Text.Pretty for more concise pretty printers and ↵hallgren
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-21PGF service: expire PGFs from the cache when they have been unused for 24 hourshallgren
...to keep memory use down on the server.
2014-07-15src/server/gf-server.cabal: update dependencieshallgren
2014-07-15PGF Web Service: include entire completion in full modejohn.j.camilleri
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-11PGF web service: Return additional completion info with 'full' flagjohn
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-08implemented computing with abstract syntax trees. It passes all test cases ↵kr.angelov
except those that require def rules. The design is consistent with the STG virtual machine
2014-07-08bugfix for the typechecker in the C runtimekr.angelov
2014-07-06an API for visitor patterns on abstract syntax trees from Python. This makes ↵kr.angelov
the embedded grammars especially pleasing
2014-07-06small fix for the embedded mode in Pythonkr.angelov
2014-07-06embedded mode for GF grammar in Python. Only generation for nowkr.angelov
2014-07-03filter out the leading +/* from the parser treekr.angelov
2014-07-03bugfix in the ParseTreeViewkr.angelov
2014-07-03scroll bars for the ParseTreeViewkr.angelov
2014-07-02Visualization for parse trees on Androidkr.angelov
2014-07-02added bracketedLinearize in the Java bindingkr.angelov
2014-07-02fixed rare memory leak in the Java bindingskr.angelov
2014-07-01a few changes in the Nerc that I have forgoten to pushkr.angelov
2014-07-01fix warnings in the compilation of the Java bindingkr.angelov
2014-06-24minibar: include the grammar's last modification in the grammar info shown ↵hallgren
by the "i" button Also bumped version number in gf.cabal to 3.6-darcs. Also removed some unecessary use of CPP.
2014-06-21Polished and renamed release notes to release-3.6.t2thallgren
Also added an example use of lookupmorpho to gf-web-api-examples.html.
2014-06-21The --output-dir option now applies also to PGF fileshallgren
2014-06-20Cloud service & apps: better error handling in wide coverage translationhallgren
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-20PGF Service: return error code 404 (not found) instead of 500 (internal ↵hallgren
server error) for missing grammars
2014-06-20PGF Service, command=grammar: include the last modified time of the grammar ↵hallgren
in the output
2014-06-20added a note that the green translation comes from the phrasebookaarne
2014-06-19language status in app help file as table ; less textaarne
2014-06-19runtime/c/setup.sh: use make -j to speed up compilationhallgren
The configuration script takes significantly longer to run than the compilation of all the C code, which is a hint that is in need of a major simplification.
2014-06-18build-binary-dist.sh: updated to include the Python binding to the C run-timehallgren
There are also some changes in src/runtime/python/setyp.py to support this.
2014-06-18a small change in the keyboard layout for Android to make it more user friendlykr.angelov