10.07.2015 Views

Algol 68 - ACM Digital Library

Algol 68 - ACM Digital Library

Algol 68 - ACM Digital Library

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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.}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!