Commit Graph

1280 Commits

Author SHA1 Message Date
aarne e765b97fc4 simplified 1.5 by removing mathematical/ 2008-10-06 12:49:13 +00:00
aarne 394050d9f7 added a command for tree operations and started a module for defining them 2008-10-05 19:49:26 +00:00
aarne e88c7a28a7 adapted old AbsCompute for use with source GF terms 2008-10-05 18:01:42 +00:00
aarne e20969ab5d prevent pgf from being empty when there are no concrete syntaxes 2008-10-05 15:44:16 +00:00
aarne 21aa3cfa17 forced checking def definitions; accept pgf with no concretes 2008-10-05 15:21:08 +00:00
aarne 27de3c0e7b print full types instead of lock field heuristics in overload resolution if the heuristic is misleading 2008-10-03 18:18:21 +00:00
aarne 4c08128503 return error on undefined opers in instance and resource 2008-10-03 16:16:45 +00:00
bjorn 1e8699d159 Added | syntax for variants. 2008-10-03 07:35:26 +00:00
bjorn fa69bd8ab3 Regenerate source GF parser from GF.cf. Now, when GF/Source/Makefile is used, no hand-hacking is needed. 2008-10-02 14:11:41 +00:00
bjorn 9e501521b4 Added src/GF/Source/Makefile for regenerating the GF source parser from GF.cf. 2008-10-02 13:42:24 +00:00
bjorn 86a30ef992 Converted GF/Source/*.hs to Unix line endings, to be able to see what happens when I regenerated the files. 2008-10-02 13:23:54 +00:00
bjorn 8fb068df6a Fail more gracefully on unknown file name extensions. 2008-10-02 12:32:03 +00:00
aarne 429092ac6a added mode 'gf --run' for running silently a script ; made quizzes handle character encoding correctly ; for this end, collected coding functions in GF.Text.Coding 2008-10-01 16:01:51 +00:00
bjorn 203430ae6d Use parantheses for precedence in pgf-pretty lincats. 2008-09-30 12:02:58 +00:00
bjorn 446aa1b5db Added --cfg option for specifying which CFG transformations to use. Added startcatonly CFG trasnformation. Removed output formats that are now easily done with --cfg: "regular", "nolr". 2008-09-30 11:52:11 +00:00
bjorn 794fbd4a41 Fixed CFG start cats for categories with more than one constituent. 2008-09-30 10:53:36 +00:00
bjorn 3ca6c605b0 Use filtering in regular printer. 2008-09-30 09:39:09 +00:00
bjorn 41c95825f3 SRG conversion: print CFG when a unknown cat is found in renameCats. Do filtering in ebnf printer. 2008-09-30 09:32:16 +00:00
bjorn 8716e48c21 pgf-pretty: remove single field record lincat hack. handle f "" (S []) correctly. 2008-09-30 09:31:31 +00:00
bjorn 664bebf5ce Some pgf-pretty fixes, including note by Peter about W "apa" (S []). 2008-09-30 07:24:01 +00:00
peb b5ae83f899 Changes to the prolog output format 2008-09-25 07:32:39 +00:00
bjorn ba321be3ff Added pgf-pretty output-format 2008-09-26 15:21:32 +00:00
bjorn 0f4e8468be Added isLiteralCat function to PGF.Macros. 2008-09-26 15:04:13 +00:00
bjorn b0dde31f00 Added semantic interpretation tag printing to the *bnf grammar printers. 2008-09-26 12:57:20 +00:00
bjorn 2f3b7d1c55 Use ebnf format for "regular" output-format. 2008-09-26 10:20:18 +00:00
bjorn 7a81b559fe Changed nolr printer to use EBNF format. 2008-09-26 10:03:42 +00:00
bjorn a372357adc ebnf printer: print external cats first. 2008-09-26 09:58:57 +00:00
bjorn 86e94e3b1b bnf and ebnf printer: align ::= symbols. 2008-09-26 09:54:09 +00:00
bjorn a4ded76aa3 SRG category renaming: don't count the external cats when calculating indices. 2008-09-26 09:44:02 +00:00
bjorn d1a2cdb948 Changed SRG category renaming to use GF cat + index among CFG cats for that GF cat, instead of the old Concrete syntax name + index among all CFG cats. 2008-09-26 09:39:48 +00:00
bjorn 65f302bb84 Oops, I accidentally disabled all CFG simplification and LR-removal with the ENBF printing patch. 2008-09-26 09:39:04 +00:00
bjorn 1bcffdce30 Change category naming in CFG generation: the number now starts from 1 for each GF category, instead of being the FCFG category number. 2008-09-26 09:28:03 +00:00
bjorn 92c76a6265 Added --output-format=ebnf. 2008-09-26 09:20:39 +00:00
bjorn 8fa99886b3 In CFG generation: don't add linrow number if the lincat has only a single constituent. 2008-09-26 09:06:52 +00:00
bjorn b114cfda77 Added --output-format=nolr. Minor makeRegular refactoring. 2008-09-25 13:41:07 +00:00
bjorn 13191ac155 Added --output-format=regular. 2008-09-25 11:49:00 +00:00
bjorn 7a5e2a15bd Fixe copy-paste error: srgs_abnf_nonrec produced xml, fixed now. 2008-09-25 11:36:04 +00:00
bjorn cc7173a034 Somewhat nicer FCFG output format. 2008-09-25 08:44:23 +00:00
bjorn cdc647e788 Added an FCFG output format (--output-format=fcfg). This now lives in GF.Speech.PGFToCFG, but should probably move somewhere else. 2008-09-25 08:41:49 +00:00
bjorn 34c5617ef6 Got SRGS ABNF generation to compile. 2008-09-23 12:56:25 +00:00
bjorn 75df5cf443 Added srgs_abnf_nonrec grammar printer to GF.Infra.Options. 2008-09-23 12:44:17 +00:00
bjorn e5779fc594 Re-added old PrSRGS_ABNF (does not compile yet). 2008-09-23 12:41:44 +00:00
aarne 47abd5327d use hex in transliteration table 2008-09-23 09:04:03 +00:00
aarne cbde244ac1 Telugu transliteration 2008-09-23 08:49:58 +00:00
bjorn 3a7888e660 A somewhat better solution to the words/UTF-8 problem: do encoding last, but only on what appears to be string literals. 2008-09-15 13:16:04 +00:00
bjorn dbb0f3f3e4 Temporary fix for the grave accent a encoding problem: change compatPrint to id.
The problem is that lower case a with a grave accent is coded in UTF-8 as \195\160. 
Unicode character \160 is non-breaking space, so Haskell's words function
will break a UTF-8 encoded string at this character.
String literals in the .gfo file are UTF-8 encoded in generateModuleCode,
just before the call to prGrammar (which uses compactPrint, which used words).
The real solution would be to pretty-print the grammar to Unicode, and then
encode as UTF-8. The problem with that is Latin-1 identifers. They are now
kept in Latin-1 in the .gfo file, since Alex can't handle Unicode.
The real solution to that would be to fix Alex to handle Unicode, but 
that is non-trivial. GHC interally uses a very hacky .x file to be
able to lex UTF-8 source files. 

An alternative solution that doesn't address the weirdness of using two different
encodings in the same .gfo as we do now, is to incorporate compactPrint
into the grammar printer, to avoid having to do any postprocessing.
2008-09-15 12:38:37 +00:00
krasimir c4c1f6d076 print the search path when we can't find a module 2008-09-10 08:55:16 +00:00
aarne e7106b6181 better error msg for missing record labels 2008-09-09 19:43:33 +00:00
aarne 1bd799d006 completed IdiomCat to compile api and math 2008-09-09 16:11:05 +00:00
aarne 8cde25475b missing case in param lookup table in GrammartoGFCC 2008-09-09 15:33:56 +00:00