John J. Camilleri
b980bce334
Add gflib.ts, a port of JS runtime gflib.js into TypeScript (WIP)
2019-06-04 15:16:17 +02:00
John J. Camilleri
bd7753db1a
Update TypeScript definitions for gflib.js
...
Still not 100% tested: best solution will really be to rewrite
gflib.js in TypeScript and at the same time use ES modules
2019-05-29 14:43:28 +02:00
krangelov
8c18d7162f
bits of documentation
2019-05-28 12:59:07 +02:00
krangelov
ac039ec74f
filter out empty cohorts
2019-05-28 12:42:59 +02:00
krangelov
9f0ea19a1c
API for scanning for cohorts in an arbitrary text
2019-05-28 12:26:00 +02:00
krangelov
8df2121650
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core
2019-05-27 09:06:11 +02:00
krangelov
8b9719bd2d
remove duplicate definition for RecordCompare
2019-05-27 09:05:41 +02:00
Aarne Ranta
b7249adf63
reordered error message for 'no overload'; might be even better to show complete types
2019-05-20 15:58:47 +02:00
Thomas Hallgren
86066d4b12
Eliminate the dependency on time-compat
...
It was only needed for compatibility with directory<1.2, but
directory>=1.2 has been shipped with ghc since ghc-7.6.
Note: time-compat-1.9.* (the current version) is a completely different
package, that does not provide the needed function toUTCTime, which
was provided in time-compat-0.1.*.
2019-05-15 12:05:38 +02:00
Thomas Hallgren
a5a019a124
runtime/javascript: use a grammar.js with two langauges
...
grammar.js contained only one langauge: FoodsEng. Now it contains
FoodsEng and FoodsIta, similar to what's shown in the gf-tutorial.
The grammar comes from gf-contrib/tutorial/foods.
2019-05-03 15:19:19 +02:00
Thomas Hallgren
61fe167392
gf-tutorial: fix link to JavaScript translator demo
...
After fixing trivial problem in translator.html, the demo works, but
the example grammar contains only one langauge, so it is not so
interesting. translator.html is located in src/runtime/javascript.
The editor.html in the same location also works.
2019-05-03 14:52:28 +02:00
Thomas Hallgren
bea6aa1d2d
GF.Compile.CheckGrammar: discard bad 'lincat C = …' with a warning
...
e.g. if C is a fun and not a cat in the abstract syntax.
Discarding bad lincats prevents GF from generating malformed PGFs that
are rejected by the C run-time system.
I also added code to reject bad lincats with an error, but I left it
commented out since it seems a bit pedantic compared to GF's otherwise
rather sloppy grammar checking.
2019-04-25 17:02:42 +02:00
krangelov
c628e11c01
respect the probs option also when merging PGFs
2019-04-12 11:04:40 +02:00
krangelov
de53a7c4db
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core
2019-03-26 12:21:52 +01:00
krangelov
1e9188ea60
bugfix in the pretty printer
2019-03-26 12:21:35 +01:00
Thomas Hallgren
a55c7c7889
GF.Compile.GrammarToCanonical: keep unreachable rows in tables
...
since unreachable rows can become reachable after grammar transformation.
Also export smart constructors for projection and selection.
2019-03-22 15:38:02 +01:00
Aarne Ranta
b3387e80e4
hiding morphological tags from Latex printing of dependency trees
2019-03-20 22:19:32 +01:00
Thomas Hallgren
de0a997fcd
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core
2019-03-20 14:40:17 +01:00
Thomas Hallgren
0f53431221
GF.Grammar.Canonical: pretty printer: omit some redundant brackets
2019-03-20 14:39:42 +01:00
krangelov
099f2de5b4
support cross-compilation from Linux to Windows
2019-03-19 12:43:38 +01:00
krangelov
2f2b39c5d2
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core
2019-03-19 11:22:09 +01:00
krangelov
f3d7d55752
added one more possible location for Java headers
2019-03-19 11:21:39 +01:00
Thomas Hallgren
2979864752
GF.Compile.GrammarToCanonical: allow + in reg exps in pre { }
2019-03-14 16:52:37 +01:00
Thomas Hallgren
b11d7d93dc
GF.Grammar.Canonical: some Functor/Foldable/Traversable instances
2019-03-13 01:51:26 +01:00
Thomas Hallgren
ba9aeb3322
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core
2019-03-12 22:34:00 +01:00
Thomas Hallgren
8e2424af49
GF.Grammar.Canonical: add TuplePattern and CommentedValue
2019-03-12 22:32:54 +01:00
Peter Ljunglöf
01b9e8da8d
canonical GF: flatten several concatenations into one json array, and parse the array back into concatenations
2019-03-08 18:33:56 +01:00
Peter Ljunglöf
926a5cf414
added parsing of json into canonical GF
2019-03-08 17:58:24 +01:00
Peter Ljunglöf
21140fc0c0
remove case expressions (no particular reason)
2019-03-08 17:57:02 +01:00
Peter Ljunglöf
3328279120
corrected json printing
...
some object labels must be preceded by ".", to not be in conflict with GF records (which are stored as json objects)
plus some minor bugfixes and cleaning
2019-03-08 17:35:35 +01:00
Peter Ljunglöf
8cf4446e8c
Remove "canonical_yaml" from the option descriptions
2019-03-08 17:21:23 +01:00
Thomas Hallgren
5b401f3880
Expose GF.Grammar.Canonical + some refactoring
...
to make it available in other tools by depending on the gf package and
importing it
2019-03-07 17:41:16 +01:00
Thomas Hallgren
b783299b73
Rename module GF.Compile.ConcreteToCanonical to GF.Compile.GrammarToCanonical
2019-03-07 14:47:37 +01:00
Thomas Hallgren
0970d678cf
haskell-bind/utils.c: add missing return
...
Found via C compiler warning
2019-03-07 14:11:29 +01:00
krangelov
52f2739da1
strip empty phrases in bracketedLinearize
2019-02-27 08:27:50 +01:00
krangelov
fc37bc26cd
fixed typo on c-bracketedLinearize
2019-02-26 21:10:06 +01:00
krangelov
25dc934871
replace aeson with json
2019-02-26 19:27:36 +01:00
krangelov
2fdfef13d8
added command c-bracketedLinearize
2019-02-26 15:16:36 +01:00
Thomas Hallgren
a928e4657e
Need aeson>=1.3
...
Also remove ununsed GF.Compile.PGFtoAbstract
2019-02-21 14:43:53 +01:00
Thomas H
b6fd9a7744
Merge pull request #34 from heatherleaf/master
...
Encode/decode of canonical grammars to/from JSON/YAML
2019-02-21 14:26:11 +01:00
krangelov
64a2483b12
added Data.Data.Data instance for Expr
2019-02-20 13:00:51 +01:00
krangelov
1d1e65185a
fixes in the headers for use with Microsoft Visual C++
2019-02-18 11:39:21 +01:00
krangelov
c32cd7133f
fixes in the headers for compilation on Windows
2019-02-18 11:23:01 +01:00
krangelov
409731413e
disable the parser debugger which was left enabled by accident
2019-02-14 15:33:21 +01:00
krangelov
8a5e7fa25d
fix the reader for patterns in a def rule
2019-02-14 15:32:12 +01:00
krangelov
e05c79a751
different definition for GF_ARRAY_LEN
2019-02-14 15:31:36 +01:00
krangelov
ef21d08225
bugfix in computing record lengths
2019-02-14 15:29:33 +01:00
Peter Ljunglöf
f8346c4557
added helper info about canonical grammar output
2019-02-08 09:22:08 +01:00
Peter Ljunglöf
47ac01e4b9
enable export of canonical grammars to JSON and YAML
2019-02-08 09:10:48 +01:00
Peter Ljunglöf
a0c1da2548
encoding/decoding canonical GF grammars to/from JSON and YAML
2019-02-08 09:10:04 +01:00