Commit Graph

134 Commits

Author SHA1 Message Date
bjorn
f898c7543d Copy command-line options to module flags when compiling to .gfo. 2008-10-15 14:24:23 +00:00
bjorn
58381a95a4 Merge ModuleOptions and Options. 2008-10-15 11:55:18 +00:00
bjorn
50ed99e9b1 Added OPTIONS class to make options handling somewhat nicer. Next, I will merge Flags and ModuleFlags. 2008-10-15 11:38:34 +00:00
krasimir
1fc909c101 the new optimized incremental parser and the common subexpression elimination optimization in PMCFG 2008-10-14 08:00:50 +00:00
bjorn
7a5d3da347 Added option to treat some categories as lexical when generating Haskell data types. 2008-10-10 11:55:12 +00:00
aarne
d53f8e0644 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
14373feb3a 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
2884598b7c Added pgf-pretty output-format 2008-09-26 15:21:32 +00:00
bjorn
824d72bf16 Added --output-format=ebnf. 2008-09-26 09:20:39 +00:00
bjorn
367cc0acb9 Added --output-format=nolr. Minor makeRegular refactoring. 2008-09-25 13:41:07 +00:00
bjorn
8001ea8ea0 Added --output-format=regular. 2008-09-25 11:49:00 +00:00
bjorn
90b2441c34 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
66d4909142 Added srgs_abnf_nonrec grammar printer to GF.Infra.Options. 2008-09-23 12:44:17 +00:00
bjorn
3857f4a6a6 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
a39f8cc5da 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
bjorn
dbe3571fcc Added --haskell-prefix option for changing the constructor prefix in generated Haskell modules. 2008-09-03 15:42:11 +00:00
peb
8952a626d0 new PGF output format: prolog syntax
* output a PGF grammar in prolog readable syntax
* variables in abstract syntax (hypotheses and lambda-abstractions) 
  are translated to unique logical variables
* PGF terms in concrete syntax are translated to more prolog-like terms
2008-09-03 09:04:09 +00:00
aarne
2efc33329e treatment of Int: not always PredefAbs but can be PredefCnc 2008-09-03 09:33:37 +00:00
bjorn
c42e4c0690 Export modifyFlags and modifyModuleFlags from GF.Infra.Options. 2008-08-24 14:52:49 +00:00
bjorn
243bd895e4 Added srgs_xml_nonrec output format. 2008-08-22 08:43:58 +00:00
bjorn
83318d0757 Include coding flag in .gfo files.
Because the PGF file gets all the flags from the GFO file automatically, we get the coding flag in the PGF file too. This is undesirable, since PGF is supposed to always by in UTF-8.
2008-06-25 18:14:45 +00:00
aarne
c5c6d13546 changed names of resource-1.3; added a note on homepage on release 2008-06-25 16:54:35 +00:00
aarne
7d721eb16e removed src for 2.9 2008-06-25 16:43:48 +00:00
krasimir
e332bd6214 fix the System.FilePath import for Posix 2008-04-22 20:06:05 +00:00
krasimir
2a7c68ad65 move gfLibraryPath and gfGrammarPath to UseIO. Now they are accessible and there is only one place to change if you want to use different envVar 2008-04-22 12:12:29 +00:00
krasimir
e16215940e use the standard System.FilePath module instead of our own broken file path manipulation functions 2008-04-22 11:39:46 +00:00
aarne
71d3221e12 option -mac to vt command (uses open with ps) 2008-03-06 21:27:14 +00:00
krasimir
344d95293a For Windows get the default GF_LIB_PATH from the executable path 2008-02-21 15:56:09 +00:00
aarne
3e108b98dd subex elim in gfr generation 2008-01-01 23:31:12 +00:00
aarne
5de05d36da more example languages 2007-12-19 10:50:17 +00:00
aarne
eb10ccbe7c restored Int size and last ; added lib/prelude to be the last in any grammar path 2007-12-16 22:24:36 +00:00
aarne
091f9f0c1b refresh compilation phase in the new format 2007-12-07 10:23:18 +00:00
aarne
cac4f5e27c encoding of lincats as gfcc terms with param value information 2007-11-07 17:27:09 +00:00
aarne
c4b9f1b94b found and temporarily solved the bug in LangGer gfcc generation 2007-10-16 17:38:57 +00:00
aarne
2b5b099813 cleaned up new GFCC, but added RP as deprecated 2007-10-05 09:02:47 +00:00
kr.angelov
c9daa2e2c1 remove the dependency to GF.Data.Operations from GF Embed API 2007-09-25 05:55:49 +00:00
aarne
6ac6a31274 fixed reading argvars from gfc in gf-to-gfcc 2007-09-21 12:00:31 +00:00
aarne
121c247d15 compact printing of gf files 2007-09-20 21:51:54 +00:00
aarne
c58b4fe048 refactored FCFG parsing to fit in GFCC shell 2007-09-20 09:10:37 +00:00
aarne
4d2992d69f strict reading of files; bug fix in readFiles in ShellState 2007-09-16 20:52:27 +00:00
aarne
2fe0291147 bug fix in import reading (had forgotten gfr) 2007-09-12 07:53:54 +00:00
aarne
8448623d36 tutorial exercises; put libdir in place in GF/src 2007-07-04 14:10:41 +00:00
aarne
219c686633 extended functor syntax 2007-06-19 18:12:35 +00:00
aarne
d4e1e2d192 bug fixes in multigrammar handling and GFCC generation 2006-09-16 18:42:46 +00:00
aarne
26f52e8380 check circularities in ln 2006-06-03 11:51:08 +00:00
kr.angelov
a5758468ed add the FCFG parser 2006-06-01 11:19:47 +00:00
aarne
361504793e bug fixes: too much reading of files ; lin of variant records 2006-06-01 07:51:53 +00:00
aarne
516abb5d58 lincat typecheck and abstract-interface extension fixed 2006-05-30 12:19:19 +00:00
aarne
1595e31a28 bug fix in with-modules and gr checker; factoring out cats to Common 2006-05-23 22:20:00 +00:00
aarne
d9a9f57089 tb -trees ; rl ; path in gfe ; removed spurious "file not found" 2006-03-02 09:55:50 +00:00