commit 70a71e3a9960dc69c0fe784d4ad86dd32e69b9af
parent 1176326a9c3bc646e7ca4e9f0d99aeafd44ba6cb
Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz>
Date: Fri, 9 Feb 2024 19:12:02 -0500
Fill in Entry Format section.
Aside from the thing about italics (which won't be produced in
all output formats), this is the same as it is in the official
PDF.
Diffstat:
1 file changed, 64 insertions(+), 6 deletions(-)
diff --git a/doc/r7rs-small/overview.texinfo b/doc/r7rs-small/overview.texinfo
@@ -194,16 +194,74 @@ not with reference to programmer or program behavior.
@node Entry format
@subsection Entry format
-@strong{This section is incomplete. The Texinfo entry format differs
-from that of the @rsevenrs{} PDF, and may be described here when the
-format is stable.}
-
Chapters @ref{Expressions} and @ref{Standard procedures} are organized
into entries. Each entry describes one language feature or a group of
related features, where a feature is either a syntactic construct or a
-procedure.
+procedure. An entry begins with one or more header lines of the form
+
+@c Use a table to simulate deffn without the indexing.
+@multitable {category:} {template}
+@item
+@var{category}: @tab @var{template}
+@end multitable
+
+for identifiers in the base library, or
+
+@multitable {name library category} {template}
+@item
+@var{name} library @var{category}: @tab @var{template}
+@end multitable
+
+where @var{name} is the short name of a library as defined in
+@ref{Appendix A}.
+
+If @var{category} is ``syntax,'' the entry describes an expression
+type, and the template gives the syntax of the expression type.
+Components of expressions are designated by syntactic variables, which
+are written using angle brackets, for example @svar{expression} and
+@svar{variable}. Syntactic variables are intended to denote segments of
+program text; for example, @svar{expression} stands for any string of
+characters which is a syntactically valid expression. The notation
+
+@display
+@svar{thing@sub{1}} @dots{}
+@end display
+
+indicates zero or more occurrences of a @svar{thing}, and
+
+@display
+@svar{thing@sub{1}} @svar{thing@sub{2}} @dots{}
+@end display
+
+indicates one or more occurrences of a @svar{thing}.
+
+If @var{category} is ``auxiliary syntax,'' then the entry describes a
+syntax binding that occurs only as part of specific surrounding
+expressions. Any use as an independent syntactic construct or
+variable is an error.
+
+If @var{category} is ``procedure,'' then the entry describes a procedure, and
+the header line gives a template for a call to the procedure.
+Thus the header line
+
+@multitable {procedure:} {vector-ref vector k}
+@item
+procedure: @tab @b{vector-ref} @var{vector} @var{k}
+@end multitable
+
+indicates that the procedure bound to the @code{vector-ref} variable takes
+two arguments, a vector @var{vector} and an exact non-negative integer
+@var{k} (see below). The header lines
+
+@multitable {procedure:} {make-vector k fill}
+@item
+procedure: @tab @b{make-vector} @var{k}
+@item
+procedure: @tab @b{make-vector} @var{k} @var{fill}
+@end multitable
-[@dots{}]
+indicate that the @code{make-vector} procedure must be defined to take
+either one or two arguments.
It is an error for a procedure to be presented with an argument
that it is not specified to handle. For succinctness, we follow