Version 12 (released 2018-12-03): * Added support for Qt 5 and Qt Jambi 5. * Fixed object ownership issues in the Java bindings. This prevents hard to debug crashes if Java objects are passed to C++ without a held Java reference. * Fixed build of concise.DynGenPar.java.ExternalizableAction and concise.DynGenPar.java.ExternalizableActionDeserializer with Java 1.6. * Slightly tweaked the grammar of and fixed an error in the cnttoxml example. * Added: ActionInfo now includes a pointer to the Parser (named "parser"). * Added: New Parser::saveState method to save the state while a Parser::parse operation is running. Intended to be used in callbacks. * Added: Parse actions can now request lookahead of one or more tokens to be performed. If the lookahead tokens match the parse state after the rule with the action, the action is executed. If they do not match, this branch of parsing fails immediately. This requires a token source that can reliably rewind to an earlier position (with a saved lexer state if needed). If the input ends after fewer than the requested number of lookahead tokens, it is considered a match if and only if it constitutes valid complete input. The lookahead does not enforce context-sensitive (PMCFG or next token) constraints nor execute any parse actions (they are executed later when regularly encountered). Version 11 (released 2017-04-13): * Optimization: The Parser::addRule method now does not always clear the whole neighborhood cache, but only those entries that need to be invalidated. While this makes addRule itself slower, it significantly improves overall performance by avoiding needless recomputation of the neighborhoods. Version 10 (released 2017-01-20): * Added support for the PGF file format revision 2.1 introduced in GF 3.7. We now support PGF files from GF versions from 3.2 to (at least) 3.7.1. The new tokens SOFT_SPACE, CAPIT and ALL_CAPIT are currently silently ignored. * Fixed PGF import when an abstract function references an identifier with non-ASCII characters in it. * Fixed PGF import to correctly recognize the first non-lindef/linref function for all files in all format revisions (in particular, the English resource grammar from GF 3.7.1 where it was previously wrong). * New tool: Added a GF resource grammar exporter that exports the dictionary from a PGF compiled from a resource grammar using the PGF import code from DynGenPar. Version 9 (released 2016-01-13): * Optimization: The Parser::processStackItem method now uses the tailcall optimization (which the compiler was unable to perform automatically because of the C++ non-POD objects). This reduces stack usage by a huge factor (an example that previously overflowed a 32 MiB stack now works with the default 8 MiB stack), and also brings a measurable speedup (by about one third of the execution time) as a side effect. Version 8 (released 2015-11-16): * Added support for serializing context-free grammars using QDataStream. Notes: - Whether or not custom rule labels are serialized is controlled by the static boolean variable DynGenPar::Rule::serializeLabels. (In Java, use the setter Rule.setSerializeLabels and the getter Rule.serializeLabels.) - Custom rule label types in C++ can only be serialized if they have stream operators registered using qRegisterMetaTypeStreamOperators. - Custom rule label types in Java can only be serialized if they implement the java.io.Serializable or java.io.Externalizable interface. - Whether or not custom rule actions are serialized is controlled by the static boolean variable DynGenPar::Rule::serializeActions. (In Java, use the setter Rule.setSerializeActions and the getter Rule.serializeActions.) - Custom action types in C++ can only be serialized if they reimplement the virtual Action::writeExternal method and have an ActionDeserializer registered using Action::registerDeserializer. The first thing writeExternal should do is write the name of the deserializer (whereas ActionDeserializer::readAction is called with the name already consumed). - While custom action types in Java can theoretically also implement the above directly, it is recommended to instead extend the convenience class concise.DynGenPar.java.ExternalizableAction, which in particular requires implementing the java.io.Externalizable interface. The ExternalizableAction class handles the translation between the Java and Qt/DynGenPar serialization interfaces. * Added a test program (dyntest = dynamic test) that parses input using a previously serialized grammar, loaded at runtime. * Optimization: Type 3 stack items no longer have an unused scope member. * Optimization: The processing of the graph-structured (DAG-structured) parse stacks was changed from reference-counted depth-first to priority-queue-driven breadth-first to eliminate two quadratic bottlenecks when parsing long linked lists. This obviates the need to count in-edges at every character (the first quadratic bottleneck), requiring to track only the node depth that is essentially immutable. It also allows pruning the search immediately if we have no matches because there are no usage (in-edge) counts to decrement, eliminating the other quadratic bottleneck. Version 7 (released 2015-08-07): * The DynGenPar data types are now declared as primitive, movable or complex using Q_DECLARE_TYPEINFO. This makes Qt containers more efficient. Version 6 (released 2015-06-12): * The cnttoxml example now uses multi-token prediction for error messages. * The cnttoxml example can now optionally use Unicode characters for error messages. * Several token sources can now also wind forward in their TokenSource::rewindTo method. The protected TokenSource::simpleRewind helper method now takes an optional "bool rewindOnly" argument that defaults to false. * The ByteTokenSource::setInputBuffer method is now also available in Java. It is the responsibility of the Java code to ensure that the passed buffer does not get garbage-collected early. (It should be keeping a reference somewhere.) Version 5 (released 2014-11-11): * Fixed a bug when matching categories at the beginning of a rule to epsilon: DynGenPar was matching the wrong category to epsilon, using the index of the current match instead of the position in the rule. In the case of an unambiguous grammar, that was always index 0, so when matching more than one category to epsilon, it was always matching copies of the first one. * Added a test case capturing the above bug. Version 4 (released 2014-10-24): * Fixed Java binding compilation issue: Due to a wrong dependency in the Ant build.xml, builds were failing entirely on Windows and producing incomplete output on GNU/Linux. Version 3 (released 2014-10-16): * Updated the Java bindings to work with current snapshots of Qt Jambi. Removed some workarounds that were needed for bugs in the old Qt Jambi that are now fixed. * Added academic citations to the API documentation using the Doxygen @cite command introduced in Doxygen 1.7.5. * Updated the Doxygen settings for the API documentation for Doxygen 1.8.x. * Added the OptProbl grammar, an extensible grammar for optimization problems. It accepts a subset of LaTeX as the input and produces COCONUT DAGs as the output. Its main feature is that the LaTeX \newcommand command can be used to add new rules to the grammar at runtime. * Updated the cnttoxml tool for the latest Concise type sheet grammar. * Dropped support for the old PGF floating-point representation. It was only used in GF versions prior to 3.2, and we cannot read the PGF files from any actual pre-3.2 release due to other changes. We still support the stable PGF file format revision 1.0 used by all GF versions from 3.2 to 3.5. * Changed the PMCFG loading to allow zero-dimensional PMCFG functions. * Fixed an endless loop in the PGF token source when an unknown identifier (to be returned as a String) matches (ends with) a suffix token. (The token source was repeatedly trying to apply further suffixes even though none matched.) * Added support for the PGF file format revision 2.0 introduced in GF 3.6. We now support PGF files from GF versions from 3.2 to (at least) 3.6. * Fixed the PGF token source to return suffixes even at the end of the input stream. * The Java bindings now accept reference parameters of value types without using the QNativePointer class. This implies one API change: PgfParser.filterCoercionsFromSyntaxTree no longer returns a Node, but modifies the passed Node directly. The PgfParser::filterCoercionsFromSyntaxTree(const Node &) overload was also removed at C++ level because it was only needed for the Java bindings and because the two overloads with different behavior (in-place modification vs. automatic copy) differing only by constness bore the risk of accidentally calling the wrong one. * Added an INSTALL text file documenting how to build DynGenPar from source. Version 2 (released 2012-03-02): * Fixed the sign of IEEE doubles in the PGF importing code. (Those doubles are not used yet, but potential future changes making use of them would have exposed the latent bug.) * Fixed a PMCFG parsing bug which made some sentences in the GF Phrasebook example fail to parse: The match operation was merging type 0 stack items even when their PMCFG scopes were different, which is not allowed. Now type 0 stack items can only be reused when they have null scopes. Version 1 (released 2012-01-30): * Initial release.