John J. Camilleri
cead0cc4c1
Add selection and projection cases but not working
2021-01-26 09:55:07 +01:00
John J. Camilleri
270e7f021f
Add binary instances
2021-01-25 14:42:00 +01:00
John J. Camilleri
f24c50339b
Strip down format. More early work on compiler. Add testsuite (doesn't work yet).
2021-01-25 12:10:30 +01:00
John J. Camilleri
cd5881d83a
Early work on LPGF compiler
2021-01-22 15:17:36 +01:00
John J. Camilleri
93b81b9f13
Add first version of LPGF datatype, with linearization function and some hardcoded examples
2021-01-22 14:07:41 +01:00
Inari Listenmaa
1a466c14c8
Don't print out the error msg for pattern matching unnecessarily
2021-01-20 01:15:28 +08:00
John J. Camilleri
8ad9cf1e09
Add flag and stubs for compiling to LPGF format
2021-01-19 17:21:13 +01:00
Andreas Källberg
56f94da772
Merge remote-tracking branch 'origin/master' into fix-newer-cabal
2020-09-05 21:11:12 +02:00
Andreas Källberg
7268253f5a
MonadFail: Make backwards-compatible
2020-09-05 20:23:07 +02:00
Andreas Källberg
0581d6827e
Fix most build errors
2020-08-05 18:48:24 +02:00
Andreas Källberg
b8812b54b2
fix newer ghc: Don't try to be backwards compatible
2020-08-05 18:48:24 +02:00
Andreas Källberg
251845f83e
First attempt at fixing incompabilities with newer cabal
2020-08-05 18:48:24 +02:00
Inari Listenmaa
7c478016d0
Replace deprecated pragma with up-to-date one. ( #17 )
2020-08-03 19:45:20 +02:00
Inari Listenmaa
868566a319
Remove accidentally added space character in deriving clause.
2020-07-31 15:16:45 +02:00
Inari Listenmaa
aeabc955c8
Remove characters that aren't allowed in Haskell data types.
...
GF allows more characters in its types, as long as they are inside
single quotes. E.g. 'VP/Object' is a valid name for a GF category,
but not for a Haskell data type.
2020-07-31 15:05:46 +02:00
Inari Listenmaa
030c3bfee9
Add option "data" to Haskell options.
...
Imports Data.Data, all GF types derive Data, and uses DeriveDataTypeable.
2020-07-31 12:46:19 +02:00
aarneranta
8a052edca2
an attempt to solve record extension overloading bug, commented out for the moment
2020-07-06 18:01:59 +02:00
aarneranta
1360723137
fixed issue #67 on order of record fields in overloading
2020-07-06 14:27:49 +02:00
Inari Listenmaa
de8cc02ba5
Condense the unsupported token gluing as per John's suggestion
2020-06-05 19:39:31 +02:00
Inari Listenmaa
dbc7297d80
Don't output "\n **" if helpfulMsg is empty.
2020-06-04 20:19:06 +02:00
Inari Listenmaa
414c2a1a5f
Add clarification to Internal error in GeneratePMCFG
2020-06-04 19:57:55 +02:00
Inari Listenmaa
dca1fcd7fe
Add clarification to Unsupported token gluing (both good and bad case)
2020-06-04 19:57:38 +02:00
Inari Listenmaa
c0714b7d33
Add clarification to "expected foo, inferred bar" type of error msgs
2020-06-04 19:57:10 +02:00
Inari Listenmaa
a4e3bce6bb
Add clarification to "Pattern is not linear" error msg.
2020-06-04 19:56:31 +02:00
Inari Listenmaa
9a903c166f
Add suggestions to error messages that are caused by too few/many args
2020-06-04 17:56:13 +02:00
krangelov
733fdac755
restore the sequence ordering after -optimize-pgf
2020-03-15 19:57:47 +01:00
krangelov
9604a6309c
fix the compilation of case insensitive grammars
2020-02-17 12:40:14 +01:00
krangelov
30eef61f0a
more dead code
2019-09-20 16:15:28 +02:00
krangelov
29662350dc
removed more dead code
2019-09-20 10:49:29 +02:00
krangelov
4d79aa8b19
remove obsolete code
2019-09-20 10:37:50 +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
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
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
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
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
47ac01e4b9
enable export of canonical grammars to JSON and YAML
2019-02-08 09:10:48 +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
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