John J. Camilleri
e5a2aed5b6
Remove record fields not in lincat
...
Fixes #100 , #101
2021-07-01 11:47:14 +02:00
John J. Camilleri
13575b093f
Add top-level signatures and general code cleanup
2021-07-01 10:13:42 +02:00
John J. Camilleri
587004f985
Sort record fields in lin definitions
...
Fixes #102
2021-06-30 14:14:54 +02:00
John J. Camilleri
0a70eca6e2
Make GF.Grammar.Canonical.Id a type synonym for GF.Infra.Ident.RawIdent
...
This avoids a lot of conversion back and forth between Strings and ByteStrings
This commit was cherry-picked from d0c27cdaae (lpgf branch)
2021-06-30 10:58:23 +02:00
Inari Listenmaa
6efbd23c5c
Merge pull request #84 from ffrixslee/issue-46
...
Issue 46 (various deprecations during compilation of GF)
2021-06-29 23:48:00 +02:00
Inari Listenmaa
1a466c14c8
Don't print out the error msg for pattern matching unnecessarily
2021-01-20 01:15:28 +08:00
Liyana
9b02385e3e
Removed fromValue for boolV
2020-11-10 17:26:56 +08:00
Liyana
8ca4baf470
Deleted redundant pattern match
2020-11-10 17:15:20 +08:00
Liyana
1f7584bf98
Added explicit implementation for 'fromValue' in instance declaration for 'Predef Bool'
2020-11-10 17:14:31 +08: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