Change Log for the C++ Version of Coco/R

  • bug fix in string hashing (thanks to Julien Schueller).
  • Support for "::" as a namespace separator on the command line.
  • Better readable parser, to support debugging.
  • Generate trace.txt into the output folder, if specified.
  • Minor bugfixes.
  • Thanks to Michel Beck for his suggestions and his bug report!
  • Moved service functions (e.g., coco_string_create) into generated namespace.
  • Suspend switch optimization if an alternative contains an LL(1) warning, and generate an if-else-if cascade instead.
  • Minor changes, cleanup.
  • New release: Apr, 04 2011
  • Coco/R C++, support for a parser constructor and destructor, the methods Init() and Destroy() will be automatically called if they exist in the constructor and the destructor respectively.
  • Prefix the #define with the given namespace name, thus more compilers can be used in one project.
  • Minor changes, cleanup.
  • New release: Nov, 16 2010
  • Frame files provided as command line argument take now precedence over frame files in the source directory of the attributed grammar.
  • The namespace can be set as a directive in the attributed grammar:
    If the namespace is set in the attributed grammar and on the command line, the command line argument takes precedence.
  • New option checkEOF: With the option checkEOF the user can specify whether the generated parser should check if the entire input has been consumed after parsing, i.e., if the token after the start symbol of the grammar is an end-of-file token. The user can enable or disable this check by the following directive in the attributed grammar:
    $checkEOF=true // enable the end of file check (default)
    $checkEOF=false // disable the end of file check
  • Support for UTF-8 input: The token stores the character position in Token.charPos.
  • Support for copyright sections in the generated files. If a file named Copyright.frame is provided, it will be included at the top of the generated scanner and parser.
  • Cleanup, removed the marker $$$ from the end of the frame files.
  • Minor change: Code cleanup.
  • New release: Jan, 11 2010
  • More robust scanner generation.
  • New release: Jun, 22 2009
  • More robust UTF-8 handling in ParserGen.CopySourcePart and Scanner.GetString.
  • New release: Mar, 27 2009
  • Support for pragmas which are part of terminal classes (thanks to Serge Voloshenyuk)
  • Scanner.frame, we assume now that every unknown compiler supports swprintf (thanks to John David Duncan)
  • #line directives for the parser, command line option -lines (thanks to Andrey Maykov)
  • Minor change: Code cleanup.
  • New release: Jan, 5 2009
  • Minor Change: Added parenthesis around && expressions to satisfy paranoid c++ compilers (thanks to Andrey Maykov).
  • New release: Dec, 19 2008
  • Bugfix: Robust namespace generation, for nested namespaces (thanks to Seth Heeren).
  • New release: Nov, 6 2008
  • Minor change: Code cleanup.
  • New release: Nov, 1 2008
  • Minor change: More robust Scanner, never assign Buffer.EOF to a char (which results in an overflow, should do no harm).
  • New release: Oct, 1 2008
  • Bugfix: bug in the construction of the scanner automaton fixed.
  • Minor change: More robust Peek method is Scanner.
  • Minor change: Allow underscores (_) in identifiers.
  • Minor change: Allow non-printable characters (smaller 32 or bigger 127) in keywords (thanks to Guram Dukashvili).
  • Minor change: Use only one variable 'i' in Scanner::Init(), support for old C++ compilers (thanks to Ory Chowaw-Liebman).
  • Minor change: Generate token codes as enumeration values instead of fields, simplifies the code (thanks to Andrey Maykov).
  • Better unicode support, Buffer::GetString(int beg, int end) returns now wide chars.
  • Bugfix: Buffer was defined as array of char which lead to troubles because of the signed nature of the type char. Fix: we use now unsigned char for the buffer.
  • Feature: Possibility to declare nested namespaces with the "-namespace" option. Just separate namespace names single colons, e.g.: Coco -namespace A:B Sample.atg
  • Update to version "Sep 6, 2007":
    Enhanced support for input streams: Previously we did support files via file names and file streams via input streams, but not non seek-able streams (e.g. network). Now we support both stream types. Please note since our memory buffer keeps the entire history of a stream, the maximum supported stream size is limited by the available memory and the runtime environment.
  • The possibility to set the output path with command line option "-o".
  • Main method returns 1 if the grammar contained an error.
  • Possibility to parse strings (Scanner).
  • Most wchar_t parameters are now const to allow literals.
  • Arrays will now be deleted with "delete[]".
  • Reworked pointer arithmetics to support 64 bit architectures.
  • Minor change in Scanner.frame, memory leak fixed.
  • Minor change in Scanner.frame, the scanner constructor has now a const parameter for the file name.
  • The declaration of standard whitespaces (namely space) is again done in the file Scanner.frame.
  • Code cleanup: The start set is no field in Parser anymore, but a static variable in the method StartOf. Result: Faster; no generated "new" in Parser, thus easier to handle failing "new"s; lesser code.
  • Changed %c to %lc to be more standard compliant, the "l" is in some compilers optional and stands for long (character).
  • Bugfix in CONTEXT shifts in token declarations (syntax error in generated source code).
  • Use "/" instead of "\\" as file separator char.
  • Use __GNUC__ instead of __gpp to recognize the Gnu compiler.
  • Updated example "Taste".
  • After minor bug fixes in the beta version 2006-09-11 according to wide characters it's considered stable.
  • Misplaced resolvers cause warnings instead of erros now.
  • Release of a new beta version with the following features:
    • The scanners generated by Coco/R can now also process Unicode characters in UTF-8 format. This implies that Coco/R itself supports UTF-8 now.
    • Attributes may now also contain the characters '<' and '>' (e.g. for operators or generic types). Such attributes must be enclosed in <. and .> brackets.
    • The literal recognition for keywords works now with a hash table instead of an if-else-if cascade.
  • bug fix in Scanner.frame, pt and tokens must point to the same token at the beginning of a peek run. This problem affected only the c++ version of Coco/R.
  • bug fix in DFA.cpp, definition of T and x moved to Parser.cpp
  • Some memory leaks in Scanner fixed
  • Constant declarations are generated for pragma names in the parser now (in case you want to access those names in semantic actions).
  • Warnings (defined but not used labels) in Scanner::NextToken() fixed
  • Bug fixed in Tab. Coco reported a misplaced resolver if 2 alternatives at the end of a production were deletable and a resolver was placed in front of the first one.
  • Bug fix in Scanner.frame (IGNORECASE did not work correctly)
  • First release of this C++ version.