Add some substructure and labels. Promote `with-parser-context' to
first position.
I'm not sure this is completely right, but the previous situation was a
total mess.
\end{describe}
%%%--------------------------------------------------------------------------
\end{describe}
%%%--------------------------------------------------------------------------
-\section{Parsing syntax}
+\section{Parser contexts and parser syntax} \label{sec:parsing.syntax}
+
+
+\subsection{Parser contexts} \label{sec:parsing.syntax.contexts}
+
+\begin{describe}{mac}
+ {with-parser-context
+ (@<context-class> @{ @<init-keyword> @<value> @}^*) \\ \ind
+ @<declaration>^* \\
+ @<form>^*
+ \-\nlret @<value>^*}
+\end{describe}
\begin{describe}{gf}{expand-parser-spec @<context> @<spec> @> @<form>}
\end{describe}
\begin{describe}{gf}{expand-parser-spec @<context> @<spec> @> @<form>}
\end{describe}
\-\nlret @<name>}
\end{describe}
\-\nlret @<name>}
\end{describe}
-\begin{describe}{mac}
- {with-parser-context
- (@<context-class> @{ @<init-keyword> @<value> @}^*) \\ \ind
- @<declaration>^* \\
- @<form>^*
- \-\nlret @<value>^*}
-\end{describe}
-
\begin{describe}{lmac}
{parse @<parser> @> @<result> @<success-flag> @<consumed-flag>}
\end{describe}
\begin{describe}{lmac}
{parse @<parser> @> @<result> @<success-flag> @<consumed-flag>}
\end{describe}
\-\nlret @<value>^*}
\end{describe}
\-\nlret @<value>^*}
\end{describe}
+
+\subsection{Basic parser syntax} \label{sec:parsing.syntax.basic}
+
\begin{describe}{parse}{:eof}
\end{describe}
\begin{describe}{parse}{:eof}
\end{describe}
@<form>^*}
\end{describe}
@<form>^*}
\end{describe}
+
+\subsection{Place-capture protocol} \label{sec:parsing.syntax.place}
+
\begin{describe}{gf}{parser-capture-place @<context> @> @<form>}
\end{describe}
\begin{describe}{gf}{parser-capture-place @<context> @> @<form>}
\end{describe}
\begin{describe}{parseform}{commit}
\end{describe}
\begin{describe}{parseform}{commit}
\end{describe}
+
+\subsection{Character parsers} \label{sec:parsing.syntax.character}
+
\begin{describe}{cls}{character-parser-context () \&key}
\end{describe}
\begin{describe}{cls}{character-parser-context () \&key}
\end{describe}
\begin{describe}{parse}[atom]{@<atom>}
\end{describe}
\begin{describe}{parse}[atom]{@<atom>}
\end{describe}
+
+\subsection{Scanner contexts} \label{sec:parsing.syntax.scanner}
+
\begin{describe}{cls}{scanner-context () \&key :scanner}
\end{describe}
\begin{describe}{cls}{scanner-context () \&key :scanner}
\end{describe}
\&key :scanner}
\end{describe}
\&key :scanner}
\end{describe}
+
+\subsection{Expression parsing} \label{sec:parsing.syntax.expression}
+
\begin{describe}{gf}{push-operator @<operator> @<state>}
\end{describe}
\begin{describe}{gf}{push-operator @<operator> @<state>}
\end{describe}
\end{describe*}
%%%-------------------------------------------------------------------------
\end{describe*}
%%%-------------------------------------------------------------------------
-\section{Lexical analyser}
+\section{Lexical analyser} \label{sec:parsing.lexical}
\begin{describe}{cls}
{sod-token-scanner (token-scanner)
\begin{describe}{cls}
{sod-token-scanner (token-scanner)