[COMMITTED] algol68: syntax for the modules and separated compilation extensions
Jose E. Marchesi
jemarch@gnu.org
Sat Mar 29 15:12:29 GMT 2025
---
gcc/algol68/ga68.vw | 480 ++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 459 insertions(+), 21 deletions(-)
diff --git a/gcc/algol68/ga68.vw b/gcc/algol68/ga68.vw
index e7c6c6200ec..6f1da94dfc9 100644
--- a/gcc/algol68/ga68.vw
+++ b/gcc/algol68/ga68.vw
@@ -12,14 +12,34 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details. }
-{ This file contains an annotated description of the GNU Algol 68
- strict language. GNU Algol 68 aims to be a super-language of Algol
- 68. There are however a few deviations which are clearly marked as
- such in this specification.
+{ This file contains an annotated description of the syntax of the GNU
+ Algol 68 strict language. GNU Algol 68 aims to be a super-language
+ of Algol 68.
+
+ Extension to the strict Revised Report incorporated into GNU Algol
+ 68 are:
+
+ [MR] A modules and separated compilation system based on the modules
+ system recomended by IFIP Working Group 2.1 Standing
+ Subcommittee on Algol 68 Support, described in:
+
+ A Modules an Separate Compilation Facility for Algol 68
+ by Lindsey and Boom.
+
+ The metaproduction rules, hyper-rules and hyper-alternatives
+ introduced by each extension are clearly marked in the sections
+ below. You can easily search for them using the extensions tags in
+ the list above. For example, to look for the extensions introduced
+ by the modules and separated compilation system, search for [MR].
+
+ The few deviations to the RR Algol 68 are clearly marked as well in
+ this specification.
A complete description of the semantics of the Algol 68 subset of
- the described language is not included in this file. The reader is
- referred to the Revised Report.
+ the described language and the extensions is not included in this
+ file. The reader is referred to the Revised Report and other
+ documentation corresponding to the extensions, like the GNU Algol 68
+ compiler manual.
The sectioning and the enumeration of metaproduction rules and of
hyper-rules, including cross-references, are the same than in the
@@ -72,18 +92,29 @@ W) TALLY :: i ; TALLY i.
1.2.2 Metaproduction rules associated with phrases and coercion
-A) ENCLOSED :: closed ; collateral ; parallel ; CHOICE{34A} ; loop.
+{ Extensions:
+ [MR] access }
+
+A) ENCLOSED :: closed ; collateral ; parallel ; CHOICE{34A} ;
+ loop ; access.
B) SOME :: SORT MOID NEST.
C) SORT :: strong ; firm ; meek ; weak ; soft.
+{ Modules are activated by means of access-clauses. }
+
1.2.3 Metaproduction rules associated with nests
+{ Extensions:
+ [MR] MODSETY, MOD, MODS, REVSETY, REVS, REV,
+ TAU, INKSETY, INKS, INK }
+
A) NEST :: LAYER ; NEST LAYER.
-B) LAYER :: new DECSETY LABSETY.
+B) LAYER :: new DECSETY LABSETY INKSETY.
C) DECSETY :: DECS ; EMPTY.
D) DECS :: DEC ; DECS DEC.
E) DEC :: MODE TAG{942A} ; priority PRIO TAD{942F} ;
- MOID TALLY TAB{942D} ; DUO TAD{942F} MONO TAM{492K}.
+ MOID TALLY TAB{942D} ; DUO TAD{942F} MONO TAM{492K} ;
+ MOD.
F) PRIO :: i ; ii ; iii ;
iii i ; iii ii ; iii iii ;
iii iii i ; iii iii ii ; iii iii iii.
@@ -92,6 +123,16 @@ H) DUO :: procedure with PARAMETER1 PARAMETER2 yielding MOID.
I) LABSETY :: LABS ; EMPTY.
J) LABS :: LAB ; LABS LAB.
K) LAB :: label TAG{942A}.
+L) MODSETY :: MODS ; EMPTY.
+M) MODS :: MOD ; MODS MOD.
+N) MOD :: module REVS TAB.
+O) REVSETY :: REVS ; EMPTY.
+P) RES :: REV ; REVS REV.
+Q) REV :: TAU reveals DECSETY INKS.
+R) TAU :: MU.
+S) INKSETY :: INKS ; EMPTY.
+T) INKS :: INK ; INKS INK.
+U) INK :: invoked TAU.
{ The primal environment is just 'new'. }
@@ -173,6 +214,12 @@ a) program : program token, strong integral new closed clause{31a}.
3.0.1 Syntax
+{ Extensions:
+ [MR] "NEST module text publishing REVS defining LAYER",
+ "NEST LAYER1 LAYER2 module series with DECSETY
+ without DECSETY",
+ "SOID NEST access clause" }
+
a) *phrase : SOME unit{32d} ; NEST declaration of DECS{41a}.
b) *SORT MODE expression : SORT MODE NEST UNIT{5A}.
c) *statement : strong void NEST UNIT{5A}.
@@ -186,17 +233,23 @@ f) *NEST range :
SOID NEST case part of choice using UNITED{34i} ;
NEST STYLE repeating part with DEC{35e} ;
NEST STYLE while do part{35f} ;
- PROCEDURE NEST routine text{541a,b}.
+ PROCEDURE NEST routine text{541a,b} ;
+ NEST module text publishing REVS defining LAYER{49c,-} ;
+ NEST LAYER1 LAYER2 module series
+ with DECSETY without DECSETY1{49d} ;
+ SOID NEST access clause{36a}.
-{ The rules b) and c) establish a precise definition of "expressions"
+{ The rules b and c establish a precise definition of "expressions"
and "statements". The former are units yielding values of a mode
other than VOID in any context. The later are units in a strong
context with a-posteriori mode of VOID, that get voided. }
-{ The rules d) and e) establish a precise definition of "constants"
- and "variables". The former are either a denotation or an
- identifier of some mode. The second are identifiers of a "reference
- to" mode. }
+{ The rules d and e establish a precise definition of "constants" and
+ "variables". The former are either a denotation or an identifier of
+ some mode. The second are identifiers of a "reference to" mode. }
+
+{ The rule f introduces a paranotion for all the constructs that
+ introduce new ranges. }
3.1 Closed clauses
@@ -212,6 +265,9 @@ a) SOID NEST closed clause{22a,5D,551a,A341h,A349a} :
3.2.1 Syntax
+{ Extensions:
+ [MR] "establishing clause" }
+
a) SOID NEST serial clause defining new PROPSETY{31a,34f,1,35h} :
SOID NEST new PROPSETY series with PROPSETY{b}.
b) SOID NEST series with PROPSETY{a,b,35c} :
@@ -252,6 +308,9 @@ i) *establishing clause :
SOID NEST serial clause defining LAYER{32a} ;
MODE NEST enquiry clause defining LAYER{34c}.
+{ The paranotion establishing-clause encompasses both module-texts and
+ revelations. }
+
3.3 Collateral and parallel clauses
3.3.1 Syntax
@@ -379,15 +438,109 @@ h) NEST3 STYLE do part{3,f} :
strong void NEST3 serial clause defining LAYER4{32a},
STYLE od{94g,-} token.
+3.6 Access clauses
+
+{ Extensions:
+ [MR] GMR }
+
+{ Access clauses contain a controlled-clause, which is an
+ enclosed-clause. XXX }
+
+3.6.1 Syntax
+
+a) SOID NEST access clause{5D,551a,A341h,A349a} :
+ NEST revelation publishing EMPTY defining LAYER{b},
+ SOID NEST LAYER ENCLSED clause{a,31a,33a,c,d,e,34a,35a,-}.
+b) NEST revelation publishing REVSETY
+ defining new DECSETY INKSETY{a,49c} :
+ access{94d} token,
+ NEST joined module call publishing REVSETY revealing REVS{c},
+ where DECSETY INKS revealed by REVS{e,f}
+ and NEST filters INKSETY out of INKS{h}.
+c) NEST joined module call publishing REVSETY revealing RES{b,c} :
+ NEST moule call publishing REVSETY revealing REVS{d,-} ;
+ where (REVSETY) is (REVSETY1 REVSETY2)
+ an (REVS) is (REVS1 REVS2),
+ NEST module call publishing REVSETY1 revealing REVS1{d,-},
+ and also{94f} token,
+ NEST joined module call publishing REVSETY2 revealing REVS2{c}.
+d) NEST module call publishing REVSETY revealing REVS{c} :
+ where (REVSETY) is (EMPTY),
+ module REVS NEST applied module indication with TAB{48b} ;
+ where (REVSETY) is (REVS),
+ public{94d} token,
+ module REVS NEST applied module indication with TAB{48b}.
+e) WHETHER DECSETY1 DECSETY2 INKS1 INKSETY2 revealed by
+ TAU reveals DECSETY1 INKS1 REVSETY3
+ TAU reveals DECSETY1 INKS1 REVSETY4{b,e,f} :
+ WHETHER DECSETY DECSETY2 INKS1 INKSETY2 revealed by
+ TAU reveals DECSETY1 INKS1 REVSETY3 REVSETY4{e,f}.
+f) WHETHER DECSETY1 DECSETY2 INKS1 INKSETY2 revealed by
+ TAU reveals DECSETY1 INKS1 REVSETY2{b,e,f} :
+ WHETHER DECSETY2 INKSETY2 revealed by REVSETY2
+ and DECSETY1 independent DECSETY2{71a,b,c}.
+g) WHETHER EMPTY revealed by EmPTY{e,f} : WHETHER true.
+h) WHETHER NEST filters INKSETY1 out of INKSETY INK{b} :
+ unless INK ientified in NEST{72a},
+ WHETHER (INKSETY) is (INKSETY2 INK)
+ and NEST INK filers INKSETY2 out of INKSETY{h,i} ;
+ where INK identified in NEST{72a},
+ WHETHER NEST filters INKSETY1 out of INKSETY{h,i}.
+i) WHETHER NEST filters EMPTY out of EMPTY{h} : WHETHER true.
+
+{ Examples:
+ a) ACCESS A, B (gets (f, a); puts (a))
+ b) ACCESS A, B
+ c) A, B
+ d) A
+ PUB B }
+
+{ In rule b, the 'invoke TAU's enveloped by 'INKS' represent those
+ modules which might need to be invoked at any module-call whose
+ applied-module-indication identified a particular
+ defining-module-indication, whereas those enveloped by 'INKSETY'
+ represent only those which need invocation in the particular
+ context, the remainder having already being elaborated, as can be
+ determined statically from the 'NEST'. The presence of 'INKSETY' in
+ the nest of all descendent constructs of the access-clause ensures
+ that all modules now invoked will never be invoked again within
+ those descendents. }
+
+{ Rule f ensures the independence of declarations revealed by one
+ revelation; thus
+
+ MODULE A = DEF PUB REAL x FED, B = DEF PUB REAL x FED;
+ ACCESS A, B (x)
+
+ is not produced. However, rule e allows a given declaration to be
+ revealed by two public accesses of the same module, as in
+
+ MODULE A = DEF PUB REAL x FED;
+ MODULE B = ACCESS PUB A DEF REAL y FED,
+ C = ACCESS PUB A DEF REAL z FED;
+ ACCESS B C (x + y + z)
+
+ in which the module-definitions for both B and C reveal x, by virtue
+ of the PUB A in their constituent revelations. }
+
+{ Note that a particular-program may now consist of a
+ joined-label-definition followed by an access-clause. The
+ defining-module- indications identified thereby would be in the
+ library-prelude or the user-prelude. }
+
4 Declarations, declarers and indicators
4.1 Declarations
4.1.1 Syntax
+{ Extensions:
+ [MR] module
+ "declaration with DECSETY without DECSETY1" }
+
A) COMMON :: mode ; priority ; MODINE identity ;
reference to MODINE variable ; MODINE operation ;
- PARAMETER ; MODE FIELDS.
+ PARAMETER ; MODE FIELDS ; module.
{ MODINE :: MODE ; routine. }
a) NEST declaration of DECS{a,32b} :
@@ -405,6 +558,29 @@ c) NEST COMMON joined definition of PROP{b,42a,43a,44a,e,45a,46e,541e} :
d) *definition of PROP :
NEST COMMON definition of PROP{42b,43b,44c,f,45c,46f,541f} ;
NEST label definition of PROP{32}.
+e) NEST declaration with DECSETY without DECSETY1{49e} :
+ where (DECSETY without DECSETY1) is (EMPTY without DECS1),
+ NEST COMMON declaration of DECS1{42a,43a,44a,e,45a,49a,-} ;
+ where (DECSETY without DECSETY1) is (DECS without EMPTY),
+ public{94d} token,
+ NEST COMMON declaration of DECS{42a,43a,44a,e,45a,49a,-} ;
+ where (DECSETY without DECSETY1) is
+ (DECSETY without DECS1 DECSETY2),
+ NEST COMMON declaration of DECS1{42a,43a,44a,e,45a,49a,-},
+ and also{94f} token,
+ NEST declaration with DECSETY without DECSETY2{e} ;
+ where (DECSETY without DECSETY1) is
+ (DECS DECSETY3 without DECSETY1),
+ public{94d} token,
+ NEST COMMON declaration of DECS{42a,43a,44a,e,45a,49a,-},
+ and also{94f} token,
+ NEST declaration with DECSETY3 without DECSETY1{e}.
+
+{ Rule e determines how a "NEST declaration with DECSETY without
+ DECSETY1" results into two groups of declarations. The declarations
+ in 'DECSETY' are public and syntactically preceded by PUB. The
+ declarations in 'DECSETY1 are non-public and are not marked by
+ PUB. }
4.2 Mode declarations
@@ -615,13 +791,18 @@ g) WHETHER MOIDS ravels to MOODS{g,46s} :
4.8.1 Syntax
-A) INDICATOR :: identifier ; mode indication ; operator.
+{ Extensions:
+ [MR] INK, "module indication", "module REVS", "invoked", TAU }
+
+A) INDICATOR :: identifier ; mode indication ; operator ;
+ module indication.
B) DEFIED :: defining ; applied.
C) PROPSETY :: PROPS ; EMPTY.
D) PROPS :: PROP ; PROPS PROP.
-E) PROP :: DEC ; LAB ; FIELD.
-F) QUALITY :: MODE ; MOID TALLY ; DYADIC ; label ; MODE field.
-G) TAX :: TAG ; TAB ; TAD ; TAM.
+E) PROP :: DEC ; LAB ; FIELD ; INK.
+F) QUALITY :: MODE ; MOID TALLY ; DYADIC ; label ; MODE field ;
+ module REVS ; invoked.
+G) TAX :: TAG ; TAB ; TAD ; TAM ; TAU.
a) QUALITY NEST new PROPSETY1 QUALITY TAX PROPSETY2
defining INDICATOR with TAX{32c,35b,42b,43b,44c,f,45c,541f} :
@@ -643,13 +824,120 @@ e) *QUALITY NEST DEFIED indicator with TAX :
f) *MODE DEFIED field seletor with TAG :
MODE field FIELDS DEFIED field selector with TAG{c,d}.
+{ MODs are introduced into a nest by module-declarations.
+ INKs are introduced into a nest by module-calls. }
+
+{ Modules are ascribed to module-indications by means of
+ module-declarations. }
+
+4.9 Module declarations
+
+4.9.1 Syntax
+
+a) NEST1 module declaration of MODS{41a,e} :
+ module{94d} token,
+ NEST1 module joined definition of MODS{41b,c}.
+b) NEST1 module definition of module RESETY REV TAB{41c} :
+ where (REV) is (TAU reveals DECSETY invoked TAU)
+ and (TAB) is (bold TAG),
+ where (NEST1) is (NOTION1 invoked TAU NOTETY2>,
+ unless (NOTION1 NOTETY2) contains (invoked TAU),
+ module REVSETY REV NEST1 defining module indication with TAB{48a},
+ is define as{94d} token,
+ NEST1 module text publishing REVSETY REV defining LAYER{c,-}.
+c) NEST1 module text
+ publishing REVSETY TAU reveals DECSETY INKSETY INK
+ defining new DECSETY1 DECSETY INK{b} :
+ where (INKSETY) is (EMPTY) and (REVSETY) is (EMPTY),
+ def{94d} token,
+ NEST1 new new DECSETY1 DECSETY INK module series
+ with DECSETY without DECSETY1{d},
+ fed{94d} token ;
+ NEST1 revelation publishing REVSETY defining LAYER{36b},
+ def{94d} token,
+ NEST1 LAYER new DECSETY1 DECSETY INK module series
+ with DECSETY without DECSETY1{d},
+ fed{94d} token,
+ where (LAYER) is (new DECSETY2 INKSETY).
+d) NEST3 module series with DECSETY without DECSETY1{c} :
+ NEST3 module prelude with DECSETY without DECSETY1{e},
+ NEST3 module postlude{f} option.
+e) NEST3 module prelude with DECSETY1 without DECSETY2{d,e} :
+ strong void NEST3 unit{32d}, go on{94f} token,
+ NEST3 module prelude with DECSETY1 without DECSETY2{e} ;
+ where (DECSETY1 without DECSETY2) is
+ (DECSETY3 DECSETY4 without DECSETY5 DECSETY6>,
+ NEST3 declaration with DECSETY3 without DECSETY5{41e},
+ go on{94f} token,
+ NEST3 module prelude with DECSETY4 without DECSETY6{e} ;
+ where (DECSETY1 without DECSETY2) is (EMPTY without EMPTY),
+ strong void NEST3 unit{32d} ;
+ NEST3 declaration with DECSETY1 without DECSETY2{41e}.
+f) NEST3 module postlude{d} :
+ postlude{94d} token, srong void NEST3 series with EMPTY{32b}.
+
+g) *module text :
+ NEST module text publishing REVS defining LAYER{c}.
+
+{ Examples:
+ a) MODULE A = DEF STRING s; gets (s);
+ PUB STRING t = "file"+s, PUB REAL a FED,
+ B = ACCESS A DEF PUB INT fd;
+ fopen (fd, file o rdonly)
+ POSTLUDE close (f) FED
+
+ b) A = DEF STRING s; gets (s);
+ PUB STRING t = "file"+s, PUB REAL a FED
+
+ B = ACCESS A DEF PUB FILE f;
+ fopen (fd, file o rdonly)
+ POSTLUDE close (f) FED
+
+ c) DEF STRING s; gets (s);
+ PUB STRING t = "file"+s, PUB REAL a FED
+
+ ACCESS A DEF PUB FILE f;
+ fopen (fd, file o rdonly)
+ POSTLUDE close (f) FED
+
+ d) STRING s; gets (s); PUB STRING t = "file"+s, PUB real a
+
+ PUB FILE f; fopen (fd, file o rdonly) POSTLUDE close (f)
+
+ e) STRING s; gets (s); PUB STRING t = "file"+s, PUB real a
+
+ PUB FILE f; fopen (fd, file o rdonly)
+
+ f) POSTLUDE close (f) }
+
+{ Rule b ensures that a unique 'TAU' is associated with each
+ module-text accessible from any given point in the program. This is
+ used to ensure that an invoke ATU' can be identified in the nest of
+ all descendent constructs of any access-clause or module-text which
+ invokes that module-text.
+
+ In general, a module-text-publishing-REVS-defining-LAYER T makes
+ 'LAYER' visible within itself, and makes the properties revealed by
+ 'REVS' visible wherever T is accessed. 'LAYER' includes both a
+ 'DECSETY' corresponding to its public declarations and an INK' which
+ links T to its unique associated 'TAU' and signifies in the nest
+ that T is now known to be invoked. REVS' always reveals 'DECSETY
+ INKSETY INK' (but not 'DECSETY1'), where INKSETY' signifies the
+ invocation of any other modules accessed by T. 'REVS' may also
+ reveal the publications of the other modules accessed by T if their
+ module-calls within T contained a public-token. }
+
5 Units
5.1 Syntax
+{ Extensions:
+ [MR] formal hole, virtual hole }
+
A) UNIT{32d} ::
assignation{521a} coercee ; identity relation{522a} coercee ;
routine txt{541a,b} coercee ; jump{544a} ; skip{552a} ;
+ formal hole{561b} ; virtual hole{561a} ;
TERTIARY{B}.
B) TERTIARY{A,521b,522a} ::
ADIC formula{542a,b} coercee ; nihil ;
@@ -864,6 +1152,156 @@ a) MOID NEST cast{5D} :
5.5.2 Skips
-5.5.2.a Syntax
+5.5.2.1 Syntax
a) strong MOID NEST skip{5A} : skip{94f} token.
+
+5.6 Holes
+
+5.6.1 Syntax
+
+A) LANGUAGE :: algol sixty eight ; fortran ; c language ; cpp language.
+B) ALGOL68 :: algol sixty eight.
+C) FORTRAM :: fortran.
+D) CLANG :: c language.
+E) CPPLANG :: cpp language.
+F) DLANG :: d language.
+
+a) strong MOID NEST virtual hole{5A} :
+ virtual nest symbol, strong MOID NEST closed clause{31a}.
+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,-}.
+d) hole indication{b} :
+ character denotation{814a} ; row of character denotation{83a}.
+e) MOID ALGOL68 indication{b} : EMPTY.
+f) MOID FORTRAN indication{b} : bold letter f letter o letter r letter t
+ letter r letter a letter n token.
+g) MOID CLANG indication{b} : bold letter c letter l letter a letter n
+ letter g.
+e) MOID CPPLANG indication{b} : bold letter c letter p letter p letter l
+ letter a letter n letter g.
+f) MOID DLANG indication{b} : bold letter d letter l letter a letter n
+ letter g.
+
+{ Since no representation is provided for the virtual-nest-symbol, the
+ user is unable to construct virtual-holes for himself, but a
+ mechanism is provided (10.6.2.a) for constructing them out of
+ formal- and actual-holes. }
+
+10.1.1 Syntax
+
+{ Extensions:
+ [MR] user, user task }
+
+A) EXTERNAL :: user.
+
+f) NEST1 user task{d} :
+ NEST2 particular prelude with DECS{c},
+ NEST2 user prelude with MODSETY{c},
+ NEST2 particular program{g} PACK, go on{94f} token,
+ NEST2 particualr poslude{i},
+ where (NEST2) is (NEST1 new DECS MODSETY STOP).
+
+10.6 Packets
+
+10.6.1 Syntax
+
+a) MOID NEST new MODSETY ALGOL68 stuffing packet{A7a} :
+ egg{94d} token, hole indication{56d}, is efined as{94d} token,
+ MOID NEST new MODSETY actual hole{56c}.
+
+{ b) Note that the rules for "MOID NEST new MODSETY LANGUAGE stuffing
+ packets" for other languages are not explicitly included in the
+ syntax. These rules conceptually transform all such
+ LANGUAGE-stuffing-packets into ALGOL68-stuffing-packets with the
+ same meaning. }
+
+c) NEST new MODSETY1 MODS definition module packet of MODS{A7a} :
+ egg{94d} token, hole indication{56d}, is defined as{94d} token,
+ NEST new MODSETY1 MODS module declaration of MODS{49a},
+ where MODS absent from NEST{e}.
+d) new LAYER1 new DECS MODSETY1 MODS STOP
+ prelude packet of MODS{A7a} :
+ new LAYER1 new DECS MODSETY1 MODS STOP
+ module declaration of MODS{4a},
+ where MODS absent from new LAYER1{e}.
+e) WHETHER MODSETY MOD absent from NEST{c,d} :
+ WHETEHR MODSETY absent from NEST{e,f}
+ and MOD independent PROPSETY{71a,b,c},
+ where PROPSETY collected properties from NEST{g,h}.
+f) WHETHER EMPTY absent from NEST{e} :
+ WHETHER true.
+g) WHETHER PROPSETY1 PROPSETY2 collected properties from
+ NEST new PROPSETY2{e,g} :
+ WHETHER PROPSETY1 collected properties from NEST {g,h}.
+h) WHETHER EMPTY collected properties from new EMPTY{e,g} :
+ WHETHER true.
+
+i) *NEST new PROPSETY packet :
+ MOID NEST new PROPSETY LANGUAGE stuffing packet{a,b} ;
+ NEST new PROPSETY definition module packet of MODS{c} ;
+ NEST new PROPSETY particular program{A1g} ;
+ NEST new PROPSETY prelude packet of MODS{d}.
+j) *letter symbol : LETTER symbol{94a}.
+k) *digit symbol : DIGIT symbol{94b}.
+
+{ Examples:
+
+ a) EGG "abc" = ACCESS A,B (x := 1; y := 2; print (x+y))
+ 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 }
+
+10.7 Compilation systems
+
+{ An implementtion of Algol 68 in which packets of a collection are
+ compiled into a collection of object-modules should conform to the
+ provisions of this section. }
+
+10.7.1 Syntax
+
+{ Note that we use the notion "compilation unit" rather than the
+ original "compilation unit" used in the IFIP modules definition. }
+
+A) *LAYERS :: LAYER ; LAYERS LAYER.
+
+a) compilation unit :
+ MOID NEST new MODSETY LANGUAGE stuffing packet{A6a,b},
+ MOID NEST hole interface{d},
+ joined module interface with MODSETY{b,c} ;
+ NEST new MODSETY1 MODS definition module packet of MODS{A6c},
+ MOID NEST hole interface{d},
+ joined module interface with MODSETY1{b,c},
+ 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),
+ joined module interface with MODSETY{b,c} ;
+ new LAYER1 new DECS MODSETY1 MODS STOP
+ prelude packet of MODS{A6d},
+ { void new LAYER1 new DECS STOP hole interface,}
+ unless (DECS) contains (module),
+ joined module interface with MODSETY1{b,c},
+ module interface with MODS{d} option.
+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.
+
+{ d) Hyper-rules for "MOID NEST hole interface", "module interface
+ with MODS" and "MOID NEST object module". The terminal
+ productions will most likely be in some cryptic notation
+ understood only by the compiler, i.e. the interface data. }
+
+{ The inclusion of the hypernotions "void new LAYER1 new DECS STOP
+ hole interface" within pragmatic remarks in rule a is intended to
+ signify that this information (which describes the standard
+ environment) must clearly be available to the compiler, but that it
+ may well not be provided in the form of an explicit
+ hole-interface. }
--
2.30.2
More information about the Algol68
mailing list