[JARGON][COMMITTED] New term Completer

Jose E. Marchesi jemarch@gnu.org
Fri Mar 7 22:37:32 GMT 2025


diff --git a/src/Makefile.am b/src/Makefile.am
index 1b8247f..7b578d4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,6 +22,7 @@ info_TEXINFOS = a68-jargon.texi
 a68_jargon_TEXINFOS = actual-parameter.texi \
                       affirmation.texi \
                       comment.texi \
+                      completer.texi \
                       contraction.texi \
                       development.texi \
                       enquiry-clause.texi \
@@ -70,6 +71,7 @@ man_MANS = a68-jargon.7algol \
            actual-parameter.7algol \
            affirmation.7algol \
            comment.7algol \
+           completer.7algol \
            contraction.7algol \
            development.7algol \
            enquiry-clause.7algol \
diff --git a/src/a68-jargon.texi b/src/a68-jargon.texi
index 8674b40..f3121a4 100644
--- a/src/a68-jargon.texi
+++ b/src/a68-jargon.texi
@@ -106,7 +106,7 @@ Language
 @c * Coercion::
 @c * Collateral Clause::
 * Comment::
-@c * Completer::
+* Completer::
 @c * Completing::
 @c * Component::
 @c * Constant::
@@ -361,6 +361,7 @@ Jose E. Marchesi <jemarch@gnu.org>
 * Actual Parameter::
 * Affirmation::
 * Comment::
+* Completer::
 * Contraction::
 * Development::
 * Enquiry Clause::
@@ -393,6 +394,7 @@ Jose E. Marchesi <jemarch@gnu.org>
 @include actual-parameter.texi
 @include affirmation.texi
 @include comment.texi
+@include completer.texi
 @include contraction.texi
 @include development.texi
 @include enquiry-clause.texi
diff --git a/src/completer.texi b/src/completer.texi
new file mode 100644
index 0000000..3b8b04d
--- /dev/null
+++ b/src/completer.texi
@@ -0,0 +1,91 @@
+@c This file is part of the Algol 68 Jargon File.
+@c
+@c Copyright (C) 2024 Jose E. Marchesi
+@c
+@c You can redistribute and/or modify this document under the terms of
+@c the GNU General Public License as published by the Free Software
+@c Foundation, either version 3 of the License, or (at your option) any
+@c later version.
+@c
+@c Alternatively, permission is granted to copy, distribute and/or modify
+@c this document under the terms of the GNU Free Documentation License,
+@c Version 1.3 or any later version published by the Free Software
+@c Foundation; with no Invariant Sections, no Front-Cover Texts, and no
+@c Back-Cover Texts.
+
+@node Completer
+@section Completer
+
+@c man title completer of a serial clause
+
+@subheading Meaning
+@c man begin MEANING
+Serial clauses contain zero or more declarations and at least one
+unit.  When more than an unit is present then the value yielded by the
+last one is the value yielded by the serial clause.  For example, in
+the serial clause:
+
+@example
+(@B{int} tmp := a; a := b; a / tmp)
+@end example
+
+@noindent
+The value yielded by the unit @code{a / tmp} is the value yielded by
+the serial clause.  Sometimes, however, it is useful to have more than
+one ``exit point'' in a serial clause.  For example:
+
+@example
+@B{begin}
+  @B{int} tmp := a;
+  a := b;
+  @B{if} tmp = 0 @B{then} divbyzero @B{fi};
+  a / temp @B{exit}
+divbyzero:
+  0
+@B{end}
+@end example
+
+When the unit @code{a / temp} in the serial clause above gets
+elaborated, the fact it is separated from the next phrase by an
+@code{@B{exit}} rather than a @R{Go-On Symbol,go-on symbol}
+(semicolon) marks it as an exit point and therefore as a
+@code{@B{mode}-unit} or expression rather than a statement to be
+voided.  The syntax mandates that an @code{@B{exit}} shall always be
+followed by a label.
+
+A @dfn{completer} is the combination of an exit followed by a label.
+
+@example
+   @code{@B{exit}}
+label:
+@end example
+
+The units preceding a completer in a serial clause are
+@code{@B{mode}-units}, i.e. @dfn{expressions}.  In contrast, other
+units in the serial clause but the last one are @code{@B{void}-units},
+also known as @dfn{statements}.
+
+Note that enquiry clauses are not allowed to contain labels, and
+therefore they can't contain completers.  This is to prevent code in
+if-parts, else-parts and do-parts to jump back to the enquiry clause
+of their enclosed clause.
+@c man end
+
+@subheading See Also
+
+@itemize @bullet
+@c @item @ref{Serial Clause}
+@item @ref{Go-On Symbol}
+@c @item @ref{Label}
+@item [II 3.1.4]
+@c @item [RR 4.1.1.b:c]
+@end itemize
+
+@ignore
+@c man begin AUTHOR
+Jose E. Marchesi <jemarch@gnu.org>
+@c man end
+@c man begin SEEALSO
+serial-clause(7algol), [II 3.1.4]
+@c man end
+@end ignore


More information about the Algol68 mailing list