Skip to content

Feature Release

Compare
Choose a tag to compare
@rochus-keller rochus-keller released this 11 Apr 14:35
· 314 commits to master since this release

This release adds a C++ code generator as a stand-alone command line application (OBNCPP) and integrated with OberonViewer.

Current features:

  • Generates C++03 compatible code with no other dependencies than the standard libraries
  • Generates stub headers for the synthesized (missing) modules to ease implementing the missing parts
  • Arrays including strings are implemented by C++ template classes
  • Modules are dynamically created to maintain the correct initialization dependencies
  • Comments of the original files are also translated
  • Oberon idents conflicting with C++ keywords are postfixed by underscore
  • The generated code is well readable and maintainable

Note that currently only the subset of Oberon-07 used by the Lola-2 compiler is supported; see https://github.com/rochus-keller/Lolac for an example of the generated code.

Also note that there is no garbage collector code generated yet, but an arena based collector can easily be implemented outside of the generator by customizing the _Root class; future versions will generate a regular mark & sweep collector.