From 2c7465aca4457e99441bb44d47da14291d7d779a Mon Sep 17 00:00:00 2001
From: Mark Wooding <mdw@distorted.org.uk>
Date: Sun, 30 Aug 2015 10:58:38 +0100
Subject: [PATCH] doc/: Add more synopses.

---
 doc/clang.tex   | 20 ++++++++++++
 doc/misc.tex    | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 doc/parsing.tex | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 214 insertions(+), 1 deletion(-)

diff --git a/doc/clang.tex b/doc/clang.tex
index bd1053f..52e330d 100644
--- a/doc/clang.tex
+++ b/doc/clang.tex
@@ -908,6 +908,26 @@ Temporary names are represented by objects which implement a simple protocol.
 \begin{describe}{cls}{codegen () \&key :vars :insts (:temp-index 0)}
 \end{describe}
 
+%%%--------------------------------------------------------------------------
+\section{Literal C code fragments} \label{sec:clang.fragment}
+
+\begin{describe}{cls}{c-fragment () \&key :location :text}
+\end{describe}
+
+\begin{describe}{gf}{c-fragment-text @<fragment> @> @<string>}
+\end{describe}
+
+\begin{describe}{fun}
+    {scan-c-fragment @<scanner> @<end-chars>
+      @> @<result> @<success-flag> @<consumed-flag>}
+\end{describe}
+
+\begin{describe}{fun}
+    {parse-delimited-fragment @<scanner> @<begin> @<end> \&key :keep-end
+      \nlret @<result> @<success-flag> @<consumed-flag>}
+\end{describe}
+
+\relax
 %%%----- That's all, folks --------------------------------------------------
 
 %%% Local variables:
diff --git a/doc/misc.tex b/doc/misc.tex
index 2126c16..de62c8e 100644
--- a/doc/misc.tex
+++ b/doc/misc.tex
@@ -414,6 +414,99 @@ These symbols are defined in the @!optparse| package.
 %%%--------------------------------------------------------------------------
 \section{Property sets} \label{sec:misc.pset}
 
+\begin{describe}{fun}{property-key @<name> @> @<keyword>}
+\end{describe}
+
+\begin{describe}{gf}{decode-property @<raw-value> @> @<type> @<value>}
+\end{describe}
+
+\begin{describe}{cls}{property}
+\end{describe}
+
+\begin{describe}{fun}{propertyp @<object> @> @<generalized-boolean>}
+\end{describe}
+
+\begin{describe}{fun}
+    {make-property @<name> @<raw-value> \&key :type :location :seenp}
+\end{describe}
+
+\begin{describe*}
+    {\dhead{fun}{p-name @<property> @> @<name>}
+     \dhead{fun}{setf (p-name @<property>) @<name>}
+     \dhead{fun}{p-value @<property> @> @<value>}
+     \dhead{fun}{setf (p-value @<property>) @<value>}
+     \dhead{fun}{p-type @<property> @> @<type>}
+     \dhead{fun}{setf (p-type @<property>) @<type>}
+     \dhead{fun}{p-key @<property> @> @<symbol>}
+     \dhead{fun}{setf (p-key @<property>) @<symbol>}
+     \dhead{fun}{p-seenp @<property> @> @<boolean>}
+     \dhead{fun}{setf (p-seenp @<property>) @<boolean>}}
+\end{describe*}
+
+\begin{describe}{gf}{decode-property @<raw-value> @> @<type> @<value>}
+\end{describe}
+
+\begin{describe}{gf}
+    {coerce-property-value @<value> @<type> @<wanted> @> @<coerced-value>}
+\end{describe}
+
+\begin{describe}{cls}{pset}
+\end{describe}
+
+\begin{describe}{fun}{psetp @<object> @> @<generalized-boolean>}
+\end{describe}
+
+\begin{describe}{fun}{make-pset @> @<pset>}
+\end{describe}
+
+\begin{describe}{fun}{pset-get @<pset> @<key> @> @<property-or-nil>}
+\end{describe}
+
+\begin{describe}{fun}{pset-store @<pset> @<property> @> @<property>}
+\end{describe}
+
+\begin{describe}{fun}{pset-map @<func> @<pset>}
+\end{describe}
+
+\begin{describe}{mac}{with-pset-iterator (@<iter> @<pset>) @<body-form>^*}
+\end{describe}
+
+\begin{describe}{fun}
+    {store-property @<pset> @<name> @<value> \&key :type :location
+      @> @<property>}
+\end{describe}
+
+\begin{describe}{fun}
+    {get-property @<pset> @<name> @<type> \&optional @<default>
+      @> @<value> @<floc-or-nil>}
+\end{describe}
+
+\begin{describe}{fun}
+    {add-property @<pset> @<name> @<value> \&key :type :location
+      @> @<property>}
+\end{describe}
+
+\begin{describe}{fun}{make-property-set \&rest @<plist> @> @<pset>}
+\end{describe}
+
+\begin{describe}{gf}{property-set @<thing> @> @<pset>}
+\end{describe}
+
+\begin{describe}{fun}{check-unused-properties @<pset>}
+\end{describe}
+
+\begin{describe}{mac}
+    {default-slot-from-property
+        (@<instance> @<slot> @[@<slot-names>@]) \\ \ind\ind
+        (@<pset> @<property> @<type> @[@<prop-var> @<convert-form>^*@]) \- \\
+      @<default-form>^*}
+\end{describe}
+
+\begin{describe}{fun}
+    {parse-property-set @<scanner>
+      @> @<result> @<success-flag> @<consumed-flag>}
+\end{describe}
+
 %%%--------------------------------------------------------------------------
 \section{Miscellaneous translator features} \label{sec:misc.pset}
 
@@ -429,6 +522,9 @@ These symbols are defined in the @!optparse| package.
 \begin{describe}{fun}{exercise}
 \end{describe}
 
+\begin{describe}{fun}{sod-frontend:main}
+\end{describe}
+
 %%%----- That's all, folks --------------------------------------------------
 
 %%% Local variables:
diff --git a/doc/parsing.tex b/doc/parsing.tex
index e39a9e9..58959c0 100644
--- a/doc/parsing.tex
+++ b/doc/parsing.tex
@@ -654,11 +654,108 @@ file-location protocols.
       \&key :scanner}
 \end{describe}
 
-%% FIXME parser-expr
+\begin{describe}{gf}{push-operator @<operator> @<state>}
+\end{describe}
+
+\begin{describe}{gf}{push-value @<value> @<state>}
+\end{describe}
+
+\begin{describe}{gf}{apply-operator @<operator> @<state>}
+\end{describe}
+
+\begin{describe}{gf}{operator-push-action @<left> @<right>}
+\end{describe}
+
+\begin{describe}{parseform}
+    {expr \=(@[[ :nestedp @<nestedp-var> @]]) \+ \\
+            @<operand-parser> @<binop-parser>
+            @<preop-parser> @<postop-parser>}
+\end{describe}
+
+\begin{describe}{gf}{operator-left-precedence @<operator> @> @<prec>}
+\end{describe}
+
+\begin{describe}{gf}{operator-right-precedence @<operator> @> @<prec>}
+\end{describe}
+
+\begin{describe}{gf}{operator-associativity @<operator> @> @<assoc>}
+\end{describe}
+
+\begin{describe}{cls}{prefix-operator () \&key}
+\end{describe}
+
+\begin{describe}{cls}{simple-operator () \&key :name :function}
+\end{describe}
+
+\begin{describe}{cls}
+    {simple-unary-operator (simple-operator) \&key :name :function}
+\end{describe}
+
+\begin{describe*}
+    {\quad\=\kill
+     \dhead{cls}{simple-binary-operator (simple-operator) \\ \>
+                  \&key :name :function :lprec :rprec :associativity}
+     \dhead{cls}{simple-postfix-operator (simple-unary-operator) \\ \>
+                  \&key :name :function :lprec :rprec}
+     \dhead{cls}{simple-prefix-operator
+                    (prefix-operator simple-unary-operator) \\ \>
+                  \&key :name :function :rprec}}
+\end{describe*}
+
+\begin{describe*}
+    {\dhead{mac}{preop @<name> (@<operand-var> @<lprec>)
+                  @<body-form>^*
+                  @> @<prefix-operator>}
+     \dhead{mac}{postop @<name>
+                     (@<operand-var> @<lprec> @[[ :rprec @<rprec> @]])
+                  @<body-form>^*
+                  @> @<postfix-operator>}
+     \dhead{mac}{binop @<name> (@<operand-var> @<lprec> @<rprec> @<assoc>)
+                  @<body-form>^*
+                  @> @<binary-operator>}}
+\end{describe*}
+
+\begin{describe*}
+    {\dhead{cls}{parenthesis () \&key :tag}
+     \dhead{cls}{open-parenthesis (parenthesis prefix-operator) \&key :tag}
+     \dhead{cls}{close-parenthesis (parenthesis) \&key :tag}}
+\end{describe*}
+
+\begin{describe*}
+    {\dhead{fun}{lparen @<tag> @> @<open-paren>}
+     \dhead{fun}{rparen @<tag> @> @<close-paren>}}
+\end{describe*}
 
 %%%-------------------------------------------------------------------------
 \section{Lexical analyser}
 
+\begin{describe}{cls}
+    {sod-token-scanner (token-scanner)
+      \&key :filename (:line 1) (:column 0) :char-scanner}
+\end{describe}
+
+\begin{describe}{fun}{define-indicator @<indicator> @<description>}
+\end{describe}
+
+\begin{describe}{fun}{syntax-error @<scanner> @<expected> \&key :continuep}
+\end{describe}
+
+\begin{describe}{fun}
+    {lexer-error @<char-scanner> @<expected> @<consumed-flag>}
+\end{describe}
+
+\begin{describe}{parseform}
+    {skip-until (@[[ :keep-end @<keep-end-flag> @]]) @<token-type>^*}
+\end{describe}
+
+\begin{describe}{parseform}{error () @<sub-parser> @<recover-parser>}
+\end{describe}
+
+\begin{describe}{fun}
+    {scan-comment @<char-scanner>
+      @> @<result> @<success-flag> @<consumed-flag>}
+\end{describe}
+
 %%%----- That's all, folks --------------------------------------------------
 
 %%% Local variables:
-- 
2.11.0

