[Oberon] Should hidden re-imports be able to coexist with identifiers

Luca Boasso luke.boasso at gmail.com
Thu May 13 16:56:33 CEST 2021

I agree. The above example works in oberonc
<https://github.com/lboasso/oberonc> (once you make use of the import M1
and global variable M0 since unused identifiers will be an error in
At this point I am more and more convinced that the algorithm from*
Griesemer R. On the Linearization of Graphs and Writing Symbol File* is the
best approach while still being relatively simple to implement.
This corner case and many more are handled and it removes the import order
limitation of Wirth's compiler.

On Thu, May 13, 2021 at 9:33 AM Andreas Pirklbauer <
andreas_pirklbauer at yahoo.com> wrote:

> The following reports a “mult def” error in PO 2013 when compiling M2
>   MODULE M0;
>   END M0.
>   MODULE M1;
>     IMPORT M0;
>     TYPE T1* = RECORD (M0.T0) j: INTEGER END ;
>   END M1.
>   MODULE M2;
>     IMPORT M1;  (*re-imports M0.T0*)
>     VAR M0: INTEGER;  (* <--- "mult def” error message*)
>   END M2.
> In PO2013 this error is reported because the symbol table headed
> by topScope *also* contains the re-imported module M0 (which is
> a bit unfortunate) -- but ORB.NewObj does not check that fact.
> I my mind, M2 should compile with no error message. i.e. hidden
> re-imports should be able to coexist with regular identifiers (since
> one cannot refer to re-imported objects by name anyway).
> Comments?
> --
> 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/20210513/2e5ebf83/attachment.html>

More information about the Oberon mailing list