[Oberon] Module aliases - what is the correct way to handle them

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Mon Feb 17 00:19:34 CET 2020


Luca,

as per our (off-list) discussion, the following compilers now also compile your programs M0 and M7 below:

1. Two-pass solution: (+25 lines more than FPGA Oberon)

    http://github.com/andreaspirklbauer/Oberon-test-module-aliases/blob/master/Sources/ORB12.Mod

    http://github.com/andreaspirklbauer/Oberon-test-module-aliases/blob/master/Sources/ORP12.Mod

2. One-pass solution: (+40 lines more than FPGA Oberon)

    http://github.com/andreaspirklbauer/Oberon-test-module-aliases/blob/master/Sources/ORB13.Mod

Thanks for your great input on:

    http://github.com/andreaspirklbauer/Oberon-test-module-aliases/issues/1

-ap


   > oberonc <https://github.com/lboasso/oberonc> implements the module systems
   > based on the ideas of  "On the Linearization of Graphs and Writing Symbol
   >Files (1991)” <http://e-collection.library.ethz.ch/eserv/eth%3A3310/eth-3310-01.pdf>
   >
   > The following example compiles and run:
   >
   > MODULE M0;
   >   TYPE T0* = RECORD i: INTEGER END ;
   > END M0.
   >
   > MODULE M7;
   >  IMPORT Y := M0, M0, X := M0,
   >     S1 := SYSTEM, S2 := SYSTEM;
   > VAR a: Y.T0;
   >     b: M0.T0;
   >     c: X.T0;
   >     i: INTEGER;
   >  BEGIN
   >    a := b;
   >    c := a;
   >    i := S1.VAL(INTEGER, {1});
   >    i := S2.VAL(INTEGER, {2})
  > END M7.


More information about the Oberon mailing list