Skip to content

Releases: cederberg/grammatica

Version 1.6

10 Mar 13:49
Compare
Choose a tag to compare
  • License modified to revised BSD
    The license agreement for this library has been changed to revised BSD license. This change was made to avoid any confusion related to usage in commercial (closed source) applications.
  • Fixed minor API issues for reusing parsers
    The Parser.reset method is now available in a new flavor that allows replacing the Analyzer being used. Also the Tokenizer now disposes the input buffer and references to parsed tokens already when the end of file is encountered.

Version 1.5

13 Mar 12:05
Compare
Choose a tag to compare
  • License modified to GNU LGPL version 3
    The license agreement for this library has been changed to GNU LGPL,
    version 3. This change was made for compatibility reasons and most
    users will remain unaffected.
  • Added Visual Basic.NET code generation
    A Visual Basic.NET source code generator has been contributed by
    Adrian Moore. It uses the same run-time library (DLL) as the C# .NET
    version.
    Bug #8199
  • Added support for case-insensitive parsing
    A CASESENSITIVE grammar declaration has been added to make it
    possible to parse in case-insensitive mode. By default all parsing is
    case-sensitive. Thanks to Adrian Moore for providing a partial implementation.
    Bug #5060
  • Added support for reusing parsers and tokenizers
    A reset() method has been added to both the Parser and the Tokenizer
    classes, allowing to reuse a parser with a new input stream. By reusing a
    single parser and tokenizer for various input files speed and memory
    gains can be made, especially for complex grammars.
    Bug #4500
  • Added factory methods for creating various objects
    New factory methods for creating tokens, productions, tokenizers and
    analyzers have been added. These can be overridden in subclasses to
    provide more specific classes if desired.
  • Improved the tokenizer processing speed
    The tokenizer speed has been improved by using a custom DFA
    implementation for regular expressions. The tokenization phase now
    runs some 20-30% faster in the general case.
    Bug #3603 &
    Bug #8202
  • Changed to use native Java regular expressions
    Since the built-in regular expression library is not used as frequently
    after the implementation of DFA regular expression handling, the native
    Java regular expression classes are now used. This implies improved
    support for advanced regular expression syntax (at a performance
    penalty).
    Bug #3597 &
    Bug #17189
  • Changed .NET parser namespace for C# 2.0
    The C# parser namespace has been modified from PerCederberg.Grammatica.Parser
    to PerCederberg.Grammatica.Runtime due to the new C# 2.0 compiler strictness.
    Bug #14302
  • Changed .NET parser API for better integration
    The .NET parser API has been modified for almost all classes, introducing
    properties and indices instead of getter and setter methods. The old methods
    have been deprecated, but are still available to avoid breaking existing applications.
    Bug #8693
  • Changed built-in regular expression API subtly
    Due to fixes required to be able to reuse tokenizers, the built-in regular
    expression class API had to be changed subtly. In essence, all the methods
    can now throw IOException which breaks a Java compile.
    Bug #4500
  • Fixed possible divide by zero in profiling
    When profiling grammars with small input files, the time measured could
    previously be zero (0). This caused a division by zero exception when
    calculating the number of tokens parsed per second.
    Bug #7998
  • Fixed parse error on some grammar comments
    Grammar comments ending with **/ previously caused a parse error.
    The comment token regular expression has now been corrected to fix this.
    Bug #12767
  • Fixed premature EOF reported in some cases
    The tokenizer previously assumed EOF had been encountered when a full
    look-ahead buffer couldn't be read. Thanks to Jeremy M Stone for finding this.
    Bug #23818
  • Fixed token match priority to use the grammar order
    String tokens were previously always checked and considered first, unless a
    regular expression token matched more characters. This has now been
    changed to depend on the grammar file ordering instead.
    Bug #13009

Version 1.4

13 Mar 11:55
Compare
Choose a tag to compare
  • Added Apache Ant task
    An Apache Ant task has been added to the distribution. See the reference
    manual for details on how to use it.
    Bug #3620
  • Added support for retrieving all tokens
    The Tokenizer class now supports enabling a useTokenList feature, that will
    link all tokens in a double-linked list. This can be used to access whitespace
    and comment tokens, although otherwise ignored by the parser. By default
    this feature is off, to avoid potetial garbage collection problems when parsing large files.
    Bug #3605
  • Removed API documentation for unsupported API
    Java API documentation for the unsupported API:s in Grammatica is no longer
    created or distributed.
    Bug #4969
  • Corrected a null pointer error in --profile
    When using --profile a null pointer exception was thrown during the parsing
    of the file. This was due to the analyzer being set to null, something that has
    now been made impossible.
    Bug #4967

Version 1.3

13 Mar 11:51
Compare
Choose a tag to compare
  • Added C# API documentation
    C# API documentation has now been added to the release documentation. The build
    file uses CppDoc to generate the HTML documents.
    Bug #3612
  • Added source code examples to documentation
    Some examples of Java source code for creating a parser has been added to the
    reference manual.
    Bug #4093
  • Improved and clarified the Analyzer API
    The Analyzer class API has been clarified by improving the generated comments slightly
    and by adding a getChildValues() method.
    Bug #4181
  • Corrected generation of C# analyzer classes
    The generation of C# analyzer classes was completely broken in all previous releases,
    due to missing keywords and erroneous casing of method names. Tests have now been
    added to verify the generated analyzers. This was only an issue in the C# code generation,
    as the Java version has been tested continuously.
    Bug #4416 &
    Bug #4498

Version 1.2

13 Mar 11:42
Compare
Choose a tag to compare
  • Added profiling for grammars
    A new action --profile has been added that prints out the statistics from a profiling run of the grammar. This is useful for improving the grammar and parsing speed. Bug #3936
  • Improved tokenizer performance
    The tokenizer performance has been much improved for string tokens. The tokenization speed is now about twice as fast (on average), meaning that the tokenizer will use half as much time for most input and grammars. Bug #3603
  • Improved the parse tree output on error
    The parse tree was previously only printed when a file could be parsed correctly. Now the parse tree is printed until the first syntax error is found. Bug #3930
  • Improved error message for missing % character
    When missing the final % character in the grammar file, the error message printed was not logical. This has been improved by printing an 'unterminated directive' error instead. Bug #3931
  • Improved the reference manual
    The reference manual has been improved to the point where it is considered finished. There is still room for much improvement, however, and such fixes will added in later versions. Bug #3598
  • Corrected unexpected token error messages
    In some circumstances the unexpected token error messages didn't list all possible tokens. This only ocurred for productions containing alternatives with ambiguities that were resolved with one alternative being set as the default. This has now been corrected, which should also improve the error recovery in these cases. Bug #3929

License: GNU GPL License (with linking exception)