Commit Graph

1335 Commits

Author SHA1 Message Date
aarne e009048e08 removed dependencies of Zipper and editor in GF grammar compiler 2008-12-08 14:25:11 +00:00
aarne 75ecc5f97b preperations for Val of params 2008-12-08 12:49:03 +00:00
aarne de8bea8d69 data structures for param values with number, preparing optimized pattern matching in grammar compilation 2008-12-08 07:15:19 +00:00
aarne d38f56b025 fixed a Compute bug due to failure to match typed record values with untyped record patterns 2008-12-04 17:02:24 +00:00
bjorn b8893fc0b5 Remove more unused stuff from GF.Data.Operations. 2008-12-01 21:33:53 +00:00
bjorn f50c4270ad Remove lots of old unused stuff from GF.Data.Operations. 2008-11-27 10:55:24 +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
bjorn a4e731cc33 Move Graph, Relation and Graphviz modules from GF.Speech to GF.Data. 2008-11-27 08:43:08 +00:00
bjorn a4f0d4f0d7 Remove ununsed GF.Source.SharedString module. 2008-11-27 08:36:18 +00:00
bjorn 720932d751 Don't use string sharing in LexGF.
Profiling showed that when loading a large .gfo file, shareString was responsible for
15-18% of the CPU time, and a lot of the allocation. Since we already use ByteStrings for 
reading the source files, shareString mostly has the effect of creating lots 
of small ByteStrings instead of one large one. Since the plain size of the .gfo is seldom
a problem (unlike when it was read as a String), it is ok to keep the whole file 
as one ByteString in RAM, and have all tokens point into that.
Profiling after the change showed 15-20% reduction in CPU time and in total allocation.
2008-11-26 16:19:54 +00:00
bjorn 5dee98234e My profiling showed that the BinTree operations were responsible for about 60% of the CPU time when reading a large .gfo file. Replacing BinTree by Data.Map reduced this to about 6%, which meant about 50% reduction in total CPU time. 2008-11-26 15:44:22 +00:00
aarne 288ffd290a restored "?" as system pipe command 2008-11-18 15:31:30 +00:00
aarne f1a68a3ca6 fixed a bug with type checking function types 2008-11-18 10:58:50 +00:00
peb 7babe205e8 Fix in Prolog output of the atom "'" 2008-11-17 13:33:53 +00:00
aarne ca59050abc print "no trees found" in GF shell if an empty tree list is returned by p or pt 2008-11-10 16:23:09 +00:00
aarne d9ff5aa48c lexer documentation in help and tutorial updated 2008-11-10 15:53:38 +00:00
aarne 7e82e4a710 updated tutorial up to lexers ; fixed lexcode in GF (was wrong due to a typo) 2008-11-10 10:59:13 +00:00
bjorn c6968b626c SRG generation: renameCats now gives new names to all cates used in the grammar, on RHS or LHS. This avoids a crash in non-recursive SRGS generation. The crash happend becase the bottom-up filter has not yet been done when renameCats is called. 2008-11-09 14:27:34 +00:00
bjorn 5e711e7abc Include .gf file name in source parsing syntax error message. 2008-10-30 10:49:23 +00:00
krasimir 03d86ba05c remove some redundant imports of GF.Text.UTF8 2008-10-28 15:47:04 +00:00
krasimir ebd98056ce binary serialization for PGF 2008-10-28 13:57:10 +00:00
aarne 970e69add9 missing case in PGF generation 2008-10-27 09:24:33 +00:00
krasimir 3fed05e121 fix typo 2008-10-25 20:44:04 +00:00
krasimir e816ae237a add cp1252. usefull for Swedish and German 2008-10-25 20:25:09 +00:00
krasimir a06d2c6d50 extend the cp1251 coding to cover all cyrillic letters 2008-10-25 20:22:06 +00:00
krasimir 0606de738e efficient and nicer implementation for literal categories 2008-10-21 14:30:36 +00:00
bjorn d327d9da6c Added --parser=ondemand flag. 2008-10-20 14:52:50 +00:00
bjorn 6b8c9dd4c9 Added PGF.Macros.mapConcretes 2008-10-20 14:51:42 +00:00
bjorn d41616dd6a Added Read and Show instances for CId. Also added readCId :: String -> Maybe CId, and use that for readLanguage. 2008-10-20 11:59:31 +00:00
bjorn a26290659d Replace Category with Type in the PGF API. Added readLanguage and showLanguage. 2008-10-20 11:35:05 +00:00
krasimir eb0fefec28 preparation for dep. types. The -cat option can take any type instead of just a category. The PGF API is generalized as well. 2008-10-20 08:42:39 +00:00
krasimir 418856d9bf move the literal category names to PGF.Macros 2008-10-19 14:21:58 +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 95278a947f Export list in GF.Compile.GetGrammar 2008-10-16 12:59:40 +00:00
bjorn bb25c86ae5 Copy command-line flags to in-memory module when reading from a .gfo file. This maeans that command-line flags get put in the .pgf file. 2008-10-16 11:58:18 +00:00
bjorn 176dc3e730 In shell "p" command, only try languages that have a parser. 2008-10-16 11:33:09 +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 d1633b98d0 Honor --erasing flag from command-line also when compiling existing .gfo to PGF. 2008-10-16 08:27:43 +00:00
aarne 856c31a64b restored the possibility to compile .cf files to gf 2008-10-15 15:08:38 +00:00
krasimir adc6566cd3 high-order syntax in PMCFG 2008-10-15 14:58:00 +00:00
krasimir be75baa4bf rename some variable names 2008-10-15 09:43:15 +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 f438fbb294 rename emptyFRulesEnv to emptyGrammarEnv 2008-10-15 09:26:01 +00:00
krasimir e36d70d483 threat category _Var as a literal category 2008-10-15 08:38:34 +00:00
krasimir 5f33e0bda9 store the total number of PMCFG categories in the PGF file 2008-10-15 07:47:57 +00:00
krasimir 57ee52103d literal categories in the incremental parser 2008-10-14 15:29:50 +00:00
aarne e4dc63f665 rudimentary abstract syntax type checker and solver in PGF 2008-10-14 14:34:08 +00:00
aarne a11f1b1437 paraphrase works a little better now ; added examples/paraphrase for testing 2008-10-14 11:19:30 +00:00