diff --git a/Documentation/S3RISCinstall.tar.gz b/Documentation/S3RISCinstall.tar.gz index 5a19f6d2..7cdbd315 100644 Binary files a/Documentation/S3RISCinstall.tar.gz and b/Documentation/S3RISCinstall.tar.gz differ diff --git a/EOS_news.txt b/EOS_news.txt index e476cc4b..6633bbd3 100644 --- a/EOS_news.txt +++ b/EOS_news.txt @@ -36,3 +36,4 @@ 2020-12-31 Modules, ORS, ORG, ORP, ORL, ORX, ORTool, Oberon0 - Add module finalization as a language construct (symbol FINAL) 2021-01-24 ORTool - Decode FLR, FLT, RTI, STI, CLI instructions 2021-04-12 In, Out - In added, Out updated +2021-06-11 ORB - Allow hidden re-imports to coexist with declarations of identifiers or module aliases with the same name diff --git a/README.md b/README.md index c3b64ed4..f64240dc 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ Features * Import any number of modules * Simple batch execution facility -**Last release:** 19.5.2021 +**Last release:** 11.6.2021 -**Last update:** 19.5.2021 +**Last update:** 11.6.2021 The file [**S3RISCinstall.tar.gz**](Documentation/S3RISCinstall.tar.gz) always reflects the *latest* version of Extended Oberon, as described in the file [**EOS_news.txt**](EOS_news.txt). diff --git a/Sources/ORB.Mod b/Sources/ORB.Mod index fa02c3ed..578e0a41 100644 --- a/Sources/ORB.Mod +++ b/Sources/ORB.Mod @@ -72,7 +72,7 @@ MODULE ORB; (*NW 25.6.2014 / AP 4.3.2020 / 5.3.2019 in Oberon-07 / AP 13.5.2 PROCEDURE NewObj*(VAR obj: Object; id: ORS.Ident; class: INTEGER); (*insert new Object with name id*) VAR new, x: Object; BEGIN x := topScope; - WHILE (x.next # NIL) & (x.next.name # id) DO x := x.next END ; + WHILE (x.next # NIL) & ((x.next.name # id) OR (x.next.class = Mod) & ~x.next.rdo) DO x := x.next END ; IF x.next = NIL THEN NEW(new); new.name := id; new.class := class; new.next := NIL; new.rdo := FALSE; new.dsc := NIL; x.next := new; obj := new @@ -84,7 +84,7 @@ MODULE ORB; (*NW 25.6.2014 / AP 4.3.2020 / 5.3.2019 in Oberon-07 / AP 13.5.2 VAR s, x: Object; BEGIN s := topScope; REPEAT x := s.next; - WHILE (x # NIL) & (x.name # ORS.id) DO x := x.next END ; + WHILE (x # NIL) & ((x.name # ORS.id) OR (x.class = Mod) & ~x.rdo) DO x := x.next END ; s := s.dsc UNTIL (x # NIL) OR (s = NIL); RETURN x @@ -184,18 +184,19 @@ MODULE ORB; (*NW 25.6.2014 / AP 4.3.2020 / 5.3.2019 in Oberon-07 / AP 13.5.2 VAR mod: Module; obj, obj1: Object; BEGIN obj1 := topScope; obj := obj1.next; (*search for module*) WHILE (obj # NIL) & (obj(Module).orgname # orgname) DO obj1 := obj; obj := obj1.next END ; - IF obj = NIL THEN (*new module, search for alias*) - obj := topScope.next; - WHILE (obj # NIL) & (obj.name # name) DO obj := obj.next END ; + IF obj = NIL THEN (*new module*) + IF decl THEN obj := topScope.next; (*search for alias*) + WHILE (obj # NIL) & ((obj.name # name) OR ~obj.rdo) DO obj := obj.next END ; + IF obj # NIL THEN ORS.Mark("mult def") END + END ; IF obj = NIL THEN (*insert new module*) NEW(mod); mod.class := Mod; mod.rdo := FALSE; mod.name := name; mod.orgname := orgname; mod.val := key; mod.lev := nofmod; INC(nofmod); mod.type := noType; mod.dsc := NIL; mod.next := NIL; obj1.next := mod; obj := mod - ELSIF decl THEN (*module already present, explicit import by declaration*) - IF obj.rdo THEN ORS.Mark("mult def") ELSE ORS.Mark("conflict with re-import") END - ELSE ORS.Mark("conflict with alias") END + ELSIF decl THEN (*module already present, explicit import by declaration*) + IF obj.rdo THEN ORS.Mark("mult def") ELSE ORS.Mark("invalid import order") END END ; RETURN obj END ThisModule; diff --git a/Sources/System.Mod b/Sources/System.Mod index d2ee6f95..6868bdca 100644 --- a/Sources/System.Mod +++ b/Sources/System.Mod @@ -1,8 +1,8 @@ -MODULE System; (*JG 3.10.90 / NW 12.10.93 / NW 20.6.2016 / AP 19.5.21 Extended Oberon*) +MODULE System; (*JG 3.10.90 / NW 12.10.93 / NW 20.6.2016 / AP 11.6.21 Extended Oberon*) IMPORT SYSTEM, Kernel, Disk, FileDir, Files, Modules, Input, Display, Viewers, Fonts, Texts, Oberon, MenuViewers, TextFrames; - CONST Version* = "Extended Oberon System AP 19.5.21"; + CONST Version* = "Extended Oberon System AP 11.6.21"; StandardMenu = "System.Close System.Copy System.Grow Edit.Search Edit.Store | System.Expand System.Spread System.Clone"; LogMenu = "Edit.Locate Edit.Search System.Copy System.Grow System.Clear | System.Expand System.Spread System.Clone"; SystemLog = "System.Log"; SystemTool = "System.Tool"; SystemBatch = "System.Batch";