X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/2c7465aca4457e99441bb44d47da14291d7d779a..de869fc8c8f988f5551802bf1887a1e9b8f4d6cf:/doc/parsing.tex

diff --git a/doc/parsing.tex b/doc/parsing.tex
index 58959c0..28a747b 100644
--- a/doc/parsing.tex
+++ b/doc/parsing.tex
@@ -7,7 +7,7 @@
 
 %%%----- Licensing notice ---------------------------------------------------
 %%%
-%%% This file is part of the Sensble Object Design, an object system for C.
+%%% This file is part of the Sensible Object Design, an object system for C.
 %%%
 %%% SOD is free software; you can redistribute it and/or modify
 %%% it under the terms of the GNU General Public License as published by
@@ -124,11 +124,12 @@ consumed any input items.
 \end{describe*}
 
 \begin{describe}{mac}
-    {with-default-error-location (@<floc>) @<body-form>^* @> @<value>^*}
+    {with-default-error-location (@<floc>) @<declaration>^* @<form>^*
+      @> @<value>^*}
 \end{describe}
 
 \begin{describe}{mac}
-    {count-and-report-errors () @<body-form>^*
+    {count-and-report-errors () @<declaration>^* @<form>^*
       @> @<value> @<n-errors> @<n-warnings>}
 \end{describe}
 
@@ -209,7 +210,8 @@ the scanner and read that data again.  Therefore it's possible to
 \end{describe}
 
 \begin{describe}{mac}
-    {with-scanner-place (@<place> @<scanner>) @<body-form>^* @> @<value>^*}
+    {with-scanner-place (@<place> @<scanner>) @<declarations>^* @<form>^*
+      @> @<value>^*}
   Capture the @<scanner>'s current position as a place, evaluate the
   @<body-form>s as an implicit progn with the variable @<place> bound to the captured
   place.  When control leaves the @<body-form>s, the place is released.  The return
@@ -446,14 +448,16 @@ file-location protocols.
 \begin{describe}{mac}
     {defparse @<name> (@[[ :context (@<var> @<context-class>) @]]
                        @<destructuring-lambda-list-item>^*) \\ \ind
-      @<body-form>^* \-
+      @[[ @<declaration>^* @! @<doc-string> @]] \\
+      @<form>^* \-
      \nlret @<name>}
 \end{describe}
 
 \begin{describe}{mac}
     {with-parser-context
         (@<context-class> @{ @<init-keyword> @<value> @}^*) \\ \ind
-      @<body-form>^* \-
+      @<declaration>^* \\
+      @<form>^* \-
      \nlret @<value>^*}
 \end{describe}
 
@@ -461,6 +465,13 @@ file-location protocols.
     {parse @<parser> @> @<result> @<success-flag> @<consumed-flag>}
 \end{describe}
 
+\begin{describe}{mac}
+    {parser @<lambda-list>
+      @[[ @<declaration>^* @! @<doc-string> @]]
+      @<parser>
+      @> @<function>}
+\end{describe}
+
 \begin{describe}{gf}{parser-at-eof-p @<context> @> @<form>}
 \end{describe}
 
@@ -482,7 +493,7 @@ file-location protocols.
 
 \begin{describe}{mac}
     {when-parse (@[@<result-var>@]) @<parser> \\ \ind
-      @<body-form>^* \-
+      @<form>^* \-
      \nlret @<value>^*}
 \end{describe}
 
@@ -563,7 +574,9 @@ file-location protocols.
 \end{describe}
 
 \begin{describe}{mac}
-    {define-pluggable-parser @<symbol> @<tag> @<lambda-list> @<body-form>^*}
+    {define-pluggable-parser @<symbol> @<tag> @<lambda-list>
+      @[[ @<declaration>^* @! @<doc-string> @]]
+      @<form>^*}
 \end{describe}
 
 \begin{describe}{gf}{parser-capture-place @<context> @> @<form>}
@@ -580,7 +593,9 @@ file-location protocols.
 \end{describe}
 
 \begin{describe}{mac}
-    {with-parser-place (@<place-var> @<context>) @<body-form>^*}
+    {with-parser-place (@<place-var> @<context>)
+      @[[ @<declaration>^* @! @<doc-string> @]]
+      @<form>^*}
 \end{describe}
 
 \begin{describe}{parseform}{peek @<parser>}
@@ -704,14 +719,14 @@ file-location protocols.
 
 \begin{describe*}
     {\dhead{mac}{preop @<name> (@<operand-var> @<lprec>)
-                  @<body-form>^*
+                  @<declaration>^* @<form>^*
                   @> @<prefix-operator>}
      \dhead{mac}{postop @<name>
                      (@<operand-var> @<lprec> @[[ :rprec @<rprec> @]])
-                  @<body-form>^*
-                  @> @<postfix-operator>}
+                  @<declaration>^* @<form>^*
+                  \nlret @<postfix-operator>}
      \dhead{mac}{binop @<name> (@<operand-var> @<lprec> @<rprec> @<assoc>)
-                  @<body-form>^*
+                  @<declaration>^*@<form>^*
                   @> @<binary-operator>}}
 \end{describe*}
 
