[Oberon] A C++ version of the Lola-2 compiler and an Oberon to C++compiler

rochus.keller at bluewin.ch rochus.keller at bluewin.ch
Wed Apr 17 12:05:08 CEST 2019


Thank you all again for your support. 

In case you're interested I updated the Oberon to C++ compiler so DIV and MOD are now mapped to the corresponding functions which can be implemented in the _Root class (in _Global.h). The following default implementation is provided:
        static int MOD(int a, int b) { return ( a % b + b ) % b; }
        static int DIV(int a, int b) { return ( a - MOD(a, b) ) / b; }

The C++ generator is part of this repository: https://github.com/rochus-keller/Oberon
The OberonViewer was updated to include the latest generator. It can be downloaded from here: http://software.rochus-keller.info/OberonViewer_win32.zip

With the updated generator and the fixes of the Oberon files provided from this forum I was able to re-generate the Lola-2 compiler: https://github.com/rochus-keller/Lolac
The C++ version of the Lola-2 compiler now generates identical files as the Vishap Oberon version. See
https://github.com/rochus-keller/Lolac/tree/master/Examples/RISC5_translated
https://github.com/rochus-keller/Lolac/tree/master/Examples/RISC5_translated_voc

Best 
R.K.


More information about the Oberon mailing list