22 van Wijngaarden, et al.• let P be some {derived} production rule for N;• a copy is taken of N;• a sequence of production trees, the "direct descendents" of T, oneproduced for each nonempty member of some alternative A of P, isattached to the copy; the order of the sequence is the order of thosemembers within A;• the copy of the original, together with the attached directdescendents, comprise the production tree T.A "production tree" for a symbol consists of a copy of that symbol {i.e.,it consists of a symbol}.The "terminal production" of a production tree T is a sequenceconsisting of the terminal productions of the direct descendents of T, takenin order.The "terminal production" of a production tree consisting only of asymbol is that symbol.{Example:'exponeNt part"II'times ten to the'power of ten'power choice' [I'plusminus'fixed! pointoption'numeral'II'plusminus''digit cyphersequence"II'digitcypher'I"digitzero'I'digit cyphersequence"I'digitcypher'I"digittWO'I'letter e 'plus 'digit zero 'digit twosymbol' symbol' symbol' symbol' }{The terminal production of this tree is the sequence of symbols at• the bottom of the tree. In the reference language, its representation wouldbe e+02.}A "terminal production" of a notion is the terminal production of someproduction tree for that notion {thus there are many other terminalproductions of 'exponent part' besides the one shown}.ALGOL 6a Revised Report 23{The syntax of the strict language has been chosen in such a way that agiven sequence of symbols which is a terminal production of some notionis so by virtue of a unique production tree, or by a set of production treeswhich differ only in such a way that the result of their elaboration is thesame (e.g., production trees derived from rules 3.2.1.e (balancing),1.3.l.d,e (predicates) and 6.7.1.a,b (choice of spelling of the mode of acoercend to be voided); see also 2.2.2.a).Therefore, in practice, terminal productions (or representationsthereof) are used, in this Report and elsewhere, in place of productiontrees. Nevertheless, it is really the production trees in terms of which theelaboration of programs is defined by the semantics of this Report, whichis concerned with explaining the meaning of those constructs whoseoriginals are the notion 'program'.}g) A production tree P is a "descendent" of a production tree Q if it isa direct descendent {f} either of O or of a descendent of O. O is said to"contain" its descendents and those descendents are said to be "smaller"than O. {For example, the production tree'plusminus option'I'plusminus'I'plus symbol'occurs as a descendent in (and is contained within and is smaller than)the production tree for 'exponent part' given above.}h) A "visible" ("invisible") production tree is one whose terminalproduction is not (is) empty.i) A descendent {g} t9 of a production tree T is "before" ("after") adescendent Y of T if the terminal production {f} of U is before (after) thatof V in the terminal production of T. The {partial} ordering of thedescendents of T thus defined is termed the "textual order". {In theexample production tree for "exponent part' (f), the production tree whoseoriginal is "plusminus' is before that whose original is 'digit two'.}j) A descendent A of a production tree "follows" ("precedes") anotherdescendent B in some textual order if A is after (before) B in that textualorder, and there exists no visible {h} descendent C which comes between Aand B. {Thus "immediately" following (preceding) is implied.}k) A production tree A is "akin" to a production tree B if the terminalproduction {f} of A is identical to the terminal production of B.1.1.3.3. Metaproduction rules and simple substitution{The metaproduction rules of the language form a set of context-freegrammars defining a "metalanguage".}
24 van Wijngaarden, et al.a) The "metaproduction rules" {b} of the language are those given inthe sections of this Report whose heading begins with "Syntax","Metasyntax" or "Metaproduction rules", together with those obtained asfollows:• for each given metaproduction rule, whose metanotion is M say,additional rules are created each of which consists of a copy of Mfollowed by one of the large syntactic marks "0", "l", "2", "3", "4","5", "6", "7", "8" or "9", followed by two colons, another copy of that Mand a point.{Thus, the metaproduction rule "MODEl :: MODE." is to be added.}b) A "metaproduction rule" consists of the following items, in order:an optional asterisk ;a nonempty sequence M of large syntactic marks ;two colons ;a nonempty sequence of hypernotions {l.l.3.1.e} separated bysemicolons ;a point.It is said to be a metaproduction rule "for" {the metanotion (1.1.3.l.d)} M.{The asterisk, if present, signifies that the metanotion is not used inother metaproduction rules or in hyper-rules, but is provided to facilitatediscussion in the semantics.}{Examples:INTREAL :: SIZETY integral ; SIZETY real. (1.2.1.C) •SIZETY :: long LONGSETY ; short SHORTSETY ; EMPTY. (1.2.1.D)}c) A "terminal metaproduction" of a metanotion M is any protonotionwhich is a "simple substitute" {d} for one of the hypernotions {on the righthand side} of the metaproduction rule for M.d) A protonotion P is a "simple substitute" for a hypernotion H if acopy of H can be transformed into a copy of P by replacing eachmetanotion M in the copy by some terminal metaproduction of M.{Thus two possible terminal metaproductions (c) of "INTREAL" are'integral' and 'long long real'. This is because the hypernotions 'SIZETYintegral' and 'SIZETY real' (the hypernotions of the metaproduction rulefor "INTREAL") may, upon simple substitution (d), give rise to 'integral'and 'long long real', which, in turn, is because " ' (the empty protonotion)and "long long' are terminal metaproductions of "SIZETY".}{The metanotions used in this Report have been so chosen that noconcatenation of one or more of them gives the same sequence of largesyntactic marks as any other such concatenation. Thus a source ofpossible ambiguity has been avoided.Although the recursive nature of some of the metaproduction rulesmakes it possible to produce terminal metaproduetions of arbitrary length,ALGOL <strong>68</strong> Revised Report 25the length of the terminal metaproductions necessarily involved in theproduction of any given program is finite.}1.1.3.4. Hyper-rules and consistent substitutiona) The hyper-rules {b} of the language are those given in the sections "of this Report whose heading begins with "Syntax".b) A "hyper-rule" consists of the following items, in order:an optional asterisk ;a nonempty hypernotion H ;a colon ;a nonempty sequence of "hyperalternatives" separated bysemicolons ;a point.It is said to be a hyper-rule "for" {the hypernotion (l.l.3.1.e)} H.c) A "hyperalternative" is a nonempty sequence of hypernotionsseparated by commas.{Examples:b) NOTION sequence :NOTION ; NOTION, NOTION sequence. (1.3.3.b)c) NOTION, NOTION sequence }d) A production rule PR {i.I.3.2.b} is derived from a hyper-rule HR if acopy of HR can be transformed into a copy of PR by replacing the set ofall the hypernotions in the copy by a "consistent substitute" {e} for thatset.e) A set of {one or more} protonotions PP is a "consistent substitute"for a corresponding set of hypernotions HH if a copy of HH can betransformed into a copy of PP by means of the following step:Step: If the copy contains one or more metanotions then, for someterminal metaproduction T of one such metanotion M, each occurrenceof M in the copy is replaced by a copy of T and the Step is taken again.{See l.IA.I.a for another application of consistent substitution.}{Applying this derivation process to the hyper-rule given above (c) maygive rise todigit cypher sequence :digit cypher ; digit cypher, digit cypher sequence.which is therefore a production rule of the language. Note thatdigit cypher sequence :digit cypher ; digit cypher, letter b sequence.is not a production rule of the language, since the replacement of themetanotion "NOTION" by one of its terminal metaproductions must beconsistent throughout.}
- Page 2 and 3: van Wijngaarden, et al.1.1.4.2. Par
- Page 4: Acknowledgements{Habent sua fata li
- Page 8 and 9: 14 van Wijngaarden, et al.0.3.4. Mo
- Page 10 and 11: . . . . . . . 4 " ' 0 . . . . . . .
- Page 14 and 15: 26 van Wijngaarden, et al.{Since so
- Page 16 and 17: 30 van Wijngaarden, et aLloperandfo
- Page 18 and 19: 34 van Wijngaarden, et al.j) WHETHE
- Page 20 and 21: 38 van Wijngaarden, et al.A protono
- Page 22 and 23: 42 van Wijngaarden, et al.d) If N i
- Page 24 and 25: 46 van Wijngaarden, et al.c) {There
- Page 26 and 27: 50 van Wijngaarden, et al.c) The ph
- Page 28 and 29: 54 van Wijngaarden, et al.3.1.1. Sy
- Page 30 and 31: 58 van Wijngaarden, et al.where (RO
- Page 32 and 33: 62 van Wijngaarden, et al.1) SOlD N
- Page 34 and 35: 66 van Wijngaarden, et al.ALGOL 68
- Page 36 and 37: 70 van Wijngaarden, et el.For each
- Page 38 and 39: 74 van Wijngaarden, et al.If 'MODE"
- Page 40 and 41: 78 J van Wijngaarden, et al.C) SECO
- Page 42 and 43: 82 van Wijngaarden, et al.ALGOL 68
- Page 44 and 45: 86 van Wijngaarden. et al.ALGOL 68
- Page 46 and 47: 90 van Wijngaarden, et al.5.4.4.1.
- Page 48 and 49: 94van Wijngaarden, et al.ALGOL 68 R
- Page 50 and 51: 98 van Wijngaarden, et al.Assignati
- Page 52 and 53: 102 van Wijngaarden, et at.{A nest,
- Page 54 and 55: 106 van Wijngaarden, et al.'HEAD's
- Page 56 and 57: 110 van Wijngaarden, et al.ALGOL 68
- Page 58 and 59: 114van Wijngaarden, et al.ALGOL 68
- Page 60 and 61: 118 van Wijngaarden, et al.ALGOL 68
- Page 62 and 63:
122 van Wijngaarden, et al.style ii
- Page 64 and 65:
126 van Wijngaarden, et al.b) The c
- Page 66 and 67:
130van Wijngaarden, et al.ALGOL 68
- Page 68 and 69:
134van Wijngaarden, et al.ALGOL 68
- Page 70 and 71:
138d)e)f)g)h)i)J)k)1)m)n)van Wijnga
- Page 72 and 73:
142 van Wijngaarden, et al.physics
- Page 74 and 75:
146 van Wijngaarden, et al.gg) On s
- Page 76 and 77:
150van Wijngaarden, et al.ALGOL 68
- Page 78 and 79:
154/van Wijngaarden, et al.ALGOL 68
- Page 80 and 81:
158 van Wijngaarden, et el.fi;ref p
- Page 82 and 83:
162van Wijngaarden, et al.ALGOL 68
- Page 84 and 85:
166van Wijngaarden, et al.ALGOL 68
- Page 86 and 87:
170/van Wijngaarden, etal.ALGOL 68
- Page 88 and 89:
174J)K)L)M)N)O)P)a)b)c)d)e)van Wijn
- Page 90 and 91:
178/van Wijngaarden, et al.ALGOL 68
- Page 92 and 93:
182 van Wijngaarden, et al.• let
- Page 94 and 95:
186van Wijngaarden, et al./ALGOL 68
- Page 96 and 97:
190 van Wijngaarden, etal.composed
- Page 98 and 99:
194h)i)J)van Wijngaa(rden, et al.pr
- Page 100 and 101:
198 van Wijngaarden, et al.¢ strin
- Page 102 and 103:
202tvan Wijngaarden, et al.ALGOL 68
- Page 104 and 105:
206 van Wijngaa~den. et al.10.3.6.1
- Page 106 and 107:
210 van Wijngaarden, et al.!ALGOL 6
- Page 108 and 109:
214 van Wijngaarden, et al.inoperat
- Page 110 and 111:
218fvan Wijngaarden, et al.¢ move
- Page 112 and 113:
222 van Wijngaarden, etaL{overflow}
- Page 114 and 115:
226 van Wijngaarden, et al.ALGOL 68
- Page 116 and 117:
230max int 10.2.1.cmax real 10.2.l.
- Page 118 and 119:
234 van Wijngaarden, et al.ALGOL 68