Commit Graph

4537 Commits

Author SHA1 Message Date
meng wong
8a14912ee3 GF_LIB_PATH can now be path1:path2:path3, not just path1
Traditionally, GF_LIB_PATH points to something like
`.../share/ghc-8.0.2-x86_64/gf-3.9/lib`

and if you want prelude and alltenses and present, you add a
`--# -path=.:present`
compiler pragma to the top of your .gf file

But if you are developing some kind of application grammar
library or contrib of your own, you might find yourself
repeating your library path at the top of all your .gf files.

After painstakingly maintaining the same library path at the
top of all your .gf files, you might say, let's factor this
out into GF_LIB_PATH.

Then you might then find to your surprise that GF_LIB_PATH
doesn't accept the usual colon:separated:path notation
familiar from, say, unix PATH and MANPATH.

This patch allows you to define
`GF_LIB_PATH=gf-3.9.lib:$HOME/gf-contrib/whatever/lib`
in a more natural way.

If you are an RGL hacker and have your own version of the
RGL tree sitting somewhere, you should be able to have both
paths in the GF_LIB_PATH, for added convenience. This minor
convenience will probably lead to obscure bugs and great
frustration when you find that your changes are mysteriously
not being picked up by GF; so keep this in mind and use it
cautiously.

This caution should probably sit in the documentation
somewhere. A subsequent commit will do that.

If you use zsh, you can do this to quickly build up a big
GF_LIB_PATH:

% gf_lib_path=( $HOME/src/GF/lib/src/{api,abstract,common,english,api/libraryBrowser,prelude,..} )

% typeset -xT GF_LIB_PATH gf_lib_path
2018-07-22 00:04:07 -07:00
John J. Camilleri
b9b0217160 Remove code which tries to get version information from darcs folder 2018-07-04 13:40:46 +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
Krasimir Angelov
6c4c22ff7a undo the partial fix for word completion since it breaks normal parsing 2018-06-27 11:53:40 +02:00
Krasimir Angelov
68db7695f5 a simple fix for the linearizer 2018-06-20 22:21:10 +02:00
Krasimir Angelov
b86373438b Revert "when linearizing missing functions with brackets, the name of the function should still be reported"
This reverts commit 18204bdd25bd460904ac475f3ea340daa96589df.
2018-06-20 21:16:19 +02:00
Krasimir Angelov
4cdd4dd8a7 Revert "forgot to switch off the debugger"
This reverts commit 5919dfa3366dfd2f2af8c3ce7749d066a2033f0d.
2018-06-20 21:13:58 +02:00
Krasimir Angelov
427f8d8478 forgot to switch off the debugger 2018-06-20 16:36:45 +02:00
Krasimir Angelov
aaefe4310d when linearizing missing functions with brackets, the name of the function should still be reported 2018-06-20 16:35:28 +02:00
Krasimir Angelov
65cfdf1775 added bracketedLinearizeAll 2018-06-20 13:51:41 +02:00
Krasimir Angelov
09d576f5b4 bracketedLinearize in Haskell now emits the BIND constructor like in Java 2018-06-20 13:05:15 +02:00
Inari Listenmaa
9d2b92dbc1 Split gftest to a new repo 2018-06-15 14:31:21 +02:00
John J. Camilleri
4ca52bf763 Add TypeScript type definitions for gflib.js 2018-06-13 09:52:20 +02:00
Aarne Ranta
013f3573e6 added transliteration arabic_unvocalized, which omits the vowels 2018-06-12 20:39:39 +02:00
Inari Listenmaa
df6c9e047e (gftest) Compare also functions of arity 0 + custom startcat for comparison 2018-06-12 14:35:03 +02:00
odanoburu
9a17ca21b5 * update GF mode
- moved to new repo at
  https://github.com/GrammaticalFramework/gf-emacs-mode
- main changes:
  - use utf-8 encoding for inferior gf process
  - add display of operation types
- update links
2018-06-04 09:16:02 -03:00
Krasimir Angelov
44e387ec16 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-05-28 10:14:27 +02:00
Krasimir Angelov
e862968305 added comment for Windows 2018-05-28 10:14:03 +02:00
Krasimir Angelov
4c5fc9f3a8 some tweaks for Windows 2018-05-28 10:12:27 +02:00
Inari Listenmaa
a0849d8a5a (gftest) Add --show-context + combine -o with -f,-c,-b 2018-05-24 22:36:23 +02:00
Prasanth Kolachina
ef4731e8ba spell error in py.egs.README 2018-05-24 09:47:55 +02:00
Prasanth Kolachina
6faad1b3cf add bracketLinearizeAll for variants 2018-05-24 09:47:27 +02:00
Inari Listenmaa
10df5a7269 (gftest) Multiple concrete categories for context generation 2018-05-22 11:49:42 +01:00
Inari Listenmaa
b635cb3d52 (gftest) Better pruning + add new command line option 2018-05-21 18:41:16 +01:00
Krasimir Angelov
9d39648dfb fixed typo which broke the compilation on Windows 2018-05-21 16:03:30 +02:00
Krasimir Angelov
e6ae55641f Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-05-21 09:37:33 +02:00
Krasimir Angelov
a6779486c5 fix the compilation when the byte order cannot be detected statically 2018-05-21 09:36:39 +02:00
John J. Camilleri
41af91f697 Update info about path to jni.h in Java binding install notes 2018-05-21 09:14:26 +02:00
John J. Camilleri
ba4057b214 Missing -I in Java bindings Makefile 2018-05-21 09:10:19 +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
Krasimir Angelov
2036ffe06d bugfix in the Haskell binding 2018-04-12 15:12:36 +02:00
Krasimir Angelov
9a6b3b4a1f Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-04-12 14:45:30 +02:00
Krasimir Angelov
2d898e78c0 bugfix in the C parser 2018-04-12 14:45:02 +02:00
odanoburu
2c163bb243 - rm duplicate lines 2018-04-09 12:14:32 -03:00
odanoburu
d7154a52f9 - rm trailing spaces 2018-04-09 12:14:02 -03:00
Inari Listenmaa
fcdcb23b35 Add more helpful printouts if no grammar provided 2018-04-06 16:55:41 +02:00
Inari Listenmaa
b9d0012f6b Add a tool to generate test cases for GF grammars 2018-04-06 16:32:58 +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
Krasimir Angelov
bb4218433f - tweak the tokenizer in pgf_lookup_sentence to threat .!?,: as separate tokens
+ bugfix which causes crashes
2018-02-22 11:35:54 +01:00
Krasimir Angelov
a16fe3415a partial fix for word completion in the C runtime 2018-02-04 17:21:15 +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
Aarne Ranta
96adbebca8 some paradigm extensions 2018-01-21 12:18:15 +01:00
Krasimir Angelov
a7926835a3 bugfix for random generation with HOAS 2017-12-19 10:47:30 +01:00
Krasimir Angelov
fa8530add1 silence some warnings on MINGW32 2017-12-09 23:11:04 +01:00
Krasimir Angelov
4a1d19086a added one more include to define alloca for Windows 2017-12-09 23:06:34 +01:00
Krasimir Angelov
515ea697ba Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2017-12-09 23:05:32 +01:00