X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/e38e83673b59b89d7af42f4c3f177aa0f6eafeb5..c6b4ed992d81518f240509e6ab212d8fe705485a:/doc/parsing.tex

diff --git a/doc/parsing.tex b/doc/parsing.tex
index cd0e12f..22960ee 100644
--- a/doc/parsing.tex
+++ b/doc/parsing.tex
@@ -63,6 +63,11 @@ consumed any input items.
      \dhead{gf}{setf (position-aware-stream-column @<stream>) @<fixnum>}}
 \end{describe*}
 
+\begin{describe*}
+    {\dhead{cls}{position-aware-input-stream \&key :file :line :column}
+     \dhead{cls}{position-aware-output-stream \&key :file :line :column}}
+\end{describe*}
+
 \begin{describe}{gf}{stream-pathname @<stream> @> @<pathname-or-nil>}
   \begin{describe}{meth}{stream}
       {stream-pathname (@<stream> stream) @> nil}
@@ -136,6 +141,9 @@ consumed any input items.
        {information-with-location (condition-with-location information) \\ \>
          \&key :location}
      \dhead{cls}
+       {enclosing-condition-with-location (condition)           \\ \>
+         \&key :location}
+     \dhead{cls}
        {enclosing-error-with-location
            (enclosing-error-with-location error)                \\ \>
          \&key :condition :location}
@@ -180,7 +188,8 @@ consumed any input items.
      \dhead{fun}{cerror-with-location @<floc> @<continue-string>
                                       @<datum> \&rest @<arguments>}
      \dhead{fun}{cerror*-with-location @<floc> @<datum> \&rest @<arguments>}
-     \dhead{fun}{warn-with-location @<floc> @<datum> \&rest @<arguments>}}
+     \dhead{fun}{warn-with-location @<floc> @<datum> \&rest @<arguments>}
+     \dhead{fun}{info-with-location @<floc> @<datum> \&rest @<arguments>}}
 \end{describe*}
 
 \begin{describe*}
@@ -458,6 +467,10 @@ file-location protocols.
   the scanner will update the location as it reads its input.
 \end{describe}
 
+\begin{describe}{cls}
+    {charbuf-scanner-stream (character-scanner-stream) \&key :scanner}
+\end{describe}
+
 \begin{describe}{cls}{charbuf-scanner-place}
   The class of place objects captured by a charbuf scanner.
 \end{describe}
@@ -513,6 +526,11 @@ file-location protocols.
     {token-scanner () \&key :filename (:line 1) (:column 0)}
 \end{describe}
 
+\begin{describe*}
+    {\dhead{gf}{setf (scanner-line @<scanner>) @<fixnum>}
+     \dhead{gf}{setf (scanner-column @<scanner>) @<fixnum>}}
+\end{describe*}
+
 \begin{describe}{gf}{token-type @<scanner> @> @<type>}
 \end{describe}
 
@@ -542,7 +560,18 @@ file-location protocols.
 \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}
@@ -562,14 +591,6 @@ file-location protocols.
      \-\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}
@@ -611,6 +632,12 @@ file-location protocols.
      \-\nlret @<value>^*}
 \end{describe}
 
+\begin{describe}{cls}{list-parser () \&key :var}
+\end{describe}
+
+
+\subsection{Basic parser syntax} \label{sec:parsing.syntax.basic}
+
 \begin{describe}{parse}{:eof}
 \end{describe}
 
@@ -686,6 +713,9 @@ file-location protocols.
       @<form>^*}
 \end{describe}
 
+
+\subsection{Place-capture protocol} \label{sec:parsing.syntax.place}
+
 \begin{describe}{gf}{parser-capture-place @<context> @> @<form>}
 \end{describe}
 
@@ -711,12 +741,19 @@ file-location protocols.
 \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}{gf}{parser-current-char @<context> @> @<form>}
 \end{describe}
 
+\begin{describe}{cls}
+    {string-parser (character-parser-context) \&key :string :index :length}
+\end{describe}
+
 \begin{describe}{parseform}
     {if-char (@[@<result-var>@]) @<condition> @<consequent> @<alternative>}
 \end{describe}
@@ -760,10 +797,13 @@ file-location protocols.
 \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}{gf}{parse-scanner @<context> @> @<symbol>}
+\begin{describe}{gf}{parser-scanner @<context> @> @<symbol>}
 \end{describe}
 
 \begin{describe}{cls}
@@ -776,14 +816,8 @@ file-location protocols.
       \&key :scanner}
 \end{describe}
 
-\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}
+\subsection{Expression parsing} \label{sec:parsing.syntax.expression}
 
 \begin{describe}{gf}{operator-push-action @<left> @<right>}
 \end{describe}
@@ -839,8 +873,7 @@ file-location protocols.
 \end{describe*}
 
 \begin{describe*}
-    {\dhead{cls}{parenthesis () \&key :tag}
-     \dhead{cls}{open-parenthesis (parenthesis prefix-operator) \&key :tag}
+    {\dhead{cls}{open-parenthesis (parenthesis prefix-operator) \&key :tag}
      \dhead{cls}{close-parenthesis (parenthesis) \&key :tag}}
 \end{describe*}
 
@@ -850,7 +883,7 @@ file-location protocols.
 \end{describe*}
 
 %%%-------------------------------------------------------------------------
-\section{Lexical analyser}
+\section{Lexical analyser} \label{sec:parsing.lexical}
 
 \begin{describe}{cls}
     {sod-token-scanner (token-scanner)
