[COMMITTED] algol68: modules syntax fixes in ga68.vw

Jose E. Marchesi jemarch@gnu.org
Sat Mar 29 22:02:27 GMT 2025


---
 gcc/algol68/ga68.vw | 45 +++++++++++++++++++++++++++++++++++++--------
 1 file changed, 37 insertions(+), 8 deletions(-)

diff --git a/gcc/algol68/ga68.vw b/gcc/algol68/ga68.vw
index 6f1da94dfc9..e690a31c0da 100644
--- a/gcc/algol68/ga68.vw
+++ b/gcc/algol68/ga68.vw
@@ -1173,7 +1173,7 @@ b) strong MOID NEST formal hole{5A} :
      formal nest{94d} token, MOID LANGUAGE indication{e,f,-},
        hole indication{d}.
 c) MOID NEST actual hole{A6a} :
-     strong MOI NEST ENCLOSED clause{31a,33a,c,34a,35a,36a,-}.
+     strong MOID NEST ENCLOSED clause{31a,33a,c,34a,35a,36a,-}.
 d) hole indication{b} :
      character denotation{814a} ; row of character denotation{83a}.
 e) MOID ALGOL68 indication{b} : EMPTY.
@@ -1210,7 +1210,7 @@ f) NEST1 user task{d} :
 10.6.1 Syntax
 
 a) MOID NEST new MODSETY ALGOL68 stuffing packet{A7a} :
-     egg{94d} token, hole indication{56d}, is efined as{94d} token,
+     egg{94d} token, hole indication{56d}, is defined as{94d} token,
        MOID NEST new MODSETY actual hole{56c}.
 
 { b) Note that the rules for "MOID NEST new MODSETY LANGUAGE stuffing
@@ -1254,9 +1254,33 @@ k) *digit symbol : DIGIT symbol{94b}.
     c) EGG "abc" = MODULE A = DEF PUB REAL x FED
     d) MODULE B = DEF PUB REAL y FED
 
-  The thre examples above would for a compatible collection of
-  packets when taken in conjunction with the particular-program
-  BEGIN NEST "abc" END }
+  The thre examples above would form a compatible collection of
+  packets when taken in conjunction with the particular-program BEGIN
+  NEST "abc" END }
+
+{ In rule a above, 'MODSETY' envelops the 'MOD's defined by al the
+  definition-module-packets that are being stuffed along with the
+  stuffing-packet.
+
+  In rules c and d, 'MODSETY1' need only envelop the 'MOD's for those
+  modules actually accessed from within that packet.
+
+  The semantics related to packets are only defined if, for a
+  collection of packets being stuffed together, all the 'MOD's
+  enveloped by the various 'MODSETY1's are enveloped by 'MODSETY'.  }
+
+{ A stuffing packet contains the definition of an actual-hole.  For
+  Algol 68 this consists on an enclosed-clause.  For other values of
+  the metanotion 'LANGUAGE' it is different, and it is expected to be
+  translated somehow to an equivalent Algol 68 definition,
+  conceptually naturally.
+
+  A definition module packet contains the definition of an actual-hole
+  which consists in one or more joined module declarations, with the
+  restriction that none of the declared modules shall exist in the
+  static environment at the formal-hole.
+
+  A prelude packet contains one or more joined module declarations.  }
 
 10.7 Compilation systems
 
@@ -1267,7 +1291,7 @@ k) *digit symbol : DIGIT symbol{94b}.
 10.7.1 Syntax
 
 { Note that we use the notion "compilation unit" rather than the
-  original "compilation unit" used in the IFIP modules definition.  }
+  original "compilation input" used in the IFIP modules definition.  }
 
 A) *LAYERS :: LAYER ; LAYERS LAYER.
 
@@ -1281,7 +1305,7 @@ a) compilation unit :
        module interface with MODS{d} option ;
      new LAYER1 new DECS MODSETY STOP particular program{A1g},
        { void new LAYER1 new DECS STOP hole interface,}
-       unless DECS) contains (MODULE),
+       unless (DECS) contains (MODULE),
        joined module interface with MODSETY{b,c} ;
      new LAYER1 new DECS MODSETY1 MODS STOP
          prelude packet of MODS{A6d},
@@ -1292,7 +1316,12 @@ a) compilation unit :
 b) joined module interface with MODS MODSETY{a,b} :
      module interface with MODS{d},
        joined module interface with MODSETY{b,c}.
-c) joined module inteface iwth EMPTY{a,b} : EMPTY.
+c) joined module inteface with EMPTY{a,b} : EMPTY.
+
+{ A compilation-unit is either a stuffing packet, a definition module
+  packet, a particular program, or a prelude packet.  The packets
+  shall be accompanied by the required hole and module interface
+  information.  }
 
 { d) Hyper-rules for "MOID NEST hole interface", "module interface
      with MODS" and "MOID NEST object module".  The terminal
-- 
2.30.2



More information about the Algol68 mailing list