Commit Graph

155 Commits

Author SHA1 Message Date
krasimir
e69f8165c0 make erasing=on the default 2009-06-16 14:50:06 +00:00
krasimir
6de94f5300 fix the generation of warnings in CheckGrammar. They are printed even in quiet mode and the prefix "Warning" is added automatically 2009-05-20 17:05:58 +00:00
krasimir
b45bdaefec simpler algorithm for file searching in the compiler. should be equivalent to the previous one 2009-05-20 13:23:34 +00:00
krasimir
37aa3947a5 implement --gfo-dir. before it was recognized but ignored 2009-05-09 18:00:11 +00:00
krasimir
ae6e8ee401 added -gf-lib-path option which overides the value of GF_LIB_PATH 2009-04-30 07:56:22 +00:00
krasimir
a391c69fd3 use new parser which supports the syntax in GF.Grammar.Grammar directly 2009-03-16 14:10:30 +00:00
krasimir
bae62cf7c2 remove the obsolete GF.Infra.PrintClass 2009-03-13 07:00:04 +00:00
krasimir
6be08d77e0 fix the handling of flag coding 2009-02-23 14:17:16 +00:00
krasimir
5c2ce87cde PMCFG pretty printer 2009-02-07 23:31:22 +00:00
krasimir
75829ceab3 the new pretty printer is now used for all -dump-* options. added -dump-source. implemented -dump-opt 2009-02-01 12:24:37 +00:00
krasimir
5e3a1f7392 the dependency graph now shows all dependencies 2009-01-31 21:15:42 +00:00
krasimir
0e1215a8f1 some dead code elimination in UseIO and ReadFiles 2009-01-31 20:36:41 +00:00
krasimir
ff0c0085cf bug fix in the module dependencies checker 2009-01-31 10:49:01 +00:00
krasimir
3c53194ca9 --make now implies --batch 2009-01-23 06:14:34 +00:00
krasimir
d95ca4a103 refactor the GF.Grammar.Grammar syntax. The obsolete constructions are removed 2009-01-19 13:23:03 +00:00
aarne
f7dfc6f1d7 command dg for showing source grammar dep graph restored 2008-12-19 14:28:58 +00:00
bjorn
1145aefdbb More efficient implementation of topological sort.
Profiling the compilation of the OALD lexicon showed that 90-95% of the time was spent in topoSort. The old implementation was quadratic. Replaced this with O(E + V) implementation, in GF.Data.Relation. This gave a 10x speed-up (~ 25 sec instead of ~270 sec) for compiling ParseEng and OaldEng.
2008-11-27 10:29:29 +00:00
krasimir
ebd98056ce binary serialization for PGF 2008-10-28 13:57:10 +00:00
bjorn
d327d9da6c Added --parser=ondemand flag. 2008-10-20 14:52:50 +00:00
krasimir
9837fb8fb1 move PGF.Quiz to GF.Quiz. It is not part of the PGF API 2008-10-19 16:38:56 +00:00
bjorn
8726886298 A bit more verbosity when combining PGF files. Use putPointE when writing output files. 2008-10-16 10:12:57 +00:00
bjorn
7676ab8e00 Copy command-line options to module flags when compiling to .gfo. 2008-10-15 14:24:23 +00:00
bjorn
849642e9dd Merge ModuleOptions and Options. 2008-10-15 11:55:18 +00:00
bjorn
1ecb4f63e9 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
4573d10442 the new optimized incremental parser and the common subexpression elimination optimization in PMCFG 2008-10-14 08:00:50 +00:00
bjorn
88798b2a23 Added option to treat some categories as lexical when generating Haskell data types. 2008-10-10 11:55:12 +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
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
ba321be3ff Added pgf-pretty output-format 2008-09-26 15:21:32 +00:00
bjorn
92c76a6265 Added --output-format=ebnf. 2008-09-26 09:20:39 +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
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
75df5cf443 Added srgs_abnf_nonrec grammar printer to GF.Infra.Options. 2008-09-23 12:44:17 +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
bjorn
207ddc4cb6 Added --haskell-prefix option for changing the constructor prefix in generated Haskell modules. 2008-09-03 15:42:11 +00:00
peb
74826158cb 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
cf00c0c2a9 treatment of Int: not always PredefAbs but can be PredefCnc 2008-09-03 09:33:37 +00:00
bjorn
a415c83319 Export modifyFlags and modifyModuleFlags from GF.Infra.Options. 2008-08-24 14:52:49 +00:00
bjorn
cb98536de1 Added srgs_xml_nonrec output format. 2008-08-22 08:43:58 +00:00
bjorn
e459cc7771 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
e9e80fc389 changed names of resource-1.3; added a note on homepage on release 2008-06-25 16:54:35 +00:00
aarne
b96b36f43d removed src for 2.9 2008-06-25 16:43:48 +00:00
krasimir
955a5db693 fix the System.FilePath import for Posix 2008-04-22 20:06:05 +00:00
krasimir
375754e106 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
fc111c1a79 use the standard System.FilePath module instead of our own broken file path manipulation functions 2008-04-22 11:39:46 +00:00
aarne
27508654c0 option -mac to vt command (uses open with ps) 2008-03-06 21:27:14 +00:00
krasimir
671b6b4dff For Windows get the default GF_LIB_PATH from the executable path 2008-02-21 15:56:09 +00:00
aarne
b3da2791fd subex elim in gfr generation 2008-01-01 23:31:12 +00:00