krasimir
5d06550283
CheckGrammar is now using the printer in GF.Grammar.Printer. Fixed bug that was hiding the warnings
2009-09-14 12:16:02 +00:00
krasimir
8b67bc92dd
simple profiler for PMCFG
2009-09-05 14:04:39 +00:00
krasimir
2087339dfc
make erasing=on the default
2009-06-16 14:50:06 +00:00
krasimir
baf56d651c
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
45a9c1666b
simpler algorithm for file searching in the compiler. should be equivalent to the previous one
2009-05-20 13:23:34 +00:00
krasimir
e5720b1b9e
implement --gfo-dir. before it was recognized but ignored
2009-05-09 18:00:11 +00:00
krasimir
063c965b5c
added -gf-lib-path option which overides the value of GF_LIB_PATH
2009-04-30 07:56:22 +00:00
krasimir
6f733230dd
use new parser which supports the syntax in GF.Grammar.Grammar directly
2009-03-16 14:10:30 +00:00
krasimir
6b23221085
remove the obsolete GF.Infra.PrintClass
2009-03-13 07:00:04 +00:00
krasimir
e647de7149
fix the handling of flag coding
2009-02-23 14:17:16 +00:00
krasimir
72fa768613
PMCFG pretty printer
2009-02-07 23:31:22 +00:00
krasimir
008566d41d
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
0e720570f9
the dependency graph now shows all dependencies
2009-01-31 21:15:42 +00:00
krasimir
8333aee547
some dead code elimination in UseIO and ReadFiles
2009-01-31 20:36:41 +00:00
krasimir
99c430e5f5
bug fix in the module dependencies checker
2009-01-31 10:49:01 +00:00
krasimir
5a5088a68c
--make now implies --batch
2009-01-23 06:14:34 +00:00
krasimir
4f093feb49
refactor the GF.Grammar.Grammar syntax. The obsolete constructions are removed
2009-01-19 13:23:03 +00:00
aarne
bd95b5e3eb
command dg for showing source grammar dep graph restored
2008-12-19 14:28:58 +00:00
bjorn
f6cf10e655
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
e44448bad0
binary serialization for PGF
2008-10-28 13:57:10 +00:00
bjorn
5b5b91eb0a
Added --parser=ondemand flag.
2008-10-20 14:52:50 +00:00
krasimir
286be2e4d9
move PGF.Quiz to GF.Quiz. It is not part of the PGF API
2008-10-19 16:38:56 +00:00
bjorn
e75ccc2542
A bit more verbosity when combining PGF files. Use putPointE when writing output files.
2008-10-16 10:12:57 +00:00
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