1
0
forked from GitHub/gf-core
Commit Graph

8672 Commits

Author SHA1 Message Date
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
Aarne Ranta fd29925173 started collecting error messages in order to explain them 2019-04-29 16:53:43 +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
Thomas Hallgren 61e7df4d1c Fix outdated comment about which version of the Haskell Platform to use 2019-04-05 16:38:12 +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
Thomas Hallgren bf17fa0bb2 Bump version number to 3.10.3-git
This is not an announced realase, but this is version now installed on our
server.
2019-03-05 20:18:30 +01:00
Thomas Hallgren 0b3c278f49 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core 2019-03-05 19:23:54 +01:00
Thomas Hallgren c710bf0e84 Update .deb packages to verion 3.10-2 on the download page
New .deb packages have been generated since it turned out that the
RGL was missing in original .deb packages.
2019-03-05 19:18:45 +01:00
Thomas Hallgren eb46577f58 debian/rules bug fix: the RGL was not included in .deb packages
The problem was that the RGL was both built and copied to the destdir
during the build step, which caused it to be deleted before the install
step. It is now copied to destdir during the install step.
2019-03-05 16:19:46 +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 bde1a6d586 fix the dependency to json 2019-02-26 19:32:08 +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
Thomas Hallgren 951b884118 Export of concrete syntax to Haskell now goes via Canonical GF
TODO: better treatment of Predef functions and record subtyping coercions
2019-01-23 02:47:10 +01:00
Thomas Hallgren fc5c2b5a22 PGF.Haskell.fromStr: fix double spaces caused by empty tokens 2019-01-23 02:45:23 +01:00
Thomas Hallgren e4abff7725 More work on the canonica_gf export
+ Abstract syntax now is converted directly from the Grammar and not via PGF,
  so you can use `gf -batch -no-pmcfg -f canonical_gf ...`, to export to
  canonical_gf while skipping PMCFG and PGF file generation completely.
+ Flags that are normally copied to PGF files are now included in the
  caninical_gf output as well (in particular the startcat flag).
2019-01-22 17:16:32 +01:00