<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=DE-CH link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hi all</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I successfully compiled the Lola source at https://people.inf.ethz.ch/wirth/Lola/index.html with the LinzOberon system on Windows 10.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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():</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Bug 1:</p><p class=MsoNormal>    ELSIF xtyp IS LSB.ArrayType THEN</p><p class=MsoNormal>      IF xtyp(LSB.ArrayType).eltyp = LSB.bitType THEN</p><p class=MsoNormal>        IF (ytyp IS LSB.ArrayType) & (<b><span style='color:red'>ytyp</span></b>(LSB.ArrayType).eltyp = LSB.bitType) THEN<span style='font-size:10.0pt'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Bug 2: instead of ELSE Err(34) it should be</p><p class=MsoNormal>        <b><span style='color:red'>ELSIF ytyp # LSB.bitType</span></b><b><span style='font-size:10.0pt;color:red'> THEN</span></b><span style='color:red'> </span>Err(34)<span style='font-size:10.0pt'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>After these modifications SmallPrograms.Lola compile</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>br</p><p class=MsoNormal>Joerg<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Gesendet von <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> für Windows 10</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='border:none;padding:0cm'><b>Von: </b><a href="mailto:rochus.keller@bluewin.ch">rochus.keller@bluewin.ch</a><br><b>Gesendet: </b>Freitag, 12. April 2019 23:32<br><b>An: </b><a href="mailto:oberon@lists.inf.ethz.ch">oberon@lists.inf.ethz.ch</a><br><b>Betreff: </b>[Oberon] Assumed issue in the Lola-2 compiler</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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:</p><p class=MsoNormal>voc version: https://github.com/rochus-keller/Lolac/tree/master/Examples/RISC5_translated_by_LSC_LSV </p><p class=MsoNormal>c++ version: https://github.com/rochus-keller/Lolac/tree/master/Examples/RISC5_translated</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Both generated file sets show the wrong type "???" in some declarations; see e.g. RISC5Top.v lines 21 to 26. </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I used the source code from https://people.inf.ethz.ch/wirth/Lola/index.html </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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?</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Best </p><p class=MsoNormal>R.</p><p class=MsoNormal>--</p><p class=MsoNormal>Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems</p><p class=MsoNormal>https://lists.inf.ethz.ch/mailman/listinfo/oberon</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>