[Oberon] Assumed issue in the Lola-2 compiler
Jörg Straube
joerg.straube at iaeth.ch
Sat Apr 13 09:20:00 CEST 2019
Hi all
I successfully compiled the Lola source at https://people.inf.ethz.ch/wirth/Lola/index.html with the LinzOberon system on Windows 10.
After the porting (I only had to change all string assignments to COPY()) and trying to compile SmallPrograms.Lola I detected that LSC.Mod has two bugs in CheckTypes():
Bug 1:
ELSIF xtyp IS LSB.ArrayType THEN
IF xtyp(LSB.ArrayType).eltyp = LSB.bitType THEN
IF (ytyp IS LSB.ArrayType) & (ytyp(LSB.ArrayType).eltyp = LSB.bitType) THEN
Bug 2: instead of ELSE Err(34) it should be
ELSIF ytyp # LSB.bitType THEN Err(34)
After these modifications SmallPrograms.Lola compile
br
Joerg
Gesendet von Mail für Windows 10
Von: rochus.keller at bluewin.ch
Gesendet: Freitag, 12. April 2019 23:32
An: oberon at lists.inf.ethz.ch
Betreff: [Oberon] Assumed issue in the Lola-2 compiler
Meawhile I was able to do some cross-validation of my C++ version of the Lola compiler. I originally wanted to compile the Lola compiler on the Oberon System and translate the Lola RISC5 files to Verilog there. Unfortunately I had no luck with the Oberon System Plugin 2.5 release on Windows 10. Eventually I managed to create an executable of the original Lola-2 compiler using https://github.com/vishaps/voc . I'm aware that this is also a transpiler but at least an independent implementation.
Both Lola-2 compilers - the one created with voc and also my C++ version - produce exactly the same output. Here are the links to the generated files:
voc version: https://github.com/rochus-keller/Lolac/tree/master/Examples/RISC5_translated_by_LSC_LSV
c++ version: https://github.com/rochus-keller/Lolac/tree/master/Examples/RISC5_translated
Both generated file sets show the wrong type "???" in some declarations; see e.g. RISC5Top.v lines 21 to 26.
I used the source code from https://people.inf.ethz.ch/wirth/Lola/index.html
It would be a little surprising if I were the first to encounter this problem. That's why I put my question into the round, who has already seen the problem and how to solve it. Does someone have a version of the Lola-2 which generates other output?
Best
R.
--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
https://lists.inf.ethz.ch/mailman/listinfo/oberon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20190413/3eaa23fd/attachment.html>
More information about the Oberon
mailing list