summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/GrammarToPGF.hs
AgeCommit message (Collapse)Author
2020-03-15restore the sequence ordering after -optimize-pgfkrangelov
2020-02-17fix the compilation of case insensitive grammarskrangelov
2019-06-30fully supported case-insensitive parsing/lookupkrangelov
2015-08-28Comment out some dead code found with -fwarn-unused-bindshallgren
Also fixed some warnings and tightened some imports
2015-02-20added option -plus-as-bind which treats (+) as a bind when used with runtime ↵krasimir
variables
2015-02-16Changes for compatibility with ghc-7.10-rc2hallgren
2 modules: Name clashes caused by Applicative-Monad change in Prelude 2 modules: Ambiguities caused by Foldable/Traversable in Prelude 2 modules: Backwards incompatible changes in time-1.5 for defaultTimeLocale 9 modules: {-# LANGUAGE FlexibleContexts #-} (because GHC checks inferred types now, in addition to explicitly given type signatures) Also silenced warnings about tab characters in source files.
2014-10-21ModuleName and Ident are now distinct typeshallgren
This makes the documentation clearer, and can potentially catch more programming mistakes.
2014-10-16finally proper stack unwind in the evaluatorkr.angelov
2014-09-05full support for recursive def rules in the C runtimekr.angelov
2014-09-01partial implementation for recursive def ruleskr.angelov
2014-08-11pattern matching in def rules is now supportedkr.angelov
2014-08-11a partial support for def rules in the C runtimekr.angelov
The def rules are now compiled to byte code by the compiler and then to native code by the JIT compiler in the runtime. Not all constructions are implemented yet. The partial implementation is now in the repository but it is not activated by default since this requires changes in the PGF format. I will enable it only after it is complete.
2014-07-28Convert from Text.PrettyPrint to GF.Text.Prettyhallgren
All compiler modules now use GF.Text.Pretty instead of Text.PrettyPrint
2014-06-12PGF library: expose only PGF and PGF.Internal instead of all moduleshallgren
PGF exports the public, stable API. PGF.Internal exports additional things needed in the GF compiler & shell, including the nonstardard version of Data.Binary.
2013-11-26Represent identifiers as UTF-8-encoded ByteStringshallgren
This was a fairly simple change thanks to previous work on making the Ident type abstract and the fact that PGF.CId already uses UTF-8-encoded ByteStrings. One potential pitfall is that Data.ByteString.UTF8 uses the same type for ByteStrings as Data.ByteString. I renamed ident2bs to ident2utf8 and bsCId to utf8CId, to make it clearer that they work with UTF-8-encoded ByteStrings. Since both the compiler input and identifiers are now UTF-8-encoded ByteStrings, the lexer now creates identifiers without copying any characters. **END OF DESCRIPTION*** Place the long patch description above the ***END OF DESCRIPTION*** marker. The first line of this file will be the patch name. This patch contains the following changes: M ./src/compiler/GF/Compile/CheckGrammar.hs -3 +3 M ./src/compiler/GF/Compile/GrammarToPGF.hs -2 +2 M ./src/compiler/GF/Grammar/Binary.hs -5 +1 M ./src/compiler/GF/Grammar/Lexer.x -11 +13 M ./src/compiler/GF/Infra/Ident.hs -19 +36 M ./src/runtime/haskell/PGF.hs -1 +1 M ./src/runtime/haskell/PGF/CId.hs -2 +3
2013-11-06the content of ParseEngAbs3.probs is now merged with ParseEngAbs.probs. The ↵kr.angelov
later is now retrained. Once the grammar is compiled with the .probs file now it doesn't need anything more to do robust parsing. The robustness itself is controlled by the flags 'heuristic_search_factor', 'meta_prob' and 'meta_token_prob' in ParseEngAbs.gf
2013-11-05Eliminate mutual dependencies between the GF compiler and the PGF libraryhallgren
+ References to modules under src/compiler have been eliminated from the PGF library (under src/runtime/haskell). Only two functions had to be moved (from GF.Data.Utilities to PGF.Utilities) to make this possible, other apparent dependencies turned out to be vacuous. + In gf.cabal, the GF executable no longer directly depends on the PGF library source directory, but only on the exposed library modules. This means that there is less duplication in gf.cabal and that the 30 modules in the PGF library will no longer be compiled twice while building GF. To make this possible, additional PGF library modules have been exposed, even though they should probably be considered for internal use only. They could be collected in a PGF.Internal module, or marked as "unstable", to make this explicit. + Also, by using the -fwarn-unused-imports flag, ~220 redundant imports were found and removed, reducing the total number of imports by ~15%.
2013-10-30added the linref construction in GF. The PGF version number is now bumpedkr.angelov
2013-10-02something in the typeinferencer of the latest GHC has changed. I need to add ↵kr.angelov
a type signature for GF.Compile.GrammarToPGF.genCncFuns in order to compile.
2013-09-23the compiler now sorts the list of sequences in the PGF fileskr.angelov
2013-09-23GrammarToPGF now looks only at the top modules for the PGF flagskr.angelov
2013-09-23GF.Grammar.Grammar.allExtends now returns a list of source modules instead ↵kr.angelov
of just the module names. This saves extra lookups later
2013-09-19Introduce type RawIdent; only 9 imports of Data.ByteString.Char8 remainhallgren
The fact that identifiers are represented as ByteStrings is now an internal implentation detail in module GF.Infra.Ident. Conversion between ByteString and identifiers is only needed in the lexer and the Binary instances.
2013-04-22a bit more informative error message in GrammarToPGFkr.angelov
2013-02-12now the beam size for the statistical parser can be configured by using the ↵kr.angelov
flag beam_size in the top-level concrete module
2013-01-28Better error message for Predef.errorhallgren
+ Instead of "Internal error in ...", you now get a proper error message with a source location and a function name. + Also added some missing error value propagation in the partial evaluator. + Also some other minor cleanup and error handling fixes.
2012-12-14The first prototype for exhaustive generation in the C runtime. The trees ↵kr.angelov
are always listed in decreasing probability order. There is also an API for generation from Python
2012-12-11partial evaluator workhallgren
* Evaluate operators once, not every time they are looked up * Remember the list of parameter values instead of recomputing it from the pattern type every time a table selection is made. * Quick fix for partial application of some predefined functions.
2012-12-02produce error message instead of failure of irrefutable pattern Ok ty_C in ↵aarne
GrammarToPGF, to help find compilation errors; the ones I've found are because an inherited abstract excludes something that the inherited concrete does not exclude.
2012-08-29A basic infrastructure for generating Teyjus bytecode from the GF abstract ↵kr.angelov
syntax
2012-01-14sorted the list of funs and cats in GrammatToPGF to get the predef ↵aarne
categories in proper place and get gr, ai, gt work properly
2011-11-24now if some module is compiled with -no-pmcfg then the PMCFG code is ↵kr.angelov
generated at the end during the linking phase. Now the default compilation of the libraries with cabal is with -no-pmcfg.
2011-11-14bugfix in the new PGF generationkr.angelov
2011-11-10Now PMCFG is compiled per module and at the end we only link it. The new ↵kr.angelov
compilation schema is few times faster.
2011-11-02merge GF.Infra.Modules and GF.Grammar.Grammar. This is a preparation for the ↵kr.angelov
separate PGF building
2011-11-02Now the compiler maintains more precise information for the source locations ↵kr.angelov
of the different definitions. There is a --tags option which generates a list of all identifiers with their source locations.
2011-08-30GF.Infra.Modules: keep the modules of a grammar in a finite map instead of a ↵hallgren
list This speeds up the compilation of PhrasebookFin.pgf by 12%, mosly by speeding up calls to lookupModule in calls from lookupParamValues, in calls from allParamValues. The invariant "modules are stored in dependency order" is no longer respected! But the type MGrammar is now abstract, making it easier to maintain this or other invariants in the future.
2011-08-30GrammarToPGF.hs: comment out unused importshallgren
2011-03-12make later flags take priority over earlier ones in PGF generation aarne
2010-11-12operations in the abstract syntaxkrasimir
2010-10-02refactor the API for random generation again. Now PGF contains probabilities ↵krasimir
in the abstract syntax
2010-07-01reorganize the modules in GF.Compile.*krasimir
2010-06-30compilation of pattern matching using the algorithm of Lennart Augustsson. ↵krasimir
Not used yet
2010-06-18Yay!! Direct generation of PMCFG from GF grammarkrasimir
2010-06-09dead code elimination for PGF. Note: the produced grammars will not work ↵krasimir
well with metavariables and high-order abstract syntax
2010-05-28refactoring in GF.Grammar.Grammarkrasimir
2010-03-24now for every category we store, in PGF, the list of functions for it in ↵krasimir
source-code order. The order matters for the termination of the exhaustive generation with dependent types.
2010-03-22store and propagate the exact source location for all judgements in the ↵krasimir
grammar. It may not be used accurately in the error messages yet
2010-03-18pattern @ should be propagated to PGFkrasimir
2010-03-18syntax for inaccessible patterns in GFkrasimir