krangelov
733fdac755
restore the sequence ordering after -optimize-pgf
2020-03-15 19:57:47 +01:00
krangelov
3133900125
another bug related to mattern matching on multiword expression
2020-02-18 15:07:47 +01:00
krangelov
e15392e579
fix: pattern matching on strings should reconstruct the tokens after matching
2020-02-17 19:29:36 +01:00
krangelov
9604a6309c
fix the compilation of case insensitive grammars
2020-02-17 12:40:14 +01:00
Thomas Hallgren
28f53e801a
PGFService: revert unlexing change in PGFService to restore &+ behaviour
2019-11-18 13:20:41 +01:00
krangelov
eece3e86b3
Merge branch 'master' into c-runtime
2019-09-20 16:19:08 +02:00
krangelov
30eef61f0a
more dead code
2019-09-20 16:15:28 +02:00
krangelov
c119d5e34b
silence encoding error
2019-09-20 14:07:07 +02:00
krangelov
a33a84df3d
funnel the generated byte code to the runtime
2019-09-20 11:18:17 +02:00
krangelov
8a419f66a6
Merge branch 'master' into c-runtime
2019-09-20 10:52:40 +02:00
krangelov
29662350dc
removed more dead code
2019-09-20 10:49:29 +02:00
krangelov
a27bcb8092
Merge branch 'master' into c-runtime
2019-09-20 10:42:50 +02:00
krangelov
4d79aa8b19
remove obsolete code
2019-09-20 10:37:50 +02:00
krangelov
084b345663
added option to show the probabilities of results
2019-09-20 08:09:54 +02:00
krangelov
a0cfe09e09
added option -number to limit the number of parse results
2019-09-20 07:18:58 +02:00
krangelov
acb70ccc1b
cleanup
2019-09-19 22:30:08 +02:00
krangelov
4a71464ca7
Merge with master and drop the Haskell runtime completely
2019-09-19 22:01:57 +02:00
krangelov
e993ae59f8
drop the haskell runtime, part 2
2019-09-19 10:06:06 +02:00
Thomas Hallgren
9d3badd8b2
GrammarToCanonical: bug fix: add missing case for Empty
2019-09-10 12:41:16 +02:00
John J. Camilleri
eab9fb88aa
Minor renamings in JSON format
2019-07-10 08:49:00 +02:00
John J. Camilleri
acd4a5e8cd
Address @heatherleaf's suggestions
2019-07-10 08:45:23 +02:00
John J. Camilleri
a4b1fb03aa
Whitespace fixes
2019-07-07 17:38:07 +02:00
John J. Camilleri
cb88b56016
Finish compile to PGF JSON, including JSON schema for resulting format.
2019-07-07 17:35:31 +02:00
John J. Camilleri
ecf9b41db0
Finish JSON conversion for abstract
2019-07-03 16:34:07 +02:00
John J. Camilleri
c5a75c482c
Start work on PGFtoJSON module. Add compiler flag -f json.
2019-07-03 15:07:31 +02:00
krangelov
32379a8d11
fully supported case-insensitive parsing/lookup
2019-06-30 08:48:23 +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
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
Thomas Hallgren
0f53431221
GF.Grammar.Canonical: pretty printer: omit some redundant brackets
2019-03-20 14:39:42 +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
krangelov
25dc934871
replace aeson with json
2019-02-26 19:27:36 +01:00
Thomas Hallgren
a928e4657e
Need aeson>=1.3
...
Also remove ununsed GF.Compile.PGFtoAbstract
2019-02-21 14:43:53 +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